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                address_balance: None,
483                coin_balance: None,
484            }
485        }
486        #[doc(hidden)]
487        pub fn default_instance() -> &'static Self {
488            static DEFAULT: super::Balance = super::Balance::const_default();
489            &DEFAULT
490        }
491        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
492        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
493            self.coin_type.as_mut().map(|field| field as _)
494        }
495        ///Returns a mutable reference to `coin_type`.
496        ///If the field is unset, it is first initialized with the default value.
497        pub fn coin_type_mut(&mut self) -> &mut String {
498            self.coin_type.get_or_insert_default()
499        }
500        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
501        pub fn coin_type_opt(&self) -> Option<&str> {
502            self.coin_type.as_ref().map(|field| field as _)
503        }
504        ///Sets `coin_type` with the provided value.
505        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
506            self.coin_type = Some(field.into().into());
507        }
508        ///Sets `coin_type` with the provided value.
509        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
510            self.set_coin_type(field.into());
511            self
512        }
513        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
514        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
515            self.balance.as_mut().map(|field| field as _)
516        }
517        ///Returns a mutable reference to `balance`.
518        ///If the field is unset, it is first initialized with the default value.
519        pub fn balance_mut(&mut self) -> &mut u64 {
520            self.balance.get_or_insert_default()
521        }
522        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
523        pub fn balance_opt(&self) -> Option<u64> {
524            self.balance.as_ref().map(|field| *field)
525        }
526        ///Sets `balance` with the provided value.
527        pub fn set_balance(&mut self, field: u64) {
528            self.balance = Some(field);
529        }
530        ///Sets `balance` with the provided value.
531        pub fn with_balance(mut self, field: u64) -> Self {
532            self.set_balance(field);
533            self
534        }
535        ///If `address_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
536        pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
537            self.address_balance.as_mut().map(|field| field as _)
538        }
539        ///Returns a mutable reference to `address_balance`.
540        ///If the field is unset, it is first initialized with the default value.
541        pub fn address_balance_mut(&mut self) -> &mut u64 {
542            self.address_balance.get_or_insert_default()
543        }
544        ///If `address_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
545        pub fn address_balance_opt(&self) -> Option<u64> {
546            self.address_balance.as_ref().map(|field| *field)
547        }
548        ///Sets `address_balance` with the provided value.
549        pub fn set_address_balance(&mut self, field: u64) {
550            self.address_balance = Some(field);
551        }
552        ///Sets `address_balance` with the provided value.
553        pub fn with_address_balance(mut self, field: u64) -> Self {
554            self.set_address_balance(field);
555            self
556        }
557        ///If `coin_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
558        pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
559            self.coin_balance.as_mut().map(|field| field as _)
560        }
561        ///Returns a mutable reference to `coin_balance`.
562        ///If the field is unset, it is first initialized with the default value.
563        pub fn coin_balance_mut(&mut self) -> &mut u64 {
564            self.coin_balance.get_or_insert_default()
565        }
566        ///If `coin_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
567        pub fn coin_balance_opt(&self) -> Option<u64> {
568            self.coin_balance.as_ref().map(|field| *field)
569        }
570        ///Sets `coin_balance` with the provided value.
571        pub fn set_coin_balance(&mut self, field: u64) {
572            self.coin_balance = Some(field);
573        }
574        ///Sets `coin_balance` with the provided value.
575        pub fn with_coin_balance(mut self, field: u64) -> Self {
576            self.set_coin_balance(field);
577            self
578        }
579    }
580    impl super::BalanceChange {
581        pub const fn const_default() -> Self {
582            Self {
583                address: None,
584                coin_type: None,
585                amount: None,
586            }
587        }
588        #[doc(hidden)]
589        pub fn default_instance() -> &'static Self {
590            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
591            &DEFAULT
592        }
593        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
594        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
595            self.address.as_mut().map(|field| field as _)
596        }
597        ///Returns a mutable reference to `address`.
598        ///If the field is unset, it is first initialized with the default value.
599        pub fn address_mut(&mut self) -> &mut String {
600            self.address.get_or_insert_default()
601        }
602        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
603        pub fn address_opt(&self) -> Option<&str> {
604            self.address.as_ref().map(|field| field as _)
605        }
606        ///Sets `address` with the provided value.
607        pub fn set_address<T: Into<String>>(&mut self, field: T) {
608            self.address = Some(field.into().into());
609        }
610        ///Sets `address` with the provided value.
611        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
612            self.set_address(field.into());
613            self
614        }
615        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
616        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
617            self.coin_type.as_mut().map(|field| field as _)
618        }
619        ///Returns a mutable reference to `coin_type`.
620        ///If the field is unset, it is first initialized with the default value.
621        pub fn coin_type_mut(&mut self) -> &mut String {
622            self.coin_type.get_or_insert_default()
623        }
624        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
625        pub fn coin_type_opt(&self) -> Option<&str> {
626            self.coin_type.as_ref().map(|field| field as _)
627        }
628        ///Sets `coin_type` with the provided value.
629        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
630            self.coin_type = Some(field.into().into());
631        }
632        ///Sets `coin_type` with the provided value.
633        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
634            self.set_coin_type(field.into());
635            self
636        }
637        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
638        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
639            self.amount.as_mut().map(|field| field as _)
640        }
641        ///Returns a mutable reference to `amount`.
642        ///If the field is unset, it is first initialized with the default value.
643        pub fn amount_mut(&mut self) -> &mut String {
644            self.amount.get_or_insert_default()
645        }
646        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
647        pub fn amount_opt(&self) -> Option<&str> {
648            self.amount.as_ref().map(|field| field as _)
649        }
650        ///Sets `amount` with the provided value.
651        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
652            self.amount = Some(field.into().into());
653        }
654        ///Sets `amount` with the provided value.
655        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
656            self.set_amount(field.into());
657            self
658        }
659    }
660    impl super::BatchGetObjectsRequest {
661        pub const fn const_default() -> Self {
662            Self {
663                requests: Vec::new(),
664                read_mask: None,
665            }
666        }
667        #[doc(hidden)]
668        pub fn default_instance() -> &'static Self {
669            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
670            &DEFAULT
671        }
672        ///Returns the value of `requests`, or the default value if `requests` is unset.
673        pub fn requests(&self) -> &[super::GetObjectRequest] {
674            &self.requests
675        }
676        ///Returns a mutable reference to `requests`.
677        ///If the field is unset, it is first initialized with the default value.
678        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
679            &mut self.requests
680        }
681        ///Sets `requests` with the provided value.
682        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
683            self.requests = field;
684        }
685        ///Sets `requests` with the provided value.
686        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
687            self.set_requests(field);
688            self
689        }
690        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
691        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
692            self.read_mask.as_mut().map(|field| field as _)
693        }
694        ///Returns a mutable reference to `read_mask`.
695        ///If the field is unset, it is first initialized with the default value.
696        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
697            self.read_mask.get_or_insert_default()
698        }
699        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
700        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
701            self.read_mask.as_ref().map(|field| field as _)
702        }
703        ///Sets `read_mask` with the provided value.
704        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
705            self.read_mask = Some(field.into().into());
706        }
707        ///Sets `read_mask` with the provided value.
708        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
709            mut self,
710            field: T,
711        ) -> Self {
712            self.set_read_mask(field.into());
713            self
714        }
715    }
716    impl super::BatchGetObjectsResponse {
717        pub const fn const_default() -> Self {
718            Self { objects: Vec::new() }
719        }
720        #[doc(hidden)]
721        pub fn default_instance() -> &'static Self {
722            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
723            &DEFAULT
724        }
725        ///Returns the value of `objects`, or the default value if `objects` is unset.
726        pub fn objects(&self) -> &[super::GetObjectResult] {
727            &self.objects
728        }
729        ///Returns a mutable reference to `objects`.
730        ///If the field is unset, it is first initialized with the default value.
731        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
732            &mut self.objects
733        }
734        ///Sets `objects` with the provided value.
735        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
736            self.objects = field;
737        }
738        ///Sets `objects` with the provided value.
739        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
740            self.set_objects(field);
741            self
742        }
743    }
744    impl super::BatchGetTransactionsRequest {
745        pub const fn const_default() -> Self {
746            Self {
747                digests: Vec::new(),
748                read_mask: None,
749            }
750        }
751        #[doc(hidden)]
752        pub fn default_instance() -> &'static Self {
753            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
754            &DEFAULT
755        }
756        ///Returns the value of `digests`, or the default value if `digests` is unset.
757        pub fn digests(&self) -> &[String] {
758            &self.digests
759        }
760        ///Returns a mutable reference to `digests`.
761        ///If the field is unset, it is first initialized with the default value.
762        pub fn digests_mut(&mut self) -> &mut Vec<String> {
763            &mut self.digests
764        }
765        ///Sets `digests` with the provided value.
766        pub fn set_digests(&mut self, field: Vec<String>) {
767            self.digests = field;
768        }
769        ///Sets `digests` with the provided value.
770        pub fn with_digests(mut self, field: Vec<String>) -> Self {
771            self.set_digests(field);
772            self
773        }
774        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
775        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
776            self.read_mask.as_mut().map(|field| field as _)
777        }
778        ///Returns a mutable reference to `read_mask`.
779        ///If the field is unset, it is first initialized with the default value.
780        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
781            self.read_mask.get_or_insert_default()
782        }
783        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
784        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
785            self.read_mask.as_ref().map(|field| field as _)
786        }
787        ///Sets `read_mask` with the provided value.
788        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
789            self.read_mask = Some(field.into().into());
790        }
791        ///Sets `read_mask` with the provided value.
792        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
793            mut self,
794            field: T,
795        ) -> Self {
796            self.set_read_mask(field.into());
797            self
798        }
799    }
800    impl super::BatchGetTransactionsResponse {
801        pub const fn const_default() -> Self {
802            Self { transactions: Vec::new() }
803        }
804        #[doc(hidden)]
805        pub fn default_instance() -> &'static Self {
806            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
807            &DEFAULT
808        }
809        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
810        pub fn transactions(&self) -> &[super::GetTransactionResult] {
811            &self.transactions
812        }
813        ///Returns a mutable reference to `transactions`.
814        ///If the field is unset, it is first initialized with the default value.
815        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
816            &mut self.transactions
817        }
818        ///Sets `transactions` with the provided value.
819        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
820            self.transactions = field;
821        }
822        ///Sets `transactions` with the provided value.
823        pub fn with_transactions(
824            mut self,
825            field: Vec<super::GetTransactionResult>,
826        ) -> Self {
827            self.set_transactions(field);
828            self
829        }
830    }
831    impl super::Bcs {
832        pub const fn const_default() -> Self {
833            Self { name: None, value: None }
834        }
835        #[doc(hidden)]
836        pub fn default_instance() -> &'static Self {
837            static DEFAULT: super::Bcs = super::Bcs::const_default();
838            &DEFAULT
839        }
840        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
841        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
842            self.name.as_mut().map(|field| field as _)
843        }
844        ///Returns a mutable reference to `name`.
845        ///If the field is unset, it is first initialized with the default value.
846        pub fn name_mut(&mut self) -> &mut String {
847            self.name.get_or_insert_default()
848        }
849        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
850        pub fn name_opt(&self) -> Option<&str> {
851            self.name.as_ref().map(|field| field as _)
852        }
853        ///Sets `name` with the provided value.
854        pub fn set_name<T: Into<String>>(&mut self, field: T) {
855            self.name = Some(field.into().into());
856        }
857        ///Sets `name` with the provided value.
858        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
859            self.set_name(field.into());
860            self
861        }
862        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
863        pub fn value_opt(&self) -> Option<&[u8]> {
864            self.value.as_ref().map(|field| field as _)
865        }
866        ///Sets `value` with the provided value.
867        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
868            self.value = Some(field.into().into());
869        }
870        ///Sets `value` with the provided value.
871        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
872            self.set_value(field.into());
873            self
874        }
875    }
876    impl super::CanceledTransaction {
877        pub const fn const_default() -> Self {
878            Self {
879                digest: None,
880                version_assignments: Vec::new(),
881            }
882        }
883        #[doc(hidden)]
884        pub fn default_instance() -> &'static Self {
885            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
886            &DEFAULT
887        }
888        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
889        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
890            self.digest.as_mut().map(|field| field as _)
891        }
892        ///Returns a mutable reference to `digest`.
893        ///If the field is unset, it is first initialized with the default value.
894        pub fn digest_mut(&mut self) -> &mut String {
895            self.digest.get_or_insert_default()
896        }
897        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
898        pub fn digest_opt(&self) -> Option<&str> {
899            self.digest.as_ref().map(|field| field as _)
900        }
901        ///Sets `digest` with the provided value.
902        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
903            self.digest = Some(field.into().into());
904        }
905        ///Sets `digest` with the provided value.
906        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
907            self.set_digest(field.into());
908            self
909        }
910        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
911        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
912            &self.version_assignments
913        }
914        ///Returns a mutable reference to `version_assignments`.
915        ///If the field is unset, it is first initialized with the default value.
916        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
917            &mut self.version_assignments
918        }
919        ///Sets `version_assignments` with the provided value.
920        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
921            self.version_assignments = field;
922        }
923        ///Sets `version_assignments` with the provided value.
924        pub fn with_version_assignments(
925            mut self,
926            field: Vec<super::VersionAssignment>,
927        ) -> Self {
928            self.set_version_assignments(field);
929            self
930        }
931    }
932    impl super::ChangeEpoch {
933        pub const fn const_default() -> Self {
934            Self {
935                epoch: None,
936                protocol_version: None,
937                storage_charge: None,
938                computation_charge: None,
939                storage_rebate: None,
940                non_refundable_storage_fee: None,
941                epoch_start_timestamp: None,
942                system_packages: Vec::new(),
943            }
944        }
945        #[doc(hidden)]
946        pub fn default_instance() -> &'static Self {
947            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
948            &DEFAULT
949        }
950        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
951        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
952            self.epoch.as_mut().map(|field| field as _)
953        }
954        ///Returns a mutable reference to `epoch`.
955        ///If the field is unset, it is first initialized with the default value.
956        pub fn epoch_mut(&mut self) -> &mut u64 {
957            self.epoch.get_or_insert_default()
958        }
959        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
960        pub fn epoch_opt(&self) -> Option<u64> {
961            self.epoch.as_ref().map(|field| *field)
962        }
963        ///Sets `epoch` with the provided value.
964        pub fn set_epoch(&mut self, field: u64) {
965            self.epoch = Some(field);
966        }
967        ///Sets `epoch` with the provided value.
968        pub fn with_epoch(mut self, field: u64) -> Self {
969            self.set_epoch(field);
970            self
971        }
972        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
973        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
974            self.protocol_version.as_mut().map(|field| field as _)
975        }
976        ///Returns a mutable reference to `protocol_version`.
977        ///If the field is unset, it is first initialized with the default value.
978        pub fn protocol_version_mut(&mut self) -> &mut u64 {
979            self.protocol_version.get_or_insert_default()
980        }
981        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
982        pub fn protocol_version_opt(&self) -> Option<u64> {
983            self.protocol_version.as_ref().map(|field| *field)
984        }
985        ///Sets `protocol_version` with the provided value.
986        pub fn set_protocol_version(&mut self, field: u64) {
987            self.protocol_version = Some(field);
988        }
989        ///Sets `protocol_version` with the provided value.
990        pub fn with_protocol_version(mut self, field: u64) -> Self {
991            self.set_protocol_version(field);
992            self
993        }
994        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
995        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
996            self.storage_charge.as_mut().map(|field| field as _)
997        }
998        ///Returns a mutable reference to `storage_charge`.
999        ///If the field is unset, it is first initialized with the default value.
1000        pub fn storage_charge_mut(&mut self) -> &mut u64 {
1001            self.storage_charge.get_or_insert_default()
1002        }
1003        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1004        pub fn storage_charge_opt(&self) -> Option<u64> {
1005            self.storage_charge.as_ref().map(|field| *field)
1006        }
1007        ///Sets `storage_charge` with the provided value.
1008        pub fn set_storage_charge(&mut self, field: u64) {
1009            self.storage_charge = Some(field);
1010        }
1011        ///Sets `storage_charge` with the provided value.
1012        pub fn with_storage_charge(mut self, field: u64) -> Self {
1013            self.set_storage_charge(field);
1014            self
1015        }
1016        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1017        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1018            self.computation_charge.as_mut().map(|field| field as _)
1019        }
1020        ///Returns a mutable reference to `computation_charge`.
1021        ///If the field is unset, it is first initialized with the default value.
1022        pub fn computation_charge_mut(&mut self) -> &mut u64 {
1023            self.computation_charge.get_or_insert_default()
1024        }
1025        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1026        pub fn computation_charge_opt(&self) -> Option<u64> {
1027            self.computation_charge.as_ref().map(|field| *field)
1028        }
1029        ///Sets `computation_charge` with the provided value.
1030        pub fn set_computation_charge(&mut self, field: u64) {
1031            self.computation_charge = Some(field);
1032        }
1033        ///Sets `computation_charge` with the provided value.
1034        pub fn with_computation_charge(mut self, field: u64) -> Self {
1035            self.set_computation_charge(field);
1036            self
1037        }
1038        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1039        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1040            self.storage_rebate.as_mut().map(|field| field as _)
1041        }
1042        ///Returns a mutable reference to `storage_rebate`.
1043        ///If the field is unset, it is first initialized with the default value.
1044        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1045            self.storage_rebate.get_or_insert_default()
1046        }
1047        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
1048        pub fn storage_rebate_opt(&self) -> Option<u64> {
1049            self.storage_rebate.as_ref().map(|field| *field)
1050        }
1051        ///Sets `storage_rebate` with the provided value.
1052        pub fn set_storage_rebate(&mut self, field: u64) {
1053            self.storage_rebate = Some(field);
1054        }
1055        ///Sets `storage_rebate` with the provided value.
1056        pub fn with_storage_rebate(mut self, field: u64) -> Self {
1057            self.set_storage_rebate(field);
1058            self
1059        }
1060        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1061        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1062            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1063        }
1064        ///Returns a mutable reference to `non_refundable_storage_fee`.
1065        ///If the field is unset, it is first initialized with the default value.
1066        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1067            self.non_refundable_storage_fee.get_or_insert_default()
1068        }
1069        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
1070        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1071            self.non_refundable_storage_fee.as_ref().map(|field| *field)
1072        }
1073        ///Sets `non_refundable_storage_fee` with the provided value.
1074        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1075            self.non_refundable_storage_fee = Some(field);
1076        }
1077        ///Sets `non_refundable_storage_fee` with the provided value.
1078        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1079            self.set_non_refundable_storage_fee(field);
1080            self
1081        }
1082        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1083        pub fn epoch_start_timestamp_opt_mut(
1084            &mut self,
1085        ) -> Option<&mut ::prost_types::Timestamp> {
1086            self.epoch_start_timestamp.as_mut().map(|field| field as _)
1087        }
1088        ///Returns a mutable reference to `epoch_start_timestamp`.
1089        ///If the field is unset, it is first initialized with the default value.
1090        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1091            self.epoch_start_timestamp.get_or_insert_default()
1092        }
1093        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1094        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1095            self.epoch_start_timestamp.as_ref().map(|field| field as _)
1096        }
1097        ///Sets `epoch_start_timestamp` with the provided value.
1098        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1099            &mut self,
1100            field: T,
1101        ) {
1102            self.epoch_start_timestamp = Some(field.into().into());
1103        }
1104        ///Sets `epoch_start_timestamp` with the provided value.
1105        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1106            mut self,
1107            field: T,
1108        ) -> Self {
1109            self.set_epoch_start_timestamp(field.into());
1110            self
1111        }
1112        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
1113        pub fn system_packages(&self) -> &[super::SystemPackage] {
1114            &self.system_packages
1115        }
1116        ///Returns a mutable reference to `system_packages`.
1117        ///If the field is unset, it is first initialized with the default value.
1118        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1119            &mut self.system_packages
1120        }
1121        ///Sets `system_packages` with the provided value.
1122        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1123            self.system_packages = field;
1124        }
1125        ///Sets `system_packages` with the provided value.
1126        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1127            self.set_system_packages(field);
1128            self
1129        }
1130    }
1131    impl super::ChangedObject {
1132        pub const fn const_default() -> Self {
1133            Self {
1134                object_id: None,
1135                input_state: None,
1136                input_version: None,
1137                input_digest: None,
1138                input_owner: None,
1139                output_state: None,
1140                output_version: None,
1141                output_digest: None,
1142                output_owner: None,
1143                accumulator_write: None,
1144                id_operation: None,
1145                object_type: None,
1146            }
1147        }
1148        #[doc(hidden)]
1149        pub fn default_instance() -> &'static Self {
1150            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1151            &DEFAULT
1152        }
1153        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1154        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1155            self.object_id.as_mut().map(|field| field as _)
1156        }
1157        ///Returns a mutable reference to `object_id`.
1158        ///If the field is unset, it is first initialized with the default value.
1159        pub fn object_id_mut(&mut self) -> &mut String {
1160            self.object_id.get_or_insert_default()
1161        }
1162        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1163        pub fn object_id_opt(&self) -> Option<&str> {
1164            self.object_id.as_ref().map(|field| field as _)
1165        }
1166        ///Sets `object_id` with the provided value.
1167        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1168            self.object_id = Some(field.into().into());
1169        }
1170        ///Sets `object_id` with the provided value.
1171        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1172            self.set_object_id(field.into());
1173            self
1174        }
1175        ///Sets `input_state` with the provided value.
1176        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1177            mut self,
1178            field: T,
1179        ) -> Self {
1180            self.set_input_state(field.into());
1181            self
1182        }
1183        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1184        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1185            self.input_version.as_mut().map(|field| field as _)
1186        }
1187        ///Returns a mutable reference to `input_version`.
1188        ///If the field is unset, it is first initialized with the default value.
1189        pub fn input_version_mut(&mut self) -> &mut u64 {
1190            self.input_version.get_or_insert_default()
1191        }
1192        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1193        pub fn input_version_opt(&self) -> Option<u64> {
1194            self.input_version.as_ref().map(|field| *field)
1195        }
1196        ///Sets `input_version` with the provided value.
1197        pub fn set_input_version(&mut self, field: u64) {
1198            self.input_version = Some(field);
1199        }
1200        ///Sets `input_version` with the provided value.
1201        pub fn with_input_version(mut self, field: u64) -> Self {
1202            self.set_input_version(field);
1203            self
1204        }
1205        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1206        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1207            self.input_digest.as_mut().map(|field| field as _)
1208        }
1209        ///Returns a mutable reference to `input_digest`.
1210        ///If the field is unset, it is first initialized with the default value.
1211        pub fn input_digest_mut(&mut self) -> &mut String {
1212            self.input_digest.get_or_insert_default()
1213        }
1214        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1215        pub fn input_digest_opt(&self) -> Option<&str> {
1216            self.input_digest.as_ref().map(|field| field as _)
1217        }
1218        ///Sets `input_digest` with the provided value.
1219        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1220            self.input_digest = Some(field.into().into());
1221        }
1222        ///Sets `input_digest` with the provided value.
1223        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1224            self.set_input_digest(field.into());
1225            self
1226        }
1227        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1228        pub fn input_owner(&self) -> &super::Owner {
1229            self.input_owner
1230                .as_ref()
1231                .map(|field| field as _)
1232                .unwrap_or_else(|| super::Owner::default_instance() as _)
1233        }
1234        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1235        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1236            self.input_owner.as_mut().map(|field| field as _)
1237        }
1238        ///Returns a mutable reference to `input_owner`.
1239        ///If the field is unset, it is first initialized with the default value.
1240        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1241            self.input_owner.get_or_insert_default()
1242        }
1243        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1244        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1245            self.input_owner.as_ref().map(|field| field as _)
1246        }
1247        ///Sets `input_owner` with the provided value.
1248        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1249            self.input_owner = Some(field.into().into());
1250        }
1251        ///Sets `input_owner` with the provided value.
1252        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1253            self.set_input_owner(field.into());
1254            self
1255        }
1256        ///Sets `output_state` with the provided value.
1257        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1258            mut self,
1259            field: T,
1260        ) -> Self {
1261            self.set_output_state(field.into());
1262            self
1263        }
1264        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1265        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1266            self.output_version.as_mut().map(|field| field as _)
1267        }
1268        ///Returns a mutable reference to `output_version`.
1269        ///If the field is unset, it is first initialized with the default value.
1270        pub fn output_version_mut(&mut self) -> &mut u64 {
1271            self.output_version.get_or_insert_default()
1272        }
1273        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1274        pub fn output_version_opt(&self) -> Option<u64> {
1275            self.output_version.as_ref().map(|field| *field)
1276        }
1277        ///Sets `output_version` with the provided value.
1278        pub fn set_output_version(&mut self, field: u64) {
1279            self.output_version = Some(field);
1280        }
1281        ///Sets `output_version` with the provided value.
1282        pub fn with_output_version(mut self, field: u64) -> Self {
1283            self.set_output_version(field);
1284            self
1285        }
1286        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1287        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1288            self.output_digest.as_mut().map(|field| field as _)
1289        }
1290        ///Returns a mutable reference to `output_digest`.
1291        ///If the field is unset, it is first initialized with the default value.
1292        pub fn output_digest_mut(&mut self) -> &mut String {
1293            self.output_digest.get_or_insert_default()
1294        }
1295        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1296        pub fn output_digest_opt(&self) -> Option<&str> {
1297            self.output_digest.as_ref().map(|field| field as _)
1298        }
1299        ///Sets `output_digest` with the provided value.
1300        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1301            self.output_digest = Some(field.into().into());
1302        }
1303        ///Sets `output_digest` with the provided value.
1304        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1305            self.set_output_digest(field.into());
1306            self
1307        }
1308        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1309        pub fn output_owner(&self) -> &super::Owner {
1310            self.output_owner
1311                .as_ref()
1312                .map(|field| field as _)
1313                .unwrap_or_else(|| super::Owner::default_instance() as _)
1314        }
1315        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1316        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1317            self.output_owner.as_mut().map(|field| field as _)
1318        }
1319        ///Returns a mutable reference to `output_owner`.
1320        ///If the field is unset, it is first initialized with the default value.
1321        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1322            self.output_owner.get_or_insert_default()
1323        }
1324        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1325        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1326            self.output_owner.as_ref().map(|field| field as _)
1327        }
1328        ///Sets `output_owner` with the provided value.
1329        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1330            self.output_owner = Some(field.into().into());
1331        }
1332        ///Sets `output_owner` with the provided value.
1333        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1334            self.set_output_owner(field.into());
1335            self
1336        }
1337        ///Returns the value of `accumulator_write`, or the default value if `accumulator_write` is unset.
1338        pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1339            self.accumulator_write
1340                .as_ref()
1341                .map(|field| field as _)
1342                .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1343        }
1344        ///If `accumulator_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1345        pub fn accumulator_write_opt_mut(
1346            &mut self,
1347        ) -> Option<&mut super::AccumulatorWrite> {
1348            self.accumulator_write.as_mut().map(|field| field as _)
1349        }
1350        ///Returns a mutable reference to `accumulator_write`.
1351        ///If the field is unset, it is first initialized with the default value.
1352        pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1353            self.accumulator_write.get_or_insert_default()
1354        }
1355        ///If `accumulator_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
1356        pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1357            self.accumulator_write.as_ref().map(|field| field as _)
1358        }
1359        ///Sets `accumulator_write` with the provided value.
1360        pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1361            &mut self,
1362            field: T,
1363        ) {
1364            self.accumulator_write = Some(field.into().into());
1365        }
1366        ///Sets `accumulator_write` with the provided value.
1367        pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1368            mut self,
1369            field: T,
1370        ) -> Self {
1371            self.set_accumulator_write(field.into());
1372            self
1373        }
1374        ///Sets `id_operation` with the provided value.
1375        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1376            mut self,
1377            field: T,
1378        ) -> Self {
1379            self.set_id_operation(field.into());
1380            self
1381        }
1382        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1383        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1384            self.object_type.as_mut().map(|field| field as _)
1385        }
1386        ///Returns a mutable reference to `object_type`.
1387        ///If the field is unset, it is first initialized with the default value.
1388        pub fn object_type_mut(&mut self) -> &mut String {
1389            self.object_type.get_or_insert_default()
1390        }
1391        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1392        pub fn object_type_opt(&self) -> Option<&str> {
1393            self.object_type.as_ref().map(|field| field as _)
1394        }
1395        ///Sets `object_type` with the provided value.
1396        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1397            self.object_type = Some(field.into().into());
1398        }
1399        ///Sets `object_type` with the provided value.
1400        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1401            self.set_object_type(field.into());
1402            self
1403        }
1404    }
1405    impl super::Checkpoint {
1406        pub const fn const_default() -> Self {
1407            Self {
1408                sequence_number: None,
1409                digest: None,
1410                summary: None,
1411                signature: None,
1412                contents: None,
1413                transactions: Vec::new(),
1414                objects: None,
1415            }
1416        }
1417        #[doc(hidden)]
1418        pub fn default_instance() -> &'static Self {
1419            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1420            &DEFAULT
1421        }
1422        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1423        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1424            self.sequence_number.as_mut().map(|field| field as _)
1425        }
1426        ///Returns a mutable reference to `sequence_number`.
1427        ///If the field is unset, it is first initialized with the default value.
1428        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1429            self.sequence_number.get_or_insert_default()
1430        }
1431        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1432        pub fn sequence_number_opt(&self) -> Option<u64> {
1433            self.sequence_number.as_ref().map(|field| *field)
1434        }
1435        ///Sets `sequence_number` with the provided value.
1436        pub fn set_sequence_number(&mut self, field: u64) {
1437            self.sequence_number = Some(field);
1438        }
1439        ///Sets `sequence_number` with the provided value.
1440        pub fn with_sequence_number(mut self, field: u64) -> Self {
1441            self.set_sequence_number(field);
1442            self
1443        }
1444        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1445        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1446            self.digest.as_mut().map(|field| field as _)
1447        }
1448        ///Returns a mutable reference to `digest`.
1449        ///If the field is unset, it is first initialized with the default value.
1450        pub fn digest_mut(&mut self) -> &mut String {
1451            self.digest.get_or_insert_default()
1452        }
1453        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1454        pub fn digest_opt(&self) -> Option<&str> {
1455            self.digest.as_ref().map(|field| field as _)
1456        }
1457        ///Sets `digest` with the provided value.
1458        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1459            self.digest = Some(field.into().into());
1460        }
1461        ///Sets `digest` with the provided value.
1462        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1463            self.set_digest(field.into());
1464            self
1465        }
1466        ///Returns the value of `summary`, or the default value if `summary` is unset.
1467        pub fn summary(&self) -> &super::CheckpointSummary {
1468            self.summary
1469                .as_ref()
1470                .map(|field| field as _)
1471                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1472        }
1473        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1474        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1475            self.summary.as_mut().map(|field| field as _)
1476        }
1477        ///Returns a mutable reference to `summary`.
1478        ///If the field is unset, it is first initialized with the default value.
1479        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1480            self.summary.get_or_insert_default()
1481        }
1482        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1483        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1484            self.summary.as_ref().map(|field| field as _)
1485        }
1486        ///Sets `summary` with the provided value.
1487        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1488            self.summary = Some(field.into().into());
1489        }
1490        ///Sets `summary` with the provided value.
1491        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1492            mut self,
1493            field: T,
1494        ) -> Self {
1495            self.set_summary(field.into());
1496            self
1497        }
1498        ///Returns the value of `signature`, or the default value if `signature` is unset.
1499        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1500            self.signature
1501                .as_ref()
1502                .map(|field| field as _)
1503                .unwrap_or_else(|| {
1504                    super::ValidatorAggregatedSignature::default_instance() as _
1505                })
1506        }
1507        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1508        pub fn signature_opt_mut(
1509            &mut self,
1510        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1511            self.signature.as_mut().map(|field| field as _)
1512        }
1513        ///Returns a mutable reference to `signature`.
1514        ///If the field is unset, it is first initialized with the default value.
1515        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1516            self.signature.get_or_insert_default()
1517        }
1518        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1519        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1520            self.signature.as_ref().map(|field| field as _)
1521        }
1522        ///Sets `signature` with the provided value.
1523        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1524            &mut self,
1525            field: T,
1526        ) {
1527            self.signature = Some(field.into().into());
1528        }
1529        ///Sets `signature` with the provided value.
1530        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1531            mut self,
1532            field: T,
1533        ) -> Self {
1534            self.set_signature(field.into());
1535            self
1536        }
1537        ///Returns the value of `contents`, or the default value if `contents` is unset.
1538        pub fn contents(&self) -> &super::CheckpointContents {
1539            self.contents
1540                .as_ref()
1541                .map(|field| field as _)
1542                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1543        }
1544        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1545        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1546            self.contents.as_mut().map(|field| field as _)
1547        }
1548        ///Returns a mutable reference to `contents`.
1549        ///If the field is unset, it is first initialized with the default value.
1550        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1551            self.contents.get_or_insert_default()
1552        }
1553        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1554        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1555            self.contents.as_ref().map(|field| field as _)
1556        }
1557        ///Sets `contents` with the provided value.
1558        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1559            self.contents = Some(field.into().into());
1560        }
1561        ///Sets `contents` with the provided value.
1562        pub fn with_contents<T: Into<super::CheckpointContents>>(
1563            mut self,
1564            field: T,
1565        ) -> Self {
1566            self.set_contents(field.into());
1567            self
1568        }
1569        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1570        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1571            &self.transactions
1572        }
1573        ///Returns a mutable reference to `transactions`.
1574        ///If the field is unset, it is first initialized with the default value.
1575        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1576            &mut self.transactions
1577        }
1578        ///Sets `transactions` with the provided value.
1579        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1580            self.transactions = field;
1581        }
1582        ///Sets `transactions` with the provided value.
1583        pub fn with_transactions(
1584            mut self,
1585            field: Vec<super::ExecutedTransaction>,
1586        ) -> Self {
1587            self.set_transactions(field);
1588            self
1589        }
1590        ///Returns the value of `objects`, or the default value if `objects` is unset.
1591        pub fn objects(&self) -> &super::ObjectSet {
1592            self.objects
1593                .as_ref()
1594                .map(|field| field as _)
1595                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1596        }
1597        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1598        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1599            self.objects.as_mut().map(|field| field as _)
1600        }
1601        ///Returns a mutable reference to `objects`.
1602        ///If the field is unset, it is first initialized with the default value.
1603        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1604            self.objects.get_or_insert_default()
1605        }
1606        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1607        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1608            self.objects.as_ref().map(|field| field as _)
1609        }
1610        ///Sets `objects` with the provided value.
1611        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1612            self.objects = Some(field.into().into());
1613        }
1614        ///Sets `objects` with the provided value.
1615        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1616            self.set_objects(field.into());
1617            self
1618        }
1619    }
1620    impl super::CheckpointCommitment {
1621        pub const fn const_default() -> Self {
1622            Self { kind: None, digest: None }
1623        }
1624        #[doc(hidden)]
1625        pub fn default_instance() -> &'static Self {
1626            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1627            &DEFAULT
1628        }
1629        ///Sets `kind` with the provided value.
1630        pub fn with_kind<
1631            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1632        >(mut self, field: T) -> Self {
1633            self.set_kind(field.into());
1634            self
1635        }
1636        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1637        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1638            self.digest.as_mut().map(|field| field as _)
1639        }
1640        ///Returns a mutable reference to `digest`.
1641        ///If the field is unset, it is first initialized with the default value.
1642        pub fn digest_mut(&mut self) -> &mut String {
1643            self.digest.get_or_insert_default()
1644        }
1645        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1646        pub fn digest_opt(&self) -> Option<&str> {
1647            self.digest.as_ref().map(|field| field as _)
1648        }
1649        ///Sets `digest` with the provided value.
1650        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1651            self.digest = Some(field.into().into());
1652        }
1653        ///Sets `digest` with the provided value.
1654        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1655            self.set_digest(field.into());
1656            self
1657        }
1658    }
1659    impl super::CheckpointContents {
1660        pub const fn const_default() -> Self {
1661            Self {
1662                bcs: None,
1663                digest: None,
1664                version: None,
1665                transactions: Vec::new(),
1666            }
1667        }
1668        #[doc(hidden)]
1669        pub fn default_instance() -> &'static Self {
1670            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1671            &DEFAULT
1672        }
1673        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1674        pub fn bcs(&self) -> &super::Bcs {
1675            self.bcs
1676                .as_ref()
1677                .map(|field| field as _)
1678                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1679        }
1680        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1681        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1682            self.bcs.as_mut().map(|field| field as _)
1683        }
1684        ///Returns a mutable reference to `bcs`.
1685        ///If the field is unset, it is first initialized with the default value.
1686        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1687            self.bcs.get_or_insert_default()
1688        }
1689        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1690        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1691            self.bcs.as_ref().map(|field| field as _)
1692        }
1693        ///Sets `bcs` with the provided value.
1694        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1695            self.bcs = Some(field.into().into());
1696        }
1697        ///Sets `bcs` with the provided value.
1698        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1699            self.set_bcs(field.into());
1700            self
1701        }
1702        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1703        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1704            self.digest.as_mut().map(|field| field as _)
1705        }
1706        ///Returns a mutable reference to `digest`.
1707        ///If the field is unset, it is first initialized with the default value.
1708        pub fn digest_mut(&mut self) -> &mut String {
1709            self.digest.get_or_insert_default()
1710        }
1711        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1712        pub fn digest_opt(&self) -> Option<&str> {
1713            self.digest.as_ref().map(|field| field as _)
1714        }
1715        ///Sets `digest` with the provided value.
1716        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1717            self.digest = Some(field.into().into());
1718        }
1719        ///Sets `digest` with the provided value.
1720        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1721            self.set_digest(field.into());
1722            self
1723        }
1724        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1725        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1726            self.version.as_mut().map(|field| field as _)
1727        }
1728        ///Returns a mutable reference to `version`.
1729        ///If the field is unset, it is first initialized with the default value.
1730        pub fn version_mut(&mut self) -> &mut i32 {
1731            self.version.get_or_insert_default()
1732        }
1733        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1734        pub fn version_opt(&self) -> Option<i32> {
1735            self.version.as_ref().map(|field| *field)
1736        }
1737        ///Sets `version` with the provided value.
1738        pub fn set_version(&mut self, field: i32) {
1739            self.version = Some(field);
1740        }
1741        ///Sets `version` with the provided value.
1742        pub fn with_version(mut self, field: i32) -> Self {
1743            self.set_version(field);
1744            self
1745        }
1746        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1747        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1748            &self.transactions
1749        }
1750        ///Returns a mutable reference to `transactions`.
1751        ///If the field is unset, it is first initialized with the default value.
1752        pub fn transactions_mut(
1753            &mut self,
1754        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1755            &mut self.transactions
1756        }
1757        ///Sets `transactions` with the provided value.
1758        pub fn set_transactions(
1759            &mut self,
1760            field: Vec<super::CheckpointedTransactionInfo>,
1761        ) {
1762            self.transactions = field;
1763        }
1764        ///Sets `transactions` with the provided value.
1765        pub fn with_transactions(
1766            mut self,
1767            field: Vec<super::CheckpointedTransactionInfo>,
1768        ) -> Self {
1769            self.set_transactions(field);
1770            self
1771        }
1772    }
1773    impl super::CheckpointSummary {
1774        pub const fn const_default() -> Self {
1775            Self {
1776                bcs: None,
1777                digest: None,
1778                epoch: None,
1779                sequence_number: None,
1780                total_network_transactions: None,
1781                content_digest: None,
1782                previous_digest: None,
1783                epoch_rolling_gas_cost_summary: None,
1784                timestamp: None,
1785                commitments: Vec::new(),
1786                end_of_epoch_data: None,
1787                version_specific_data: None,
1788            }
1789        }
1790        #[doc(hidden)]
1791        pub fn default_instance() -> &'static Self {
1792            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1793            &DEFAULT
1794        }
1795        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1796        pub fn bcs(&self) -> &super::Bcs {
1797            self.bcs
1798                .as_ref()
1799                .map(|field| field as _)
1800                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1801        }
1802        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1803        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1804            self.bcs.as_mut().map(|field| field as _)
1805        }
1806        ///Returns a mutable reference to `bcs`.
1807        ///If the field is unset, it is first initialized with the default value.
1808        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1809            self.bcs.get_or_insert_default()
1810        }
1811        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1812        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1813            self.bcs.as_ref().map(|field| field as _)
1814        }
1815        ///Sets `bcs` with the provided value.
1816        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1817            self.bcs = Some(field.into().into());
1818        }
1819        ///Sets `bcs` with the provided value.
1820        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1821            self.set_bcs(field.into());
1822            self
1823        }
1824        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1825        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1826            self.digest.as_mut().map(|field| field as _)
1827        }
1828        ///Returns a mutable reference to `digest`.
1829        ///If the field is unset, it is first initialized with the default value.
1830        pub fn digest_mut(&mut self) -> &mut String {
1831            self.digest.get_or_insert_default()
1832        }
1833        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1834        pub fn digest_opt(&self) -> Option<&str> {
1835            self.digest.as_ref().map(|field| field as _)
1836        }
1837        ///Sets `digest` with the provided value.
1838        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1839            self.digest = Some(field.into().into());
1840        }
1841        ///Sets `digest` with the provided value.
1842        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1843            self.set_digest(field.into());
1844            self
1845        }
1846        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1847        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1848            self.epoch.as_mut().map(|field| field as _)
1849        }
1850        ///Returns a mutable reference to `epoch`.
1851        ///If the field is unset, it is first initialized with the default value.
1852        pub fn epoch_mut(&mut self) -> &mut u64 {
1853            self.epoch.get_or_insert_default()
1854        }
1855        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1856        pub fn epoch_opt(&self) -> Option<u64> {
1857            self.epoch.as_ref().map(|field| *field)
1858        }
1859        ///Sets `epoch` with the provided value.
1860        pub fn set_epoch(&mut self, field: u64) {
1861            self.epoch = Some(field);
1862        }
1863        ///Sets `epoch` with the provided value.
1864        pub fn with_epoch(mut self, field: u64) -> Self {
1865            self.set_epoch(field);
1866            self
1867        }
1868        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1869        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1870            self.sequence_number.as_mut().map(|field| field as _)
1871        }
1872        ///Returns a mutable reference to `sequence_number`.
1873        ///If the field is unset, it is first initialized with the default value.
1874        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1875            self.sequence_number.get_or_insert_default()
1876        }
1877        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1878        pub fn sequence_number_opt(&self) -> Option<u64> {
1879            self.sequence_number.as_ref().map(|field| *field)
1880        }
1881        ///Sets `sequence_number` with the provided value.
1882        pub fn set_sequence_number(&mut self, field: u64) {
1883            self.sequence_number = Some(field);
1884        }
1885        ///Sets `sequence_number` with the provided value.
1886        pub fn with_sequence_number(mut self, field: u64) -> Self {
1887            self.set_sequence_number(field);
1888            self
1889        }
1890        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1891        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1892            self.total_network_transactions.as_mut().map(|field| field as _)
1893        }
1894        ///Returns a mutable reference to `total_network_transactions`.
1895        ///If the field is unset, it is first initialized with the default value.
1896        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1897            self.total_network_transactions.get_or_insert_default()
1898        }
1899        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1900        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1901            self.total_network_transactions.as_ref().map(|field| *field)
1902        }
1903        ///Sets `total_network_transactions` with the provided value.
1904        pub fn set_total_network_transactions(&mut self, field: u64) {
1905            self.total_network_transactions = Some(field);
1906        }
1907        ///Sets `total_network_transactions` with the provided value.
1908        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1909            self.set_total_network_transactions(field);
1910            self
1911        }
1912        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1913        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1914            self.content_digest.as_mut().map(|field| field as _)
1915        }
1916        ///Returns a mutable reference to `content_digest`.
1917        ///If the field is unset, it is first initialized with the default value.
1918        pub fn content_digest_mut(&mut self) -> &mut String {
1919            self.content_digest.get_or_insert_default()
1920        }
1921        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1922        pub fn content_digest_opt(&self) -> Option<&str> {
1923            self.content_digest.as_ref().map(|field| field as _)
1924        }
1925        ///Sets `content_digest` with the provided value.
1926        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1927            self.content_digest = Some(field.into().into());
1928        }
1929        ///Sets `content_digest` with the provided value.
1930        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1931            self.set_content_digest(field.into());
1932            self
1933        }
1934        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1935        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1936            self.previous_digest.as_mut().map(|field| field as _)
1937        }
1938        ///Returns a mutable reference to `previous_digest`.
1939        ///If the field is unset, it is first initialized with the default value.
1940        pub fn previous_digest_mut(&mut self) -> &mut String {
1941            self.previous_digest.get_or_insert_default()
1942        }
1943        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1944        pub fn previous_digest_opt(&self) -> Option<&str> {
1945            self.previous_digest.as_ref().map(|field| field as _)
1946        }
1947        ///Sets `previous_digest` with the provided value.
1948        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1949            self.previous_digest = Some(field.into().into());
1950        }
1951        ///Sets `previous_digest` with the provided value.
1952        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1953            self.set_previous_digest(field.into());
1954            self
1955        }
1956        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
1957        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1958            self.epoch_rolling_gas_cost_summary
1959                .as_ref()
1960                .map(|field| field as _)
1961                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1962        }
1963        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1964        pub fn epoch_rolling_gas_cost_summary_opt_mut(
1965            &mut self,
1966        ) -> Option<&mut super::GasCostSummary> {
1967            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1968        }
1969        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
1970        ///If the field is unset, it is first initialized with the default value.
1971        pub fn epoch_rolling_gas_cost_summary_mut(
1972            &mut self,
1973        ) -> &mut super::GasCostSummary {
1974            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1975        }
1976        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1977        pub fn epoch_rolling_gas_cost_summary_opt(
1978            &self,
1979        ) -> Option<&super::GasCostSummary> {
1980            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1981        }
1982        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1983        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1984            &mut self,
1985            field: T,
1986        ) {
1987            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1988        }
1989        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1990        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1991            mut self,
1992            field: T,
1993        ) -> Self {
1994            self.set_epoch_rolling_gas_cost_summary(field.into());
1995            self
1996        }
1997        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1998        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1999            self.timestamp.as_mut().map(|field| field as _)
2000        }
2001        ///Returns a mutable reference to `timestamp`.
2002        ///If the field is unset, it is first initialized with the default value.
2003        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2004            self.timestamp.get_or_insert_default()
2005        }
2006        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
2007        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2008            self.timestamp.as_ref().map(|field| field as _)
2009        }
2010        ///Sets `timestamp` with the provided value.
2011        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2012            self.timestamp = Some(field.into().into());
2013        }
2014        ///Sets `timestamp` with the provided value.
2015        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2016            mut self,
2017            field: T,
2018        ) -> Self {
2019            self.set_timestamp(field.into());
2020            self
2021        }
2022        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
2023        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2024            &self.commitments
2025        }
2026        ///Returns a mutable reference to `commitments`.
2027        ///If the field is unset, it is first initialized with the default value.
2028        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2029            &mut self.commitments
2030        }
2031        ///Sets `commitments` with the provided value.
2032        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2033            self.commitments = field;
2034        }
2035        ///Sets `commitments` with the provided value.
2036        pub fn with_commitments(
2037            mut self,
2038            field: Vec<super::CheckpointCommitment>,
2039        ) -> Self {
2040            self.set_commitments(field);
2041            self
2042        }
2043        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
2044        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2045            self.end_of_epoch_data
2046                .as_ref()
2047                .map(|field| field as _)
2048                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2049        }
2050        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2051        pub fn end_of_epoch_data_opt_mut(
2052            &mut self,
2053        ) -> Option<&mut super::EndOfEpochData> {
2054            self.end_of_epoch_data.as_mut().map(|field| field as _)
2055        }
2056        ///Returns a mutable reference to `end_of_epoch_data`.
2057        ///If the field is unset, it is first initialized with the default value.
2058        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2059            self.end_of_epoch_data.get_or_insert_default()
2060        }
2061        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2062        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2063            self.end_of_epoch_data.as_ref().map(|field| field as _)
2064        }
2065        ///Sets `end_of_epoch_data` with the provided value.
2066        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2067            &mut self,
2068            field: T,
2069        ) {
2070            self.end_of_epoch_data = Some(field.into().into());
2071        }
2072        ///Sets `end_of_epoch_data` with the provided value.
2073        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2074            mut self,
2075            field: T,
2076        ) -> Self {
2077            self.set_end_of_epoch_data(field.into());
2078            self
2079        }
2080        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2081        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2082            self.version_specific_data.as_ref().map(|field| field as _)
2083        }
2084        ///Sets `version_specific_data` with the provided value.
2085        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2086            &mut self,
2087            field: T,
2088        ) {
2089            self.version_specific_data = Some(field.into().into());
2090        }
2091        ///Sets `version_specific_data` with the provided value.
2092        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2093            mut self,
2094            field: T,
2095        ) -> Self {
2096            self.set_version_specific_data(field.into());
2097            self
2098        }
2099    }
2100    impl super::CheckpointedTransactionInfo {
2101        pub const fn const_default() -> Self {
2102            Self {
2103                transaction: None,
2104                effects: None,
2105                signatures: Vec::new(),
2106                address_aliases_versions: Vec::new(),
2107            }
2108        }
2109        #[doc(hidden)]
2110        pub fn default_instance() -> &'static Self {
2111            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2112            &DEFAULT
2113        }
2114        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2115        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2116            self.transaction.as_mut().map(|field| field as _)
2117        }
2118        ///Returns a mutable reference to `transaction`.
2119        ///If the field is unset, it is first initialized with the default value.
2120        pub fn transaction_mut(&mut self) -> &mut String {
2121            self.transaction.get_or_insert_default()
2122        }
2123        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2124        pub fn transaction_opt(&self) -> Option<&str> {
2125            self.transaction.as_ref().map(|field| field as _)
2126        }
2127        ///Sets `transaction` with the provided value.
2128        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2129            self.transaction = Some(field.into().into());
2130        }
2131        ///Sets `transaction` with the provided value.
2132        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2133            self.set_transaction(field.into());
2134            self
2135        }
2136        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2137        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2138            self.effects.as_mut().map(|field| field as _)
2139        }
2140        ///Returns a mutable reference to `effects`.
2141        ///If the field is unset, it is first initialized with the default value.
2142        pub fn effects_mut(&mut self) -> &mut String {
2143            self.effects.get_or_insert_default()
2144        }
2145        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2146        pub fn effects_opt(&self) -> Option<&str> {
2147            self.effects.as_ref().map(|field| field as _)
2148        }
2149        ///Sets `effects` with the provided value.
2150        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2151            self.effects = Some(field.into().into());
2152        }
2153        ///Sets `effects` with the provided value.
2154        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2155            self.set_effects(field.into());
2156            self
2157        }
2158        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
2159        pub fn signatures(&self) -> &[super::UserSignature] {
2160            &self.signatures
2161        }
2162        ///Returns a mutable reference to `signatures`.
2163        ///If the field is unset, it is first initialized with the default value.
2164        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2165            &mut self.signatures
2166        }
2167        ///Sets `signatures` with the provided value.
2168        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2169            self.signatures = field;
2170        }
2171        ///Sets `signatures` with the provided value.
2172        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2173            self.set_signatures(field);
2174            self
2175        }
2176        ///Returns the value of `address_aliases_versions`, or the default value if `address_aliases_versions` is unset.
2177        pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2178            &self.address_aliases_versions
2179        }
2180        ///Returns a mutable reference to `address_aliases_versions`.
2181        ///If the field is unset, it is first initialized with the default value.
2182        pub fn address_aliases_versions_mut(
2183            &mut self,
2184        ) -> &mut Vec<super::AddressAliasesVersion> {
2185            &mut self.address_aliases_versions
2186        }
2187        ///Sets `address_aliases_versions` with the provided value.
2188        pub fn set_address_aliases_versions(
2189            &mut self,
2190            field: Vec<super::AddressAliasesVersion>,
2191        ) {
2192            self.address_aliases_versions = field;
2193        }
2194        ///Sets `address_aliases_versions` with the provided value.
2195        pub fn with_address_aliases_versions(
2196            mut self,
2197            field: Vec<super::AddressAliasesVersion>,
2198        ) -> Self {
2199            self.set_address_aliases_versions(field);
2200            self
2201        }
2202    }
2203    impl super::CircomG1 {
2204        pub const fn const_default() -> Self {
2205            Self {
2206                e0: None,
2207                e1: None,
2208                e2: None,
2209            }
2210        }
2211        #[doc(hidden)]
2212        pub fn default_instance() -> &'static Self {
2213            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2214            &DEFAULT
2215        }
2216        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2217        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2218            self.e0.as_mut().map(|field| field as _)
2219        }
2220        ///Returns a mutable reference to `e0`.
2221        ///If the field is unset, it is first initialized with the default value.
2222        pub fn e0_mut(&mut self) -> &mut String {
2223            self.e0.get_or_insert_default()
2224        }
2225        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2226        pub fn e0_opt(&self) -> Option<&str> {
2227            self.e0.as_ref().map(|field| field as _)
2228        }
2229        ///Sets `e0` with the provided value.
2230        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2231            self.e0 = Some(field.into().into());
2232        }
2233        ///Sets `e0` with the provided value.
2234        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2235            self.set_e0(field.into());
2236            self
2237        }
2238        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2239        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2240            self.e1.as_mut().map(|field| field as _)
2241        }
2242        ///Returns a mutable reference to `e1`.
2243        ///If the field is unset, it is first initialized with the default value.
2244        pub fn e1_mut(&mut self) -> &mut String {
2245            self.e1.get_or_insert_default()
2246        }
2247        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2248        pub fn e1_opt(&self) -> Option<&str> {
2249            self.e1.as_ref().map(|field| field as _)
2250        }
2251        ///Sets `e1` with the provided value.
2252        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2253            self.e1 = Some(field.into().into());
2254        }
2255        ///Sets `e1` with the provided value.
2256        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2257            self.set_e1(field.into());
2258            self
2259        }
2260        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2261        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2262            self.e2.as_mut().map(|field| field as _)
2263        }
2264        ///Returns a mutable reference to `e2`.
2265        ///If the field is unset, it is first initialized with the default value.
2266        pub fn e2_mut(&mut self) -> &mut String {
2267            self.e2.get_or_insert_default()
2268        }
2269        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2270        pub fn e2_opt(&self) -> Option<&str> {
2271            self.e2.as_ref().map(|field| field as _)
2272        }
2273        ///Sets `e2` with the provided value.
2274        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2275            self.e2 = Some(field.into().into());
2276        }
2277        ///Sets `e2` with the provided value.
2278        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2279            self.set_e2(field.into());
2280            self
2281        }
2282    }
2283    impl super::CircomG2 {
2284        pub const fn const_default() -> Self {
2285            Self {
2286                e00: None,
2287                e01: None,
2288                e10: None,
2289                e11: None,
2290                e20: None,
2291                e21: None,
2292            }
2293        }
2294        #[doc(hidden)]
2295        pub fn default_instance() -> &'static Self {
2296            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2297            &DEFAULT
2298        }
2299        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2300        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2301            self.e00.as_mut().map(|field| field as _)
2302        }
2303        ///Returns a mutable reference to `e00`.
2304        ///If the field is unset, it is first initialized with the default value.
2305        pub fn e00_mut(&mut self) -> &mut String {
2306            self.e00.get_or_insert_default()
2307        }
2308        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2309        pub fn e00_opt(&self) -> Option<&str> {
2310            self.e00.as_ref().map(|field| field as _)
2311        }
2312        ///Sets `e00` with the provided value.
2313        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2314            self.e00 = Some(field.into().into());
2315        }
2316        ///Sets `e00` with the provided value.
2317        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2318            self.set_e00(field.into());
2319            self
2320        }
2321        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2322        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2323            self.e01.as_mut().map(|field| field as _)
2324        }
2325        ///Returns a mutable reference to `e01`.
2326        ///If the field is unset, it is first initialized with the default value.
2327        pub fn e01_mut(&mut self) -> &mut String {
2328            self.e01.get_or_insert_default()
2329        }
2330        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2331        pub fn e01_opt(&self) -> Option<&str> {
2332            self.e01.as_ref().map(|field| field as _)
2333        }
2334        ///Sets `e01` with the provided value.
2335        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2336            self.e01 = Some(field.into().into());
2337        }
2338        ///Sets `e01` with the provided value.
2339        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2340            self.set_e01(field.into());
2341            self
2342        }
2343        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2344        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2345            self.e10.as_mut().map(|field| field as _)
2346        }
2347        ///Returns a mutable reference to `e10`.
2348        ///If the field is unset, it is first initialized with the default value.
2349        pub fn e10_mut(&mut self) -> &mut String {
2350            self.e10.get_or_insert_default()
2351        }
2352        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2353        pub fn e10_opt(&self) -> Option<&str> {
2354            self.e10.as_ref().map(|field| field as _)
2355        }
2356        ///Sets `e10` with the provided value.
2357        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2358            self.e10 = Some(field.into().into());
2359        }
2360        ///Sets `e10` with the provided value.
2361        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2362            self.set_e10(field.into());
2363            self
2364        }
2365        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2366        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2367            self.e11.as_mut().map(|field| field as _)
2368        }
2369        ///Returns a mutable reference to `e11`.
2370        ///If the field is unset, it is first initialized with the default value.
2371        pub fn e11_mut(&mut self) -> &mut String {
2372            self.e11.get_or_insert_default()
2373        }
2374        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2375        pub fn e11_opt(&self) -> Option<&str> {
2376            self.e11.as_ref().map(|field| field as _)
2377        }
2378        ///Sets `e11` with the provided value.
2379        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2380            self.e11 = Some(field.into().into());
2381        }
2382        ///Sets `e11` with the provided value.
2383        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2384            self.set_e11(field.into());
2385            self
2386        }
2387        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2388        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2389            self.e20.as_mut().map(|field| field as _)
2390        }
2391        ///Returns a mutable reference to `e20`.
2392        ///If the field is unset, it is first initialized with the default value.
2393        pub fn e20_mut(&mut self) -> &mut String {
2394            self.e20.get_or_insert_default()
2395        }
2396        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2397        pub fn e20_opt(&self) -> Option<&str> {
2398            self.e20.as_ref().map(|field| field as _)
2399        }
2400        ///Sets `e20` with the provided value.
2401        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2402            self.e20 = Some(field.into().into());
2403        }
2404        ///Sets `e20` with the provided value.
2405        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2406            self.set_e20(field.into());
2407            self
2408        }
2409        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2410        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2411            self.e21.as_mut().map(|field| field as _)
2412        }
2413        ///Returns a mutable reference to `e21`.
2414        ///If the field is unset, it is first initialized with the default value.
2415        pub fn e21_mut(&mut self) -> &mut String {
2416            self.e21.get_or_insert_default()
2417        }
2418        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2419        pub fn e21_opt(&self) -> Option<&str> {
2420            self.e21.as_ref().map(|field| field as _)
2421        }
2422        ///Sets `e21` with the provided value.
2423        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2424            self.e21 = Some(field.into().into());
2425        }
2426        ///Sets `e21` with the provided value.
2427        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2428            self.set_e21(field.into());
2429            self
2430        }
2431    }
2432    impl super::CleverError {
2433        pub const fn const_default() -> Self {
2434            Self {
2435                error_code: None,
2436                line_number: None,
2437                constant_name: None,
2438                constant_type: None,
2439                value: None,
2440            }
2441        }
2442        #[doc(hidden)]
2443        pub fn default_instance() -> &'static Self {
2444            static DEFAULT: super::CleverError = super::CleverError::const_default();
2445            &DEFAULT
2446        }
2447        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2448        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2449            self.error_code.as_mut().map(|field| field as _)
2450        }
2451        ///Returns a mutable reference to `error_code`.
2452        ///If the field is unset, it is first initialized with the default value.
2453        pub fn error_code_mut(&mut self) -> &mut u64 {
2454            self.error_code.get_or_insert_default()
2455        }
2456        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2457        pub fn error_code_opt(&self) -> Option<u64> {
2458            self.error_code.as_ref().map(|field| *field)
2459        }
2460        ///Sets `error_code` with the provided value.
2461        pub fn set_error_code(&mut self, field: u64) {
2462            self.error_code = Some(field);
2463        }
2464        ///Sets `error_code` with the provided value.
2465        pub fn with_error_code(mut self, field: u64) -> Self {
2466            self.set_error_code(field);
2467            self
2468        }
2469        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2470        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2471            self.line_number.as_mut().map(|field| field as _)
2472        }
2473        ///Returns a mutable reference to `line_number`.
2474        ///If the field is unset, it is first initialized with the default value.
2475        pub fn line_number_mut(&mut self) -> &mut u64 {
2476            self.line_number.get_or_insert_default()
2477        }
2478        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2479        pub fn line_number_opt(&self) -> Option<u64> {
2480            self.line_number.as_ref().map(|field| *field)
2481        }
2482        ///Sets `line_number` with the provided value.
2483        pub fn set_line_number(&mut self, field: u64) {
2484            self.line_number = Some(field);
2485        }
2486        ///Sets `line_number` with the provided value.
2487        pub fn with_line_number(mut self, field: u64) -> Self {
2488            self.set_line_number(field);
2489            self
2490        }
2491        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2492        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2493            self.constant_name.as_mut().map(|field| field as _)
2494        }
2495        ///Returns a mutable reference to `constant_name`.
2496        ///If the field is unset, it is first initialized with the default value.
2497        pub fn constant_name_mut(&mut self) -> &mut String {
2498            self.constant_name.get_or_insert_default()
2499        }
2500        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2501        pub fn constant_name_opt(&self) -> Option<&str> {
2502            self.constant_name.as_ref().map(|field| field as _)
2503        }
2504        ///Sets `constant_name` with the provided value.
2505        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2506            self.constant_name = Some(field.into().into());
2507        }
2508        ///Sets `constant_name` with the provided value.
2509        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2510            self.set_constant_name(field.into());
2511            self
2512        }
2513        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2514        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2515            self.constant_type.as_mut().map(|field| field as _)
2516        }
2517        ///Returns a mutable reference to `constant_type`.
2518        ///If the field is unset, it is first initialized with the default value.
2519        pub fn constant_type_mut(&mut self) -> &mut String {
2520            self.constant_type.get_or_insert_default()
2521        }
2522        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2523        pub fn constant_type_opt(&self) -> Option<&str> {
2524            self.constant_type.as_ref().map(|field| field as _)
2525        }
2526        ///Sets `constant_type` with the provided value.
2527        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2528            self.constant_type = Some(field.into().into());
2529        }
2530        ///Sets `constant_type` with the provided value.
2531        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2532            self.set_constant_type(field.into());
2533            self
2534        }
2535        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2536        pub fn rendered(&self) -> &str {
2537            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2538                field as _
2539            } else {
2540                ""
2541            }
2542        }
2543        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2544        pub fn rendered_opt(&self) -> Option<&str> {
2545            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2546                Some(field as _)
2547            } else {
2548                None
2549            }
2550        }
2551        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2552        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2553            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2554                Some(field as _)
2555            } else {
2556                None
2557            }
2558        }
2559        ///Returns a mutable reference to `rendered`.
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 rendered_mut(&mut self) -> &mut String {
2563            if self.rendered_opt_mut().is_none() {
2564                self.value = Some(
2565                    super::clever_error::Value::Rendered(String::default()),
2566                );
2567            }
2568            self.rendered_opt_mut().unwrap()
2569        }
2570        ///Sets `rendered` with the provided value.
2571        ///If any other oneof field in the same oneof is set, it will be cleared.
2572        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2573            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2574        }
2575        ///Sets `rendered` with the provided value.
2576        ///If any other oneof field in the same oneof is set, it will be cleared.
2577        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2578            self.set_rendered(field.into());
2579            self
2580        }
2581        ///Returns the value of `raw`, or the default value if `raw` is unset.
2582        pub fn raw(&self) -> &[u8] {
2583            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2584                field as _
2585            } else {
2586                &[]
2587            }
2588        }
2589        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2590        pub fn raw_opt(&self) -> Option<&[u8]> {
2591            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2592                Some(field as _)
2593            } else {
2594                None
2595            }
2596        }
2597        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2598        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2599            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2600                Some(field as _)
2601            } else {
2602                None
2603            }
2604        }
2605        ///Returns a mutable reference to `raw`.
2606        ///If the field is unset, it is first initialized with the default value.
2607        ///If any other oneof field in the same oneof is set, it will be cleared.
2608        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2609            if self.raw_opt_mut().is_none() {
2610                self.value = Some(
2611                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2612                );
2613            }
2614            self.raw_opt_mut().unwrap()
2615        }
2616        ///Sets `raw` with the provided value.
2617        ///If any other oneof field in the same oneof is set, it will be cleared.
2618        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2619            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2620        }
2621        ///Sets `raw` with the provided value.
2622        ///If any other oneof field in the same oneof is set, it will be cleared.
2623        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2624            self.set_raw(field.into());
2625            self
2626        }
2627    }
2628    impl super::CoinDenyListError {
2629        pub const fn const_default() -> Self {
2630            Self {
2631                address: None,
2632                coin_type: None,
2633            }
2634        }
2635        #[doc(hidden)]
2636        pub fn default_instance() -> &'static Self {
2637            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2638            &DEFAULT
2639        }
2640        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2641        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2642            self.address.as_mut().map(|field| field as _)
2643        }
2644        ///Returns a mutable reference to `address`.
2645        ///If the field is unset, it is first initialized with the default value.
2646        pub fn address_mut(&mut self) -> &mut String {
2647            self.address.get_or_insert_default()
2648        }
2649        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2650        pub fn address_opt(&self) -> Option<&str> {
2651            self.address.as_ref().map(|field| field as _)
2652        }
2653        ///Sets `address` with the provided value.
2654        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2655            self.address = Some(field.into().into());
2656        }
2657        ///Sets `address` with the provided value.
2658        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2659            self.set_address(field.into());
2660            self
2661        }
2662        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2663        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2664            self.coin_type.as_mut().map(|field| field as _)
2665        }
2666        ///Returns a mutable reference to `coin_type`.
2667        ///If the field is unset, it is first initialized with the default value.
2668        pub fn coin_type_mut(&mut self) -> &mut String {
2669            self.coin_type.get_or_insert_default()
2670        }
2671        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2672        pub fn coin_type_opt(&self) -> Option<&str> {
2673            self.coin_type.as_ref().map(|field| field as _)
2674        }
2675        ///Sets `coin_type` with the provided value.
2676        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2677            self.coin_type = Some(field.into().into());
2678        }
2679        ///Sets `coin_type` with the provided value.
2680        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2681            self.set_coin_type(field.into());
2682            self
2683        }
2684    }
2685    impl super::CoinMetadata {
2686        pub const fn const_default() -> Self {
2687            Self {
2688                id: None,
2689                decimals: None,
2690                name: None,
2691                symbol: None,
2692                description: None,
2693                icon_url: None,
2694                metadata_cap_id: None,
2695                metadata_cap_state: None,
2696            }
2697        }
2698        #[doc(hidden)]
2699        pub fn default_instance() -> &'static Self {
2700            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2701            &DEFAULT
2702        }
2703        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2704        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2705            self.id.as_mut().map(|field| field as _)
2706        }
2707        ///Returns a mutable reference to `id`.
2708        ///If the field is unset, it is first initialized with the default value.
2709        pub fn id_mut(&mut self) -> &mut String {
2710            self.id.get_or_insert_default()
2711        }
2712        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2713        pub fn id_opt(&self) -> Option<&str> {
2714            self.id.as_ref().map(|field| field as _)
2715        }
2716        ///Sets `id` with the provided value.
2717        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2718            self.id = Some(field.into().into());
2719        }
2720        ///Sets `id` with the provided value.
2721        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2722            self.set_id(field.into());
2723            self
2724        }
2725        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2726        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2727            self.decimals.as_mut().map(|field| field as _)
2728        }
2729        ///Returns a mutable reference to `decimals`.
2730        ///If the field is unset, it is first initialized with the default value.
2731        pub fn decimals_mut(&mut self) -> &mut u32 {
2732            self.decimals.get_or_insert_default()
2733        }
2734        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2735        pub fn decimals_opt(&self) -> Option<u32> {
2736            self.decimals.as_ref().map(|field| *field)
2737        }
2738        ///Sets `decimals` with the provided value.
2739        pub fn set_decimals(&mut self, field: u32) {
2740            self.decimals = Some(field);
2741        }
2742        ///Sets `decimals` with the provided value.
2743        pub fn with_decimals(mut self, field: u32) -> Self {
2744            self.set_decimals(field);
2745            self
2746        }
2747        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2748        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2749            self.name.as_mut().map(|field| field as _)
2750        }
2751        ///Returns a mutable reference to `name`.
2752        ///If the field is unset, it is first initialized with the default value.
2753        pub fn name_mut(&mut self) -> &mut String {
2754            self.name.get_or_insert_default()
2755        }
2756        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2757        pub fn name_opt(&self) -> Option<&str> {
2758            self.name.as_ref().map(|field| field as _)
2759        }
2760        ///Sets `name` with the provided value.
2761        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2762            self.name = Some(field.into().into());
2763        }
2764        ///Sets `name` with the provided value.
2765        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2766            self.set_name(field.into());
2767            self
2768        }
2769        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2770        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2771            self.symbol.as_mut().map(|field| field as _)
2772        }
2773        ///Returns a mutable reference to `symbol`.
2774        ///If the field is unset, it is first initialized with the default value.
2775        pub fn symbol_mut(&mut self) -> &mut String {
2776            self.symbol.get_or_insert_default()
2777        }
2778        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2779        pub fn symbol_opt(&self) -> Option<&str> {
2780            self.symbol.as_ref().map(|field| field as _)
2781        }
2782        ///Sets `symbol` with the provided value.
2783        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2784            self.symbol = Some(field.into().into());
2785        }
2786        ///Sets `symbol` with the provided value.
2787        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2788            self.set_symbol(field.into());
2789            self
2790        }
2791        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2792        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2793            self.description.as_mut().map(|field| field as _)
2794        }
2795        ///Returns a mutable reference to `description`.
2796        ///If the field is unset, it is first initialized with the default value.
2797        pub fn description_mut(&mut self) -> &mut String {
2798            self.description.get_or_insert_default()
2799        }
2800        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2801        pub fn description_opt(&self) -> Option<&str> {
2802            self.description.as_ref().map(|field| field as _)
2803        }
2804        ///Sets `description` with the provided value.
2805        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2806            self.description = Some(field.into().into());
2807        }
2808        ///Sets `description` with the provided value.
2809        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2810            self.set_description(field.into());
2811            self
2812        }
2813        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2814        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2815            self.icon_url.as_mut().map(|field| field as _)
2816        }
2817        ///Returns a mutable reference to `icon_url`.
2818        ///If the field is unset, it is first initialized with the default value.
2819        pub fn icon_url_mut(&mut self) -> &mut String {
2820            self.icon_url.get_or_insert_default()
2821        }
2822        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2823        pub fn icon_url_opt(&self) -> Option<&str> {
2824            self.icon_url.as_ref().map(|field| field as _)
2825        }
2826        ///Sets `icon_url` with the provided value.
2827        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2828            self.icon_url = Some(field.into().into());
2829        }
2830        ///Sets `icon_url` with the provided value.
2831        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2832            self.set_icon_url(field.into());
2833            self
2834        }
2835        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2836        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2837            self.metadata_cap_id.as_mut().map(|field| field as _)
2838        }
2839        ///Returns a mutable reference to `metadata_cap_id`.
2840        ///If the field is unset, it is first initialized with the default value.
2841        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2842            self.metadata_cap_id.get_or_insert_default()
2843        }
2844        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2845        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2846            self.metadata_cap_id.as_ref().map(|field| field as _)
2847        }
2848        ///Sets `metadata_cap_id` with the provided value.
2849        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2850            self.metadata_cap_id = Some(field.into().into());
2851        }
2852        ///Sets `metadata_cap_id` with the provided value.
2853        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2854            self.set_metadata_cap_id(field.into());
2855            self
2856        }
2857        ///Sets `metadata_cap_state` with the provided value.
2858        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2859            mut self,
2860            field: T,
2861        ) -> Self {
2862            self.set_metadata_cap_state(field.into());
2863            self
2864        }
2865    }
2866    impl super::CoinTreasury {
2867        pub const fn const_default() -> Self {
2868            Self {
2869                id: None,
2870                total_supply: None,
2871                supply_state: None,
2872            }
2873        }
2874        #[doc(hidden)]
2875        pub fn default_instance() -> &'static Self {
2876            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2877            &DEFAULT
2878        }
2879        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2880        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2881            self.id.as_mut().map(|field| field as _)
2882        }
2883        ///Returns a mutable reference to `id`.
2884        ///If the field is unset, it is first initialized with the default value.
2885        pub fn id_mut(&mut self) -> &mut String {
2886            self.id.get_or_insert_default()
2887        }
2888        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2889        pub fn id_opt(&self) -> Option<&str> {
2890            self.id.as_ref().map(|field| field as _)
2891        }
2892        ///Sets `id` with the provided value.
2893        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2894            self.id = Some(field.into().into());
2895        }
2896        ///Sets `id` with the provided value.
2897        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2898            self.set_id(field.into());
2899            self
2900        }
2901        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2902        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2903            self.total_supply.as_mut().map(|field| field as _)
2904        }
2905        ///Returns a mutable reference to `total_supply`.
2906        ///If the field is unset, it is first initialized with the default value.
2907        pub fn total_supply_mut(&mut self) -> &mut u64 {
2908            self.total_supply.get_or_insert_default()
2909        }
2910        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2911        pub fn total_supply_opt(&self) -> Option<u64> {
2912            self.total_supply.as_ref().map(|field| *field)
2913        }
2914        ///Sets `total_supply` with the provided value.
2915        pub fn set_total_supply(&mut self, field: u64) {
2916            self.total_supply = Some(field);
2917        }
2918        ///Sets `total_supply` with the provided value.
2919        pub fn with_total_supply(mut self, field: u64) -> Self {
2920            self.set_total_supply(field);
2921            self
2922        }
2923        ///Sets `supply_state` with the provided value.
2924        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2925            mut self,
2926            field: T,
2927        ) -> Self {
2928            self.set_supply_state(field.into());
2929            self
2930        }
2931    }
2932    impl super::Command {
2933        pub const fn const_default() -> Self {
2934            Self { command: None }
2935        }
2936        #[doc(hidden)]
2937        pub fn default_instance() -> &'static Self {
2938            static DEFAULT: super::Command = super::Command::const_default();
2939            &DEFAULT
2940        }
2941        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2942        pub fn move_call(&self) -> &super::MoveCall {
2943            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2944                field as _
2945            } else {
2946                super::MoveCall::default_instance() as _
2947            }
2948        }
2949        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
2950        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2951            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2952                Some(field as _)
2953            } else {
2954                None
2955            }
2956        }
2957        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2958        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2959            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2960                Some(field as _)
2961            } else {
2962                None
2963            }
2964        }
2965        ///Returns a mutable reference to `move_call`.
2966        ///If the field is unset, it is first initialized with the default value.
2967        ///If any other oneof field in the same oneof is set, it will be cleared.
2968        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2969            if self.move_call_opt_mut().is_none() {
2970                self.command = Some(
2971                    super::command::Command::MoveCall(super::MoveCall::default()),
2972                );
2973            }
2974            self.move_call_opt_mut().unwrap()
2975        }
2976        ///Sets `move_call` with the provided value.
2977        ///If any other oneof field in the same oneof is set, it will be cleared.
2978        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2979            self.command = Some(super::command::Command::MoveCall(field.into().into()));
2980        }
2981        ///Sets `move_call` with the provided value.
2982        ///If any other oneof field in the same oneof is set, it will be cleared.
2983        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2984            self.set_move_call(field.into());
2985            self
2986        }
2987        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
2988        pub fn transfer_objects(&self) -> &super::TransferObjects {
2989            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2990            {
2991                field as _
2992            } else {
2993                super::TransferObjects::default_instance() as _
2994            }
2995        }
2996        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2997        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2998            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2999            {
3000                Some(field as _)
3001            } else {
3002                None
3003            }
3004        }
3005        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3006        pub fn transfer_objects_opt_mut(
3007            &mut self,
3008        ) -> Option<&mut super::TransferObjects> {
3009            if let Some(super::command::Command::TransferObjects(field)) = &mut self
3010                .command
3011            {
3012                Some(field as _)
3013            } else {
3014                None
3015            }
3016        }
3017        ///Returns a mutable reference to `transfer_objects`.
3018        ///If the field is unset, it is first initialized with the default value.
3019        ///If any other oneof field in the same oneof is set, it will be cleared.
3020        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3021            if self.transfer_objects_opt_mut().is_none() {
3022                self.command = Some(
3023                    super::command::Command::TransferObjects(
3024                        super::TransferObjects::default(),
3025                    ),
3026                );
3027            }
3028            self.transfer_objects_opt_mut().unwrap()
3029        }
3030        ///Sets `transfer_objects` with the provided value.
3031        ///If any other oneof field in the same oneof is set, it will be cleared.
3032        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3033            &mut self,
3034            field: T,
3035        ) {
3036            self.command = Some(
3037                super::command::Command::TransferObjects(field.into().into()),
3038            );
3039        }
3040        ///Sets `transfer_objects` with the provided value.
3041        ///If any other oneof field in the same oneof is set, it will be cleared.
3042        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3043            mut self,
3044            field: T,
3045        ) -> Self {
3046            self.set_transfer_objects(field.into());
3047            self
3048        }
3049        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
3050        pub fn split_coins(&self) -> &super::SplitCoins {
3051            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3052                field as _
3053            } else {
3054                super::SplitCoins::default_instance() as _
3055            }
3056        }
3057        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3058        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3059            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3060                Some(field as _)
3061            } else {
3062                None
3063            }
3064        }
3065        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3066        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3067            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3068                Some(field as _)
3069            } else {
3070                None
3071            }
3072        }
3073        ///Returns a mutable reference to `split_coins`.
3074        ///If the field is unset, it is first initialized with the default value.
3075        ///If any other oneof field in the same oneof is set, it will be cleared.
3076        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3077            if self.split_coins_opt_mut().is_none() {
3078                self.command = Some(
3079                    super::command::Command::SplitCoins(super::SplitCoins::default()),
3080                );
3081            }
3082            self.split_coins_opt_mut().unwrap()
3083        }
3084        ///Sets `split_coins` with the provided value.
3085        ///If any other oneof field in the same oneof is set, it will be cleared.
3086        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3087            self.command = Some(
3088                super::command::Command::SplitCoins(field.into().into()),
3089            );
3090        }
3091        ///Sets `split_coins` with the provided value.
3092        ///If any other oneof field in the same oneof is set, it will be cleared.
3093        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3094            self.set_split_coins(field.into());
3095            self
3096        }
3097        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
3098        pub fn merge_coins(&self) -> &super::MergeCoins {
3099            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3100                field as _
3101            } else {
3102                super::MergeCoins::default_instance() as _
3103            }
3104        }
3105        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3106        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3107            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3108                Some(field as _)
3109            } else {
3110                None
3111            }
3112        }
3113        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3114        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3115            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3116                Some(field as _)
3117            } else {
3118                None
3119            }
3120        }
3121        ///Returns a mutable reference to `merge_coins`.
3122        ///If the field is unset, it is first initialized with the default value.
3123        ///If any other oneof field in the same oneof is set, it will be cleared.
3124        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3125            if self.merge_coins_opt_mut().is_none() {
3126                self.command = Some(
3127                    super::command::Command::MergeCoins(super::MergeCoins::default()),
3128                );
3129            }
3130            self.merge_coins_opt_mut().unwrap()
3131        }
3132        ///Sets `merge_coins` with the provided value.
3133        ///If any other oneof field in the same oneof is set, it will be cleared.
3134        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3135            self.command = Some(
3136                super::command::Command::MergeCoins(field.into().into()),
3137            );
3138        }
3139        ///Sets `merge_coins` with the provided value.
3140        ///If any other oneof field in the same oneof is set, it will be cleared.
3141        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3142            self.set_merge_coins(field.into());
3143            self
3144        }
3145        ///Returns the value of `publish`, or the default value if `publish` is unset.
3146        pub fn publish(&self) -> &super::Publish {
3147            if let Some(super::command::Command::Publish(field)) = &self.command {
3148                field as _
3149            } else {
3150                super::Publish::default_instance() as _
3151            }
3152        }
3153        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
3154        pub fn publish_opt(&self) -> Option<&super::Publish> {
3155            if let Some(super::command::Command::Publish(field)) = &self.command {
3156                Some(field as _)
3157            } else {
3158                None
3159            }
3160        }
3161        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3162        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3163            if let Some(super::command::Command::Publish(field)) = &mut self.command {
3164                Some(field as _)
3165            } else {
3166                None
3167            }
3168        }
3169        ///Returns a mutable reference to `publish`.
3170        ///If the field is unset, it is first initialized with the default value.
3171        ///If any other oneof field in the same oneof is set, it will be cleared.
3172        pub fn publish_mut(&mut self) -> &mut super::Publish {
3173            if self.publish_opt_mut().is_none() {
3174                self.command = Some(
3175                    super::command::Command::Publish(super::Publish::default()),
3176                );
3177            }
3178            self.publish_opt_mut().unwrap()
3179        }
3180        ///Sets `publish` with the provided value.
3181        ///If any other oneof field in the same oneof is set, it will be cleared.
3182        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3183            self.command = Some(super::command::Command::Publish(field.into().into()));
3184        }
3185        ///Sets `publish` with the provided value.
3186        ///If any other oneof field in the same oneof is set, it will be cleared.
3187        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3188            self.set_publish(field.into());
3189            self
3190        }
3191        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
3192        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3193            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3194                field as _
3195            } else {
3196                super::MakeMoveVector::default_instance() as _
3197            }
3198        }
3199        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
3200        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3201            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3202                Some(field as _)
3203            } else {
3204                None
3205            }
3206        }
3207        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3208        pub fn make_move_vector_opt_mut(
3209            &mut self,
3210        ) -> Option<&mut super::MakeMoveVector> {
3211            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3212                .command
3213            {
3214                Some(field as _)
3215            } else {
3216                None
3217            }
3218        }
3219        ///Returns a mutable reference to `make_move_vector`.
3220        ///If the field is unset, it is first initialized with the default value.
3221        ///If any other oneof field in the same oneof is set, it will be cleared.
3222        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3223            if self.make_move_vector_opt_mut().is_none() {
3224                self.command = Some(
3225                    super::command::Command::MakeMoveVector(
3226                        super::MakeMoveVector::default(),
3227                    ),
3228                );
3229            }
3230            self.make_move_vector_opt_mut().unwrap()
3231        }
3232        ///Sets `make_move_vector` with the provided value.
3233        ///If any other oneof field in the same oneof is set, it will be cleared.
3234        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3235            &mut self,
3236            field: T,
3237        ) {
3238            self.command = Some(
3239                super::command::Command::MakeMoveVector(field.into().into()),
3240            );
3241        }
3242        ///Sets `make_move_vector` with the provided value.
3243        ///If any other oneof field in the same oneof is set, it will be cleared.
3244        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3245            mut self,
3246            field: T,
3247        ) -> Self {
3248            self.set_make_move_vector(field.into());
3249            self
3250        }
3251        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3252        pub fn upgrade(&self) -> &super::Upgrade {
3253            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3254                field as _
3255            } else {
3256                super::Upgrade::default_instance() as _
3257            }
3258        }
3259        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3260        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3261            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3262                Some(field as _)
3263            } else {
3264                None
3265            }
3266        }
3267        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3268        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3269            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3270                Some(field as _)
3271            } else {
3272                None
3273            }
3274        }
3275        ///Returns a mutable reference to `upgrade`.
3276        ///If the field is unset, it is first initialized with the default value.
3277        ///If any other oneof field in the same oneof is set, it will be cleared.
3278        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3279            if self.upgrade_opt_mut().is_none() {
3280                self.command = Some(
3281                    super::command::Command::Upgrade(super::Upgrade::default()),
3282                );
3283            }
3284            self.upgrade_opt_mut().unwrap()
3285        }
3286        ///Sets `upgrade` with the provided value.
3287        ///If any other oneof field in the same oneof is set, it will be cleared.
3288        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3289            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3290        }
3291        ///Sets `upgrade` with the provided value.
3292        ///If any other oneof field in the same oneof is set, it will be cleared.
3293        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3294            self.set_upgrade(field.into());
3295            self
3296        }
3297    }
3298    impl super::CommandArgumentError {
3299        pub const fn const_default() -> Self {
3300            Self {
3301                argument: None,
3302                kind: None,
3303                index_error: None,
3304            }
3305        }
3306        #[doc(hidden)]
3307        pub fn default_instance() -> &'static Self {
3308            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3309            &DEFAULT
3310        }
3311        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3312        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3313            self.argument.as_mut().map(|field| field as _)
3314        }
3315        ///Returns a mutable reference to `argument`.
3316        ///If the field is unset, it is first initialized with the default value.
3317        pub fn argument_mut(&mut self) -> &mut u32 {
3318            self.argument.get_or_insert_default()
3319        }
3320        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3321        pub fn argument_opt(&self) -> Option<u32> {
3322            self.argument.as_ref().map(|field| *field)
3323        }
3324        ///Sets `argument` with the provided value.
3325        pub fn set_argument(&mut self, field: u32) {
3326            self.argument = Some(field);
3327        }
3328        ///Sets `argument` with the provided value.
3329        pub fn with_argument(mut self, field: u32) -> Self {
3330            self.set_argument(field);
3331            self
3332        }
3333        ///Sets `kind` with the provided value.
3334        pub fn with_kind<
3335            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3336        >(mut self, field: T) -> Self {
3337            self.set_kind(field.into());
3338            self
3339        }
3340        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3341        pub fn index_error(&self) -> &super::IndexError {
3342            self.index_error
3343                .as_ref()
3344                .map(|field| field as _)
3345                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3346        }
3347        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3348        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3349            self.index_error.as_mut().map(|field| field as _)
3350        }
3351        ///Returns a mutable reference to `index_error`.
3352        ///If the field is unset, it is first initialized with the default value.
3353        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3354            self.index_error.get_or_insert_default()
3355        }
3356        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3357        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3358            self.index_error.as_ref().map(|field| field as _)
3359        }
3360        ///Sets `index_error` with the provided value.
3361        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3362            self.index_error = Some(field.into().into());
3363        }
3364        ///Sets `index_error` with the provided value.
3365        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3366            self.set_index_error(field.into());
3367            self
3368        }
3369    }
3370    impl super::CommandOutput {
3371        pub const fn const_default() -> Self {
3372            Self {
3373                argument: None,
3374                value: None,
3375                json: None,
3376            }
3377        }
3378        #[doc(hidden)]
3379        pub fn default_instance() -> &'static Self {
3380            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3381            &DEFAULT
3382        }
3383        ///Returns the value of `argument`, or the default value if `argument` is unset.
3384        pub fn argument(&self) -> &super::Argument {
3385            self.argument
3386                .as_ref()
3387                .map(|field| field as _)
3388                .unwrap_or_else(|| super::Argument::default_instance() as _)
3389        }
3390        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3391        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3392            self.argument.as_mut().map(|field| field as _)
3393        }
3394        ///Returns a mutable reference to `argument`.
3395        ///If the field is unset, it is first initialized with the default value.
3396        pub fn argument_mut(&mut self) -> &mut super::Argument {
3397            self.argument.get_or_insert_default()
3398        }
3399        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3400        pub fn argument_opt(&self) -> Option<&super::Argument> {
3401            self.argument.as_ref().map(|field| field as _)
3402        }
3403        ///Sets `argument` with the provided value.
3404        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3405            self.argument = Some(field.into().into());
3406        }
3407        ///Sets `argument` with the provided value.
3408        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3409            self.set_argument(field.into());
3410            self
3411        }
3412        ///Returns the value of `value`, or the default value if `value` is unset.
3413        pub fn value(&self) -> &super::Bcs {
3414            self.value
3415                .as_ref()
3416                .map(|field| field as _)
3417                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3418        }
3419        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3420        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3421            self.value.as_mut().map(|field| field as _)
3422        }
3423        ///Returns a mutable reference to `value`.
3424        ///If the field is unset, it is first initialized with the default value.
3425        pub fn value_mut(&mut self) -> &mut super::Bcs {
3426            self.value.get_or_insert_default()
3427        }
3428        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3429        pub fn value_opt(&self) -> Option<&super::Bcs> {
3430            self.value.as_ref().map(|field| field as _)
3431        }
3432        ///Sets `value` with the provided value.
3433        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3434            self.value = Some(field.into().into());
3435        }
3436        ///Sets `value` with the provided value.
3437        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3438            self.set_value(field.into());
3439            self
3440        }
3441        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3442        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3443            self.json.as_mut().map(|field| field as _)
3444        }
3445        ///Returns a mutable reference to `json`.
3446        ///If the field is unset, it is first initialized with the default value.
3447        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3448            self.json.get_or_insert_default()
3449        }
3450        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3451        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3452            self.json.as_ref().map(|field| field as _)
3453        }
3454        ///Sets `json` with the provided value.
3455        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3456            self.json = Some(field.into().into());
3457        }
3458        ///Sets `json` with the provided value.
3459        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3460            self.set_json(field.into());
3461            self
3462        }
3463    }
3464    impl super::CommandResult {
3465        pub const fn const_default() -> Self {
3466            Self {
3467                return_values: Vec::new(),
3468                mutated_by_ref: Vec::new(),
3469            }
3470        }
3471        #[doc(hidden)]
3472        pub fn default_instance() -> &'static Self {
3473            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3474            &DEFAULT
3475        }
3476        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3477        pub fn return_values(&self) -> &[super::CommandOutput] {
3478            &self.return_values
3479        }
3480        ///Returns a mutable reference to `return_values`.
3481        ///If the field is unset, it is first initialized with the default value.
3482        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3483            &mut self.return_values
3484        }
3485        ///Sets `return_values` with the provided value.
3486        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3487            self.return_values = field;
3488        }
3489        ///Sets `return_values` with the provided value.
3490        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3491            self.set_return_values(field);
3492            self
3493        }
3494        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3495        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3496            &self.mutated_by_ref
3497        }
3498        ///Returns a mutable reference to `mutated_by_ref`.
3499        ///If the field is unset, it is first initialized with the default value.
3500        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3501            &mut self.mutated_by_ref
3502        }
3503        ///Sets `mutated_by_ref` with the provided value.
3504        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3505            self.mutated_by_ref = field;
3506        }
3507        ///Sets `mutated_by_ref` with the provided value.
3508        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3509            self.set_mutated_by_ref(field);
3510            self
3511        }
3512    }
3513    impl super::CongestedObjects {
3514        pub const fn const_default() -> Self {
3515            Self { objects: Vec::new() }
3516        }
3517        #[doc(hidden)]
3518        pub fn default_instance() -> &'static Self {
3519            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3520            &DEFAULT
3521        }
3522        ///Returns the value of `objects`, or the default value if `objects` is unset.
3523        pub fn objects(&self) -> &[String] {
3524            &self.objects
3525        }
3526        ///Returns a mutable reference to `objects`.
3527        ///If the field is unset, it is first initialized with the default value.
3528        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3529            &mut self.objects
3530        }
3531        ///Sets `objects` with the provided value.
3532        pub fn set_objects(&mut self, field: Vec<String>) {
3533            self.objects = field;
3534        }
3535        ///Sets `objects` with the provided value.
3536        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3537            self.set_objects(field);
3538            self
3539        }
3540    }
3541    impl super::ConsensusCommitPrologue {
3542        pub const fn const_default() -> Self {
3543            Self {
3544                epoch: None,
3545                round: None,
3546                commit_timestamp: None,
3547                consensus_commit_digest: None,
3548                sub_dag_index: None,
3549                consensus_determined_version_assignments: None,
3550                additional_state_digest: None,
3551            }
3552        }
3553        #[doc(hidden)]
3554        pub fn default_instance() -> &'static Self {
3555            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3556            &DEFAULT
3557        }
3558        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3559        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3560            self.epoch.as_mut().map(|field| field as _)
3561        }
3562        ///Returns a mutable reference to `epoch`.
3563        ///If the field is unset, it is first initialized with the default value.
3564        pub fn epoch_mut(&mut self) -> &mut u64 {
3565            self.epoch.get_or_insert_default()
3566        }
3567        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3568        pub fn epoch_opt(&self) -> Option<u64> {
3569            self.epoch.as_ref().map(|field| *field)
3570        }
3571        ///Sets `epoch` with the provided value.
3572        pub fn set_epoch(&mut self, field: u64) {
3573            self.epoch = Some(field);
3574        }
3575        ///Sets `epoch` with the provided value.
3576        pub fn with_epoch(mut self, field: u64) -> Self {
3577            self.set_epoch(field);
3578            self
3579        }
3580        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3581        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3582            self.round.as_mut().map(|field| field as _)
3583        }
3584        ///Returns a mutable reference to `round`.
3585        ///If the field is unset, it is first initialized with the default value.
3586        pub fn round_mut(&mut self) -> &mut u64 {
3587            self.round.get_or_insert_default()
3588        }
3589        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3590        pub fn round_opt(&self) -> Option<u64> {
3591            self.round.as_ref().map(|field| *field)
3592        }
3593        ///Sets `round` with the provided value.
3594        pub fn set_round(&mut self, field: u64) {
3595            self.round = Some(field);
3596        }
3597        ///Sets `round` with the provided value.
3598        pub fn with_round(mut self, field: u64) -> Self {
3599            self.set_round(field);
3600            self
3601        }
3602        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3603        pub fn commit_timestamp_opt_mut(
3604            &mut self,
3605        ) -> Option<&mut ::prost_types::Timestamp> {
3606            self.commit_timestamp.as_mut().map(|field| field as _)
3607        }
3608        ///Returns a mutable reference to `commit_timestamp`.
3609        ///If the field is unset, it is first initialized with the default value.
3610        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3611            self.commit_timestamp.get_or_insert_default()
3612        }
3613        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3614        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3615            self.commit_timestamp.as_ref().map(|field| field as _)
3616        }
3617        ///Sets `commit_timestamp` with the provided value.
3618        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3619            &mut self,
3620            field: T,
3621        ) {
3622            self.commit_timestamp = Some(field.into().into());
3623        }
3624        ///Sets `commit_timestamp` with the provided value.
3625        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3626            mut self,
3627            field: T,
3628        ) -> Self {
3629            self.set_commit_timestamp(field.into());
3630            self
3631        }
3632        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3633        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3634            self.consensus_commit_digest.as_mut().map(|field| field as _)
3635        }
3636        ///Returns a mutable reference to `consensus_commit_digest`.
3637        ///If the field is unset, it is first initialized with the default value.
3638        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3639            self.consensus_commit_digest.get_or_insert_default()
3640        }
3641        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3642        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3643            self.consensus_commit_digest.as_ref().map(|field| field as _)
3644        }
3645        ///Sets `consensus_commit_digest` with the provided value.
3646        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3647            self.consensus_commit_digest = Some(field.into().into());
3648        }
3649        ///Sets `consensus_commit_digest` with the provided value.
3650        pub fn with_consensus_commit_digest<T: Into<String>>(
3651            mut self,
3652            field: T,
3653        ) -> Self {
3654            self.set_consensus_commit_digest(field.into());
3655            self
3656        }
3657        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3658        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3659            self.sub_dag_index.as_mut().map(|field| field as _)
3660        }
3661        ///Returns a mutable reference to `sub_dag_index`.
3662        ///If the field is unset, it is first initialized with the default value.
3663        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3664            self.sub_dag_index.get_or_insert_default()
3665        }
3666        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3667        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3668            self.sub_dag_index.as_ref().map(|field| *field)
3669        }
3670        ///Sets `sub_dag_index` with the provided value.
3671        pub fn set_sub_dag_index(&mut self, field: u64) {
3672            self.sub_dag_index = Some(field);
3673        }
3674        ///Sets `sub_dag_index` with the provided value.
3675        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3676            self.set_sub_dag_index(field);
3677            self
3678        }
3679        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3680        pub fn consensus_determined_version_assignments(
3681            &self,
3682        ) -> &super::ConsensusDeterminedVersionAssignments {
3683            self.consensus_determined_version_assignments
3684                .as_ref()
3685                .map(|field| field as _)
3686                .unwrap_or_else(|| {
3687                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3688                })
3689        }
3690        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3691        pub fn consensus_determined_version_assignments_opt_mut(
3692            &mut self,
3693        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3694            self.consensus_determined_version_assignments
3695                .as_mut()
3696                .map(|field| field as _)
3697        }
3698        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3699        ///If the field is unset, it is first initialized with the default value.
3700        pub fn consensus_determined_version_assignments_mut(
3701            &mut self,
3702        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3703            self.consensus_determined_version_assignments.get_or_insert_default()
3704        }
3705        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3706        pub fn consensus_determined_version_assignments_opt(
3707            &self,
3708        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3709            self.consensus_determined_version_assignments
3710                .as_ref()
3711                .map(|field| field as _)
3712        }
3713        ///Sets `consensus_determined_version_assignments` with the provided value.
3714        pub fn set_consensus_determined_version_assignments<
3715            T: Into<super::ConsensusDeterminedVersionAssignments>,
3716        >(&mut self, field: T) {
3717            self.consensus_determined_version_assignments = Some(field.into().into());
3718        }
3719        ///Sets `consensus_determined_version_assignments` with the provided value.
3720        pub fn with_consensus_determined_version_assignments<
3721            T: Into<super::ConsensusDeterminedVersionAssignments>,
3722        >(mut self, field: T) -> Self {
3723            self.set_consensus_determined_version_assignments(field.into());
3724            self
3725        }
3726        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3727        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3728            self.additional_state_digest.as_mut().map(|field| field as _)
3729        }
3730        ///Returns a mutable reference to `additional_state_digest`.
3731        ///If the field is unset, it is first initialized with the default value.
3732        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3733            self.additional_state_digest.get_or_insert_default()
3734        }
3735        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3736        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3737            self.additional_state_digest.as_ref().map(|field| field as _)
3738        }
3739        ///Sets `additional_state_digest` with the provided value.
3740        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3741            self.additional_state_digest = Some(field.into().into());
3742        }
3743        ///Sets `additional_state_digest` with the provided value.
3744        pub fn with_additional_state_digest<T: Into<String>>(
3745            mut self,
3746            field: T,
3747        ) -> Self {
3748            self.set_additional_state_digest(field.into());
3749            self
3750        }
3751    }
3752    impl super::ConsensusDeterminedVersionAssignments {
3753        pub const fn const_default() -> Self {
3754            Self {
3755                version: None,
3756                canceled_transactions: Vec::new(),
3757            }
3758        }
3759        #[doc(hidden)]
3760        pub fn default_instance() -> &'static Self {
3761            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3762            &DEFAULT
3763        }
3764        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3765        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3766            self.version.as_mut().map(|field| field as _)
3767        }
3768        ///Returns a mutable reference to `version`.
3769        ///If the field is unset, it is first initialized with the default value.
3770        pub fn version_mut(&mut self) -> &mut i32 {
3771            self.version.get_or_insert_default()
3772        }
3773        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3774        pub fn version_opt(&self) -> Option<i32> {
3775            self.version.as_ref().map(|field| *field)
3776        }
3777        ///Sets `version` with the provided value.
3778        pub fn set_version(&mut self, field: i32) {
3779            self.version = Some(field);
3780        }
3781        ///Sets `version` with the provided value.
3782        pub fn with_version(mut self, field: i32) -> Self {
3783            self.set_version(field);
3784            self
3785        }
3786        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3787        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3788            &self.canceled_transactions
3789        }
3790        ///Returns a mutable reference to `canceled_transactions`.
3791        ///If the field is unset, it is first initialized with the default value.
3792        pub fn canceled_transactions_mut(
3793            &mut self,
3794        ) -> &mut Vec<super::CanceledTransaction> {
3795            &mut self.canceled_transactions
3796        }
3797        ///Sets `canceled_transactions` with the provided value.
3798        pub fn set_canceled_transactions(
3799            &mut self,
3800            field: Vec<super::CanceledTransaction>,
3801        ) {
3802            self.canceled_transactions = field;
3803        }
3804        ///Sets `canceled_transactions` with the provided value.
3805        pub fn with_canceled_transactions(
3806            mut self,
3807            field: Vec<super::CanceledTransaction>,
3808        ) -> Self {
3809            self.set_canceled_transactions(field);
3810            self
3811        }
3812    }
3813    impl super::DatatypeDescriptor {
3814        pub const fn const_default() -> Self {
3815            Self {
3816                type_name: None,
3817                defining_id: None,
3818                module: None,
3819                name: None,
3820                abilities: Vec::new(),
3821                type_parameters: Vec::new(),
3822                kind: None,
3823                fields: Vec::new(),
3824                variants: Vec::new(),
3825            }
3826        }
3827        #[doc(hidden)]
3828        pub fn default_instance() -> &'static Self {
3829            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3830            &DEFAULT
3831        }
3832        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3833        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3834            self.type_name.as_mut().map(|field| field as _)
3835        }
3836        ///Returns a mutable reference to `type_name`.
3837        ///If the field is unset, it is first initialized with the default value.
3838        pub fn type_name_mut(&mut self) -> &mut String {
3839            self.type_name.get_or_insert_default()
3840        }
3841        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3842        pub fn type_name_opt(&self) -> Option<&str> {
3843            self.type_name.as_ref().map(|field| field as _)
3844        }
3845        ///Sets `type_name` with the provided value.
3846        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3847            self.type_name = Some(field.into().into());
3848        }
3849        ///Sets `type_name` with the provided value.
3850        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3851            self.set_type_name(field.into());
3852            self
3853        }
3854        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3855        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3856            self.defining_id.as_mut().map(|field| field as _)
3857        }
3858        ///Returns a mutable reference to `defining_id`.
3859        ///If the field is unset, it is first initialized with the default value.
3860        pub fn defining_id_mut(&mut self) -> &mut String {
3861            self.defining_id.get_or_insert_default()
3862        }
3863        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3864        pub fn defining_id_opt(&self) -> Option<&str> {
3865            self.defining_id.as_ref().map(|field| field as _)
3866        }
3867        ///Sets `defining_id` with the provided value.
3868        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3869            self.defining_id = Some(field.into().into());
3870        }
3871        ///Sets `defining_id` with the provided value.
3872        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3873            self.set_defining_id(field.into());
3874            self
3875        }
3876        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3877        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3878            self.module.as_mut().map(|field| field as _)
3879        }
3880        ///Returns a mutable reference to `module`.
3881        ///If the field is unset, it is first initialized with the default value.
3882        pub fn module_mut(&mut self) -> &mut String {
3883            self.module.get_or_insert_default()
3884        }
3885        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3886        pub fn module_opt(&self) -> Option<&str> {
3887            self.module.as_ref().map(|field| field as _)
3888        }
3889        ///Sets `module` with the provided value.
3890        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3891            self.module = Some(field.into().into());
3892        }
3893        ///Sets `module` with the provided value.
3894        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3895            self.set_module(field.into());
3896            self
3897        }
3898        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3899        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3900            self.name.as_mut().map(|field| field as _)
3901        }
3902        ///Returns a mutable reference to `name`.
3903        ///If the field is unset, it is first initialized with the default value.
3904        pub fn name_mut(&mut self) -> &mut String {
3905            self.name.get_or_insert_default()
3906        }
3907        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3908        pub fn name_opt(&self) -> Option<&str> {
3909            self.name.as_ref().map(|field| field as _)
3910        }
3911        ///Sets `name` with the provided value.
3912        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3913            self.name = Some(field.into().into());
3914        }
3915        ///Sets `name` with the provided value.
3916        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3917            self.set_name(field.into());
3918            self
3919        }
3920        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3921        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3922            &self.type_parameters
3923        }
3924        ///Returns a mutable reference to `type_parameters`.
3925        ///If the field is unset, it is first initialized with the default value.
3926        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3927            &mut self.type_parameters
3928        }
3929        ///Sets `type_parameters` with the provided value.
3930        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3931            self.type_parameters = field;
3932        }
3933        ///Sets `type_parameters` with the provided value.
3934        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3935            self.set_type_parameters(field);
3936            self
3937        }
3938        ///Sets `kind` with the provided value.
3939        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3940            mut self,
3941            field: T,
3942        ) -> Self {
3943            self.set_kind(field.into());
3944            self
3945        }
3946        ///Returns the value of `fields`, or the default value if `fields` is unset.
3947        pub fn fields(&self) -> &[super::FieldDescriptor] {
3948            &self.fields
3949        }
3950        ///Returns a mutable reference to `fields`.
3951        ///If the field is unset, it is first initialized with the default value.
3952        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3953            &mut self.fields
3954        }
3955        ///Sets `fields` with the provided value.
3956        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3957            self.fields = field;
3958        }
3959        ///Sets `fields` with the provided value.
3960        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3961            self.set_fields(field);
3962            self
3963        }
3964        ///Returns the value of `variants`, or the default value if `variants` is unset.
3965        pub fn variants(&self) -> &[super::VariantDescriptor] {
3966            &self.variants
3967        }
3968        ///Returns a mutable reference to `variants`.
3969        ///If the field is unset, it is first initialized with the default value.
3970        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3971            &mut self.variants
3972        }
3973        ///Sets `variants` with the provided value.
3974        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3975            self.variants = field;
3976        }
3977        ///Sets `variants` with the provided value.
3978        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3979            self.set_variants(field);
3980            self
3981        }
3982    }
3983    impl super::DynamicField {
3984        pub const fn const_default() -> Self {
3985            Self {
3986                kind: None,
3987                parent: None,
3988                field_id: None,
3989                field_object: None,
3990                name: None,
3991                value: None,
3992                value_type: None,
3993                child_id: None,
3994                child_object: None,
3995            }
3996        }
3997        #[doc(hidden)]
3998        pub fn default_instance() -> &'static Self {
3999            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4000            &DEFAULT
4001        }
4002        ///Sets `kind` with the provided value.
4003        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4004            mut self,
4005            field: T,
4006        ) -> Self {
4007            self.set_kind(field.into());
4008            self
4009        }
4010        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4011        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4012            self.parent.as_mut().map(|field| field as _)
4013        }
4014        ///Returns a mutable reference to `parent`.
4015        ///If the field is unset, it is first initialized with the default value.
4016        pub fn parent_mut(&mut self) -> &mut String {
4017            self.parent.get_or_insert_default()
4018        }
4019        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
4020        pub fn parent_opt(&self) -> Option<&str> {
4021            self.parent.as_ref().map(|field| field as _)
4022        }
4023        ///Sets `parent` with the provided value.
4024        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4025            self.parent = Some(field.into().into());
4026        }
4027        ///Sets `parent` with the provided value.
4028        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4029            self.set_parent(field.into());
4030            self
4031        }
4032        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4033        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4034            self.field_id.as_mut().map(|field| field as _)
4035        }
4036        ///Returns a mutable reference to `field_id`.
4037        ///If the field is unset, it is first initialized with the default value.
4038        pub fn field_id_mut(&mut self) -> &mut String {
4039            self.field_id.get_or_insert_default()
4040        }
4041        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4042        pub fn field_id_opt(&self) -> Option<&str> {
4043            self.field_id.as_ref().map(|field| field as _)
4044        }
4045        ///Sets `field_id` with the provided value.
4046        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4047            self.field_id = Some(field.into().into());
4048        }
4049        ///Sets `field_id` with the provided value.
4050        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4051            self.set_field_id(field.into());
4052            self
4053        }
4054        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4055        pub fn field_object(&self) -> &super::Object {
4056            self.field_object
4057                .as_ref()
4058                .map(|field| field as _)
4059                .unwrap_or_else(|| super::Object::default_instance() as _)
4060        }
4061        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4062        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4063            self.field_object.as_mut().map(|field| field as _)
4064        }
4065        ///Returns a mutable reference to `field_object`.
4066        ///If the field is unset, it is first initialized with the default value.
4067        pub fn field_object_mut(&mut self) -> &mut super::Object {
4068            self.field_object.get_or_insert_default()
4069        }
4070        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4071        pub fn field_object_opt(&self) -> Option<&super::Object> {
4072            self.field_object.as_ref().map(|field| field as _)
4073        }
4074        ///Sets `field_object` with the provided value.
4075        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4076            self.field_object = Some(field.into().into());
4077        }
4078        ///Sets `field_object` with the provided value.
4079        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4080            self.set_field_object(field.into());
4081            self
4082        }
4083        ///Returns the value of `name`, or the default value if `name` is unset.
4084        pub fn name(&self) -> &super::Bcs {
4085            self.name
4086                .as_ref()
4087                .map(|field| field as _)
4088                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4089        }
4090        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4091        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4092            self.name.as_mut().map(|field| field as _)
4093        }
4094        ///Returns a mutable reference to `name`.
4095        ///If the field is unset, it is first initialized with the default value.
4096        pub fn name_mut(&mut self) -> &mut super::Bcs {
4097            self.name.get_or_insert_default()
4098        }
4099        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4100        pub fn name_opt(&self) -> Option<&super::Bcs> {
4101            self.name.as_ref().map(|field| field as _)
4102        }
4103        ///Sets `name` with the provided value.
4104        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4105            self.name = Some(field.into().into());
4106        }
4107        ///Sets `name` with the provided value.
4108        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4109            self.set_name(field.into());
4110            self
4111        }
4112        ///Returns the value of `value`, or the default value if `value` is unset.
4113        pub fn value(&self) -> &super::Bcs {
4114            self.value
4115                .as_ref()
4116                .map(|field| field as _)
4117                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4118        }
4119        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4120        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4121            self.value.as_mut().map(|field| field as _)
4122        }
4123        ///Returns a mutable reference to `value`.
4124        ///If the field is unset, it is first initialized with the default value.
4125        pub fn value_mut(&mut self) -> &mut super::Bcs {
4126            self.value.get_or_insert_default()
4127        }
4128        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4129        pub fn value_opt(&self) -> Option<&super::Bcs> {
4130            self.value.as_ref().map(|field| field as _)
4131        }
4132        ///Sets `value` with the provided value.
4133        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4134            self.value = Some(field.into().into());
4135        }
4136        ///Sets `value` with the provided value.
4137        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4138            self.set_value(field.into());
4139            self
4140        }
4141        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4142        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4143            self.value_type.as_mut().map(|field| field as _)
4144        }
4145        ///Returns a mutable reference to `value_type`.
4146        ///If the field is unset, it is first initialized with the default value.
4147        pub fn value_type_mut(&mut self) -> &mut String {
4148            self.value_type.get_or_insert_default()
4149        }
4150        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4151        pub fn value_type_opt(&self) -> Option<&str> {
4152            self.value_type.as_ref().map(|field| field as _)
4153        }
4154        ///Sets `value_type` with the provided value.
4155        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4156            self.value_type = Some(field.into().into());
4157        }
4158        ///Sets `value_type` with the provided value.
4159        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4160            self.set_value_type(field.into());
4161            self
4162        }
4163        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4164        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4165            self.child_id.as_mut().map(|field| field as _)
4166        }
4167        ///Returns a mutable reference to `child_id`.
4168        ///If the field is unset, it is first initialized with the default value.
4169        pub fn child_id_mut(&mut self) -> &mut String {
4170            self.child_id.get_or_insert_default()
4171        }
4172        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4173        pub fn child_id_opt(&self) -> Option<&str> {
4174            self.child_id.as_ref().map(|field| field as _)
4175        }
4176        ///Sets `child_id` with the provided value.
4177        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4178            self.child_id = Some(field.into().into());
4179        }
4180        ///Sets `child_id` with the provided value.
4181        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4182            self.set_child_id(field.into());
4183            self
4184        }
4185        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4186        pub fn child_object(&self) -> &super::Object {
4187            self.child_object
4188                .as_ref()
4189                .map(|field| field as _)
4190                .unwrap_or_else(|| super::Object::default_instance() as _)
4191        }
4192        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4193        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4194            self.child_object.as_mut().map(|field| field as _)
4195        }
4196        ///Returns a mutable reference to `child_object`.
4197        ///If the field is unset, it is first initialized with the default value.
4198        pub fn child_object_mut(&mut self) -> &mut super::Object {
4199            self.child_object.get_or_insert_default()
4200        }
4201        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4202        pub fn child_object_opt(&self) -> Option<&super::Object> {
4203            self.child_object.as_ref().map(|field| field as _)
4204        }
4205        ///Sets `child_object` with the provided value.
4206        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4207            self.child_object = Some(field.into().into());
4208        }
4209        ///Sets `child_object` with the provided value.
4210        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4211            self.set_child_object(field.into());
4212            self
4213        }
4214    }
4215    impl super::EndOfEpochData {
4216        pub const fn const_default() -> Self {
4217            Self {
4218                next_epoch_committee: Vec::new(),
4219                next_epoch_protocol_version: None,
4220                epoch_commitments: Vec::new(),
4221            }
4222        }
4223        #[doc(hidden)]
4224        pub fn default_instance() -> &'static Self {
4225            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4226            &DEFAULT
4227        }
4228        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4229        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4230            &self.next_epoch_committee
4231        }
4232        ///Returns a mutable reference to `next_epoch_committee`.
4233        ///If the field is unset, it is first initialized with the default value.
4234        pub fn next_epoch_committee_mut(
4235            &mut self,
4236        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4237            &mut self.next_epoch_committee
4238        }
4239        ///Sets `next_epoch_committee` with the provided value.
4240        pub fn set_next_epoch_committee(
4241            &mut self,
4242            field: Vec<super::ValidatorCommitteeMember>,
4243        ) {
4244            self.next_epoch_committee = field;
4245        }
4246        ///Sets `next_epoch_committee` with the provided value.
4247        pub fn with_next_epoch_committee(
4248            mut self,
4249            field: Vec<super::ValidatorCommitteeMember>,
4250        ) -> Self {
4251            self.set_next_epoch_committee(field);
4252            self
4253        }
4254        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4255        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4256            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4257        }
4258        ///Returns a mutable reference to `next_epoch_protocol_version`.
4259        ///If the field is unset, it is first initialized with the default value.
4260        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4261            self.next_epoch_protocol_version.get_or_insert_default()
4262        }
4263        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4264        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4265            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4266        }
4267        ///Sets `next_epoch_protocol_version` with the provided value.
4268        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4269            self.next_epoch_protocol_version = Some(field);
4270        }
4271        ///Sets `next_epoch_protocol_version` with the provided value.
4272        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4273            self.set_next_epoch_protocol_version(field);
4274            self
4275        }
4276        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4277        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4278            &self.epoch_commitments
4279        }
4280        ///Returns a mutable reference to `epoch_commitments`.
4281        ///If the field is unset, it is first initialized with the default value.
4282        pub fn epoch_commitments_mut(
4283            &mut self,
4284        ) -> &mut Vec<super::CheckpointCommitment> {
4285            &mut self.epoch_commitments
4286        }
4287        ///Sets `epoch_commitments` with the provided value.
4288        pub fn set_epoch_commitments(
4289            &mut self,
4290            field: Vec<super::CheckpointCommitment>,
4291        ) {
4292            self.epoch_commitments = field;
4293        }
4294        ///Sets `epoch_commitments` with the provided value.
4295        pub fn with_epoch_commitments(
4296            mut self,
4297            field: Vec<super::CheckpointCommitment>,
4298        ) -> Self {
4299            self.set_epoch_commitments(field);
4300            self
4301        }
4302    }
4303    impl super::EndOfEpochTransaction {
4304        pub const fn const_default() -> Self {
4305            Self { transactions: Vec::new() }
4306        }
4307        #[doc(hidden)]
4308        pub fn default_instance() -> &'static Self {
4309            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4310            &DEFAULT
4311        }
4312        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4313        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4314            &self.transactions
4315        }
4316        ///Returns a mutable reference to `transactions`.
4317        ///If the field is unset, it is first initialized with the default value.
4318        pub fn transactions_mut(
4319            &mut self,
4320        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4321            &mut self.transactions
4322        }
4323        ///Sets `transactions` with the provided value.
4324        pub fn set_transactions(
4325            &mut self,
4326            field: Vec<super::EndOfEpochTransactionKind>,
4327        ) {
4328            self.transactions = field;
4329        }
4330        ///Sets `transactions` with the provided value.
4331        pub fn with_transactions(
4332            mut self,
4333            field: Vec<super::EndOfEpochTransactionKind>,
4334        ) -> Self {
4335            self.set_transactions(field);
4336            self
4337        }
4338    }
4339    impl super::EndOfEpochTransactionKind {
4340        pub const fn const_default() -> Self {
4341            Self { kind: None, data: None }
4342        }
4343        #[doc(hidden)]
4344        pub fn default_instance() -> &'static Self {
4345            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4346            &DEFAULT
4347        }
4348        ///Sets `kind` with the provided value.
4349        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4350            mut self,
4351            field: T,
4352        ) -> Self {
4353            self.set_kind(field.into());
4354            self
4355        }
4356        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4357        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4358            if let Some(
4359                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4360            ) = &self.data
4361            {
4362                field as _
4363            } else {
4364                super::ChangeEpoch::default_instance() as _
4365            }
4366        }
4367        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4368        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4369            if let Some(
4370                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4371            ) = &self.data
4372            {
4373                Some(field as _)
4374            } else {
4375                None
4376            }
4377        }
4378        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4379        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4380            if let Some(
4381                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4382            ) = &mut self.data
4383            {
4384                Some(field as _)
4385            } else {
4386                None
4387            }
4388        }
4389        ///Returns a mutable reference to `change_epoch`.
4390        ///If the field is unset, it is first initialized with the default value.
4391        ///If any other oneof field in the same oneof is set, it will be cleared.
4392        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4393            if self.change_epoch_opt_mut().is_none() {
4394                self.data = Some(
4395                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4396                        super::ChangeEpoch::default(),
4397                    ),
4398                );
4399            }
4400            self.change_epoch_opt_mut().unwrap()
4401        }
4402        ///Sets `change_epoch` with the provided value.
4403        ///If any other oneof field in the same oneof is set, it will be cleared.
4404        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4405            self.data = Some(
4406                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4407                    field.into().into(),
4408                ),
4409            );
4410        }
4411        ///Sets `change_epoch` with the provided value.
4412        ///If any other oneof field in the same oneof is set, it will be cleared.
4413        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4414            mut self,
4415            field: T,
4416        ) -> Self {
4417            self.set_change_epoch(field.into());
4418            self
4419        }
4420        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4421        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4422            if let Some(
4423                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4424                    field,
4425                ),
4426            ) = &self.data
4427            {
4428                field as _
4429            } else {
4430                super::AuthenticatorStateExpire::default_instance() as _
4431            }
4432        }
4433        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4434        pub fn authenticator_state_expire_opt(
4435            &self,
4436        ) -> Option<&super::AuthenticatorStateExpire> {
4437            if let Some(
4438                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4439                    field,
4440                ),
4441            ) = &self.data
4442            {
4443                Some(field as _)
4444            } else {
4445                None
4446            }
4447        }
4448        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4449        pub fn authenticator_state_expire_opt_mut(
4450            &mut self,
4451        ) -> Option<&mut super::AuthenticatorStateExpire> {
4452            if let Some(
4453                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4454                    field,
4455                ),
4456            ) = &mut self.data
4457            {
4458                Some(field as _)
4459            } else {
4460                None
4461            }
4462        }
4463        ///Returns a mutable reference to `authenticator_state_expire`.
4464        ///If the field is unset, it is first initialized with the default value.
4465        ///If any other oneof field in the same oneof is set, it will be cleared.
4466        pub fn authenticator_state_expire_mut(
4467            &mut self,
4468        ) -> &mut super::AuthenticatorStateExpire {
4469            if self.authenticator_state_expire_opt_mut().is_none() {
4470                self.data = Some(
4471                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4472                        super::AuthenticatorStateExpire::default(),
4473                    ),
4474                );
4475            }
4476            self.authenticator_state_expire_opt_mut().unwrap()
4477        }
4478        ///Sets `authenticator_state_expire` with the provided value.
4479        ///If any other oneof field in the same oneof is set, it will be cleared.
4480        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4481            &mut self,
4482            field: T,
4483        ) {
4484            self.data = Some(
4485                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4486                    field.into().into(),
4487                ),
4488            );
4489        }
4490        ///Sets `authenticator_state_expire` with the provided value.
4491        ///If any other oneof field in the same oneof is set, it will be cleared.
4492        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4493            mut self,
4494            field: T,
4495        ) -> Self {
4496            self.set_authenticator_state_expire(field.into());
4497            self
4498        }
4499        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4500        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4501            if let Some(
4502                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4503                    field,
4504                ),
4505            ) = &self.data
4506            {
4507                field as _
4508            } else {
4509                super::ExecutionTimeObservations::default_instance() as _
4510            }
4511        }
4512        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4513        pub fn execution_time_observations_opt(
4514            &self,
4515        ) -> Option<&super::ExecutionTimeObservations> {
4516            if let Some(
4517                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4518                    field,
4519                ),
4520            ) = &self.data
4521            {
4522                Some(field as _)
4523            } else {
4524                None
4525            }
4526        }
4527        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4528        pub fn execution_time_observations_opt_mut(
4529            &mut self,
4530        ) -> Option<&mut super::ExecutionTimeObservations> {
4531            if let Some(
4532                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4533                    field,
4534                ),
4535            ) = &mut self.data
4536            {
4537                Some(field as _)
4538            } else {
4539                None
4540            }
4541        }
4542        ///Returns a mutable reference to `execution_time_observations`.
4543        ///If the field is unset, it is first initialized with the default value.
4544        ///If any other oneof field in the same oneof is set, it will be cleared.
4545        pub fn execution_time_observations_mut(
4546            &mut self,
4547        ) -> &mut super::ExecutionTimeObservations {
4548            if self.execution_time_observations_opt_mut().is_none() {
4549                self.data = Some(
4550                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4551                        super::ExecutionTimeObservations::default(),
4552                    ),
4553                );
4554            }
4555            self.execution_time_observations_opt_mut().unwrap()
4556        }
4557        ///Sets `execution_time_observations` with the provided value.
4558        ///If any other oneof field in the same oneof is set, it will be cleared.
4559        pub fn set_execution_time_observations<
4560            T: Into<super::ExecutionTimeObservations>,
4561        >(&mut self, field: T) {
4562            self.data = Some(
4563                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4564                    field.into().into(),
4565                ),
4566            );
4567        }
4568        ///Sets `execution_time_observations` with the provided value.
4569        ///If any other oneof field in the same oneof is set, it will be cleared.
4570        pub fn with_execution_time_observations<
4571            T: Into<super::ExecutionTimeObservations>,
4572        >(mut self, field: T) -> Self {
4573            self.set_execution_time_observations(field.into());
4574            self
4575        }
4576        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4577        pub fn bridge_chain_id(&self) -> &str {
4578            if let Some(
4579                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4580            ) = &self.data
4581            {
4582                field as _
4583            } else {
4584                ""
4585            }
4586        }
4587        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4588        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4589            if let Some(
4590                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4591            ) = &self.data
4592            {
4593                Some(field as _)
4594            } else {
4595                None
4596            }
4597        }
4598        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4599        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4600            if let Some(
4601                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4602            ) = &mut self.data
4603            {
4604                Some(field as _)
4605            } else {
4606                None
4607            }
4608        }
4609        ///Returns a mutable reference to `bridge_chain_id`.
4610        ///If the field is unset, it is first initialized with the default value.
4611        ///If any other oneof field in the same oneof is set, it will be cleared.
4612        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4613            if self.bridge_chain_id_opt_mut().is_none() {
4614                self.data = Some(
4615                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4616                        String::default(),
4617                    ),
4618                );
4619            }
4620            self.bridge_chain_id_opt_mut().unwrap()
4621        }
4622        ///Sets `bridge_chain_id` with the provided value.
4623        ///If any other oneof field in the same oneof is set, it will be cleared.
4624        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4625            self.data = Some(
4626                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4627                    field.into().into(),
4628                ),
4629            );
4630        }
4631        ///Sets `bridge_chain_id` with the provided value.
4632        ///If any other oneof field in the same oneof is set, it will be cleared.
4633        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4634            self.set_bridge_chain_id(field.into());
4635            self
4636        }
4637        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4638        pub fn bridge_object_version(&self) -> u64 {
4639            if let Some(
4640                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4641            ) = &self.data
4642            {
4643                *field
4644            } else {
4645                0u64
4646            }
4647        }
4648        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4649        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4650            if let Some(
4651                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4652            ) = &self.data
4653            {
4654                Some(*field)
4655            } else {
4656                None
4657            }
4658        }
4659        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4660        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4661            if let Some(
4662                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4663            ) = &mut self.data
4664            {
4665                Some(field as _)
4666            } else {
4667                None
4668            }
4669        }
4670        ///Returns a mutable reference to `bridge_object_version`.
4671        ///If the field is unset, it is first initialized with the default value.
4672        ///If any other oneof field in the same oneof is set, it will be cleared.
4673        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4674            if self.bridge_object_version_opt_mut().is_none() {
4675                self.data = Some(
4676                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4677                        u64::default(),
4678                    ),
4679                );
4680            }
4681            self.bridge_object_version_opt_mut().unwrap()
4682        }
4683        ///Sets `bridge_object_version` with the provided value.
4684        ///If any other oneof field in the same oneof is set, it will be cleared.
4685        pub fn set_bridge_object_version(&mut self, field: u64) {
4686            self.data = Some(
4687                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4688            );
4689        }
4690        ///Sets `bridge_object_version` with the provided value.
4691        ///If any other oneof field in the same oneof is set, it will be cleared.
4692        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4693            self.set_bridge_object_version(field);
4694            self
4695        }
4696        ///Returns the value of `storage_cost`, or the default value if `storage_cost` is unset.
4697        pub fn storage_cost(&self) -> u64 {
4698            if let Some(
4699                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4700            ) = &self.data
4701            {
4702                *field
4703            } else {
4704                0u64
4705            }
4706        }
4707        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
4708        pub fn storage_cost_opt(&self) -> Option<u64> {
4709            if let Some(
4710                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4711            ) = &self.data
4712            {
4713                Some(*field)
4714            } else {
4715                None
4716            }
4717        }
4718        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4719        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4720            if let Some(
4721                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4722            ) = &mut self.data
4723            {
4724                Some(field as _)
4725            } else {
4726                None
4727            }
4728        }
4729        ///Returns a mutable reference to `storage_cost`.
4730        ///If the field is unset, it is first initialized with the default value.
4731        ///If any other oneof field in the same oneof is set, it will be cleared.
4732        pub fn storage_cost_mut(&mut self) -> &mut u64 {
4733            if self.storage_cost_opt_mut().is_none() {
4734                self.data = Some(
4735                    super::end_of_epoch_transaction_kind::Data::StorageCost(
4736                        u64::default(),
4737                    ),
4738                );
4739            }
4740            self.storage_cost_opt_mut().unwrap()
4741        }
4742        ///Sets `storage_cost` with the provided value.
4743        ///If any other oneof field in the same oneof is set, it will be cleared.
4744        pub fn set_storage_cost(&mut self, field: u64) {
4745            self.data = Some(
4746                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4747            );
4748        }
4749        ///Sets `storage_cost` with the provided value.
4750        ///If any other oneof field in the same oneof is set, it will be cleared.
4751        pub fn with_storage_cost(mut self, field: u64) -> Self {
4752            self.set_storage_cost(field);
4753            self
4754        }
4755    }
4756    impl super::Epoch {
4757        pub const fn const_default() -> Self {
4758            Self {
4759                epoch: None,
4760                committee: None,
4761                system_state: None,
4762                first_checkpoint: None,
4763                last_checkpoint: None,
4764                start: None,
4765                end: None,
4766                reference_gas_price: None,
4767                protocol_config: None,
4768            }
4769        }
4770        #[doc(hidden)]
4771        pub fn default_instance() -> &'static Self {
4772            static DEFAULT: super::Epoch = super::Epoch::const_default();
4773            &DEFAULT
4774        }
4775        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4776        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4777            self.epoch.as_mut().map(|field| field as _)
4778        }
4779        ///Returns a mutable reference to `epoch`.
4780        ///If the field is unset, it is first initialized with the default value.
4781        pub fn epoch_mut(&mut self) -> &mut u64 {
4782            self.epoch.get_or_insert_default()
4783        }
4784        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4785        pub fn epoch_opt(&self) -> Option<u64> {
4786            self.epoch.as_ref().map(|field| *field)
4787        }
4788        ///Sets `epoch` with the provided value.
4789        pub fn set_epoch(&mut self, field: u64) {
4790            self.epoch = Some(field);
4791        }
4792        ///Sets `epoch` with the provided value.
4793        pub fn with_epoch(mut self, field: u64) -> Self {
4794            self.set_epoch(field);
4795            self
4796        }
4797        ///Returns the value of `committee`, or the default value if `committee` is unset.
4798        pub fn committee(&self) -> &super::ValidatorCommittee {
4799            self.committee
4800                .as_ref()
4801                .map(|field| field as _)
4802                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4803        }
4804        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4805        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4806            self.committee.as_mut().map(|field| field as _)
4807        }
4808        ///Returns a mutable reference to `committee`.
4809        ///If the field is unset, it is first initialized with the default value.
4810        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4811            self.committee.get_or_insert_default()
4812        }
4813        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4814        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4815            self.committee.as_ref().map(|field| field as _)
4816        }
4817        ///Sets `committee` with the provided value.
4818        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4819            self.committee = Some(field.into().into());
4820        }
4821        ///Sets `committee` with the provided value.
4822        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4823            mut self,
4824            field: T,
4825        ) -> Self {
4826            self.set_committee(field.into());
4827            self
4828        }
4829        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4830        pub fn system_state(&self) -> &super::SystemState {
4831            self.system_state
4832                .as_ref()
4833                .map(|field| field as _)
4834                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4835        }
4836        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4837        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4838            self.system_state.as_mut().map(|field| field as _)
4839        }
4840        ///Returns a mutable reference to `system_state`.
4841        ///If the field is unset, it is first initialized with the default value.
4842        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4843            self.system_state.get_or_insert_default()
4844        }
4845        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4846        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4847            self.system_state.as_ref().map(|field| field as _)
4848        }
4849        ///Sets `system_state` with the provided value.
4850        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4851            self.system_state = Some(field.into().into());
4852        }
4853        ///Sets `system_state` with the provided value.
4854        pub fn with_system_state<T: Into<super::SystemState>>(
4855            mut self,
4856            field: T,
4857        ) -> Self {
4858            self.set_system_state(field.into());
4859            self
4860        }
4861        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4862        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4863            self.first_checkpoint.as_mut().map(|field| field as _)
4864        }
4865        ///Returns a mutable reference to `first_checkpoint`.
4866        ///If the field is unset, it is first initialized with the default value.
4867        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4868            self.first_checkpoint.get_or_insert_default()
4869        }
4870        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4871        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4872            self.first_checkpoint.as_ref().map(|field| *field)
4873        }
4874        ///Sets `first_checkpoint` with the provided value.
4875        pub fn set_first_checkpoint(&mut self, field: u64) {
4876            self.first_checkpoint = Some(field);
4877        }
4878        ///Sets `first_checkpoint` with the provided value.
4879        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4880            self.set_first_checkpoint(field);
4881            self
4882        }
4883        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4884        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4885            self.last_checkpoint.as_mut().map(|field| field as _)
4886        }
4887        ///Returns a mutable reference to `last_checkpoint`.
4888        ///If the field is unset, it is first initialized with the default value.
4889        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4890            self.last_checkpoint.get_or_insert_default()
4891        }
4892        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4893        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4894            self.last_checkpoint.as_ref().map(|field| *field)
4895        }
4896        ///Sets `last_checkpoint` with the provided value.
4897        pub fn set_last_checkpoint(&mut self, field: u64) {
4898            self.last_checkpoint = Some(field);
4899        }
4900        ///Sets `last_checkpoint` with the provided value.
4901        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4902            self.set_last_checkpoint(field);
4903            self
4904        }
4905        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4906        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4907            self.start.as_mut().map(|field| field as _)
4908        }
4909        ///Returns a mutable reference to `start`.
4910        ///If the field is unset, it is first initialized with the default value.
4911        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4912            self.start.get_or_insert_default()
4913        }
4914        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4915        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4916            self.start.as_ref().map(|field| field as _)
4917        }
4918        ///Sets `start` with the provided value.
4919        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4920            self.start = Some(field.into().into());
4921        }
4922        ///Sets `start` with the provided value.
4923        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4924            mut self,
4925            field: T,
4926        ) -> Self {
4927            self.set_start(field.into());
4928            self
4929        }
4930        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4931        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4932            self.end.as_mut().map(|field| field as _)
4933        }
4934        ///Returns a mutable reference to `end`.
4935        ///If the field is unset, it is first initialized with the default value.
4936        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4937            self.end.get_or_insert_default()
4938        }
4939        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4940        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4941            self.end.as_ref().map(|field| field as _)
4942        }
4943        ///Sets `end` with the provided value.
4944        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4945            self.end = Some(field.into().into());
4946        }
4947        ///Sets `end` with the provided value.
4948        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4949            self.set_end(field.into());
4950            self
4951        }
4952        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4953        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4954            self.reference_gas_price.as_mut().map(|field| field as _)
4955        }
4956        ///Returns a mutable reference to `reference_gas_price`.
4957        ///If the field is unset, it is first initialized with the default value.
4958        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4959            self.reference_gas_price.get_or_insert_default()
4960        }
4961        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
4962        pub fn reference_gas_price_opt(&self) -> Option<u64> {
4963            self.reference_gas_price.as_ref().map(|field| *field)
4964        }
4965        ///Sets `reference_gas_price` with the provided value.
4966        pub fn set_reference_gas_price(&mut self, field: u64) {
4967            self.reference_gas_price = Some(field);
4968        }
4969        ///Sets `reference_gas_price` with the provided value.
4970        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4971            self.set_reference_gas_price(field);
4972            self
4973        }
4974        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
4975        pub fn protocol_config(&self) -> &super::ProtocolConfig {
4976            self.protocol_config
4977                .as_ref()
4978                .map(|field| field as _)
4979                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4980        }
4981        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4982        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4983            self.protocol_config.as_mut().map(|field| field as _)
4984        }
4985        ///Returns a mutable reference to `protocol_config`.
4986        ///If the field is unset, it is first initialized with the default value.
4987        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4988            self.protocol_config.get_or_insert_default()
4989        }
4990        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
4991        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4992            self.protocol_config.as_ref().map(|field| field as _)
4993        }
4994        ///Sets `protocol_config` with the provided value.
4995        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4996            self.protocol_config = Some(field.into().into());
4997        }
4998        ///Sets `protocol_config` with the provided value.
4999        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5000            mut self,
5001            field: T,
5002        ) -> Self {
5003            self.set_protocol_config(field.into());
5004            self
5005        }
5006    }
5007    impl super::Event {
5008        pub const fn const_default() -> Self {
5009            Self {
5010                package_id: None,
5011                module: None,
5012                sender: None,
5013                event_type: None,
5014                contents: None,
5015                json: None,
5016            }
5017        }
5018        #[doc(hidden)]
5019        pub fn default_instance() -> &'static Self {
5020            static DEFAULT: super::Event = super::Event::const_default();
5021            &DEFAULT
5022        }
5023        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5024        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5025            self.package_id.as_mut().map(|field| field as _)
5026        }
5027        ///Returns a mutable reference to `package_id`.
5028        ///If the field is unset, it is first initialized with the default value.
5029        pub fn package_id_mut(&mut self) -> &mut String {
5030            self.package_id.get_or_insert_default()
5031        }
5032        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5033        pub fn package_id_opt(&self) -> Option<&str> {
5034            self.package_id.as_ref().map(|field| field as _)
5035        }
5036        ///Sets `package_id` with the provided value.
5037        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5038            self.package_id = Some(field.into().into());
5039        }
5040        ///Sets `package_id` with the provided value.
5041        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5042            self.set_package_id(field.into());
5043            self
5044        }
5045        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5046        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5047            self.module.as_mut().map(|field| field as _)
5048        }
5049        ///Returns a mutable reference to `module`.
5050        ///If the field is unset, it is first initialized with the default value.
5051        pub fn module_mut(&mut self) -> &mut String {
5052            self.module.get_or_insert_default()
5053        }
5054        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5055        pub fn module_opt(&self) -> Option<&str> {
5056            self.module.as_ref().map(|field| field as _)
5057        }
5058        ///Sets `module` with the provided value.
5059        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5060            self.module = Some(field.into().into());
5061        }
5062        ///Sets `module` with the provided value.
5063        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5064            self.set_module(field.into());
5065            self
5066        }
5067        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5068        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5069            self.sender.as_mut().map(|field| field as _)
5070        }
5071        ///Returns a mutable reference to `sender`.
5072        ///If the field is unset, it is first initialized with the default value.
5073        pub fn sender_mut(&mut self) -> &mut String {
5074            self.sender.get_or_insert_default()
5075        }
5076        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5077        pub fn sender_opt(&self) -> Option<&str> {
5078            self.sender.as_ref().map(|field| field as _)
5079        }
5080        ///Sets `sender` with the provided value.
5081        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5082            self.sender = Some(field.into().into());
5083        }
5084        ///Sets `sender` with the provided value.
5085        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5086            self.set_sender(field.into());
5087            self
5088        }
5089        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5090        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5091            self.event_type.as_mut().map(|field| field as _)
5092        }
5093        ///Returns a mutable reference to `event_type`.
5094        ///If the field is unset, it is first initialized with the default value.
5095        pub fn event_type_mut(&mut self) -> &mut String {
5096            self.event_type.get_or_insert_default()
5097        }
5098        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5099        pub fn event_type_opt(&self) -> Option<&str> {
5100            self.event_type.as_ref().map(|field| field as _)
5101        }
5102        ///Sets `event_type` with the provided value.
5103        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5104            self.event_type = Some(field.into().into());
5105        }
5106        ///Sets `event_type` with the provided value.
5107        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5108            self.set_event_type(field.into());
5109            self
5110        }
5111        ///Returns the value of `contents`, or the default value if `contents` is unset.
5112        pub fn contents(&self) -> &super::Bcs {
5113            self.contents
5114                .as_ref()
5115                .map(|field| field as _)
5116                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5117        }
5118        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5119        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5120            self.contents.as_mut().map(|field| field as _)
5121        }
5122        ///Returns a mutable reference to `contents`.
5123        ///If the field is unset, it is first initialized with the default value.
5124        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5125            self.contents.get_or_insert_default()
5126        }
5127        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5128        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5129            self.contents.as_ref().map(|field| field as _)
5130        }
5131        ///Sets `contents` with the provided value.
5132        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5133            self.contents = Some(field.into().into());
5134        }
5135        ///Sets `contents` with the provided value.
5136        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5137            self.set_contents(field.into());
5138            self
5139        }
5140        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5141        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5142            self.json.as_mut().map(|field| field as _)
5143        }
5144        ///Returns a mutable reference to `json`.
5145        ///If the field is unset, it is first initialized with the default value.
5146        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5147            self.json.get_or_insert_default()
5148        }
5149        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5150        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5151            self.json.as_ref().map(|field| field as _)
5152        }
5153        ///Sets `json` with the provided value.
5154        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5155            self.json = Some(field.into().into());
5156        }
5157        ///Sets `json` with the provided value.
5158        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5159            self.set_json(field.into());
5160            self
5161        }
5162    }
5163    impl super::ExecuteTransactionRequest {
5164        pub const fn const_default() -> Self {
5165            Self {
5166                transaction: None,
5167                signatures: Vec::new(),
5168                read_mask: None,
5169            }
5170        }
5171        #[doc(hidden)]
5172        pub fn default_instance() -> &'static Self {
5173            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5174            &DEFAULT
5175        }
5176        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5177        pub fn transaction(&self) -> &super::Transaction {
5178            self.transaction
5179                .as_ref()
5180                .map(|field| field as _)
5181                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5182        }
5183        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5184        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5185            self.transaction.as_mut().map(|field| field as _)
5186        }
5187        ///Returns a mutable reference to `transaction`.
5188        ///If the field is unset, it is first initialized with the default value.
5189        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5190            self.transaction.get_or_insert_default()
5191        }
5192        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5193        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5194            self.transaction.as_ref().map(|field| field as _)
5195        }
5196        ///Sets `transaction` with the provided value.
5197        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5198            self.transaction = Some(field.into().into());
5199        }
5200        ///Sets `transaction` with the provided value.
5201        pub fn with_transaction<T: Into<super::Transaction>>(
5202            mut self,
5203            field: T,
5204        ) -> Self {
5205            self.set_transaction(field.into());
5206            self
5207        }
5208        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5209        pub fn signatures(&self) -> &[super::UserSignature] {
5210            &self.signatures
5211        }
5212        ///Returns a mutable reference to `signatures`.
5213        ///If the field is unset, it is first initialized with the default value.
5214        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5215            &mut self.signatures
5216        }
5217        ///Sets `signatures` with the provided value.
5218        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5219            self.signatures = field;
5220        }
5221        ///Sets `signatures` with the provided value.
5222        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5223            self.set_signatures(field);
5224            self
5225        }
5226        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5227        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5228            self.read_mask.as_mut().map(|field| field as _)
5229        }
5230        ///Returns a mutable reference to `read_mask`.
5231        ///If the field is unset, it is first initialized with the default value.
5232        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5233            self.read_mask.get_or_insert_default()
5234        }
5235        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
5236        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5237            self.read_mask.as_ref().map(|field| field as _)
5238        }
5239        ///Sets `read_mask` with the provided value.
5240        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5241            self.read_mask = Some(field.into().into());
5242        }
5243        ///Sets `read_mask` with the provided value.
5244        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5245            mut self,
5246            field: T,
5247        ) -> Self {
5248            self.set_read_mask(field.into());
5249            self
5250        }
5251    }
5252    impl super::ExecuteTransactionResponse {
5253        pub const fn const_default() -> Self {
5254            Self { transaction: None }
5255        }
5256        #[doc(hidden)]
5257        pub fn default_instance() -> &'static Self {
5258            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5259            &DEFAULT
5260        }
5261        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5262        pub fn transaction(&self) -> &super::ExecutedTransaction {
5263            self.transaction
5264                .as_ref()
5265                .map(|field| field as _)
5266                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5267        }
5268        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5269        pub fn transaction_opt_mut(
5270            &mut self,
5271        ) -> Option<&mut super::ExecutedTransaction> {
5272            self.transaction.as_mut().map(|field| field as _)
5273        }
5274        ///Returns a mutable reference to `transaction`.
5275        ///If the field is unset, it is first initialized with the default value.
5276        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5277            self.transaction.get_or_insert_default()
5278        }
5279        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5280        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5281            self.transaction.as_ref().map(|field| field as _)
5282        }
5283        ///Sets `transaction` with the provided value.
5284        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5285            &mut self,
5286            field: T,
5287        ) {
5288            self.transaction = Some(field.into().into());
5289        }
5290        ///Sets `transaction` with the provided value.
5291        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5292            mut self,
5293            field: T,
5294        ) -> Self {
5295            self.set_transaction(field.into());
5296            self
5297        }
5298    }
5299    impl super::ExecutedTransaction {
5300        pub const fn const_default() -> Self {
5301            Self {
5302                digest: None,
5303                transaction: None,
5304                signatures: Vec::new(),
5305                effects: None,
5306                events: None,
5307                checkpoint: None,
5308                timestamp: None,
5309                balance_changes: Vec::new(),
5310                objects: None,
5311            }
5312        }
5313        #[doc(hidden)]
5314        pub fn default_instance() -> &'static Self {
5315            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5316            &DEFAULT
5317        }
5318        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5319        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5320            self.digest.as_mut().map(|field| field as _)
5321        }
5322        ///Returns a mutable reference to `digest`.
5323        ///If the field is unset, it is first initialized with the default value.
5324        pub fn digest_mut(&mut self) -> &mut String {
5325            self.digest.get_or_insert_default()
5326        }
5327        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5328        pub fn digest_opt(&self) -> Option<&str> {
5329            self.digest.as_ref().map(|field| field as _)
5330        }
5331        ///Sets `digest` with the provided value.
5332        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5333            self.digest = Some(field.into().into());
5334        }
5335        ///Sets `digest` with the provided value.
5336        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5337            self.set_digest(field.into());
5338            self
5339        }
5340        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5341        pub fn transaction(&self) -> &super::Transaction {
5342            self.transaction
5343                .as_ref()
5344                .map(|field| field as _)
5345                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5346        }
5347        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5348        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5349            self.transaction.as_mut().map(|field| field as _)
5350        }
5351        ///Returns a mutable reference to `transaction`.
5352        ///If the field is unset, it is first initialized with the default value.
5353        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5354            self.transaction.get_or_insert_default()
5355        }
5356        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5357        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5358            self.transaction.as_ref().map(|field| field as _)
5359        }
5360        ///Sets `transaction` with the provided value.
5361        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5362            self.transaction = Some(field.into().into());
5363        }
5364        ///Sets `transaction` with the provided value.
5365        pub fn with_transaction<T: Into<super::Transaction>>(
5366            mut self,
5367            field: T,
5368        ) -> Self {
5369            self.set_transaction(field.into());
5370            self
5371        }
5372        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5373        pub fn signatures(&self) -> &[super::UserSignature] {
5374            &self.signatures
5375        }
5376        ///Returns a mutable reference to `signatures`.
5377        ///If the field is unset, it is first initialized with the default value.
5378        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5379            &mut self.signatures
5380        }
5381        ///Sets `signatures` with the provided value.
5382        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5383            self.signatures = field;
5384        }
5385        ///Sets `signatures` with the provided value.
5386        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5387            self.set_signatures(field);
5388            self
5389        }
5390        ///Returns the value of `effects`, or the default value if `effects` is unset.
5391        pub fn effects(&self) -> &super::TransactionEffects {
5392            self.effects
5393                .as_ref()
5394                .map(|field| field as _)
5395                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5396        }
5397        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5398        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5399            self.effects.as_mut().map(|field| field as _)
5400        }
5401        ///Returns a mutable reference to `effects`.
5402        ///If the field is unset, it is first initialized with the default value.
5403        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5404            self.effects.get_or_insert_default()
5405        }
5406        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5407        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5408            self.effects.as_ref().map(|field| field as _)
5409        }
5410        ///Sets `effects` with the provided value.
5411        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5412            self.effects = Some(field.into().into());
5413        }
5414        ///Sets `effects` with the provided value.
5415        pub fn with_effects<T: Into<super::TransactionEffects>>(
5416            mut self,
5417            field: T,
5418        ) -> Self {
5419            self.set_effects(field.into());
5420            self
5421        }
5422        ///Returns the value of `events`, or the default value if `events` is unset.
5423        pub fn events(&self) -> &super::TransactionEvents {
5424            self.events
5425                .as_ref()
5426                .map(|field| field as _)
5427                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5428        }
5429        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5430        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5431            self.events.as_mut().map(|field| field as _)
5432        }
5433        ///Returns a mutable reference to `events`.
5434        ///If the field is unset, it is first initialized with the default value.
5435        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5436            self.events.get_or_insert_default()
5437        }
5438        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5439        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5440            self.events.as_ref().map(|field| field as _)
5441        }
5442        ///Sets `events` with the provided value.
5443        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5444            self.events = Some(field.into().into());
5445        }
5446        ///Sets `events` with the provided value.
5447        pub fn with_events<T: Into<super::TransactionEvents>>(
5448            mut self,
5449            field: T,
5450        ) -> Self {
5451            self.set_events(field.into());
5452            self
5453        }
5454        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5455        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5456            self.checkpoint.as_mut().map(|field| field as _)
5457        }
5458        ///Returns a mutable reference to `checkpoint`.
5459        ///If the field is unset, it is first initialized with the default value.
5460        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5461            self.checkpoint.get_or_insert_default()
5462        }
5463        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5464        pub fn checkpoint_opt(&self) -> Option<u64> {
5465            self.checkpoint.as_ref().map(|field| *field)
5466        }
5467        ///Sets `checkpoint` with the provided value.
5468        pub fn set_checkpoint(&mut self, field: u64) {
5469            self.checkpoint = Some(field);
5470        }
5471        ///Sets `checkpoint` with the provided value.
5472        pub fn with_checkpoint(mut self, field: u64) -> Self {
5473            self.set_checkpoint(field);
5474            self
5475        }
5476        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5477        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5478            self.timestamp.as_mut().map(|field| field as _)
5479        }
5480        ///Returns a mutable reference to `timestamp`.
5481        ///If the field is unset, it is first initialized with the default value.
5482        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5483            self.timestamp.get_or_insert_default()
5484        }
5485        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5486        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5487            self.timestamp.as_ref().map(|field| field as _)
5488        }
5489        ///Sets `timestamp` with the provided value.
5490        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5491            self.timestamp = Some(field.into().into());
5492        }
5493        ///Sets `timestamp` with the provided value.
5494        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5495            mut self,
5496            field: T,
5497        ) -> Self {
5498            self.set_timestamp(field.into());
5499            self
5500        }
5501        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5502        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5503            &self.balance_changes
5504        }
5505        ///Returns a mutable reference to `balance_changes`.
5506        ///If the field is unset, it is first initialized with the default value.
5507        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5508            &mut self.balance_changes
5509        }
5510        ///Sets `balance_changes` with the provided value.
5511        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5512            self.balance_changes = field;
5513        }
5514        ///Sets `balance_changes` with the provided value.
5515        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5516            self.set_balance_changes(field);
5517            self
5518        }
5519        ///Returns the value of `objects`, or the default value if `objects` is unset.
5520        pub fn objects(&self) -> &super::ObjectSet {
5521            self.objects
5522                .as_ref()
5523                .map(|field| field as _)
5524                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5525        }
5526        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5527        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5528            self.objects.as_mut().map(|field| field as _)
5529        }
5530        ///Returns a mutable reference to `objects`.
5531        ///If the field is unset, it is first initialized with the default value.
5532        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5533            self.objects.get_or_insert_default()
5534        }
5535        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5536        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5537            self.objects.as_ref().map(|field| field as _)
5538        }
5539        ///Sets `objects` with the provided value.
5540        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5541            self.objects = Some(field.into().into());
5542        }
5543        ///Sets `objects` with the provided value.
5544        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5545            self.set_objects(field.into());
5546            self
5547        }
5548    }
5549    impl super::ExecutionError {
5550        pub const fn const_default() -> Self {
5551            Self {
5552                description: None,
5553                command: None,
5554                kind: None,
5555                error_details: None,
5556            }
5557        }
5558        #[doc(hidden)]
5559        pub fn default_instance() -> &'static Self {
5560            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5561            &DEFAULT
5562        }
5563        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5564        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5565            self.description.as_mut().map(|field| field as _)
5566        }
5567        ///Returns a mutable reference to `description`.
5568        ///If the field is unset, it is first initialized with the default value.
5569        pub fn description_mut(&mut self) -> &mut String {
5570            self.description.get_or_insert_default()
5571        }
5572        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5573        pub fn description_opt(&self) -> Option<&str> {
5574            self.description.as_ref().map(|field| field as _)
5575        }
5576        ///Sets `description` with the provided value.
5577        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5578            self.description = Some(field.into().into());
5579        }
5580        ///Sets `description` with the provided value.
5581        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5582            self.set_description(field.into());
5583            self
5584        }
5585        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5586        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5587            self.command.as_mut().map(|field| field as _)
5588        }
5589        ///Returns a mutable reference to `command`.
5590        ///If the field is unset, it is first initialized with the default value.
5591        pub fn command_mut(&mut self) -> &mut u64 {
5592            self.command.get_or_insert_default()
5593        }
5594        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5595        pub fn command_opt(&self) -> Option<u64> {
5596            self.command.as_ref().map(|field| *field)
5597        }
5598        ///Sets `command` with the provided value.
5599        pub fn set_command(&mut self, field: u64) {
5600            self.command = Some(field);
5601        }
5602        ///Sets `command` with the provided value.
5603        pub fn with_command(mut self, field: u64) -> Self {
5604            self.set_command(field);
5605            self
5606        }
5607        ///Sets `kind` with the provided value.
5608        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5609            mut self,
5610            field: T,
5611        ) -> Self {
5612            self.set_kind(field.into());
5613            self
5614        }
5615        ///Returns the value of `abort`, or the default value if `abort` is unset.
5616        pub fn abort(&self) -> &super::MoveAbort {
5617            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5618                .error_details
5619            {
5620                field as _
5621            } else {
5622                super::MoveAbort::default_instance() as _
5623            }
5624        }
5625        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5626        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5627            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5628                .error_details
5629            {
5630                Some(field as _)
5631            } else {
5632                None
5633            }
5634        }
5635        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5636        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5637            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5638                .error_details
5639            {
5640                Some(field as _)
5641            } else {
5642                None
5643            }
5644        }
5645        ///Returns a mutable reference to `abort`.
5646        ///If the field is unset, it is first initialized with the default value.
5647        ///If any other oneof field in the same oneof is set, it will be cleared.
5648        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5649            if self.abort_opt_mut().is_none() {
5650                self.error_details = Some(
5651                    super::execution_error::ErrorDetails::Abort(
5652                        super::MoveAbort::default(),
5653                    ),
5654                );
5655            }
5656            self.abort_opt_mut().unwrap()
5657        }
5658        ///Sets `abort` with the provided value.
5659        ///If any other oneof field in the same oneof is set, it will be cleared.
5660        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5661            self.error_details = Some(
5662                super::execution_error::ErrorDetails::Abort(field.into().into()),
5663            );
5664        }
5665        ///Sets `abort` with the provided value.
5666        ///If any other oneof field in the same oneof is set, it will be cleared.
5667        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5668            self.set_abort(field.into());
5669            self
5670        }
5671        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5672        pub fn size_error(&self) -> &super::SizeError {
5673            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5674                .error_details
5675            {
5676                field as _
5677            } else {
5678                super::SizeError::default_instance() as _
5679            }
5680        }
5681        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5682        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5683            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5684                .error_details
5685            {
5686                Some(field as _)
5687            } else {
5688                None
5689            }
5690        }
5691        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5692        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5693            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5694                .error_details
5695            {
5696                Some(field as _)
5697            } else {
5698                None
5699            }
5700        }
5701        ///Returns a mutable reference to `size_error`.
5702        ///If the field is unset, it is first initialized with the default value.
5703        ///If any other oneof field in the same oneof is set, it will be cleared.
5704        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5705            if self.size_error_opt_mut().is_none() {
5706                self.error_details = Some(
5707                    super::execution_error::ErrorDetails::SizeError(
5708                        super::SizeError::default(),
5709                    ),
5710                );
5711            }
5712            self.size_error_opt_mut().unwrap()
5713        }
5714        ///Sets `size_error` with the provided value.
5715        ///If any other oneof field in the same oneof is set, it will be cleared.
5716        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5717            self.error_details = Some(
5718                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5719            );
5720        }
5721        ///Sets `size_error` with the provided value.
5722        ///If any other oneof field in the same oneof is set, it will be cleared.
5723        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5724            self.set_size_error(field.into());
5725            self
5726        }
5727        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5728        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5729            if let Some(
5730                super::execution_error::ErrorDetails::CommandArgumentError(field),
5731            ) = &self.error_details
5732            {
5733                field as _
5734            } else {
5735                super::CommandArgumentError::default_instance() as _
5736            }
5737        }
5738        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5739        pub fn command_argument_error_opt(
5740            &self,
5741        ) -> Option<&super::CommandArgumentError> {
5742            if let Some(
5743                super::execution_error::ErrorDetails::CommandArgumentError(field),
5744            ) = &self.error_details
5745            {
5746                Some(field as _)
5747            } else {
5748                None
5749            }
5750        }
5751        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5752        pub fn command_argument_error_opt_mut(
5753            &mut self,
5754        ) -> Option<&mut super::CommandArgumentError> {
5755            if let Some(
5756                super::execution_error::ErrorDetails::CommandArgumentError(field),
5757            ) = &mut self.error_details
5758            {
5759                Some(field as _)
5760            } else {
5761                None
5762            }
5763        }
5764        ///Returns a mutable reference to `command_argument_error`.
5765        ///If the field is unset, it is first initialized with the default value.
5766        ///If any other oneof field in the same oneof is set, it will be cleared.
5767        pub fn command_argument_error_mut(
5768            &mut self,
5769        ) -> &mut super::CommandArgumentError {
5770            if self.command_argument_error_opt_mut().is_none() {
5771                self.error_details = Some(
5772                    super::execution_error::ErrorDetails::CommandArgumentError(
5773                        super::CommandArgumentError::default(),
5774                    ),
5775                );
5776            }
5777            self.command_argument_error_opt_mut().unwrap()
5778        }
5779        ///Sets `command_argument_error` with the provided value.
5780        ///If any other oneof field in the same oneof is set, it will be cleared.
5781        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5782            &mut self,
5783            field: T,
5784        ) {
5785            self.error_details = Some(
5786                super::execution_error::ErrorDetails::CommandArgumentError(
5787                    field.into().into(),
5788                ),
5789            );
5790        }
5791        ///Sets `command_argument_error` with the provided value.
5792        ///If any other oneof field in the same oneof is set, it will be cleared.
5793        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5794            mut self,
5795            field: T,
5796        ) -> Self {
5797            self.set_command_argument_error(field.into());
5798            self
5799        }
5800        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5801        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5802            if let Some(
5803                super::execution_error::ErrorDetails::TypeArgumentError(field),
5804            ) = &self.error_details
5805            {
5806                field as _
5807            } else {
5808                super::TypeArgumentError::default_instance() as _
5809            }
5810        }
5811        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5812        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5813            if let Some(
5814                super::execution_error::ErrorDetails::TypeArgumentError(field),
5815            ) = &self.error_details
5816            {
5817                Some(field as _)
5818            } else {
5819                None
5820            }
5821        }
5822        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5823        pub fn type_argument_error_opt_mut(
5824            &mut self,
5825        ) -> Option<&mut super::TypeArgumentError> {
5826            if let Some(
5827                super::execution_error::ErrorDetails::TypeArgumentError(field),
5828            ) = &mut self.error_details
5829            {
5830                Some(field as _)
5831            } else {
5832                None
5833            }
5834        }
5835        ///Returns a mutable reference to `type_argument_error`.
5836        ///If the field is unset, it is first initialized with the default value.
5837        ///If any other oneof field in the same oneof is set, it will be cleared.
5838        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5839            if self.type_argument_error_opt_mut().is_none() {
5840                self.error_details = Some(
5841                    super::execution_error::ErrorDetails::TypeArgumentError(
5842                        super::TypeArgumentError::default(),
5843                    ),
5844                );
5845            }
5846            self.type_argument_error_opt_mut().unwrap()
5847        }
5848        ///Sets `type_argument_error` with the provided value.
5849        ///If any other oneof field in the same oneof is set, it will be cleared.
5850        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5851            &mut self,
5852            field: T,
5853        ) {
5854            self.error_details = Some(
5855                super::execution_error::ErrorDetails::TypeArgumentError(
5856                    field.into().into(),
5857                ),
5858            );
5859        }
5860        ///Sets `type_argument_error` with the provided value.
5861        ///If any other oneof field in the same oneof is set, it will be cleared.
5862        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5863            mut self,
5864            field: T,
5865        ) -> Self {
5866            self.set_type_argument_error(field.into());
5867            self
5868        }
5869        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5870        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5871            if let Some(
5872                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5873            ) = &self.error_details
5874            {
5875                field as _
5876            } else {
5877                super::PackageUpgradeError::default_instance() as _
5878            }
5879        }
5880        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5881        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5882            if let Some(
5883                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5884            ) = &self.error_details
5885            {
5886                Some(field as _)
5887            } else {
5888                None
5889            }
5890        }
5891        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5892        pub fn package_upgrade_error_opt_mut(
5893            &mut self,
5894        ) -> Option<&mut super::PackageUpgradeError> {
5895            if let Some(
5896                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5897            ) = &mut self.error_details
5898            {
5899                Some(field as _)
5900            } else {
5901                None
5902            }
5903        }
5904        ///Returns a mutable reference to `package_upgrade_error`.
5905        ///If the field is unset, it is first initialized with the default value.
5906        ///If any other oneof field in the same oneof is set, it will be cleared.
5907        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5908            if self.package_upgrade_error_opt_mut().is_none() {
5909                self.error_details = Some(
5910                    super::execution_error::ErrorDetails::PackageUpgradeError(
5911                        super::PackageUpgradeError::default(),
5912                    ),
5913                );
5914            }
5915            self.package_upgrade_error_opt_mut().unwrap()
5916        }
5917        ///Sets `package_upgrade_error` with the provided value.
5918        ///If any other oneof field in the same oneof is set, it will be cleared.
5919        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5920            &mut self,
5921            field: T,
5922        ) {
5923            self.error_details = Some(
5924                super::execution_error::ErrorDetails::PackageUpgradeError(
5925                    field.into().into(),
5926                ),
5927            );
5928        }
5929        ///Sets `package_upgrade_error` with the provided value.
5930        ///If any other oneof field in the same oneof is set, it will be cleared.
5931        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5932            mut self,
5933            field: T,
5934        ) -> Self {
5935            self.set_package_upgrade_error(field.into());
5936            self
5937        }
5938        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5939        pub fn index_error(&self) -> &super::IndexError {
5940            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5941                .error_details
5942            {
5943                field as _
5944            } else {
5945                super::IndexError::default_instance() as _
5946            }
5947        }
5948        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5949        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5950            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5951                .error_details
5952            {
5953                Some(field as _)
5954            } else {
5955                None
5956            }
5957        }
5958        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5959        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5960            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5961                .error_details
5962            {
5963                Some(field as _)
5964            } else {
5965                None
5966            }
5967        }
5968        ///Returns a mutable reference to `index_error`.
5969        ///If the field is unset, it is first initialized with the default value.
5970        ///If any other oneof field in the same oneof is set, it will be cleared.
5971        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5972            if self.index_error_opt_mut().is_none() {
5973                self.error_details = Some(
5974                    super::execution_error::ErrorDetails::IndexError(
5975                        super::IndexError::default(),
5976                    ),
5977                );
5978            }
5979            self.index_error_opt_mut().unwrap()
5980        }
5981        ///Sets `index_error` with the provided value.
5982        ///If any other oneof field in the same oneof is set, it will be cleared.
5983        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5984            self.error_details = Some(
5985                super::execution_error::ErrorDetails::IndexError(field.into().into()),
5986            );
5987        }
5988        ///Sets `index_error` with the provided value.
5989        ///If any other oneof field in the same oneof is set, it will be cleared.
5990        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5991            self.set_index_error(field.into());
5992            self
5993        }
5994        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
5995        pub fn object_id(&self) -> &str {
5996            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5997                .error_details
5998            {
5999                field as _
6000            } else {
6001                ""
6002            }
6003        }
6004        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6005        pub fn object_id_opt(&self) -> Option<&str> {
6006            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6007                .error_details
6008            {
6009                Some(field as _)
6010            } else {
6011                None
6012            }
6013        }
6014        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6015        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6016            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6017                .error_details
6018            {
6019                Some(field as _)
6020            } else {
6021                None
6022            }
6023        }
6024        ///Returns a mutable reference to `object_id`.
6025        ///If the field is unset, it is first initialized with the default value.
6026        ///If any other oneof field in the same oneof is set, it will be cleared.
6027        pub fn object_id_mut(&mut self) -> &mut String {
6028            if self.object_id_opt_mut().is_none() {
6029                self.error_details = Some(
6030                    super::execution_error::ErrorDetails::ObjectId(String::default()),
6031                );
6032            }
6033            self.object_id_opt_mut().unwrap()
6034        }
6035        ///Sets `object_id` with the provided value.
6036        ///If any other oneof field in the same oneof is set, it will be cleared.
6037        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6038            self.error_details = Some(
6039                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6040            );
6041        }
6042        ///Sets `object_id` with the provided value.
6043        ///If any other oneof field in the same oneof is set, it will be cleared.
6044        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6045            self.set_object_id(field.into());
6046            self
6047        }
6048        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
6049        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6050            if let Some(
6051                super::execution_error::ErrorDetails::CoinDenyListError(field),
6052            ) = &self.error_details
6053            {
6054                field as _
6055            } else {
6056                super::CoinDenyListError::default_instance() as _
6057            }
6058        }
6059        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6060        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6061            if let Some(
6062                super::execution_error::ErrorDetails::CoinDenyListError(field),
6063            ) = &self.error_details
6064            {
6065                Some(field as _)
6066            } else {
6067                None
6068            }
6069        }
6070        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6071        pub fn coin_deny_list_error_opt_mut(
6072            &mut self,
6073        ) -> Option<&mut super::CoinDenyListError> {
6074            if let Some(
6075                super::execution_error::ErrorDetails::CoinDenyListError(field),
6076            ) = &mut self.error_details
6077            {
6078                Some(field as _)
6079            } else {
6080                None
6081            }
6082        }
6083        ///Returns a mutable reference to `coin_deny_list_error`.
6084        ///If the field is unset, it is first initialized with the default value.
6085        ///If any other oneof field in the same oneof is set, it will be cleared.
6086        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6087            if self.coin_deny_list_error_opt_mut().is_none() {
6088                self.error_details = Some(
6089                    super::execution_error::ErrorDetails::CoinDenyListError(
6090                        super::CoinDenyListError::default(),
6091                    ),
6092                );
6093            }
6094            self.coin_deny_list_error_opt_mut().unwrap()
6095        }
6096        ///Sets `coin_deny_list_error` with the provided value.
6097        ///If any other oneof field in the same oneof is set, it will be cleared.
6098        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6099            &mut self,
6100            field: T,
6101        ) {
6102            self.error_details = Some(
6103                super::execution_error::ErrorDetails::CoinDenyListError(
6104                    field.into().into(),
6105                ),
6106            );
6107        }
6108        ///Sets `coin_deny_list_error` with the provided value.
6109        ///If any other oneof field in the same oneof is set, it will be cleared.
6110        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6111            mut self,
6112            field: T,
6113        ) -> Self {
6114            self.set_coin_deny_list_error(field.into());
6115            self
6116        }
6117        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6118        pub fn congested_objects(&self) -> &super::CongestedObjects {
6119            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6120                .error_details
6121            {
6122                field as _
6123            } else {
6124                super::CongestedObjects::default_instance() as _
6125            }
6126        }
6127        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6128        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6129            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6130                .error_details
6131            {
6132                Some(field as _)
6133            } else {
6134                None
6135            }
6136        }
6137        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6138        pub fn congested_objects_opt_mut(
6139            &mut self,
6140        ) -> Option<&mut super::CongestedObjects> {
6141            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6142                .error_details
6143            {
6144                Some(field as _)
6145            } else {
6146                None
6147            }
6148        }
6149        ///Returns a mutable reference to `congested_objects`.
6150        ///If the field is unset, it is first initialized with the default value.
6151        ///If any other oneof field in the same oneof is set, it will be cleared.
6152        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6153            if self.congested_objects_opt_mut().is_none() {
6154                self.error_details = Some(
6155                    super::execution_error::ErrorDetails::CongestedObjects(
6156                        super::CongestedObjects::default(),
6157                    ),
6158                );
6159            }
6160            self.congested_objects_opt_mut().unwrap()
6161        }
6162        ///Sets `congested_objects` with the provided value.
6163        ///If any other oneof field in the same oneof is set, it will be cleared.
6164        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6165            &mut self,
6166            field: T,
6167        ) {
6168            self.error_details = Some(
6169                super::execution_error::ErrorDetails::CongestedObjects(
6170                    field.into().into(),
6171                ),
6172            );
6173        }
6174        ///Sets `congested_objects` with the provided value.
6175        ///If any other oneof field in the same oneof is set, it will be cleared.
6176        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6177            mut self,
6178            field: T,
6179        ) -> Self {
6180            self.set_congested_objects(field.into());
6181            self
6182        }
6183    }
6184    impl super::ExecutionStatus {
6185        pub const fn const_default() -> Self {
6186            Self { success: None, error: None }
6187        }
6188        #[doc(hidden)]
6189        pub fn default_instance() -> &'static Self {
6190            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6191            &DEFAULT
6192        }
6193        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6194        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6195            self.success.as_mut().map(|field| field as _)
6196        }
6197        ///Returns a mutable reference to `success`.
6198        ///If the field is unset, it is first initialized with the default value.
6199        pub fn success_mut(&mut self) -> &mut bool {
6200            self.success.get_or_insert_default()
6201        }
6202        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
6203        pub fn success_opt(&self) -> Option<bool> {
6204            self.success.as_ref().map(|field| *field)
6205        }
6206        ///Sets `success` with the provided value.
6207        pub fn set_success(&mut self, field: bool) {
6208            self.success = Some(field);
6209        }
6210        ///Sets `success` with the provided value.
6211        pub fn with_success(mut self, field: bool) -> Self {
6212            self.set_success(field);
6213            self
6214        }
6215        ///Returns the value of `error`, or the default value if `error` is unset.
6216        pub fn error(&self) -> &super::ExecutionError {
6217            self.error
6218                .as_ref()
6219                .map(|field| field as _)
6220                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6221        }
6222        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6223        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6224            self.error.as_mut().map(|field| field as _)
6225        }
6226        ///Returns a mutable reference to `error`.
6227        ///If the field is unset, it is first initialized with the default value.
6228        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6229            self.error.get_or_insert_default()
6230        }
6231        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6232        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6233            self.error.as_ref().map(|field| field as _)
6234        }
6235        ///Sets `error` with the provided value.
6236        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6237            self.error = Some(field.into().into());
6238        }
6239        ///Sets `error` with the provided value.
6240        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6241            self.set_error(field.into());
6242            self
6243        }
6244    }
6245    impl super::ExecutionTimeObservation {
6246        pub const fn const_default() -> Self {
6247            Self {
6248                kind: None,
6249                move_entry_point: None,
6250                validator_observations: Vec::new(),
6251            }
6252        }
6253        #[doc(hidden)]
6254        pub fn default_instance() -> &'static Self {
6255            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6256            &DEFAULT
6257        }
6258        ///Sets `kind` with the provided value.
6259        pub fn with_kind<
6260            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6261        >(mut self, field: T) -> Self {
6262            self.set_kind(field.into());
6263            self
6264        }
6265        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
6266        pub fn move_entry_point(&self) -> &super::MoveCall {
6267            self.move_entry_point
6268                .as_ref()
6269                .map(|field| field as _)
6270                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6271        }
6272        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6273        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6274            self.move_entry_point.as_mut().map(|field| field as _)
6275        }
6276        ///Returns a mutable reference to `move_entry_point`.
6277        ///If the field is unset, it is first initialized with the default value.
6278        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6279            self.move_entry_point.get_or_insert_default()
6280        }
6281        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
6282        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6283            self.move_entry_point.as_ref().map(|field| field as _)
6284        }
6285        ///Sets `move_entry_point` with the provided value.
6286        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6287            self.move_entry_point = Some(field.into().into());
6288        }
6289        ///Sets `move_entry_point` with the provided value.
6290        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6291            mut self,
6292            field: T,
6293        ) -> Self {
6294            self.set_move_entry_point(field.into());
6295            self
6296        }
6297        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6298        pub fn validator_observations(
6299            &self,
6300        ) -> &[super::ValidatorExecutionTimeObservation] {
6301            &self.validator_observations
6302        }
6303        ///Returns a mutable reference to `validator_observations`.
6304        ///If the field is unset, it is first initialized with the default value.
6305        pub fn validator_observations_mut(
6306            &mut self,
6307        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6308            &mut self.validator_observations
6309        }
6310        ///Sets `validator_observations` with the provided value.
6311        pub fn set_validator_observations(
6312            &mut self,
6313            field: Vec<super::ValidatorExecutionTimeObservation>,
6314        ) {
6315            self.validator_observations = field;
6316        }
6317        ///Sets `validator_observations` with the provided value.
6318        pub fn with_validator_observations(
6319            mut self,
6320            field: Vec<super::ValidatorExecutionTimeObservation>,
6321        ) -> Self {
6322            self.set_validator_observations(field);
6323            self
6324        }
6325    }
6326    impl super::ExecutionTimeObservations {
6327        pub const fn const_default() -> Self {
6328            Self {
6329                version: None,
6330                observations: Vec::new(),
6331            }
6332        }
6333        #[doc(hidden)]
6334        pub fn default_instance() -> &'static Self {
6335            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6336            &DEFAULT
6337        }
6338        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6339        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6340            self.version.as_mut().map(|field| field as _)
6341        }
6342        ///Returns a mutable reference to `version`.
6343        ///If the field is unset, it is first initialized with the default value.
6344        pub fn version_mut(&mut self) -> &mut i32 {
6345            self.version.get_or_insert_default()
6346        }
6347        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6348        pub fn version_opt(&self) -> Option<i32> {
6349            self.version.as_ref().map(|field| *field)
6350        }
6351        ///Sets `version` with the provided value.
6352        pub fn set_version(&mut self, field: i32) {
6353            self.version = Some(field);
6354        }
6355        ///Sets `version` with the provided value.
6356        pub fn with_version(mut self, field: i32) -> Self {
6357            self.set_version(field);
6358            self
6359        }
6360        ///Returns the value of `observations`, or the default value if `observations` is unset.
6361        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6362            &self.observations
6363        }
6364        ///Returns a mutable reference to `observations`.
6365        ///If the field is unset, it is first initialized with the default value.
6366        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6367            &mut self.observations
6368        }
6369        ///Sets `observations` with the provided value.
6370        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6371            self.observations = field;
6372        }
6373        ///Sets `observations` with the provided value.
6374        pub fn with_observations(
6375            mut self,
6376            field: Vec<super::ExecutionTimeObservation>,
6377        ) -> Self {
6378            self.set_observations(field);
6379            self
6380        }
6381    }
6382    impl super::FieldDescriptor {
6383        pub const fn const_default() -> Self {
6384            Self {
6385                name: None,
6386                position: None,
6387                r#type: None,
6388            }
6389        }
6390        #[doc(hidden)]
6391        pub fn default_instance() -> &'static Self {
6392            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6393            &DEFAULT
6394        }
6395        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6396        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6397            self.name.as_mut().map(|field| field as _)
6398        }
6399        ///Returns a mutable reference to `name`.
6400        ///If the field is unset, it is first initialized with the default value.
6401        pub fn name_mut(&mut self) -> &mut String {
6402            self.name.get_or_insert_default()
6403        }
6404        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6405        pub fn name_opt(&self) -> Option<&str> {
6406            self.name.as_ref().map(|field| field as _)
6407        }
6408        ///Sets `name` with the provided value.
6409        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6410            self.name = Some(field.into().into());
6411        }
6412        ///Sets `name` with the provided value.
6413        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6414            self.set_name(field.into());
6415            self
6416        }
6417        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6418        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6419            self.position.as_mut().map(|field| field as _)
6420        }
6421        ///Returns a mutable reference to `position`.
6422        ///If the field is unset, it is first initialized with the default value.
6423        pub fn position_mut(&mut self) -> &mut u32 {
6424            self.position.get_or_insert_default()
6425        }
6426        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6427        pub fn position_opt(&self) -> Option<u32> {
6428            self.position.as_ref().map(|field| *field)
6429        }
6430        ///Sets `position` with the provided value.
6431        pub fn set_position(&mut self, field: u32) {
6432            self.position = Some(field);
6433        }
6434        ///Sets `position` with the provided value.
6435        pub fn with_position(mut self, field: u32) -> Self {
6436            self.set_position(field);
6437            self
6438        }
6439        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6440        pub fn r#type(&self) -> &super::OpenSignatureBody {
6441            self.r#type
6442                .as_ref()
6443                .map(|field| field as _)
6444                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6445        }
6446        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6447        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6448            self.r#type.as_mut().map(|field| field as _)
6449        }
6450        ///Returns a mutable reference to `r#type`.
6451        ///If the field is unset, it is first initialized with the default value.
6452        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6453            self.r#type.get_or_insert_default()
6454        }
6455        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6456        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6457            self.r#type.as_ref().map(|field| field as _)
6458        }
6459        ///Sets `r#type` with the provided value.
6460        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6461            self.r#type = Some(field.into().into());
6462        }
6463        ///Sets `r#type` with the provided value.
6464        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6465            self.set_type(field.into());
6466            self
6467        }
6468    }
6469    impl super::FunctionDescriptor {
6470        pub const fn const_default() -> Self {
6471            Self {
6472                name: None,
6473                visibility: None,
6474                is_entry: None,
6475                type_parameters: Vec::new(),
6476                parameters: Vec::new(),
6477                returns: Vec::new(),
6478            }
6479        }
6480        #[doc(hidden)]
6481        pub fn default_instance() -> &'static Self {
6482            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6483            &DEFAULT
6484        }
6485        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6486        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6487            self.name.as_mut().map(|field| field as _)
6488        }
6489        ///Returns a mutable reference to `name`.
6490        ///If the field is unset, it is first initialized with the default value.
6491        pub fn name_mut(&mut self) -> &mut String {
6492            self.name.get_or_insert_default()
6493        }
6494        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6495        pub fn name_opt(&self) -> Option<&str> {
6496            self.name.as_ref().map(|field| field as _)
6497        }
6498        ///Sets `name` with the provided value.
6499        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6500            self.name = Some(field.into().into());
6501        }
6502        ///Sets `name` with the provided value.
6503        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6504            self.set_name(field.into());
6505            self
6506        }
6507        ///Sets `visibility` with the provided value.
6508        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6509            mut self,
6510            field: T,
6511        ) -> Self {
6512            self.set_visibility(field.into());
6513            self
6514        }
6515        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6516        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6517            self.is_entry.as_mut().map(|field| field as _)
6518        }
6519        ///Returns a mutable reference to `is_entry`.
6520        ///If the field is unset, it is first initialized with the default value.
6521        pub fn is_entry_mut(&mut self) -> &mut bool {
6522            self.is_entry.get_or_insert_default()
6523        }
6524        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6525        pub fn is_entry_opt(&self) -> Option<bool> {
6526            self.is_entry.as_ref().map(|field| *field)
6527        }
6528        ///Sets `is_entry` with the provided value.
6529        pub fn set_is_entry(&mut self, field: bool) {
6530            self.is_entry = Some(field);
6531        }
6532        ///Sets `is_entry` with the provided value.
6533        pub fn with_is_entry(mut self, field: bool) -> Self {
6534            self.set_is_entry(field);
6535            self
6536        }
6537        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6538        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6539            &self.type_parameters
6540        }
6541        ///Returns a mutable reference to `type_parameters`.
6542        ///If the field is unset, it is first initialized with the default value.
6543        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6544            &mut self.type_parameters
6545        }
6546        ///Sets `type_parameters` with the provided value.
6547        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6548            self.type_parameters = field;
6549        }
6550        ///Sets `type_parameters` with the provided value.
6551        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6552            self.set_type_parameters(field);
6553            self
6554        }
6555        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6556        pub fn parameters(&self) -> &[super::OpenSignature] {
6557            &self.parameters
6558        }
6559        ///Returns a mutable reference to `parameters`.
6560        ///If the field is unset, it is first initialized with the default value.
6561        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6562            &mut self.parameters
6563        }
6564        ///Sets `parameters` with the provided value.
6565        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6566            self.parameters = field;
6567        }
6568        ///Sets `parameters` with the provided value.
6569        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6570            self.set_parameters(field);
6571            self
6572        }
6573        ///Returns the value of `returns`, or the default value if `returns` is unset.
6574        pub fn returns(&self) -> &[super::OpenSignature] {
6575            &self.returns
6576        }
6577        ///Returns a mutable reference to `returns`.
6578        ///If the field is unset, it is first initialized with the default value.
6579        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6580            &mut self.returns
6581        }
6582        ///Sets `returns` with the provided value.
6583        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6584            self.returns = field;
6585        }
6586        ///Sets `returns` with the provided value.
6587        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6588            self.set_returns(field);
6589            self
6590        }
6591    }
6592    impl super::FundsWithdrawal {
6593        pub const fn const_default() -> Self {
6594            Self {
6595                amount: None,
6596                coin_type: None,
6597                source: None,
6598            }
6599        }
6600        #[doc(hidden)]
6601        pub fn default_instance() -> &'static Self {
6602            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6603            &DEFAULT
6604        }
6605        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6606        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6607            self.amount.as_mut().map(|field| field as _)
6608        }
6609        ///Returns a mutable reference to `amount`.
6610        ///If the field is unset, it is first initialized with the default value.
6611        pub fn amount_mut(&mut self) -> &mut u64 {
6612            self.amount.get_or_insert_default()
6613        }
6614        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
6615        pub fn amount_opt(&self) -> Option<u64> {
6616            self.amount.as_ref().map(|field| *field)
6617        }
6618        ///Sets `amount` with the provided value.
6619        pub fn set_amount(&mut self, field: u64) {
6620            self.amount = Some(field);
6621        }
6622        ///Sets `amount` with the provided value.
6623        pub fn with_amount(mut self, field: u64) -> Self {
6624            self.set_amount(field);
6625            self
6626        }
6627        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6628        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6629            self.coin_type.as_mut().map(|field| field as _)
6630        }
6631        ///Returns a mutable reference to `coin_type`.
6632        ///If the field is unset, it is first initialized with the default value.
6633        pub fn coin_type_mut(&mut self) -> &mut String {
6634            self.coin_type.get_or_insert_default()
6635        }
6636        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6637        pub fn coin_type_opt(&self) -> Option<&str> {
6638            self.coin_type.as_ref().map(|field| field as _)
6639        }
6640        ///Sets `coin_type` with the provided value.
6641        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6642            self.coin_type = Some(field.into().into());
6643        }
6644        ///Sets `coin_type` with the provided value.
6645        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6646            self.set_coin_type(field.into());
6647            self
6648        }
6649        ///Sets `source` with the provided value.
6650        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6651            mut self,
6652            field: T,
6653        ) -> Self {
6654            self.set_source(field.into());
6655            self
6656        }
6657    }
6658    impl super::GasCostSummary {
6659        pub const fn const_default() -> Self {
6660            Self {
6661                computation_cost: None,
6662                storage_cost: None,
6663                storage_rebate: None,
6664                non_refundable_storage_fee: None,
6665            }
6666        }
6667        #[doc(hidden)]
6668        pub fn default_instance() -> &'static Self {
6669            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6670            &DEFAULT
6671        }
6672        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6673        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6674            self.computation_cost.as_mut().map(|field| field as _)
6675        }
6676        ///Returns a mutable reference to `computation_cost`.
6677        ///If the field is unset, it is first initialized with the default value.
6678        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6679            self.computation_cost.get_or_insert_default()
6680        }
6681        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6682        pub fn computation_cost_opt(&self) -> Option<u64> {
6683            self.computation_cost.as_ref().map(|field| *field)
6684        }
6685        ///Sets `computation_cost` with the provided value.
6686        pub fn set_computation_cost(&mut self, field: u64) {
6687            self.computation_cost = Some(field);
6688        }
6689        ///Sets `computation_cost` with the provided value.
6690        pub fn with_computation_cost(mut self, field: u64) -> Self {
6691            self.set_computation_cost(field);
6692            self
6693        }
6694        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6695        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6696            self.storage_cost.as_mut().map(|field| field as _)
6697        }
6698        ///Returns a mutable reference to `storage_cost`.
6699        ///If the field is unset, it is first initialized with the default value.
6700        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6701            self.storage_cost.get_or_insert_default()
6702        }
6703        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6704        pub fn storage_cost_opt(&self) -> Option<u64> {
6705            self.storage_cost.as_ref().map(|field| *field)
6706        }
6707        ///Sets `storage_cost` with the provided value.
6708        pub fn set_storage_cost(&mut self, field: u64) {
6709            self.storage_cost = Some(field);
6710        }
6711        ///Sets `storage_cost` with the provided value.
6712        pub fn with_storage_cost(mut self, field: u64) -> Self {
6713            self.set_storage_cost(field);
6714            self
6715        }
6716        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6717        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6718            self.storage_rebate.as_mut().map(|field| field as _)
6719        }
6720        ///Returns a mutable reference to `storage_rebate`.
6721        ///If the field is unset, it is first initialized with the default value.
6722        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6723            self.storage_rebate.get_or_insert_default()
6724        }
6725        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6726        pub fn storage_rebate_opt(&self) -> Option<u64> {
6727            self.storage_rebate.as_ref().map(|field| *field)
6728        }
6729        ///Sets `storage_rebate` with the provided value.
6730        pub fn set_storage_rebate(&mut self, field: u64) {
6731            self.storage_rebate = Some(field);
6732        }
6733        ///Sets `storage_rebate` with the provided value.
6734        pub fn with_storage_rebate(mut self, field: u64) -> Self {
6735            self.set_storage_rebate(field);
6736            self
6737        }
6738        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6739        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6740            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6741        }
6742        ///Returns a mutable reference to `non_refundable_storage_fee`.
6743        ///If the field is unset, it is first initialized with the default value.
6744        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6745            self.non_refundable_storage_fee.get_or_insert_default()
6746        }
6747        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6748        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6749            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6750        }
6751        ///Sets `non_refundable_storage_fee` with the provided value.
6752        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6753            self.non_refundable_storage_fee = Some(field);
6754        }
6755        ///Sets `non_refundable_storage_fee` with the provided value.
6756        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6757            self.set_non_refundable_storage_fee(field);
6758            self
6759        }
6760    }
6761    impl super::GasPayment {
6762        pub const fn const_default() -> Self {
6763            Self {
6764                objects: Vec::new(),
6765                owner: None,
6766                price: None,
6767                budget: None,
6768            }
6769        }
6770        #[doc(hidden)]
6771        pub fn default_instance() -> &'static Self {
6772            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6773            &DEFAULT
6774        }
6775        ///Returns the value of `objects`, or the default value if `objects` is unset.
6776        pub fn objects(&self) -> &[super::ObjectReference] {
6777            &self.objects
6778        }
6779        ///Returns a mutable reference to `objects`.
6780        ///If the field is unset, it is first initialized with the default value.
6781        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6782            &mut self.objects
6783        }
6784        ///Sets `objects` with the provided value.
6785        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6786            self.objects = field;
6787        }
6788        ///Sets `objects` with the provided value.
6789        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6790            self.set_objects(field);
6791            self
6792        }
6793        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6794        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6795            self.owner.as_mut().map(|field| field as _)
6796        }
6797        ///Returns a mutable reference to `owner`.
6798        ///If the field is unset, it is first initialized with the default value.
6799        pub fn owner_mut(&mut self) -> &mut String {
6800            self.owner.get_or_insert_default()
6801        }
6802        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6803        pub fn owner_opt(&self) -> Option<&str> {
6804            self.owner.as_ref().map(|field| field as _)
6805        }
6806        ///Sets `owner` with the provided value.
6807        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6808            self.owner = Some(field.into().into());
6809        }
6810        ///Sets `owner` with the provided value.
6811        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6812            self.set_owner(field.into());
6813            self
6814        }
6815        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6816        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6817            self.price.as_mut().map(|field| field as _)
6818        }
6819        ///Returns a mutable reference to `price`.
6820        ///If the field is unset, it is first initialized with the default value.
6821        pub fn price_mut(&mut self) -> &mut u64 {
6822            self.price.get_or_insert_default()
6823        }
6824        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6825        pub fn price_opt(&self) -> Option<u64> {
6826            self.price.as_ref().map(|field| *field)
6827        }
6828        ///Sets `price` with the provided value.
6829        pub fn set_price(&mut self, field: u64) {
6830            self.price = Some(field);
6831        }
6832        ///Sets `price` with the provided value.
6833        pub fn with_price(mut self, field: u64) -> Self {
6834            self.set_price(field);
6835            self
6836        }
6837        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6838        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6839            self.budget.as_mut().map(|field| field as _)
6840        }
6841        ///Returns a mutable reference to `budget`.
6842        ///If the field is unset, it is first initialized with the default value.
6843        pub fn budget_mut(&mut self) -> &mut u64 {
6844            self.budget.get_or_insert_default()
6845        }
6846        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6847        pub fn budget_opt(&self) -> Option<u64> {
6848            self.budget.as_ref().map(|field| *field)
6849        }
6850        ///Sets `budget` with the provided value.
6851        pub fn set_budget(&mut self, field: u64) {
6852            self.budget = Some(field);
6853        }
6854        ///Sets `budget` with the provided value.
6855        pub fn with_budget(mut self, field: u64) -> Self {
6856            self.set_budget(field);
6857            self
6858        }
6859    }
6860    impl super::GenesisTransaction {
6861        pub const fn const_default() -> Self {
6862            Self { objects: Vec::new() }
6863        }
6864        #[doc(hidden)]
6865        pub fn default_instance() -> &'static Self {
6866            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6867            &DEFAULT
6868        }
6869        ///Returns the value of `objects`, or the default value if `objects` is unset.
6870        pub fn objects(&self) -> &[super::Object] {
6871            &self.objects
6872        }
6873        ///Returns a mutable reference to `objects`.
6874        ///If the field is unset, it is first initialized with the default value.
6875        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6876            &mut self.objects
6877        }
6878        ///Sets `objects` with the provided value.
6879        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6880            self.objects = field;
6881        }
6882        ///Sets `objects` with the provided value.
6883        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6884            self.set_objects(field);
6885            self
6886        }
6887    }
6888    impl super::GetBalanceRequest {
6889        pub const fn const_default() -> Self {
6890            Self {
6891                owner: None,
6892                coin_type: None,
6893            }
6894        }
6895        #[doc(hidden)]
6896        pub fn default_instance() -> &'static Self {
6897            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6898            &DEFAULT
6899        }
6900        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6901        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6902            self.owner.as_mut().map(|field| field as _)
6903        }
6904        ///Returns a mutable reference to `owner`.
6905        ///If the field is unset, it is first initialized with the default value.
6906        pub fn owner_mut(&mut self) -> &mut String {
6907            self.owner.get_or_insert_default()
6908        }
6909        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6910        pub fn owner_opt(&self) -> Option<&str> {
6911            self.owner.as_ref().map(|field| field as _)
6912        }
6913        ///Sets `owner` with the provided value.
6914        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6915            self.owner = Some(field.into().into());
6916        }
6917        ///Sets `owner` with the provided value.
6918        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6919            self.set_owner(field.into());
6920            self
6921        }
6922        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6923        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6924            self.coin_type.as_mut().map(|field| field as _)
6925        }
6926        ///Returns a mutable reference to `coin_type`.
6927        ///If the field is unset, it is first initialized with the default value.
6928        pub fn coin_type_mut(&mut self) -> &mut String {
6929            self.coin_type.get_or_insert_default()
6930        }
6931        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6932        pub fn coin_type_opt(&self) -> Option<&str> {
6933            self.coin_type.as_ref().map(|field| field as _)
6934        }
6935        ///Sets `coin_type` with the provided value.
6936        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6937            self.coin_type = Some(field.into().into());
6938        }
6939        ///Sets `coin_type` with the provided value.
6940        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6941            self.set_coin_type(field.into());
6942            self
6943        }
6944    }
6945    impl super::GetBalanceResponse {
6946        pub const fn const_default() -> Self {
6947            Self { balance: None }
6948        }
6949        #[doc(hidden)]
6950        pub fn default_instance() -> &'static Self {
6951            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6952            &DEFAULT
6953        }
6954        ///Returns the value of `balance`, or the default value if `balance` is unset.
6955        pub fn balance(&self) -> &super::Balance {
6956            self.balance
6957                .as_ref()
6958                .map(|field| field as _)
6959                .unwrap_or_else(|| super::Balance::default_instance() as _)
6960        }
6961        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6962        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6963            self.balance.as_mut().map(|field| field as _)
6964        }
6965        ///Returns a mutable reference to `balance`.
6966        ///If the field is unset, it is first initialized with the default value.
6967        pub fn balance_mut(&mut self) -> &mut super::Balance {
6968            self.balance.get_or_insert_default()
6969        }
6970        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
6971        pub fn balance_opt(&self) -> Option<&super::Balance> {
6972            self.balance.as_ref().map(|field| field as _)
6973        }
6974        ///Sets `balance` with the provided value.
6975        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6976            self.balance = Some(field.into().into());
6977        }
6978        ///Sets `balance` with the provided value.
6979        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6980            self.set_balance(field.into());
6981            self
6982        }
6983    }
6984    impl super::GetCheckpointRequest {
6985        pub const fn const_default() -> Self {
6986            Self {
6987                read_mask: None,
6988                checkpoint_id: None,
6989            }
6990        }
6991        #[doc(hidden)]
6992        pub fn default_instance() -> &'static Self {
6993            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6994            &DEFAULT
6995        }
6996        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6997        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6998            self.read_mask.as_mut().map(|field| field as _)
6999        }
7000        ///Returns a mutable reference to `read_mask`.
7001        ///If the field is unset, it is first initialized with the default value.
7002        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7003            self.read_mask.get_or_insert_default()
7004        }
7005        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7006        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7007            self.read_mask.as_ref().map(|field| field as _)
7008        }
7009        ///Sets `read_mask` with the provided value.
7010        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7011            self.read_mask = Some(field.into().into());
7012        }
7013        ///Sets `read_mask` with the provided value.
7014        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7015            mut self,
7016            field: T,
7017        ) -> Self {
7018            self.set_read_mask(field.into());
7019            self
7020        }
7021        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
7022        pub fn sequence_number(&self) -> u64 {
7023            if let Some(
7024                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7025            ) = &self.checkpoint_id
7026            {
7027                *field
7028            } else {
7029                0u64
7030            }
7031        }
7032        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
7033        pub fn sequence_number_opt(&self) -> Option<u64> {
7034            if let Some(
7035                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7036            ) = &self.checkpoint_id
7037            {
7038                Some(*field)
7039            } else {
7040                None
7041            }
7042        }
7043        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7044        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7045            if let Some(
7046                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7047            ) = &mut self.checkpoint_id
7048            {
7049                Some(field as _)
7050            } else {
7051                None
7052            }
7053        }
7054        ///Returns a mutable reference to `sequence_number`.
7055        ///If the field is unset, it is first initialized with the default value.
7056        ///If any other oneof field in the same oneof is set, it will be cleared.
7057        pub fn sequence_number_mut(&mut self) -> &mut u64 {
7058            if self.sequence_number_opt_mut().is_none() {
7059                self.checkpoint_id = Some(
7060                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7061                        u64::default(),
7062                    ),
7063                );
7064            }
7065            self.sequence_number_opt_mut().unwrap()
7066        }
7067        ///Sets `sequence_number` with the provided value.
7068        ///If any other oneof field in the same oneof is set, it will be cleared.
7069        pub fn set_sequence_number(&mut self, field: u64) {
7070            self.checkpoint_id = Some(
7071                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7072            );
7073        }
7074        ///Sets `sequence_number` with the provided value.
7075        ///If any other oneof field in the same oneof is set, it will be cleared.
7076        pub fn with_sequence_number(mut self, field: u64) -> Self {
7077            self.set_sequence_number(field);
7078            self
7079        }
7080        ///Returns the value of `digest`, or the default value if `digest` is unset.
7081        pub fn digest(&self) -> &str {
7082            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7083                .checkpoint_id
7084            {
7085                field as _
7086            } else {
7087                ""
7088            }
7089        }
7090        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7091        pub fn digest_opt(&self) -> Option<&str> {
7092            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7093                .checkpoint_id
7094            {
7095                Some(field as _)
7096            } else {
7097                None
7098            }
7099        }
7100        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7101        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7102            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7103                .checkpoint_id
7104            {
7105                Some(field as _)
7106            } else {
7107                None
7108            }
7109        }
7110        ///Returns a mutable reference to `digest`.
7111        ///If the field is unset, it is first initialized with the default value.
7112        ///If any other oneof field in the same oneof is set, it will be cleared.
7113        pub fn digest_mut(&mut self) -> &mut String {
7114            if self.digest_opt_mut().is_none() {
7115                self.checkpoint_id = Some(
7116                    super::get_checkpoint_request::CheckpointId::Digest(
7117                        String::default(),
7118                    ),
7119                );
7120            }
7121            self.digest_opt_mut().unwrap()
7122        }
7123        ///Sets `digest` with the provided value.
7124        ///If any other oneof field in the same oneof is set, it will be cleared.
7125        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7126            self.checkpoint_id = Some(
7127                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7128            );
7129        }
7130        ///Sets `digest` with the provided value.
7131        ///If any other oneof field in the same oneof is set, it will be cleared.
7132        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7133            self.set_digest(field.into());
7134            self
7135        }
7136    }
7137    impl super::GetCheckpointResponse {
7138        pub const fn const_default() -> Self {
7139            Self { checkpoint: None }
7140        }
7141        #[doc(hidden)]
7142        pub fn default_instance() -> &'static Self {
7143            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7144            &DEFAULT
7145        }
7146        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7147        pub fn checkpoint(&self) -> &super::Checkpoint {
7148            self.checkpoint
7149                .as_ref()
7150                .map(|field| field as _)
7151                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7152        }
7153        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7154        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7155            self.checkpoint.as_mut().map(|field| field as _)
7156        }
7157        ///Returns a mutable reference to `checkpoint`.
7158        ///If the field is unset, it is first initialized with the default value.
7159        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7160            self.checkpoint.get_or_insert_default()
7161        }
7162        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7163        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7164            self.checkpoint.as_ref().map(|field| field as _)
7165        }
7166        ///Sets `checkpoint` with the provided value.
7167        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7168            self.checkpoint = Some(field.into().into());
7169        }
7170        ///Sets `checkpoint` with the provided value.
7171        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7172            self.set_checkpoint(field.into());
7173            self
7174        }
7175    }
7176    impl super::GetCoinInfoRequest {
7177        pub const fn const_default() -> Self {
7178            Self { coin_type: None }
7179        }
7180        #[doc(hidden)]
7181        pub fn default_instance() -> &'static Self {
7182            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7183            &DEFAULT
7184        }
7185        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7186        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7187            self.coin_type.as_mut().map(|field| field as _)
7188        }
7189        ///Returns a mutable reference to `coin_type`.
7190        ///If the field is unset, it is first initialized with the default value.
7191        pub fn coin_type_mut(&mut self) -> &mut String {
7192            self.coin_type.get_or_insert_default()
7193        }
7194        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7195        pub fn coin_type_opt(&self) -> Option<&str> {
7196            self.coin_type.as_ref().map(|field| field as _)
7197        }
7198        ///Sets `coin_type` with the provided value.
7199        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7200            self.coin_type = Some(field.into().into());
7201        }
7202        ///Sets `coin_type` with the provided value.
7203        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7204            self.set_coin_type(field.into());
7205            self
7206        }
7207    }
7208    impl super::GetCoinInfoResponse {
7209        pub const fn const_default() -> Self {
7210            Self {
7211                coin_type: None,
7212                metadata: None,
7213                treasury: None,
7214                regulated_metadata: None,
7215            }
7216        }
7217        #[doc(hidden)]
7218        pub fn default_instance() -> &'static Self {
7219            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7220            &DEFAULT
7221        }
7222        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7223        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7224            self.coin_type.as_mut().map(|field| field as _)
7225        }
7226        ///Returns a mutable reference to `coin_type`.
7227        ///If the field is unset, it is first initialized with the default value.
7228        pub fn coin_type_mut(&mut self) -> &mut String {
7229            self.coin_type.get_or_insert_default()
7230        }
7231        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7232        pub fn coin_type_opt(&self) -> Option<&str> {
7233            self.coin_type.as_ref().map(|field| field as _)
7234        }
7235        ///Sets `coin_type` with the provided value.
7236        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7237            self.coin_type = Some(field.into().into());
7238        }
7239        ///Sets `coin_type` with the provided value.
7240        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7241            self.set_coin_type(field.into());
7242            self
7243        }
7244        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
7245        pub fn metadata(&self) -> &super::CoinMetadata {
7246            self.metadata
7247                .as_ref()
7248                .map(|field| field as _)
7249                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7250        }
7251        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7252        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7253            self.metadata.as_mut().map(|field| field as _)
7254        }
7255        ///Returns a mutable reference to `metadata`.
7256        ///If the field is unset, it is first initialized with the default value.
7257        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7258            self.metadata.get_or_insert_default()
7259        }
7260        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7261        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7262            self.metadata.as_ref().map(|field| field as _)
7263        }
7264        ///Sets `metadata` with the provided value.
7265        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7266            self.metadata = Some(field.into().into());
7267        }
7268        ///Sets `metadata` with the provided value.
7269        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7270            self.set_metadata(field.into());
7271            self
7272        }
7273        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
7274        pub fn treasury(&self) -> &super::CoinTreasury {
7275            self.treasury
7276                .as_ref()
7277                .map(|field| field as _)
7278                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7279        }
7280        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7281        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7282            self.treasury.as_mut().map(|field| field as _)
7283        }
7284        ///Returns a mutable reference to `treasury`.
7285        ///If the field is unset, it is first initialized with the default value.
7286        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7287            self.treasury.get_or_insert_default()
7288        }
7289        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
7290        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7291            self.treasury.as_ref().map(|field| field as _)
7292        }
7293        ///Sets `treasury` with the provided value.
7294        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7295            self.treasury = Some(field.into().into());
7296        }
7297        ///Sets `treasury` with the provided value.
7298        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7299            self.set_treasury(field.into());
7300            self
7301        }
7302        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
7303        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7304            self.regulated_metadata
7305                .as_ref()
7306                .map(|field| field as _)
7307                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7308        }
7309        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7310        pub fn regulated_metadata_opt_mut(
7311            &mut self,
7312        ) -> Option<&mut super::RegulatedCoinMetadata> {
7313            self.regulated_metadata.as_mut().map(|field| field as _)
7314        }
7315        ///Returns a mutable reference to `regulated_metadata`.
7316        ///If the field is unset, it is first initialized with the default value.
7317        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7318            self.regulated_metadata.get_or_insert_default()
7319        }
7320        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7321        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7322            self.regulated_metadata.as_ref().map(|field| field as _)
7323        }
7324        ///Sets `regulated_metadata` with the provided value.
7325        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7326            &mut self,
7327            field: T,
7328        ) {
7329            self.regulated_metadata = Some(field.into().into());
7330        }
7331        ///Sets `regulated_metadata` with the provided value.
7332        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7333            mut self,
7334            field: T,
7335        ) -> Self {
7336            self.set_regulated_metadata(field.into());
7337            self
7338        }
7339    }
7340    impl super::GetDatatypeRequest {
7341        pub const fn const_default() -> Self {
7342            Self {
7343                package_id: None,
7344                module_name: None,
7345                name: None,
7346            }
7347        }
7348        #[doc(hidden)]
7349        pub fn default_instance() -> &'static Self {
7350            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7351            &DEFAULT
7352        }
7353        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7354        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7355            self.package_id.as_mut().map(|field| field as _)
7356        }
7357        ///Returns a mutable reference to `package_id`.
7358        ///If the field is unset, it is first initialized with the default value.
7359        pub fn package_id_mut(&mut self) -> &mut String {
7360            self.package_id.get_or_insert_default()
7361        }
7362        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7363        pub fn package_id_opt(&self) -> Option<&str> {
7364            self.package_id.as_ref().map(|field| field as _)
7365        }
7366        ///Sets `package_id` with the provided value.
7367        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7368            self.package_id = Some(field.into().into());
7369        }
7370        ///Sets `package_id` with the provided value.
7371        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7372            self.set_package_id(field.into());
7373            self
7374        }
7375        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7376        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7377            self.module_name.as_mut().map(|field| field as _)
7378        }
7379        ///Returns a mutable reference to `module_name`.
7380        ///If the field is unset, it is first initialized with the default value.
7381        pub fn module_name_mut(&mut self) -> &mut String {
7382            self.module_name.get_or_insert_default()
7383        }
7384        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7385        pub fn module_name_opt(&self) -> Option<&str> {
7386            self.module_name.as_ref().map(|field| field as _)
7387        }
7388        ///Sets `module_name` with the provided value.
7389        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7390            self.module_name = Some(field.into().into());
7391        }
7392        ///Sets `module_name` with the provided value.
7393        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7394            self.set_module_name(field.into());
7395            self
7396        }
7397        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7398        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7399            self.name.as_mut().map(|field| field as _)
7400        }
7401        ///Returns a mutable reference to `name`.
7402        ///If the field is unset, it is first initialized with the default value.
7403        pub fn name_mut(&mut self) -> &mut String {
7404            self.name.get_or_insert_default()
7405        }
7406        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7407        pub fn name_opt(&self) -> Option<&str> {
7408            self.name.as_ref().map(|field| field as _)
7409        }
7410        ///Sets `name` with the provided value.
7411        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7412            self.name = Some(field.into().into());
7413        }
7414        ///Sets `name` with the provided value.
7415        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7416            self.set_name(field.into());
7417            self
7418        }
7419    }
7420    impl super::GetDatatypeResponse {
7421        pub const fn const_default() -> Self {
7422            Self { datatype: None }
7423        }
7424        #[doc(hidden)]
7425        pub fn default_instance() -> &'static Self {
7426            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7427            &DEFAULT
7428        }
7429        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7430        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7431            self.datatype
7432                .as_ref()
7433                .map(|field| field as _)
7434                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7435        }
7436        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7437        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7438            self.datatype.as_mut().map(|field| field as _)
7439        }
7440        ///Returns a mutable reference to `datatype`.
7441        ///If the field is unset, it is first initialized with the default value.
7442        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7443            self.datatype.get_or_insert_default()
7444        }
7445        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7446        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7447            self.datatype.as_ref().map(|field| field as _)
7448        }
7449        ///Sets `datatype` with the provided value.
7450        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7451            self.datatype = Some(field.into().into());
7452        }
7453        ///Sets `datatype` with the provided value.
7454        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7455            mut self,
7456            field: T,
7457        ) -> Self {
7458            self.set_datatype(field.into());
7459            self
7460        }
7461    }
7462    impl super::GetEpochRequest {
7463        pub const fn const_default() -> Self {
7464            Self {
7465                epoch: None,
7466                read_mask: None,
7467            }
7468        }
7469        #[doc(hidden)]
7470        pub fn default_instance() -> &'static Self {
7471            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7472            &DEFAULT
7473        }
7474        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7475        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7476            self.epoch.as_mut().map(|field| field as _)
7477        }
7478        ///Returns a mutable reference to `epoch`.
7479        ///If the field is unset, it is first initialized with the default value.
7480        pub fn epoch_mut(&mut self) -> &mut u64 {
7481            self.epoch.get_or_insert_default()
7482        }
7483        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7484        pub fn epoch_opt(&self) -> Option<u64> {
7485            self.epoch.as_ref().map(|field| *field)
7486        }
7487        ///Sets `epoch` with the provided value.
7488        pub fn set_epoch(&mut self, field: u64) {
7489            self.epoch = Some(field);
7490        }
7491        ///Sets `epoch` with the provided value.
7492        pub fn with_epoch(mut self, field: u64) -> Self {
7493            self.set_epoch(field);
7494            self
7495        }
7496        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7497        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7498            self.read_mask.as_mut().map(|field| field as _)
7499        }
7500        ///Returns a mutable reference to `read_mask`.
7501        ///If the field is unset, it is first initialized with the default value.
7502        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7503            self.read_mask.get_or_insert_default()
7504        }
7505        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7506        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7507            self.read_mask.as_ref().map(|field| field as _)
7508        }
7509        ///Sets `read_mask` with the provided value.
7510        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7511            self.read_mask = Some(field.into().into());
7512        }
7513        ///Sets `read_mask` with the provided value.
7514        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7515            mut self,
7516            field: T,
7517        ) -> Self {
7518            self.set_read_mask(field.into());
7519            self
7520        }
7521    }
7522    impl super::GetEpochResponse {
7523        pub const fn const_default() -> Self {
7524            Self { epoch: None }
7525        }
7526        #[doc(hidden)]
7527        pub fn default_instance() -> &'static Self {
7528            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7529            &DEFAULT
7530        }
7531        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7532        pub fn epoch(&self) -> &super::Epoch {
7533            self.epoch
7534                .as_ref()
7535                .map(|field| field as _)
7536                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7537        }
7538        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7539        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7540            self.epoch.as_mut().map(|field| field as _)
7541        }
7542        ///Returns a mutable reference to `epoch`.
7543        ///If the field is unset, it is first initialized with the default value.
7544        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7545            self.epoch.get_or_insert_default()
7546        }
7547        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7548        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7549            self.epoch.as_ref().map(|field| field as _)
7550        }
7551        ///Sets `epoch` with the provided value.
7552        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7553            self.epoch = Some(field.into().into());
7554        }
7555        ///Sets `epoch` with the provided value.
7556        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7557            self.set_epoch(field.into());
7558            self
7559        }
7560    }
7561    impl super::GetFunctionRequest {
7562        pub const fn const_default() -> Self {
7563            Self {
7564                package_id: None,
7565                module_name: None,
7566                name: None,
7567            }
7568        }
7569        #[doc(hidden)]
7570        pub fn default_instance() -> &'static Self {
7571            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7572            &DEFAULT
7573        }
7574        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7575        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7576            self.package_id.as_mut().map(|field| field as _)
7577        }
7578        ///Returns a mutable reference to `package_id`.
7579        ///If the field is unset, it is first initialized with the default value.
7580        pub fn package_id_mut(&mut self) -> &mut String {
7581            self.package_id.get_or_insert_default()
7582        }
7583        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7584        pub fn package_id_opt(&self) -> Option<&str> {
7585            self.package_id.as_ref().map(|field| field as _)
7586        }
7587        ///Sets `package_id` with the provided value.
7588        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7589            self.package_id = Some(field.into().into());
7590        }
7591        ///Sets `package_id` with the provided value.
7592        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7593            self.set_package_id(field.into());
7594            self
7595        }
7596        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7597        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7598            self.module_name.as_mut().map(|field| field as _)
7599        }
7600        ///Returns a mutable reference to `module_name`.
7601        ///If the field is unset, it is first initialized with the default value.
7602        pub fn module_name_mut(&mut self) -> &mut String {
7603            self.module_name.get_or_insert_default()
7604        }
7605        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7606        pub fn module_name_opt(&self) -> Option<&str> {
7607            self.module_name.as_ref().map(|field| field as _)
7608        }
7609        ///Sets `module_name` with the provided value.
7610        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7611            self.module_name = Some(field.into().into());
7612        }
7613        ///Sets `module_name` with the provided value.
7614        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7615            self.set_module_name(field.into());
7616            self
7617        }
7618        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7619        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7620            self.name.as_mut().map(|field| field as _)
7621        }
7622        ///Returns a mutable reference to `name`.
7623        ///If the field is unset, it is first initialized with the default value.
7624        pub fn name_mut(&mut self) -> &mut String {
7625            self.name.get_or_insert_default()
7626        }
7627        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7628        pub fn name_opt(&self) -> Option<&str> {
7629            self.name.as_ref().map(|field| field as _)
7630        }
7631        ///Sets `name` with the provided value.
7632        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7633            self.name = Some(field.into().into());
7634        }
7635        ///Sets `name` with the provided value.
7636        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7637            self.set_name(field.into());
7638            self
7639        }
7640    }
7641    impl super::GetFunctionResponse {
7642        pub const fn const_default() -> Self {
7643            Self { function: None }
7644        }
7645        #[doc(hidden)]
7646        pub fn default_instance() -> &'static Self {
7647            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7648            &DEFAULT
7649        }
7650        ///Returns the value of `function`, or the default value if `function` is unset.
7651        pub fn function(&self) -> &super::FunctionDescriptor {
7652            self.function
7653                .as_ref()
7654                .map(|field| field as _)
7655                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7656        }
7657        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7658        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7659            self.function.as_mut().map(|field| field as _)
7660        }
7661        ///Returns a mutable reference to `function`.
7662        ///If the field is unset, it is first initialized with the default value.
7663        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7664            self.function.get_or_insert_default()
7665        }
7666        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7667        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7668            self.function.as_ref().map(|field| field as _)
7669        }
7670        ///Sets `function` with the provided value.
7671        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7672            self.function = Some(field.into().into());
7673        }
7674        ///Sets `function` with the provided value.
7675        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7676            mut self,
7677            field: T,
7678        ) -> Self {
7679            self.set_function(field.into());
7680            self
7681        }
7682    }
7683    impl super::GetObjectRequest {
7684        pub const fn const_default() -> Self {
7685            Self {
7686                object_id: None,
7687                version: None,
7688                read_mask: None,
7689            }
7690        }
7691        #[doc(hidden)]
7692        pub fn default_instance() -> &'static Self {
7693            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7694            &DEFAULT
7695        }
7696        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7697        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7698            self.object_id.as_mut().map(|field| field as _)
7699        }
7700        ///Returns a mutable reference to `object_id`.
7701        ///If the field is unset, it is first initialized with the default value.
7702        pub fn object_id_mut(&mut self) -> &mut String {
7703            self.object_id.get_or_insert_default()
7704        }
7705        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7706        pub fn object_id_opt(&self) -> Option<&str> {
7707            self.object_id.as_ref().map(|field| field as _)
7708        }
7709        ///Sets `object_id` with the provided value.
7710        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7711            self.object_id = Some(field.into().into());
7712        }
7713        ///Sets `object_id` with the provided value.
7714        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7715            self.set_object_id(field.into());
7716            self
7717        }
7718        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7719        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7720            self.version.as_mut().map(|field| field as _)
7721        }
7722        ///Returns a mutable reference to `version`.
7723        ///If the field is unset, it is first initialized with the default value.
7724        pub fn version_mut(&mut self) -> &mut u64 {
7725            self.version.get_or_insert_default()
7726        }
7727        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7728        pub fn version_opt(&self) -> Option<u64> {
7729            self.version.as_ref().map(|field| *field)
7730        }
7731        ///Sets `version` with the provided value.
7732        pub fn set_version(&mut self, field: u64) {
7733            self.version = Some(field);
7734        }
7735        ///Sets `version` with the provided value.
7736        pub fn with_version(mut self, field: u64) -> Self {
7737            self.set_version(field);
7738            self
7739        }
7740        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7741        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7742            self.read_mask.as_mut().map(|field| field as _)
7743        }
7744        ///Returns a mutable reference to `read_mask`.
7745        ///If the field is unset, it is first initialized with the default value.
7746        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7747            self.read_mask.get_or_insert_default()
7748        }
7749        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7750        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7751            self.read_mask.as_ref().map(|field| field as _)
7752        }
7753        ///Sets `read_mask` with the provided value.
7754        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7755            self.read_mask = Some(field.into().into());
7756        }
7757        ///Sets `read_mask` with the provided value.
7758        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7759            mut self,
7760            field: T,
7761        ) -> Self {
7762            self.set_read_mask(field.into());
7763            self
7764        }
7765    }
7766    impl super::GetObjectResponse {
7767        pub const fn const_default() -> Self {
7768            Self { object: None }
7769        }
7770        #[doc(hidden)]
7771        pub fn default_instance() -> &'static Self {
7772            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7773            &DEFAULT
7774        }
7775        ///Returns the value of `object`, or the default value if `object` is unset.
7776        pub fn object(&self) -> &super::Object {
7777            self.object
7778                .as_ref()
7779                .map(|field| field as _)
7780                .unwrap_or_else(|| super::Object::default_instance() as _)
7781        }
7782        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7783        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7784            self.object.as_mut().map(|field| field as _)
7785        }
7786        ///Returns a mutable reference to `object`.
7787        ///If the field is unset, it is first initialized with the default value.
7788        pub fn object_mut(&mut self) -> &mut super::Object {
7789            self.object.get_or_insert_default()
7790        }
7791        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7792        pub fn object_opt(&self) -> Option<&super::Object> {
7793            self.object.as_ref().map(|field| field as _)
7794        }
7795        ///Sets `object` with the provided value.
7796        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7797            self.object = Some(field.into().into());
7798        }
7799        ///Sets `object` with the provided value.
7800        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7801            self.set_object(field.into());
7802            self
7803        }
7804    }
7805    impl super::GetObjectResult {
7806        pub const fn const_default() -> Self {
7807            Self { result: None }
7808        }
7809        #[doc(hidden)]
7810        pub fn default_instance() -> &'static Self {
7811            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7812            &DEFAULT
7813        }
7814        ///Returns the value of `object`, or the default value if `object` is unset.
7815        pub fn object(&self) -> &super::Object {
7816            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7817                field as _
7818            } else {
7819                super::Object::default_instance() as _
7820            }
7821        }
7822        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7823        pub fn object_opt(&self) -> Option<&super::Object> {
7824            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7825                Some(field as _)
7826            } else {
7827                None
7828            }
7829        }
7830        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7831        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7832            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7833                .result
7834            {
7835                Some(field as _)
7836            } else {
7837                None
7838            }
7839        }
7840        ///Returns a mutable reference to `object`.
7841        ///If the field is unset, it is first initialized with the default value.
7842        ///If any other oneof field in the same oneof is set, it will be cleared.
7843        pub fn object_mut(&mut self) -> &mut super::Object {
7844            if self.object_opt_mut().is_none() {
7845                self.result = Some(
7846                    super::get_object_result::Result::Object(super::Object::default()),
7847                );
7848            }
7849            self.object_opt_mut().unwrap()
7850        }
7851        ///Sets `object` with the provided value.
7852        ///If any other oneof field in the same oneof is set, it will be cleared.
7853        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7854            self.result = Some(
7855                super::get_object_result::Result::Object(field.into().into()),
7856            );
7857        }
7858        ///Sets `object` with the provided value.
7859        ///If any other oneof field in the same oneof is set, it will be cleared.
7860        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7861            self.set_object(field.into());
7862            self
7863        }
7864        ///Returns the value of `error`, or the default value if `error` is unset.
7865        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7866            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7867                field as _
7868            } else {
7869                super::super::super::super::google::rpc::Status::default_instance() as _
7870            }
7871        }
7872        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7873        pub fn error_opt(
7874            &self,
7875        ) -> Option<&super::super::super::super::google::rpc::Status> {
7876            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7877                Some(field as _)
7878            } else {
7879                None
7880            }
7881        }
7882        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7883        pub fn error_opt_mut(
7884            &mut self,
7885        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7886            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7887                .result
7888            {
7889                Some(field as _)
7890            } else {
7891                None
7892            }
7893        }
7894        ///Returns a mutable reference to `error`.
7895        ///If the field is unset, it is first initialized with the default value.
7896        ///If any other oneof field in the same oneof is set, it will be cleared.
7897        pub fn error_mut(
7898            &mut self,
7899        ) -> &mut super::super::super::super::google::rpc::Status {
7900            if self.error_opt_mut().is_none() {
7901                self.result = Some(
7902                    super::get_object_result::Result::Error(
7903                        super::super::super::super::google::rpc::Status::default(),
7904                    ),
7905                );
7906            }
7907            self.error_opt_mut().unwrap()
7908        }
7909        ///Sets `error` with the provided value.
7910        ///If any other oneof field in the same oneof is set, it will be cleared.
7911        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7912            &mut self,
7913            field: T,
7914        ) {
7915            self.result = Some(
7916                super::get_object_result::Result::Error(field.into().into()),
7917            );
7918        }
7919        ///Sets `error` with the provided value.
7920        ///If any other oneof field in the same oneof is set, it will be cleared.
7921        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7922            mut self,
7923            field: T,
7924        ) -> Self {
7925            self.set_error(field.into());
7926            self
7927        }
7928    }
7929    impl super::GetPackageRequest {
7930        pub const fn const_default() -> Self {
7931            Self { package_id: None }
7932        }
7933        #[doc(hidden)]
7934        pub fn default_instance() -> &'static Self {
7935            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7936            &DEFAULT
7937        }
7938        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7939        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7940            self.package_id.as_mut().map(|field| field as _)
7941        }
7942        ///Returns a mutable reference to `package_id`.
7943        ///If the field is unset, it is first initialized with the default value.
7944        pub fn package_id_mut(&mut self) -> &mut String {
7945            self.package_id.get_or_insert_default()
7946        }
7947        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7948        pub fn package_id_opt(&self) -> Option<&str> {
7949            self.package_id.as_ref().map(|field| field as _)
7950        }
7951        ///Sets `package_id` with the provided value.
7952        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7953            self.package_id = Some(field.into().into());
7954        }
7955        ///Sets `package_id` with the provided value.
7956        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7957            self.set_package_id(field.into());
7958            self
7959        }
7960    }
7961    impl super::GetPackageResponse {
7962        pub const fn const_default() -> Self {
7963            Self { package: None }
7964        }
7965        #[doc(hidden)]
7966        pub fn default_instance() -> &'static Self {
7967            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7968            &DEFAULT
7969        }
7970        ///Returns the value of `package`, or the default value if `package` is unset.
7971        pub fn package(&self) -> &super::Package {
7972            self.package
7973                .as_ref()
7974                .map(|field| field as _)
7975                .unwrap_or_else(|| super::Package::default_instance() as _)
7976        }
7977        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7978        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7979            self.package.as_mut().map(|field| field as _)
7980        }
7981        ///Returns a mutable reference to `package`.
7982        ///If the field is unset, it is first initialized with the default value.
7983        pub fn package_mut(&mut self) -> &mut super::Package {
7984            self.package.get_or_insert_default()
7985        }
7986        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
7987        pub fn package_opt(&self) -> Option<&super::Package> {
7988            self.package.as_ref().map(|field| field as _)
7989        }
7990        ///Sets `package` with the provided value.
7991        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7992            self.package = Some(field.into().into());
7993        }
7994        ///Sets `package` with the provided value.
7995        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7996            self.set_package(field.into());
7997            self
7998        }
7999    }
8000    impl super::GetServiceInfoRequest {
8001        pub const fn const_default() -> Self {
8002            Self {}
8003        }
8004        #[doc(hidden)]
8005        pub fn default_instance() -> &'static Self {
8006            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8007            &DEFAULT
8008        }
8009    }
8010    impl super::GetServiceInfoResponse {
8011        pub const fn const_default() -> Self {
8012            Self {
8013                chain_id: None,
8014                chain: None,
8015                epoch: None,
8016                checkpoint_height: None,
8017                timestamp: None,
8018                lowest_available_checkpoint: None,
8019                lowest_available_checkpoint_objects: None,
8020                server: None,
8021            }
8022        }
8023        #[doc(hidden)]
8024        pub fn default_instance() -> &'static Self {
8025            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8026            &DEFAULT
8027        }
8028        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8029        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8030            self.chain_id.as_mut().map(|field| field as _)
8031        }
8032        ///Returns a mutable reference to `chain_id`.
8033        ///If the field is unset, it is first initialized with the default value.
8034        pub fn chain_id_mut(&mut self) -> &mut String {
8035            self.chain_id.get_or_insert_default()
8036        }
8037        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8038        pub fn chain_id_opt(&self) -> Option<&str> {
8039            self.chain_id.as_ref().map(|field| field as _)
8040        }
8041        ///Sets `chain_id` with the provided value.
8042        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8043            self.chain_id = Some(field.into().into());
8044        }
8045        ///Sets `chain_id` with the provided value.
8046        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8047            self.set_chain_id(field.into());
8048            self
8049        }
8050        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8051        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8052            self.chain.as_mut().map(|field| field as _)
8053        }
8054        ///Returns a mutable reference to `chain`.
8055        ///If the field is unset, it is first initialized with the default value.
8056        pub fn chain_mut(&mut self) -> &mut String {
8057            self.chain.get_or_insert_default()
8058        }
8059        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8060        pub fn chain_opt(&self) -> Option<&str> {
8061            self.chain.as_ref().map(|field| field as _)
8062        }
8063        ///Sets `chain` with the provided value.
8064        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8065            self.chain = Some(field.into().into());
8066        }
8067        ///Sets `chain` with the provided value.
8068        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8069            self.set_chain(field.into());
8070            self
8071        }
8072        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8073        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8074            self.epoch.as_mut().map(|field| field as _)
8075        }
8076        ///Returns a mutable reference to `epoch`.
8077        ///If the field is unset, it is first initialized with the default value.
8078        pub fn epoch_mut(&mut self) -> &mut u64 {
8079            self.epoch.get_or_insert_default()
8080        }
8081        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8082        pub fn epoch_opt(&self) -> Option<u64> {
8083            self.epoch.as_ref().map(|field| *field)
8084        }
8085        ///Sets `epoch` with the provided value.
8086        pub fn set_epoch(&mut self, field: u64) {
8087            self.epoch = Some(field);
8088        }
8089        ///Sets `epoch` with the provided value.
8090        pub fn with_epoch(mut self, field: u64) -> Self {
8091            self.set_epoch(field);
8092            self
8093        }
8094        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8095        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8096            self.checkpoint_height.as_mut().map(|field| field as _)
8097        }
8098        ///Returns a mutable reference to `checkpoint_height`.
8099        ///If the field is unset, it is first initialized with the default value.
8100        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8101            self.checkpoint_height.get_or_insert_default()
8102        }
8103        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8104        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8105            self.checkpoint_height.as_ref().map(|field| *field)
8106        }
8107        ///Sets `checkpoint_height` with the provided value.
8108        pub fn set_checkpoint_height(&mut self, field: u64) {
8109            self.checkpoint_height = Some(field);
8110        }
8111        ///Sets `checkpoint_height` with the provided value.
8112        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8113            self.set_checkpoint_height(field);
8114            self
8115        }
8116        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8117        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8118            self.timestamp.as_mut().map(|field| field as _)
8119        }
8120        ///Returns a mutable reference to `timestamp`.
8121        ///If the field is unset, it is first initialized with the default value.
8122        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8123            self.timestamp.get_or_insert_default()
8124        }
8125        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8126        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8127            self.timestamp.as_ref().map(|field| field as _)
8128        }
8129        ///Sets `timestamp` with the provided value.
8130        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8131            self.timestamp = Some(field.into().into());
8132        }
8133        ///Sets `timestamp` with the provided value.
8134        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8135            mut self,
8136            field: T,
8137        ) -> Self {
8138            self.set_timestamp(field.into());
8139            self
8140        }
8141        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8142        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8143            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8144        }
8145        ///Returns a mutable reference to `lowest_available_checkpoint`.
8146        ///If the field is unset, it is first initialized with the default value.
8147        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8148            self.lowest_available_checkpoint.get_or_insert_default()
8149        }
8150        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8151        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8152            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8153        }
8154        ///Sets `lowest_available_checkpoint` with the provided value.
8155        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8156            self.lowest_available_checkpoint = Some(field);
8157        }
8158        ///Sets `lowest_available_checkpoint` with the provided value.
8159        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8160            self.set_lowest_available_checkpoint(field);
8161            self
8162        }
8163        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8164        pub fn lowest_available_checkpoint_objects_opt_mut(
8165            &mut self,
8166        ) -> Option<&mut u64> {
8167            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8168        }
8169        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8170        ///If the field is unset, it is first initialized with the default value.
8171        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8172            self.lowest_available_checkpoint_objects.get_or_insert_default()
8173        }
8174        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8175        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8176            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8177        }
8178        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8179        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8180            self.lowest_available_checkpoint_objects = Some(field);
8181        }
8182        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8183        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8184            self.set_lowest_available_checkpoint_objects(field);
8185            self
8186        }
8187        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8188        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8189            self.server.as_mut().map(|field| field as _)
8190        }
8191        ///Returns a mutable reference to `server`.
8192        ///If the field is unset, it is first initialized with the default value.
8193        pub fn server_mut(&mut self) -> &mut String {
8194            self.server.get_or_insert_default()
8195        }
8196        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8197        pub fn server_opt(&self) -> Option<&str> {
8198            self.server.as_ref().map(|field| field as _)
8199        }
8200        ///Sets `server` with the provided value.
8201        pub fn set_server<T: Into<String>>(&mut self, field: T) {
8202            self.server = Some(field.into().into());
8203        }
8204        ///Sets `server` with the provided value.
8205        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8206            self.set_server(field.into());
8207            self
8208        }
8209    }
8210    impl super::GetTransactionRequest {
8211        pub const fn const_default() -> Self {
8212            Self {
8213                digest: None,
8214                read_mask: None,
8215            }
8216        }
8217        #[doc(hidden)]
8218        pub fn default_instance() -> &'static Self {
8219            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8220            &DEFAULT
8221        }
8222        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8223        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8224            self.digest.as_mut().map(|field| field as _)
8225        }
8226        ///Returns a mutable reference to `digest`.
8227        ///If the field is unset, it is first initialized with the default value.
8228        pub fn digest_mut(&mut self) -> &mut String {
8229            self.digest.get_or_insert_default()
8230        }
8231        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8232        pub fn digest_opt(&self) -> Option<&str> {
8233            self.digest.as_ref().map(|field| field as _)
8234        }
8235        ///Sets `digest` with the provided value.
8236        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8237            self.digest = Some(field.into().into());
8238        }
8239        ///Sets `digest` with the provided value.
8240        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8241            self.set_digest(field.into());
8242            self
8243        }
8244        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8245        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8246            self.read_mask.as_mut().map(|field| field as _)
8247        }
8248        ///Returns a mutable reference to `read_mask`.
8249        ///If the field is unset, it is first initialized with the default value.
8250        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8251            self.read_mask.get_or_insert_default()
8252        }
8253        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8254        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8255            self.read_mask.as_ref().map(|field| field as _)
8256        }
8257        ///Sets `read_mask` with the provided value.
8258        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8259            self.read_mask = Some(field.into().into());
8260        }
8261        ///Sets `read_mask` with the provided value.
8262        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8263            mut self,
8264            field: T,
8265        ) -> Self {
8266            self.set_read_mask(field.into());
8267            self
8268        }
8269    }
8270    impl super::GetTransactionResponse {
8271        pub const fn const_default() -> Self {
8272            Self { transaction: None }
8273        }
8274        #[doc(hidden)]
8275        pub fn default_instance() -> &'static Self {
8276            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8277            &DEFAULT
8278        }
8279        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8280        pub fn transaction(&self) -> &super::ExecutedTransaction {
8281            self.transaction
8282                .as_ref()
8283                .map(|field| field as _)
8284                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8285        }
8286        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8287        pub fn transaction_opt_mut(
8288            &mut self,
8289        ) -> Option<&mut super::ExecutedTransaction> {
8290            self.transaction.as_mut().map(|field| field as _)
8291        }
8292        ///Returns a mutable reference to `transaction`.
8293        ///If the field is unset, it is first initialized with the default value.
8294        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8295            self.transaction.get_or_insert_default()
8296        }
8297        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8298        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8299            self.transaction.as_ref().map(|field| field as _)
8300        }
8301        ///Sets `transaction` with the provided value.
8302        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8303            &mut self,
8304            field: T,
8305        ) {
8306            self.transaction = Some(field.into().into());
8307        }
8308        ///Sets `transaction` with the provided value.
8309        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8310            mut self,
8311            field: T,
8312        ) -> Self {
8313            self.set_transaction(field.into());
8314            self
8315        }
8316    }
8317    impl super::GetTransactionResult {
8318        pub const fn const_default() -> Self {
8319            Self { result: None }
8320        }
8321        #[doc(hidden)]
8322        pub fn default_instance() -> &'static Self {
8323            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8324            &DEFAULT
8325        }
8326        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8327        pub fn transaction(&self) -> &super::ExecutedTransaction {
8328            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8329                .result
8330            {
8331                field as _
8332            } else {
8333                super::ExecutedTransaction::default_instance() as _
8334            }
8335        }
8336        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8337        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8338            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8339                .result
8340            {
8341                Some(field as _)
8342            } else {
8343                None
8344            }
8345        }
8346        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8347        pub fn transaction_opt_mut(
8348            &mut self,
8349        ) -> Option<&mut super::ExecutedTransaction> {
8350            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8351                .result
8352            {
8353                Some(field as _)
8354            } else {
8355                None
8356            }
8357        }
8358        ///Returns a mutable reference to `transaction`.
8359        ///If the field is unset, it is first initialized with the default value.
8360        ///If any other oneof field in the same oneof is set, it will be cleared.
8361        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8362            if self.transaction_opt_mut().is_none() {
8363                self.result = Some(
8364                    super::get_transaction_result::Result::Transaction(
8365                        super::ExecutedTransaction::default(),
8366                    ),
8367                );
8368            }
8369            self.transaction_opt_mut().unwrap()
8370        }
8371        ///Sets `transaction` with the provided value.
8372        ///If any other oneof field in the same oneof is set, it will be cleared.
8373        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8374            &mut self,
8375            field: T,
8376        ) {
8377            self.result = Some(
8378                super::get_transaction_result::Result::Transaction(field.into().into()),
8379            );
8380        }
8381        ///Sets `transaction` with the provided value.
8382        ///If any other oneof field in the same oneof is set, it will be cleared.
8383        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8384            mut self,
8385            field: T,
8386        ) -> Self {
8387            self.set_transaction(field.into());
8388            self
8389        }
8390        ///Returns the value of `error`, or the default value if `error` is unset.
8391        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8392            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8393                .result
8394            {
8395                field as _
8396            } else {
8397                super::super::super::super::google::rpc::Status::default_instance() as _
8398            }
8399        }
8400        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8401        pub fn error_opt(
8402            &self,
8403        ) -> Option<&super::super::super::super::google::rpc::Status> {
8404            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8405                .result
8406            {
8407                Some(field as _)
8408            } else {
8409                None
8410            }
8411        }
8412        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8413        pub fn error_opt_mut(
8414            &mut self,
8415        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8416            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8417                .result
8418            {
8419                Some(field as _)
8420            } else {
8421                None
8422            }
8423        }
8424        ///Returns a mutable reference to `error`.
8425        ///If the field is unset, it is first initialized with the default value.
8426        ///If any other oneof field in the same oneof is set, it will be cleared.
8427        pub fn error_mut(
8428            &mut self,
8429        ) -> &mut super::super::super::super::google::rpc::Status {
8430            if self.error_opt_mut().is_none() {
8431                self.result = Some(
8432                    super::get_transaction_result::Result::Error(
8433                        super::super::super::super::google::rpc::Status::default(),
8434                    ),
8435                );
8436            }
8437            self.error_opt_mut().unwrap()
8438        }
8439        ///Sets `error` with the provided value.
8440        ///If any other oneof field in the same oneof is set, it will be cleared.
8441        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8442            &mut self,
8443            field: T,
8444        ) {
8445            self.result = Some(
8446                super::get_transaction_result::Result::Error(field.into().into()),
8447            );
8448        }
8449        ///Sets `error` with the provided value.
8450        ///If any other oneof field in the same oneof is set, it will be cleared.
8451        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8452            mut self,
8453            field: T,
8454        ) -> Self {
8455            self.set_error(field.into());
8456            self
8457        }
8458    }
8459    impl super::IndexError {
8460        pub const fn const_default() -> Self {
8461            Self {
8462                index: None,
8463                subresult: None,
8464            }
8465        }
8466        #[doc(hidden)]
8467        pub fn default_instance() -> &'static Self {
8468            static DEFAULT: super::IndexError = super::IndexError::const_default();
8469            &DEFAULT
8470        }
8471        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8472        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8473            self.index.as_mut().map(|field| field as _)
8474        }
8475        ///Returns a mutable reference to `index`.
8476        ///If the field is unset, it is first initialized with the default value.
8477        pub fn index_mut(&mut self) -> &mut u32 {
8478            self.index.get_or_insert_default()
8479        }
8480        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8481        pub fn index_opt(&self) -> Option<u32> {
8482            self.index.as_ref().map(|field| *field)
8483        }
8484        ///Sets `index` with the provided value.
8485        pub fn set_index(&mut self, field: u32) {
8486            self.index = Some(field);
8487        }
8488        ///Sets `index` with the provided value.
8489        pub fn with_index(mut self, field: u32) -> Self {
8490            self.set_index(field);
8491            self
8492        }
8493        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8494        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8495            self.subresult.as_mut().map(|field| field as _)
8496        }
8497        ///Returns a mutable reference to `subresult`.
8498        ///If the field is unset, it is first initialized with the default value.
8499        pub fn subresult_mut(&mut self) -> &mut u32 {
8500            self.subresult.get_or_insert_default()
8501        }
8502        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8503        pub fn subresult_opt(&self) -> Option<u32> {
8504            self.subresult.as_ref().map(|field| *field)
8505        }
8506        ///Sets `subresult` with the provided value.
8507        pub fn set_subresult(&mut self, field: u32) {
8508            self.subresult = Some(field);
8509        }
8510        ///Sets `subresult` with the provided value.
8511        pub fn with_subresult(mut self, field: u32) -> Self {
8512            self.set_subresult(field);
8513            self
8514        }
8515    }
8516    impl super::Input {
8517        pub const fn const_default() -> Self {
8518            Self {
8519                kind: None,
8520                pure: None,
8521                object_id: None,
8522                version: None,
8523                digest: None,
8524                mutable: None,
8525                mutability: None,
8526                funds_withdrawal: None,
8527                literal: None,
8528            }
8529        }
8530        #[doc(hidden)]
8531        pub fn default_instance() -> &'static Self {
8532            static DEFAULT: super::Input = super::Input::const_default();
8533            &DEFAULT
8534        }
8535        ///Sets `kind` with the provided value.
8536        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8537            self.set_kind(field.into());
8538            self
8539        }
8540        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8541        pub fn pure_opt(&self) -> Option<&[u8]> {
8542            self.pure.as_ref().map(|field| field as _)
8543        }
8544        ///Sets `pure` with the provided value.
8545        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8546            self.pure = Some(field.into().into());
8547        }
8548        ///Sets `pure` with the provided value.
8549        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8550            self.set_pure(field.into());
8551            self
8552        }
8553        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8554        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8555            self.object_id.as_mut().map(|field| field as _)
8556        }
8557        ///Returns a mutable reference to `object_id`.
8558        ///If the field is unset, it is first initialized with the default value.
8559        pub fn object_id_mut(&mut self) -> &mut String {
8560            self.object_id.get_or_insert_default()
8561        }
8562        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8563        pub fn object_id_opt(&self) -> Option<&str> {
8564            self.object_id.as_ref().map(|field| field as _)
8565        }
8566        ///Sets `object_id` with the provided value.
8567        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8568            self.object_id = Some(field.into().into());
8569        }
8570        ///Sets `object_id` with the provided value.
8571        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8572            self.set_object_id(field.into());
8573            self
8574        }
8575        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8576        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8577            self.version.as_mut().map(|field| field as _)
8578        }
8579        ///Returns a mutable reference to `version`.
8580        ///If the field is unset, it is first initialized with the default value.
8581        pub fn version_mut(&mut self) -> &mut u64 {
8582            self.version.get_or_insert_default()
8583        }
8584        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8585        pub fn version_opt(&self) -> Option<u64> {
8586            self.version.as_ref().map(|field| *field)
8587        }
8588        ///Sets `version` with the provided value.
8589        pub fn set_version(&mut self, field: u64) {
8590            self.version = Some(field);
8591        }
8592        ///Sets `version` with the provided value.
8593        pub fn with_version(mut self, field: u64) -> Self {
8594            self.set_version(field);
8595            self
8596        }
8597        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8598        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8599            self.digest.as_mut().map(|field| field as _)
8600        }
8601        ///Returns a mutable reference to `digest`.
8602        ///If the field is unset, it is first initialized with the default value.
8603        pub fn digest_mut(&mut self) -> &mut String {
8604            self.digest.get_or_insert_default()
8605        }
8606        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8607        pub fn digest_opt(&self) -> Option<&str> {
8608            self.digest.as_ref().map(|field| field as _)
8609        }
8610        ///Sets `digest` with the provided value.
8611        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8612            self.digest = Some(field.into().into());
8613        }
8614        ///Sets `digest` with the provided value.
8615        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8616            self.set_digest(field.into());
8617            self
8618        }
8619        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8620        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8621            self.mutable.as_mut().map(|field| field as _)
8622        }
8623        ///Returns a mutable reference to `mutable`.
8624        ///If the field is unset, it is first initialized with the default value.
8625        pub fn mutable_mut(&mut self) -> &mut bool {
8626            self.mutable.get_or_insert_default()
8627        }
8628        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8629        pub fn mutable_opt(&self) -> Option<bool> {
8630            self.mutable.as_ref().map(|field| *field)
8631        }
8632        ///Sets `mutable` with the provided value.
8633        pub fn set_mutable(&mut self, field: bool) {
8634            self.mutable = Some(field);
8635        }
8636        ///Sets `mutable` with the provided value.
8637        pub fn with_mutable(mut self, field: bool) -> Self {
8638            self.set_mutable(field);
8639            self
8640        }
8641        ///Sets `mutability` with the provided value.
8642        pub fn with_mutability<T: Into<super::input::Mutability>>(
8643            mut self,
8644            field: T,
8645        ) -> Self {
8646            self.set_mutability(field.into());
8647            self
8648        }
8649        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
8650        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8651            self.funds_withdrawal
8652                .as_ref()
8653                .map(|field| field as _)
8654                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8655        }
8656        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8657        pub fn funds_withdrawal_opt_mut(
8658            &mut self,
8659        ) -> Option<&mut super::FundsWithdrawal> {
8660            self.funds_withdrawal.as_mut().map(|field| field as _)
8661        }
8662        ///Returns a mutable reference to `funds_withdrawal`.
8663        ///If the field is unset, it is first initialized with the default value.
8664        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8665            self.funds_withdrawal.get_or_insert_default()
8666        }
8667        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8668        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8669            self.funds_withdrawal.as_ref().map(|field| field as _)
8670        }
8671        ///Sets `funds_withdrawal` with the provided value.
8672        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8673            &mut self,
8674            field: T,
8675        ) {
8676            self.funds_withdrawal = Some(field.into().into());
8677        }
8678        ///Sets `funds_withdrawal` with the provided value.
8679        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8680            mut self,
8681            field: T,
8682        ) -> Self {
8683            self.set_funds_withdrawal(field.into());
8684            self
8685        }
8686        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8687        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8688            self.literal.as_mut().map(|field| field as _)
8689        }
8690        ///Returns a mutable reference to `literal`.
8691        ///If the field is unset, it is first initialized with the default value.
8692        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8693            self.literal.get_or_insert_default()
8694        }
8695        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8696        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8697            self.literal.as_ref().map(|field| field as _)
8698        }
8699        ///Sets `literal` with the provided value.
8700        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8701            self.literal = Some(field.into().into());
8702        }
8703        ///Sets `literal` with the provided value.
8704        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8705            self.set_literal(field.into());
8706            self
8707        }
8708    }
8709    impl super::Jwk {
8710        pub const fn const_default() -> Self {
8711            Self {
8712                kty: None,
8713                e: None,
8714                n: None,
8715                alg: None,
8716            }
8717        }
8718        #[doc(hidden)]
8719        pub fn default_instance() -> &'static Self {
8720            static DEFAULT: super::Jwk = super::Jwk::const_default();
8721            &DEFAULT
8722        }
8723        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8724        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8725            self.kty.as_mut().map(|field| field as _)
8726        }
8727        ///Returns a mutable reference to `kty`.
8728        ///If the field is unset, it is first initialized with the default value.
8729        pub fn kty_mut(&mut self) -> &mut String {
8730            self.kty.get_or_insert_default()
8731        }
8732        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8733        pub fn kty_opt(&self) -> Option<&str> {
8734            self.kty.as_ref().map(|field| field as _)
8735        }
8736        ///Sets `kty` with the provided value.
8737        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8738            self.kty = Some(field.into().into());
8739        }
8740        ///Sets `kty` with the provided value.
8741        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8742            self.set_kty(field.into());
8743            self
8744        }
8745        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8746        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8747            self.e.as_mut().map(|field| field as _)
8748        }
8749        ///Returns a mutable reference to `e`.
8750        ///If the field is unset, it is first initialized with the default value.
8751        pub fn e_mut(&mut self) -> &mut String {
8752            self.e.get_or_insert_default()
8753        }
8754        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8755        pub fn e_opt(&self) -> Option<&str> {
8756            self.e.as_ref().map(|field| field as _)
8757        }
8758        ///Sets `e` with the provided value.
8759        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8760            self.e = Some(field.into().into());
8761        }
8762        ///Sets `e` with the provided value.
8763        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8764            self.set_e(field.into());
8765            self
8766        }
8767        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8768        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8769            self.n.as_mut().map(|field| field as _)
8770        }
8771        ///Returns a mutable reference to `n`.
8772        ///If the field is unset, it is first initialized with the default value.
8773        pub fn n_mut(&mut self) -> &mut String {
8774            self.n.get_or_insert_default()
8775        }
8776        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8777        pub fn n_opt(&self) -> Option<&str> {
8778            self.n.as_ref().map(|field| field as _)
8779        }
8780        ///Sets `n` with the provided value.
8781        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8782            self.n = Some(field.into().into());
8783        }
8784        ///Sets `n` with the provided value.
8785        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8786            self.set_n(field.into());
8787            self
8788        }
8789        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8790        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8791            self.alg.as_mut().map(|field| field as _)
8792        }
8793        ///Returns a mutable reference to `alg`.
8794        ///If the field is unset, it is first initialized with the default value.
8795        pub fn alg_mut(&mut self) -> &mut String {
8796            self.alg.get_or_insert_default()
8797        }
8798        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8799        pub fn alg_opt(&self) -> Option<&str> {
8800            self.alg.as_ref().map(|field| field as _)
8801        }
8802        ///Sets `alg` with the provided value.
8803        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8804            self.alg = Some(field.into().into());
8805        }
8806        ///Sets `alg` with the provided value.
8807        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8808            self.set_alg(field.into());
8809            self
8810        }
8811    }
8812    impl super::JwkId {
8813        pub const fn const_default() -> Self {
8814            Self { iss: None, kid: None }
8815        }
8816        #[doc(hidden)]
8817        pub fn default_instance() -> &'static Self {
8818            static DEFAULT: super::JwkId = super::JwkId::const_default();
8819            &DEFAULT
8820        }
8821        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8822        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8823            self.iss.as_mut().map(|field| field as _)
8824        }
8825        ///Returns a mutable reference to `iss`.
8826        ///If the field is unset, it is first initialized with the default value.
8827        pub fn iss_mut(&mut self) -> &mut String {
8828            self.iss.get_or_insert_default()
8829        }
8830        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8831        pub fn iss_opt(&self) -> Option<&str> {
8832            self.iss.as_ref().map(|field| field as _)
8833        }
8834        ///Sets `iss` with the provided value.
8835        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8836            self.iss = Some(field.into().into());
8837        }
8838        ///Sets `iss` with the provided value.
8839        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8840            self.set_iss(field.into());
8841            self
8842        }
8843        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8844        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8845            self.kid.as_mut().map(|field| field as _)
8846        }
8847        ///Returns a mutable reference to `kid`.
8848        ///If the field is unset, it is first initialized with the default value.
8849        pub fn kid_mut(&mut self) -> &mut String {
8850            self.kid.get_or_insert_default()
8851        }
8852        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8853        pub fn kid_opt(&self) -> Option<&str> {
8854            self.kid.as_ref().map(|field| field as _)
8855        }
8856        ///Sets `kid` with the provided value.
8857        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8858            self.kid = Some(field.into().into());
8859        }
8860        ///Sets `kid` with the provided value.
8861        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8862            self.set_kid(field.into());
8863            self
8864        }
8865    }
8866    impl super::Linkage {
8867        pub const fn const_default() -> Self {
8868            Self {
8869                original_id: None,
8870                upgraded_id: None,
8871                upgraded_version: None,
8872            }
8873        }
8874        #[doc(hidden)]
8875        pub fn default_instance() -> &'static Self {
8876            static DEFAULT: super::Linkage = super::Linkage::const_default();
8877            &DEFAULT
8878        }
8879        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8880        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8881            self.original_id.as_mut().map(|field| field as _)
8882        }
8883        ///Returns a mutable reference to `original_id`.
8884        ///If the field is unset, it is first initialized with the default value.
8885        pub fn original_id_mut(&mut self) -> &mut String {
8886            self.original_id.get_or_insert_default()
8887        }
8888        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8889        pub fn original_id_opt(&self) -> Option<&str> {
8890            self.original_id.as_ref().map(|field| field as _)
8891        }
8892        ///Sets `original_id` with the provided value.
8893        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8894            self.original_id = Some(field.into().into());
8895        }
8896        ///Sets `original_id` with the provided value.
8897        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8898            self.set_original_id(field.into());
8899            self
8900        }
8901        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8902        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8903            self.upgraded_id.as_mut().map(|field| field as _)
8904        }
8905        ///Returns a mutable reference to `upgraded_id`.
8906        ///If the field is unset, it is first initialized with the default value.
8907        pub fn upgraded_id_mut(&mut self) -> &mut String {
8908            self.upgraded_id.get_or_insert_default()
8909        }
8910        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8911        pub fn upgraded_id_opt(&self) -> Option<&str> {
8912            self.upgraded_id.as_ref().map(|field| field as _)
8913        }
8914        ///Sets `upgraded_id` with the provided value.
8915        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8916            self.upgraded_id = Some(field.into().into());
8917        }
8918        ///Sets `upgraded_id` with the provided value.
8919        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8920            self.set_upgraded_id(field.into());
8921            self
8922        }
8923        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8924        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8925            self.upgraded_version.as_mut().map(|field| field as _)
8926        }
8927        ///Returns a mutable reference to `upgraded_version`.
8928        ///If the field is unset, it is first initialized with the default value.
8929        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8930            self.upgraded_version.get_or_insert_default()
8931        }
8932        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8933        pub fn upgraded_version_opt(&self) -> Option<u64> {
8934            self.upgraded_version.as_ref().map(|field| *field)
8935        }
8936        ///Sets `upgraded_version` with the provided value.
8937        pub fn set_upgraded_version(&mut self, field: u64) {
8938            self.upgraded_version = Some(field);
8939        }
8940        ///Sets `upgraded_version` with the provided value.
8941        pub fn with_upgraded_version(mut self, field: u64) -> Self {
8942            self.set_upgraded_version(field);
8943            self
8944        }
8945    }
8946    impl super::ListBalancesRequest {
8947        pub const fn const_default() -> Self {
8948            Self {
8949                owner: None,
8950                page_size: None,
8951                page_token: None,
8952            }
8953        }
8954        #[doc(hidden)]
8955        pub fn default_instance() -> &'static Self {
8956            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8957            &DEFAULT
8958        }
8959        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8960        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8961            self.owner.as_mut().map(|field| field as _)
8962        }
8963        ///Returns a mutable reference to `owner`.
8964        ///If the field is unset, it is first initialized with the default value.
8965        pub fn owner_mut(&mut self) -> &mut String {
8966            self.owner.get_or_insert_default()
8967        }
8968        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8969        pub fn owner_opt(&self) -> Option<&str> {
8970            self.owner.as_ref().map(|field| field as _)
8971        }
8972        ///Sets `owner` with the provided value.
8973        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8974            self.owner = Some(field.into().into());
8975        }
8976        ///Sets `owner` with the provided value.
8977        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8978            self.set_owner(field.into());
8979            self
8980        }
8981        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8982        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8983            self.page_size.as_mut().map(|field| field as _)
8984        }
8985        ///Returns a mutable reference to `page_size`.
8986        ///If the field is unset, it is first initialized with the default value.
8987        pub fn page_size_mut(&mut self) -> &mut u32 {
8988            self.page_size.get_or_insert_default()
8989        }
8990        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8991        pub fn page_size_opt(&self) -> Option<u32> {
8992            self.page_size.as_ref().map(|field| *field)
8993        }
8994        ///Sets `page_size` with the provided value.
8995        pub fn set_page_size(&mut self, field: u32) {
8996            self.page_size = Some(field);
8997        }
8998        ///Sets `page_size` with the provided value.
8999        pub fn with_page_size(mut self, field: u32) -> Self {
9000            self.set_page_size(field);
9001            self
9002        }
9003        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9004        pub fn page_token_opt(&self) -> Option<&[u8]> {
9005            self.page_token.as_ref().map(|field| field as _)
9006        }
9007        ///Sets `page_token` with the provided value.
9008        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9009            self.page_token = Some(field.into().into());
9010        }
9011        ///Sets `page_token` with the provided value.
9012        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9013            mut self,
9014            field: T,
9015        ) -> Self {
9016            self.set_page_token(field.into());
9017            self
9018        }
9019    }
9020    impl super::ListBalancesResponse {
9021        pub const fn const_default() -> Self {
9022            Self {
9023                balances: Vec::new(),
9024                next_page_token: None,
9025            }
9026        }
9027        #[doc(hidden)]
9028        pub fn default_instance() -> &'static Self {
9029            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9030            &DEFAULT
9031        }
9032        ///Returns the value of `balances`, or the default value if `balances` is unset.
9033        pub fn balances(&self) -> &[super::Balance] {
9034            &self.balances
9035        }
9036        ///Returns a mutable reference to `balances`.
9037        ///If the field is unset, it is first initialized with the default value.
9038        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9039            &mut self.balances
9040        }
9041        ///Sets `balances` with the provided value.
9042        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9043            self.balances = field;
9044        }
9045        ///Sets `balances` with the provided value.
9046        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9047            self.set_balances(field);
9048            self
9049        }
9050        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9051        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9052            self.next_page_token.as_ref().map(|field| field as _)
9053        }
9054        ///Sets `next_page_token` with the provided value.
9055        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9056            self.next_page_token = Some(field.into().into());
9057        }
9058        ///Sets `next_page_token` with the provided value.
9059        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9060            mut self,
9061            field: T,
9062        ) -> Self {
9063            self.set_next_page_token(field.into());
9064            self
9065        }
9066    }
9067    impl super::ListDynamicFieldsRequest {
9068        pub const fn const_default() -> Self {
9069            Self {
9070                parent: None,
9071                page_size: None,
9072                page_token: None,
9073                read_mask: None,
9074            }
9075        }
9076        #[doc(hidden)]
9077        pub fn default_instance() -> &'static Self {
9078            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9079            &DEFAULT
9080        }
9081        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9082        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9083            self.parent.as_mut().map(|field| field as _)
9084        }
9085        ///Returns a mutable reference to `parent`.
9086        ///If the field is unset, it is first initialized with the default value.
9087        pub fn parent_mut(&mut self) -> &mut String {
9088            self.parent.get_or_insert_default()
9089        }
9090        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
9091        pub fn parent_opt(&self) -> Option<&str> {
9092            self.parent.as_ref().map(|field| field as _)
9093        }
9094        ///Sets `parent` with the provided value.
9095        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9096            self.parent = Some(field.into().into());
9097        }
9098        ///Sets `parent` with the provided value.
9099        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9100            self.set_parent(field.into());
9101            self
9102        }
9103        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9104        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9105            self.page_size.as_mut().map(|field| field as _)
9106        }
9107        ///Returns a mutable reference to `page_size`.
9108        ///If the field is unset, it is first initialized with the default value.
9109        pub fn page_size_mut(&mut self) -> &mut u32 {
9110            self.page_size.get_or_insert_default()
9111        }
9112        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9113        pub fn page_size_opt(&self) -> Option<u32> {
9114            self.page_size.as_ref().map(|field| *field)
9115        }
9116        ///Sets `page_size` with the provided value.
9117        pub fn set_page_size(&mut self, field: u32) {
9118            self.page_size = Some(field);
9119        }
9120        ///Sets `page_size` with the provided value.
9121        pub fn with_page_size(mut self, field: u32) -> Self {
9122            self.set_page_size(field);
9123            self
9124        }
9125        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9126        pub fn page_token_opt(&self) -> Option<&[u8]> {
9127            self.page_token.as_ref().map(|field| field as _)
9128        }
9129        ///Sets `page_token` with the provided value.
9130        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9131            self.page_token = Some(field.into().into());
9132        }
9133        ///Sets `page_token` with the provided value.
9134        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9135            mut self,
9136            field: T,
9137        ) -> Self {
9138            self.set_page_token(field.into());
9139            self
9140        }
9141        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9142        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9143            self.read_mask.as_mut().map(|field| field as _)
9144        }
9145        ///Returns a mutable reference to `read_mask`.
9146        ///If the field is unset, it is first initialized with the default value.
9147        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9148            self.read_mask.get_or_insert_default()
9149        }
9150        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9151        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9152            self.read_mask.as_ref().map(|field| field as _)
9153        }
9154        ///Sets `read_mask` with the provided value.
9155        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9156            self.read_mask = Some(field.into().into());
9157        }
9158        ///Sets `read_mask` with the provided value.
9159        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9160            mut self,
9161            field: T,
9162        ) -> Self {
9163            self.set_read_mask(field.into());
9164            self
9165        }
9166    }
9167    impl super::ListDynamicFieldsResponse {
9168        pub const fn const_default() -> Self {
9169            Self {
9170                dynamic_fields: Vec::new(),
9171                next_page_token: None,
9172            }
9173        }
9174        #[doc(hidden)]
9175        pub fn default_instance() -> &'static Self {
9176            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9177            &DEFAULT
9178        }
9179        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
9180        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9181            &self.dynamic_fields
9182        }
9183        ///Returns a mutable reference to `dynamic_fields`.
9184        ///If the field is unset, it is first initialized with the default value.
9185        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9186            &mut self.dynamic_fields
9187        }
9188        ///Sets `dynamic_fields` with the provided value.
9189        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9190            self.dynamic_fields = field;
9191        }
9192        ///Sets `dynamic_fields` with the provided value.
9193        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9194            self.set_dynamic_fields(field);
9195            self
9196        }
9197        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9198        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9199            self.next_page_token.as_ref().map(|field| field as _)
9200        }
9201        ///Sets `next_page_token` with the provided value.
9202        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9203            self.next_page_token = Some(field.into().into());
9204        }
9205        ///Sets `next_page_token` with the provided value.
9206        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9207            mut self,
9208            field: T,
9209        ) -> Self {
9210            self.set_next_page_token(field.into());
9211            self
9212        }
9213    }
9214    impl super::ListOwnedObjectsRequest {
9215        pub const fn const_default() -> Self {
9216            Self {
9217                owner: None,
9218                page_size: None,
9219                page_token: None,
9220                read_mask: None,
9221                object_type: None,
9222            }
9223        }
9224        #[doc(hidden)]
9225        pub fn default_instance() -> &'static Self {
9226            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9227            &DEFAULT
9228        }
9229        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9230        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9231            self.owner.as_mut().map(|field| field as _)
9232        }
9233        ///Returns a mutable reference to `owner`.
9234        ///If the field is unset, it is first initialized with the default value.
9235        pub fn owner_mut(&mut self) -> &mut String {
9236            self.owner.get_or_insert_default()
9237        }
9238        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9239        pub fn owner_opt(&self) -> Option<&str> {
9240            self.owner.as_ref().map(|field| field as _)
9241        }
9242        ///Sets `owner` with the provided value.
9243        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9244            self.owner = Some(field.into().into());
9245        }
9246        ///Sets `owner` with the provided value.
9247        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9248            self.set_owner(field.into());
9249            self
9250        }
9251        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9252        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9253            self.page_size.as_mut().map(|field| field as _)
9254        }
9255        ///Returns a mutable reference to `page_size`.
9256        ///If the field is unset, it is first initialized with the default value.
9257        pub fn page_size_mut(&mut self) -> &mut u32 {
9258            self.page_size.get_or_insert_default()
9259        }
9260        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9261        pub fn page_size_opt(&self) -> Option<u32> {
9262            self.page_size.as_ref().map(|field| *field)
9263        }
9264        ///Sets `page_size` with the provided value.
9265        pub fn set_page_size(&mut self, field: u32) {
9266            self.page_size = Some(field);
9267        }
9268        ///Sets `page_size` with the provided value.
9269        pub fn with_page_size(mut self, field: u32) -> Self {
9270            self.set_page_size(field);
9271            self
9272        }
9273        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9274        pub fn page_token_opt(&self) -> Option<&[u8]> {
9275            self.page_token.as_ref().map(|field| field as _)
9276        }
9277        ///Sets `page_token` with the provided value.
9278        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9279            self.page_token = Some(field.into().into());
9280        }
9281        ///Sets `page_token` with the provided value.
9282        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9283            mut self,
9284            field: T,
9285        ) -> Self {
9286            self.set_page_token(field.into());
9287            self
9288        }
9289        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9290        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9291            self.read_mask.as_mut().map(|field| field as _)
9292        }
9293        ///Returns a mutable reference to `read_mask`.
9294        ///If the field is unset, it is first initialized with the default value.
9295        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9296            self.read_mask.get_or_insert_default()
9297        }
9298        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9299        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9300            self.read_mask.as_ref().map(|field| field as _)
9301        }
9302        ///Sets `read_mask` with the provided value.
9303        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9304            self.read_mask = Some(field.into().into());
9305        }
9306        ///Sets `read_mask` with the provided value.
9307        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9308            mut self,
9309            field: T,
9310        ) -> Self {
9311            self.set_read_mask(field.into());
9312            self
9313        }
9314        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9315        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9316            self.object_type.as_mut().map(|field| field as _)
9317        }
9318        ///Returns a mutable reference to `object_type`.
9319        ///If the field is unset, it is first initialized with the default value.
9320        pub fn object_type_mut(&mut self) -> &mut String {
9321            self.object_type.get_or_insert_default()
9322        }
9323        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9324        pub fn object_type_opt(&self) -> Option<&str> {
9325            self.object_type.as_ref().map(|field| field as _)
9326        }
9327        ///Sets `object_type` with the provided value.
9328        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9329            self.object_type = Some(field.into().into());
9330        }
9331        ///Sets `object_type` with the provided value.
9332        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9333            self.set_object_type(field.into());
9334            self
9335        }
9336    }
9337    impl super::ListOwnedObjectsResponse {
9338        pub const fn const_default() -> Self {
9339            Self {
9340                objects: Vec::new(),
9341                next_page_token: None,
9342            }
9343        }
9344        #[doc(hidden)]
9345        pub fn default_instance() -> &'static Self {
9346            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9347            &DEFAULT
9348        }
9349        ///Returns the value of `objects`, or the default value if `objects` is unset.
9350        pub fn objects(&self) -> &[super::Object] {
9351            &self.objects
9352        }
9353        ///Returns a mutable reference to `objects`.
9354        ///If the field is unset, it is first initialized with the default value.
9355        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9356            &mut self.objects
9357        }
9358        ///Sets `objects` with the provided value.
9359        pub fn set_objects(&mut self, field: Vec<super::Object>) {
9360            self.objects = field;
9361        }
9362        ///Sets `objects` with the provided value.
9363        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9364            self.set_objects(field);
9365            self
9366        }
9367        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9368        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9369            self.next_page_token.as_ref().map(|field| field as _)
9370        }
9371        ///Sets `next_page_token` with the provided value.
9372        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9373            self.next_page_token = Some(field.into().into());
9374        }
9375        ///Sets `next_page_token` with the provided value.
9376        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9377            mut self,
9378            field: T,
9379        ) -> Self {
9380            self.set_next_page_token(field.into());
9381            self
9382        }
9383    }
9384    impl super::ListPackageVersionsRequest {
9385        pub const fn const_default() -> Self {
9386            Self {
9387                package_id: None,
9388                page_size: None,
9389                page_token: None,
9390            }
9391        }
9392        #[doc(hidden)]
9393        pub fn default_instance() -> &'static Self {
9394            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9395            &DEFAULT
9396        }
9397        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9398        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9399            self.package_id.as_mut().map(|field| field as _)
9400        }
9401        ///Returns a mutable reference to `package_id`.
9402        ///If the field is unset, it is first initialized with the default value.
9403        pub fn package_id_mut(&mut self) -> &mut String {
9404            self.package_id.get_or_insert_default()
9405        }
9406        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9407        pub fn package_id_opt(&self) -> Option<&str> {
9408            self.package_id.as_ref().map(|field| field as _)
9409        }
9410        ///Sets `package_id` with the provided value.
9411        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9412            self.package_id = Some(field.into().into());
9413        }
9414        ///Sets `package_id` with the provided value.
9415        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9416            self.set_package_id(field.into());
9417            self
9418        }
9419        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9420        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9421            self.page_size.as_mut().map(|field| field as _)
9422        }
9423        ///Returns a mutable reference to `page_size`.
9424        ///If the field is unset, it is first initialized with the default value.
9425        pub fn page_size_mut(&mut self) -> &mut u32 {
9426            self.page_size.get_or_insert_default()
9427        }
9428        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9429        pub fn page_size_opt(&self) -> Option<u32> {
9430            self.page_size.as_ref().map(|field| *field)
9431        }
9432        ///Sets `page_size` with the provided value.
9433        pub fn set_page_size(&mut self, field: u32) {
9434            self.page_size = Some(field);
9435        }
9436        ///Sets `page_size` with the provided value.
9437        pub fn with_page_size(mut self, field: u32) -> Self {
9438            self.set_page_size(field);
9439            self
9440        }
9441        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9442        pub fn page_token_opt(&self) -> Option<&[u8]> {
9443            self.page_token.as_ref().map(|field| field as _)
9444        }
9445        ///Sets `page_token` with the provided value.
9446        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9447            self.page_token = Some(field.into().into());
9448        }
9449        ///Sets `page_token` with the provided value.
9450        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9451            mut self,
9452            field: T,
9453        ) -> Self {
9454            self.set_page_token(field.into());
9455            self
9456        }
9457    }
9458    impl super::ListPackageVersionsResponse {
9459        pub const fn const_default() -> Self {
9460            Self {
9461                versions: Vec::new(),
9462                next_page_token: None,
9463            }
9464        }
9465        #[doc(hidden)]
9466        pub fn default_instance() -> &'static Self {
9467            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9468            &DEFAULT
9469        }
9470        ///Returns the value of `versions`, or the default value if `versions` is unset.
9471        pub fn versions(&self) -> &[super::PackageVersion] {
9472            &self.versions
9473        }
9474        ///Returns a mutable reference to `versions`.
9475        ///If the field is unset, it is first initialized with the default value.
9476        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9477            &mut self.versions
9478        }
9479        ///Sets `versions` with the provided value.
9480        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9481            self.versions = field;
9482        }
9483        ///Sets `versions` with the provided value.
9484        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9485            self.set_versions(field);
9486            self
9487        }
9488        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9489        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9490            self.next_page_token.as_ref().map(|field| field as _)
9491        }
9492        ///Sets `next_page_token` with the provided value.
9493        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9494            self.next_page_token = Some(field.into().into());
9495        }
9496        ///Sets `next_page_token` with the provided value.
9497        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9498            mut self,
9499            field: T,
9500        ) -> Self {
9501            self.set_next_page_token(field.into());
9502            self
9503        }
9504    }
9505    impl super::LookupNameRequest {
9506        pub const fn const_default() -> Self {
9507            Self { name: None }
9508        }
9509        #[doc(hidden)]
9510        pub fn default_instance() -> &'static Self {
9511            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9512            &DEFAULT
9513        }
9514        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9515        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9516            self.name.as_mut().map(|field| field as _)
9517        }
9518        ///Returns a mutable reference to `name`.
9519        ///If the field is unset, it is first initialized with the default value.
9520        pub fn name_mut(&mut self) -> &mut String {
9521            self.name.get_or_insert_default()
9522        }
9523        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9524        pub fn name_opt(&self) -> Option<&str> {
9525            self.name.as_ref().map(|field| field as _)
9526        }
9527        ///Sets `name` with the provided value.
9528        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9529            self.name = Some(field.into().into());
9530        }
9531        ///Sets `name` with the provided value.
9532        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9533            self.set_name(field.into());
9534            self
9535        }
9536    }
9537    impl super::LookupNameResponse {
9538        pub const fn const_default() -> Self {
9539            Self { record: None }
9540        }
9541        #[doc(hidden)]
9542        pub fn default_instance() -> &'static Self {
9543            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9544            &DEFAULT
9545        }
9546        ///Returns the value of `record`, or the default value if `record` is unset.
9547        pub fn record(&self) -> &super::NameRecord {
9548            self.record
9549                .as_ref()
9550                .map(|field| field as _)
9551                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9552        }
9553        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9554        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9555            self.record.as_mut().map(|field| field as _)
9556        }
9557        ///Returns a mutable reference to `record`.
9558        ///If the field is unset, it is first initialized with the default value.
9559        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9560            self.record.get_or_insert_default()
9561        }
9562        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9563        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9564            self.record.as_ref().map(|field| field as _)
9565        }
9566        ///Sets `record` with the provided value.
9567        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9568            self.record = Some(field.into().into());
9569        }
9570        ///Sets `record` with the provided value.
9571        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9572            self.set_record(field.into());
9573            self
9574        }
9575    }
9576    impl super::MakeMoveVector {
9577        pub const fn const_default() -> Self {
9578            Self {
9579                element_type: None,
9580                elements: Vec::new(),
9581            }
9582        }
9583        #[doc(hidden)]
9584        pub fn default_instance() -> &'static Self {
9585            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9586            &DEFAULT
9587        }
9588        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9589        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9590            self.element_type.as_mut().map(|field| field as _)
9591        }
9592        ///Returns a mutable reference to `element_type`.
9593        ///If the field is unset, it is first initialized with the default value.
9594        pub fn element_type_mut(&mut self) -> &mut String {
9595            self.element_type.get_or_insert_default()
9596        }
9597        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9598        pub fn element_type_opt(&self) -> Option<&str> {
9599            self.element_type.as_ref().map(|field| field as _)
9600        }
9601        ///Sets `element_type` with the provided value.
9602        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9603            self.element_type = Some(field.into().into());
9604        }
9605        ///Sets `element_type` with the provided value.
9606        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9607            self.set_element_type(field.into());
9608            self
9609        }
9610        ///Returns the value of `elements`, or the default value if `elements` is unset.
9611        pub fn elements(&self) -> &[super::Argument] {
9612            &self.elements
9613        }
9614        ///Returns a mutable reference to `elements`.
9615        ///If the field is unset, it is first initialized with the default value.
9616        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9617            &mut self.elements
9618        }
9619        ///Sets `elements` with the provided value.
9620        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9621            self.elements = field;
9622        }
9623        ///Sets `elements` with the provided value.
9624        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9625            self.set_elements(field);
9626            self
9627        }
9628    }
9629    impl super::MergeCoins {
9630        pub const fn const_default() -> Self {
9631            Self {
9632                coin: None,
9633                coins_to_merge: Vec::new(),
9634            }
9635        }
9636        #[doc(hidden)]
9637        pub fn default_instance() -> &'static Self {
9638            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9639            &DEFAULT
9640        }
9641        ///Returns the value of `coin`, or the default value if `coin` is unset.
9642        pub fn coin(&self) -> &super::Argument {
9643            self.coin
9644                .as_ref()
9645                .map(|field| field as _)
9646                .unwrap_or_else(|| super::Argument::default_instance() as _)
9647        }
9648        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9649        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9650            self.coin.as_mut().map(|field| field as _)
9651        }
9652        ///Returns a mutable reference to `coin`.
9653        ///If the field is unset, it is first initialized with the default value.
9654        pub fn coin_mut(&mut self) -> &mut super::Argument {
9655            self.coin.get_or_insert_default()
9656        }
9657        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9658        pub fn coin_opt(&self) -> Option<&super::Argument> {
9659            self.coin.as_ref().map(|field| field as _)
9660        }
9661        ///Sets `coin` with the provided value.
9662        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9663            self.coin = Some(field.into().into());
9664        }
9665        ///Sets `coin` with the provided value.
9666        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9667            self.set_coin(field.into());
9668            self
9669        }
9670        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9671        pub fn coins_to_merge(&self) -> &[super::Argument] {
9672            &self.coins_to_merge
9673        }
9674        ///Returns a mutable reference to `coins_to_merge`.
9675        ///If the field is unset, it is first initialized with the default value.
9676        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9677            &mut self.coins_to_merge
9678        }
9679        ///Sets `coins_to_merge` with the provided value.
9680        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9681            self.coins_to_merge = field;
9682        }
9683        ///Sets `coins_to_merge` with the provided value.
9684        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9685            self.set_coins_to_merge(field);
9686            self
9687        }
9688    }
9689    impl super::Module {
9690        pub const fn const_default() -> Self {
9691            Self {
9692                name: None,
9693                contents: None,
9694                datatypes: Vec::new(),
9695                functions: Vec::new(),
9696            }
9697        }
9698        #[doc(hidden)]
9699        pub fn default_instance() -> &'static Self {
9700            static DEFAULT: super::Module = super::Module::const_default();
9701            &DEFAULT
9702        }
9703        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9704        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9705            self.name.as_mut().map(|field| field as _)
9706        }
9707        ///Returns a mutable reference to `name`.
9708        ///If the field is unset, it is first initialized with the default value.
9709        pub fn name_mut(&mut self) -> &mut String {
9710            self.name.get_or_insert_default()
9711        }
9712        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9713        pub fn name_opt(&self) -> Option<&str> {
9714            self.name.as_ref().map(|field| field as _)
9715        }
9716        ///Sets `name` with the provided value.
9717        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9718            self.name = Some(field.into().into());
9719        }
9720        ///Sets `name` with the provided value.
9721        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9722            self.set_name(field.into());
9723            self
9724        }
9725        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9726        pub fn contents_opt(&self) -> Option<&[u8]> {
9727            self.contents.as_ref().map(|field| field as _)
9728        }
9729        ///Sets `contents` with the provided value.
9730        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9731            self.contents = Some(field.into().into());
9732        }
9733        ///Sets `contents` with the provided value.
9734        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9735            mut self,
9736            field: T,
9737        ) -> Self {
9738            self.set_contents(field.into());
9739            self
9740        }
9741        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9742        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9743            &self.datatypes
9744        }
9745        ///Returns a mutable reference to `datatypes`.
9746        ///If the field is unset, it is first initialized with the default value.
9747        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9748            &mut self.datatypes
9749        }
9750        ///Sets `datatypes` with the provided value.
9751        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9752            self.datatypes = field;
9753        }
9754        ///Sets `datatypes` with the provided value.
9755        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9756            self.set_datatypes(field);
9757            self
9758        }
9759        ///Returns the value of `functions`, or the default value if `functions` is unset.
9760        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9761            &self.functions
9762        }
9763        ///Returns a mutable reference to `functions`.
9764        ///If the field is unset, it is first initialized with the default value.
9765        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9766            &mut self.functions
9767        }
9768        ///Sets `functions` with the provided value.
9769        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9770            self.functions = field;
9771        }
9772        ///Sets `functions` with the provided value.
9773        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9774            self.set_functions(field);
9775            self
9776        }
9777    }
9778    impl super::MoveAbort {
9779        pub const fn const_default() -> Self {
9780            Self {
9781                abort_code: None,
9782                location: None,
9783                clever_error: None,
9784            }
9785        }
9786        #[doc(hidden)]
9787        pub fn default_instance() -> &'static Self {
9788            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9789            &DEFAULT
9790        }
9791        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9792        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9793            self.abort_code.as_mut().map(|field| field as _)
9794        }
9795        ///Returns a mutable reference to `abort_code`.
9796        ///If the field is unset, it is first initialized with the default value.
9797        pub fn abort_code_mut(&mut self) -> &mut u64 {
9798            self.abort_code.get_or_insert_default()
9799        }
9800        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9801        pub fn abort_code_opt(&self) -> Option<u64> {
9802            self.abort_code.as_ref().map(|field| *field)
9803        }
9804        ///Sets `abort_code` with the provided value.
9805        pub fn set_abort_code(&mut self, field: u64) {
9806            self.abort_code = Some(field);
9807        }
9808        ///Sets `abort_code` with the provided value.
9809        pub fn with_abort_code(mut self, field: u64) -> Self {
9810            self.set_abort_code(field);
9811            self
9812        }
9813        ///Returns the value of `location`, or the default value if `location` is unset.
9814        pub fn location(&self) -> &super::MoveLocation {
9815            self.location
9816                .as_ref()
9817                .map(|field| field as _)
9818                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9819        }
9820        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9821        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9822            self.location.as_mut().map(|field| field as _)
9823        }
9824        ///Returns a mutable reference to `location`.
9825        ///If the field is unset, it is first initialized with the default value.
9826        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9827            self.location.get_or_insert_default()
9828        }
9829        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9830        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9831            self.location.as_ref().map(|field| field as _)
9832        }
9833        ///Sets `location` with the provided value.
9834        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9835            self.location = Some(field.into().into());
9836        }
9837        ///Sets `location` with the provided value.
9838        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9839            self.set_location(field.into());
9840            self
9841        }
9842        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9843        pub fn clever_error(&self) -> &super::CleverError {
9844            self.clever_error
9845                .as_ref()
9846                .map(|field| field as _)
9847                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9848        }
9849        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9850        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9851            self.clever_error.as_mut().map(|field| field as _)
9852        }
9853        ///Returns a mutable reference to `clever_error`.
9854        ///If the field is unset, it is first initialized with the default value.
9855        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9856            self.clever_error.get_or_insert_default()
9857        }
9858        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9859        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9860            self.clever_error.as_ref().map(|field| field as _)
9861        }
9862        ///Sets `clever_error` with the provided value.
9863        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9864            self.clever_error = Some(field.into().into());
9865        }
9866        ///Sets `clever_error` with the provided value.
9867        pub fn with_clever_error<T: Into<super::CleverError>>(
9868            mut self,
9869            field: T,
9870        ) -> Self {
9871            self.set_clever_error(field.into());
9872            self
9873        }
9874    }
9875    impl super::MoveCall {
9876        pub const fn const_default() -> Self {
9877            Self {
9878                package: None,
9879                module: None,
9880                function: None,
9881                type_arguments: Vec::new(),
9882                arguments: Vec::new(),
9883            }
9884        }
9885        #[doc(hidden)]
9886        pub fn default_instance() -> &'static Self {
9887            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9888            &DEFAULT
9889        }
9890        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9891        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9892            self.package.as_mut().map(|field| field as _)
9893        }
9894        ///Returns a mutable reference to `package`.
9895        ///If the field is unset, it is first initialized with the default value.
9896        pub fn package_mut(&mut self) -> &mut String {
9897            self.package.get_or_insert_default()
9898        }
9899        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9900        pub fn package_opt(&self) -> Option<&str> {
9901            self.package.as_ref().map(|field| field as _)
9902        }
9903        ///Sets `package` with the provided value.
9904        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9905            self.package = Some(field.into().into());
9906        }
9907        ///Sets `package` with the provided value.
9908        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9909            self.set_package(field.into());
9910            self
9911        }
9912        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9913        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9914            self.module.as_mut().map(|field| field as _)
9915        }
9916        ///Returns a mutable reference to `module`.
9917        ///If the field is unset, it is first initialized with the default value.
9918        pub fn module_mut(&mut self) -> &mut String {
9919            self.module.get_or_insert_default()
9920        }
9921        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9922        pub fn module_opt(&self) -> Option<&str> {
9923            self.module.as_ref().map(|field| field as _)
9924        }
9925        ///Sets `module` with the provided value.
9926        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9927            self.module = Some(field.into().into());
9928        }
9929        ///Sets `module` with the provided value.
9930        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9931            self.set_module(field.into());
9932            self
9933        }
9934        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9935        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9936            self.function.as_mut().map(|field| field as _)
9937        }
9938        ///Returns a mutable reference to `function`.
9939        ///If the field is unset, it is first initialized with the default value.
9940        pub fn function_mut(&mut self) -> &mut String {
9941            self.function.get_or_insert_default()
9942        }
9943        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9944        pub fn function_opt(&self) -> Option<&str> {
9945            self.function.as_ref().map(|field| field as _)
9946        }
9947        ///Sets `function` with the provided value.
9948        pub fn set_function<T: Into<String>>(&mut self, field: T) {
9949            self.function = Some(field.into().into());
9950        }
9951        ///Sets `function` with the provided value.
9952        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9953            self.set_function(field.into());
9954            self
9955        }
9956        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
9957        pub fn type_arguments(&self) -> &[String] {
9958            &self.type_arguments
9959        }
9960        ///Returns a mutable reference to `type_arguments`.
9961        ///If the field is unset, it is first initialized with the default value.
9962        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9963            &mut self.type_arguments
9964        }
9965        ///Sets `type_arguments` with the provided value.
9966        pub fn set_type_arguments(&mut self, field: Vec<String>) {
9967            self.type_arguments = field;
9968        }
9969        ///Sets `type_arguments` with the provided value.
9970        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9971            self.set_type_arguments(field);
9972            self
9973        }
9974        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
9975        pub fn arguments(&self) -> &[super::Argument] {
9976            &self.arguments
9977        }
9978        ///Returns a mutable reference to `arguments`.
9979        ///If the field is unset, it is first initialized with the default value.
9980        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9981            &mut self.arguments
9982        }
9983        ///Sets `arguments` with the provided value.
9984        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9985            self.arguments = field;
9986        }
9987        ///Sets `arguments` with the provided value.
9988        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9989            self.set_arguments(field);
9990            self
9991        }
9992    }
9993    impl super::MoveLocation {
9994        pub const fn const_default() -> Self {
9995            Self {
9996                package: None,
9997                module: None,
9998                function: None,
9999                instruction: None,
10000                function_name: None,
10001            }
10002        }
10003        #[doc(hidden)]
10004        pub fn default_instance() -> &'static Self {
10005            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
10006            &DEFAULT
10007        }
10008        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10009        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10010            self.package.as_mut().map(|field| field as _)
10011        }
10012        ///Returns a mutable reference to `package`.
10013        ///If the field is unset, it is first initialized with the default value.
10014        pub fn package_mut(&mut self) -> &mut String {
10015            self.package.get_or_insert_default()
10016        }
10017        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10018        pub fn package_opt(&self) -> Option<&str> {
10019            self.package.as_ref().map(|field| field as _)
10020        }
10021        ///Sets `package` with the provided value.
10022        pub fn set_package<T: Into<String>>(&mut self, field: T) {
10023            self.package = Some(field.into().into());
10024        }
10025        ///Sets `package` with the provided value.
10026        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10027            self.set_package(field.into());
10028            self
10029        }
10030        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10031        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10032            self.module.as_mut().map(|field| field as _)
10033        }
10034        ///Returns a mutable reference to `module`.
10035        ///If the field is unset, it is first initialized with the default value.
10036        pub fn module_mut(&mut self) -> &mut String {
10037            self.module.get_or_insert_default()
10038        }
10039        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
10040        pub fn module_opt(&self) -> Option<&str> {
10041            self.module.as_ref().map(|field| field as _)
10042        }
10043        ///Sets `module` with the provided value.
10044        pub fn set_module<T: Into<String>>(&mut self, field: T) {
10045            self.module = Some(field.into().into());
10046        }
10047        ///Sets `module` with the provided value.
10048        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10049            self.set_module(field.into());
10050            self
10051        }
10052        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10053        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
10054            self.function.as_mut().map(|field| field as _)
10055        }
10056        ///Returns a mutable reference to `function`.
10057        ///If the field is unset, it is first initialized with the default value.
10058        pub fn function_mut(&mut self) -> &mut u32 {
10059            self.function.get_or_insert_default()
10060        }
10061        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
10062        pub fn function_opt(&self) -> Option<u32> {
10063            self.function.as_ref().map(|field| *field)
10064        }
10065        ///Sets `function` with the provided value.
10066        pub fn set_function(&mut self, field: u32) {
10067            self.function = Some(field);
10068        }
10069        ///Sets `function` with the provided value.
10070        pub fn with_function(mut self, field: u32) -> Self {
10071            self.set_function(field);
10072            self
10073        }
10074        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10075        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10076            self.instruction.as_mut().map(|field| field as _)
10077        }
10078        ///Returns a mutable reference to `instruction`.
10079        ///If the field is unset, it is first initialized with the default value.
10080        pub fn instruction_mut(&mut self) -> &mut u32 {
10081            self.instruction.get_or_insert_default()
10082        }
10083        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10084        pub fn instruction_opt(&self) -> Option<u32> {
10085            self.instruction.as_ref().map(|field| *field)
10086        }
10087        ///Sets `instruction` with the provided value.
10088        pub fn set_instruction(&mut self, field: u32) {
10089            self.instruction = Some(field);
10090        }
10091        ///Sets `instruction` with the provided value.
10092        pub fn with_instruction(mut self, field: u32) -> Self {
10093            self.set_instruction(field);
10094            self
10095        }
10096        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10097        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10098            self.function_name.as_mut().map(|field| field as _)
10099        }
10100        ///Returns a mutable reference to `function_name`.
10101        ///If the field is unset, it is first initialized with the default value.
10102        pub fn function_name_mut(&mut self) -> &mut String {
10103            self.function_name.get_or_insert_default()
10104        }
10105        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10106        pub fn function_name_opt(&self) -> Option<&str> {
10107            self.function_name.as_ref().map(|field| field as _)
10108        }
10109        ///Sets `function_name` with the provided value.
10110        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10111            self.function_name = Some(field.into().into());
10112        }
10113        ///Sets `function_name` with the provided value.
10114        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10115            self.set_function_name(field.into());
10116            self
10117        }
10118    }
10119    impl super::MoveTable {
10120        pub const fn const_default() -> Self {
10121            Self { id: None, size: None }
10122        }
10123        #[doc(hidden)]
10124        pub fn default_instance() -> &'static Self {
10125            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10126            &DEFAULT
10127        }
10128        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10129        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10130            self.id.as_mut().map(|field| field as _)
10131        }
10132        ///Returns a mutable reference to `id`.
10133        ///If the field is unset, it is first initialized with the default value.
10134        pub fn id_mut(&mut self) -> &mut String {
10135            self.id.get_or_insert_default()
10136        }
10137        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10138        pub fn id_opt(&self) -> Option<&str> {
10139            self.id.as_ref().map(|field| field as _)
10140        }
10141        ///Sets `id` with the provided value.
10142        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10143            self.id = Some(field.into().into());
10144        }
10145        ///Sets `id` with the provided value.
10146        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10147            self.set_id(field.into());
10148            self
10149        }
10150        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10151        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10152            self.size.as_mut().map(|field| field as _)
10153        }
10154        ///Returns a mutable reference to `size`.
10155        ///If the field is unset, it is first initialized with the default value.
10156        pub fn size_mut(&mut self) -> &mut u64 {
10157            self.size.get_or_insert_default()
10158        }
10159        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10160        pub fn size_opt(&self) -> Option<u64> {
10161            self.size.as_ref().map(|field| *field)
10162        }
10163        ///Sets `size` with the provided value.
10164        pub fn set_size(&mut self, field: u64) {
10165            self.size = Some(field);
10166        }
10167        ///Sets `size` with the provided value.
10168        pub fn with_size(mut self, field: u64) -> Self {
10169            self.set_size(field);
10170            self
10171        }
10172    }
10173    impl super::MultisigAggregatedSignature {
10174        pub const fn const_default() -> Self {
10175            Self {
10176                signatures: Vec::new(),
10177                bitmap: None,
10178                legacy_bitmap: None,
10179                committee: None,
10180            }
10181        }
10182        #[doc(hidden)]
10183        pub fn default_instance() -> &'static Self {
10184            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10185            &DEFAULT
10186        }
10187        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
10188        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10189            &self.signatures
10190        }
10191        ///Returns a mutable reference to `signatures`.
10192        ///If the field is unset, it is first initialized with the default value.
10193        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10194            &mut self.signatures
10195        }
10196        ///Sets `signatures` with the provided value.
10197        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10198            self.signatures = field;
10199        }
10200        ///Sets `signatures` with the provided value.
10201        pub fn with_signatures(
10202            mut self,
10203            field: Vec<super::MultisigMemberSignature>,
10204        ) -> Self {
10205            self.set_signatures(field);
10206            self
10207        }
10208        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10209        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10210            self.bitmap.as_mut().map(|field| field as _)
10211        }
10212        ///Returns a mutable reference to `bitmap`.
10213        ///If the field is unset, it is first initialized with the default value.
10214        pub fn bitmap_mut(&mut self) -> &mut u32 {
10215            self.bitmap.get_or_insert_default()
10216        }
10217        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10218        pub fn bitmap_opt(&self) -> Option<u32> {
10219            self.bitmap.as_ref().map(|field| *field)
10220        }
10221        ///Sets `bitmap` with the provided value.
10222        pub fn set_bitmap(&mut self, field: u32) {
10223            self.bitmap = Some(field);
10224        }
10225        ///Sets `bitmap` with the provided value.
10226        pub fn with_bitmap(mut self, field: u32) -> Self {
10227            self.set_bitmap(field);
10228            self
10229        }
10230        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10231        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10232            self.legacy_bitmap.as_ref().map(|field| field as _)
10233        }
10234        ///Sets `legacy_bitmap` with the provided value.
10235        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10236            self.legacy_bitmap = Some(field.into().into());
10237        }
10238        ///Sets `legacy_bitmap` with the provided value.
10239        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10240            mut self,
10241            field: T,
10242        ) -> Self {
10243            self.set_legacy_bitmap(field.into());
10244            self
10245        }
10246        ///Returns the value of `committee`, or the default value if `committee` is unset.
10247        pub fn committee(&self) -> &super::MultisigCommittee {
10248            self.committee
10249                .as_ref()
10250                .map(|field| field as _)
10251                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10252        }
10253        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10254        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10255            self.committee.as_mut().map(|field| field as _)
10256        }
10257        ///Returns a mutable reference to `committee`.
10258        ///If the field is unset, it is first initialized with the default value.
10259        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10260            self.committee.get_or_insert_default()
10261        }
10262        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
10263        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10264            self.committee.as_ref().map(|field| field as _)
10265        }
10266        ///Sets `committee` with the provided value.
10267        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10268            self.committee = Some(field.into().into());
10269        }
10270        ///Sets `committee` with the provided value.
10271        pub fn with_committee<T: Into<super::MultisigCommittee>>(
10272            mut self,
10273            field: T,
10274        ) -> Self {
10275            self.set_committee(field.into());
10276            self
10277        }
10278    }
10279    impl super::MultisigCommittee {
10280        pub const fn const_default() -> Self {
10281            Self {
10282                members: Vec::new(),
10283                threshold: None,
10284            }
10285        }
10286        #[doc(hidden)]
10287        pub fn default_instance() -> &'static Self {
10288            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10289            &DEFAULT
10290        }
10291        ///Returns the value of `members`, or the default value if `members` is unset.
10292        pub fn members(&self) -> &[super::MultisigMember] {
10293            &self.members
10294        }
10295        ///Returns a mutable reference to `members`.
10296        ///If the field is unset, it is first initialized with the default value.
10297        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10298            &mut self.members
10299        }
10300        ///Sets `members` with the provided value.
10301        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10302            self.members = field;
10303        }
10304        ///Sets `members` with the provided value.
10305        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10306            self.set_members(field);
10307            self
10308        }
10309        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10310        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10311            self.threshold.as_mut().map(|field| field as _)
10312        }
10313        ///Returns a mutable reference to `threshold`.
10314        ///If the field is unset, it is first initialized with the default value.
10315        pub fn threshold_mut(&mut self) -> &mut u32 {
10316            self.threshold.get_or_insert_default()
10317        }
10318        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
10319        pub fn threshold_opt(&self) -> Option<u32> {
10320            self.threshold.as_ref().map(|field| *field)
10321        }
10322        ///Sets `threshold` with the provided value.
10323        pub fn set_threshold(&mut self, field: u32) {
10324            self.threshold = Some(field);
10325        }
10326        ///Sets `threshold` with the provided value.
10327        pub fn with_threshold(mut self, field: u32) -> Self {
10328            self.set_threshold(field);
10329            self
10330        }
10331    }
10332    impl super::MultisigMember {
10333        pub const fn const_default() -> Self {
10334            Self {
10335                public_key: None,
10336                weight: None,
10337            }
10338        }
10339        #[doc(hidden)]
10340        pub fn default_instance() -> &'static Self {
10341            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10342            &DEFAULT
10343        }
10344        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
10345        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10346            self.public_key
10347                .as_ref()
10348                .map(|field| field as _)
10349                .unwrap_or_else(|| {
10350                    super::MultisigMemberPublicKey::default_instance() as _
10351                })
10352        }
10353        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10354        pub fn public_key_opt_mut(
10355            &mut self,
10356        ) -> Option<&mut super::MultisigMemberPublicKey> {
10357            self.public_key.as_mut().map(|field| field as _)
10358        }
10359        ///Returns a mutable reference to `public_key`.
10360        ///If the field is unset, it is first initialized with the default value.
10361        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10362            self.public_key.get_or_insert_default()
10363        }
10364        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10365        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10366            self.public_key.as_ref().map(|field| field as _)
10367        }
10368        ///Sets `public_key` with the provided value.
10369        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10370            &mut self,
10371            field: T,
10372        ) {
10373            self.public_key = Some(field.into().into());
10374        }
10375        ///Sets `public_key` with the provided value.
10376        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10377            mut self,
10378            field: T,
10379        ) -> Self {
10380            self.set_public_key(field.into());
10381            self
10382        }
10383        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10384        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10385            self.weight.as_mut().map(|field| field as _)
10386        }
10387        ///Returns a mutable reference to `weight`.
10388        ///If the field is unset, it is first initialized with the default value.
10389        pub fn weight_mut(&mut self) -> &mut u32 {
10390            self.weight.get_or_insert_default()
10391        }
10392        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
10393        pub fn weight_opt(&self) -> Option<u32> {
10394            self.weight.as_ref().map(|field| *field)
10395        }
10396        ///Sets `weight` with the provided value.
10397        pub fn set_weight(&mut self, field: u32) {
10398            self.weight = Some(field);
10399        }
10400        ///Sets `weight` with the provided value.
10401        pub fn with_weight(mut self, field: u32) -> Self {
10402            self.set_weight(field);
10403            self
10404        }
10405    }
10406    impl super::MultisigMemberPublicKey {
10407        pub const fn const_default() -> Self {
10408            Self {
10409                scheme: None,
10410                public_key: None,
10411                zklogin: None,
10412            }
10413        }
10414        #[doc(hidden)]
10415        pub fn default_instance() -> &'static Self {
10416            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10417            &DEFAULT
10418        }
10419        ///Sets `scheme` with the provided value.
10420        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10421            self.set_scheme(field.into());
10422            self
10423        }
10424        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10425        pub fn public_key_opt(&self) -> Option<&[u8]> {
10426            self.public_key.as_ref().map(|field| field as _)
10427        }
10428        ///Sets `public_key` with the provided value.
10429        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10430            self.public_key = Some(field.into().into());
10431        }
10432        ///Sets `public_key` with the provided value.
10433        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10434            mut self,
10435            field: T,
10436        ) -> Self {
10437            self.set_public_key(field.into());
10438            self
10439        }
10440        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10441        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10442            self.zklogin
10443                .as_ref()
10444                .map(|field| field as _)
10445                .unwrap_or_else(|| {
10446                    super::ZkLoginPublicIdentifier::default_instance() as _
10447                })
10448        }
10449        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10450        pub fn zklogin_opt_mut(
10451            &mut self,
10452        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10453            self.zklogin.as_mut().map(|field| field as _)
10454        }
10455        ///Returns a mutable reference to `zklogin`.
10456        ///If the field is unset, it is first initialized with the default value.
10457        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10458            self.zklogin.get_or_insert_default()
10459        }
10460        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10461        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10462            self.zklogin.as_ref().map(|field| field as _)
10463        }
10464        ///Sets `zklogin` with the provided value.
10465        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10466            &mut self,
10467            field: T,
10468        ) {
10469            self.zklogin = Some(field.into().into());
10470        }
10471        ///Sets `zklogin` with the provided value.
10472        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10473            mut self,
10474            field: T,
10475        ) -> Self {
10476            self.set_zklogin(field.into());
10477            self
10478        }
10479    }
10480    impl super::MultisigMemberSignature {
10481        pub const fn const_default() -> Self {
10482            Self {
10483                scheme: None,
10484                signature: None,
10485                zklogin: None,
10486                passkey: None,
10487            }
10488        }
10489        #[doc(hidden)]
10490        pub fn default_instance() -> &'static Self {
10491            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10492            &DEFAULT
10493        }
10494        ///Sets `scheme` with the provided value.
10495        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10496            self.set_scheme(field.into());
10497            self
10498        }
10499        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10500        pub fn signature_opt(&self) -> Option<&[u8]> {
10501            self.signature.as_ref().map(|field| field as _)
10502        }
10503        ///Sets `signature` with the provided value.
10504        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10505            self.signature = Some(field.into().into());
10506        }
10507        ///Sets `signature` with the provided value.
10508        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10509            mut self,
10510            field: T,
10511        ) -> Self {
10512            self.set_signature(field.into());
10513            self
10514        }
10515        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10516        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10517            self.zklogin
10518                .as_ref()
10519                .map(|field| field as _)
10520                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10521        }
10522        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10523        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10524            self.zklogin.as_mut().map(|field| field as _)
10525        }
10526        ///Returns a mutable reference to `zklogin`.
10527        ///If the field is unset, it is first initialized with the default value.
10528        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10529            self.zklogin.get_or_insert_default()
10530        }
10531        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10532        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10533            self.zklogin.as_ref().map(|field| field as _)
10534        }
10535        ///Sets `zklogin` with the provided value.
10536        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10537            self.zklogin = Some(field.into().into());
10538        }
10539        ///Sets `zklogin` with the provided value.
10540        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10541            mut self,
10542            field: T,
10543        ) -> Self {
10544            self.set_zklogin(field.into());
10545            self
10546        }
10547        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10548        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10549            self.passkey
10550                .as_ref()
10551                .map(|field| field as _)
10552                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10553        }
10554        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10555        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10556            self.passkey.as_mut().map(|field| field as _)
10557        }
10558        ///Returns a mutable reference to `passkey`.
10559        ///If the field is unset, it is first initialized with the default value.
10560        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10561            self.passkey.get_or_insert_default()
10562        }
10563        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10564        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10565            self.passkey.as_ref().map(|field| field as _)
10566        }
10567        ///Sets `passkey` with the provided value.
10568        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10569            self.passkey = Some(field.into().into());
10570        }
10571        ///Sets `passkey` with the provided value.
10572        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10573            mut self,
10574            field: T,
10575        ) -> Self {
10576            self.set_passkey(field.into());
10577            self
10578        }
10579    }
10580    impl super::NameRecord {
10581        pub const fn const_default() -> Self {
10582            Self {
10583                id: None,
10584                name: None,
10585                registration_nft_id: None,
10586                expiration_timestamp: None,
10587                target_address: None,
10588                data: std::collections::BTreeMap::new(),
10589            }
10590        }
10591        #[doc(hidden)]
10592        pub fn default_instance() -> &'static Self {
10593            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10594            &DEFAULT
10595        }
10596        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10597        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10598            self.id.as_mut().map(|field| field as _)
10599        }
10600        ///Returns a mutable reference to `id`.
10601        ///If the field is unset, it is first initialized with the default value.
10602        pub fn id_mut(&mut self) -> &mut String {
10603            self.id.get_or_insert_default()
10604        }
10605        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10606        pub fn id_opt(&self) -> Option<&str> {
10607            self.id.as_ref().map(|field| field as _)
10608        }
10609        ///Sets `id` with the provided value.
10610        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10611            self.id = Some(field.into().into());
10612        }
10613        ///Sets `id` with the provided value.
10614        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10615            self.set_id(field.into());
10616            self
10617        }
10618        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10619        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10620            self.name.as_mut().map(|field| field as _)
10621        }
10622        ///Returns a mutable reference to `name`.
10623        ///If the field is unset, it is first initialized with the default value.
10624        pub fn name_mut(&mut self) -> &mut String {
10625            self.name.get_or_insert_default()
10626        }
10627        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10628        pub fn name_opt(&self) -> Option<&str> {
10629            self.name.as_ref().map(|field| field as _)
10630        }
10631        ///Sets `name` with the provided value.
10632        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10633            self.name = Some(field.into().into());
10634        }
10635        ///Sets `name` with the provided value.
10636        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10637            self.set_name(field.into());
10638            self
10639        }
10640        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10641        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10642            self.registration_nft_id.as_mut().map(|field| field as _)
10643        }
10644        ///Returns a mutable reference to `registration_nft_id`.
10645        ///If the field is unset, it is first initialized with the default value.
10646        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10647            self.registration_nft_id.get_or_insert_default()
10648        }
10649        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10650        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10651            self.registration_nft_id.as_ref().map(|field| field as _)
10652        }
10653        ///Sets `registration_nft_id` with the provided value.
10654        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10655            self.registration_nft_id = Some(field.into().into());
10656        }
10657        ///Sets `registration_nft_id` with the provided value.
10658        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10659            self.set_registration_nft_id(field.into());
10660            self
10661        }
10662        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10663        pub fn expiration_timestamp_opt_mut(
10664            &mut self,
10665        ) -> Option<&mut ::prost_types::Timestamp> {
10666            self.expiration_timestamp.as_mut().map(|field| field as _)
10667        }
10668        ///Returns a mutable reference to `expiration_timestamp`.
10669        ///If the field is unset, it is first initialized with the default value.
10670        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10671            self.expiration_timestamp.get_or_insert_default()
10672        }
10673        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10674        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10675            self.expiration_timestamp.as_ref().map(|field| field as _)
10676        }
10677        ///Sets `expiration_timestamp` with the provided value.
10678        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10679            &mut self,
10680            field: T,
10681        ) {
10682            self.expiration_timestamp = Some(field.into().into());
10683        }
10684        ///Sets `expiration_timestamp` with the provided value.
10685        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10686            mut self,
10687            field: T,
10688        ) -> Self {
10689            self.set_expiration_timestamp(field.into());
10690            self
10691        }
10692        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10693        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10694            self.target_address.as_mut().map(|field| field as _)
10695        }
10696        ///Returns a mutable reference to `target_address`.
10697        ///If the field is unset, it is first initialized with the default value.
10698        pub fn target_address_mut(&mut self) -> &mut String {
10699            self.target_address.get_or_insert_default()
10700        }
10701        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10702        pub fn target_address_opt(&self) -> Option<&str> {
10703            self.target_address.as_ref().map(|field| field as _)
10704        }
10705        ///Sets `target_address` with the provided value.
10706        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10707            self.target_address = Some(field.into().into());
10708        }
10709        ///Sets `target_address` with the provided value.
10710        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10711            self.set_target_address(field.into());
10712            self
10713        }
10714        ///Returns the value of `data`, or the default value if `data` is unset.
10715        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10716            &self.data
10717        }
10718        ///Returns a mutable reference to `data`.
10719        ///If the field is unset, it is first initialized with the default value.
10720        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10721            &mut self.data
10722        }
10723        ///Sets `data` with the provided value.
10724        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10725            self.data = field;
10726        }
10727        ///Sets `data` with the provided value.
10728        pub fn with_data(
10729            mut self,
10730            field: ::std::collections::BTreeMap<String, String>,
10731        ) -> Self {
10732            self.set_data(field);
10733            self
10734        }
10735    }
10736    impl super::Object {
10737        pub const fn const_default() -> Self {
10738            Self {
10739                bcs: None,
10740                object_id: None,
10741                version: None,
10742                digest: None,
10743                owner: None,
10744                object_type: None,
10745                has_public_transfer: None,
10746                contents: None,
10747                package: None,
10748                previous_transaction: None,
10749                storage_rebate: None,
10750                json: None,
10751                balance: None,
10752            }
10753        }
10754        #[doc(hidden)]
10755        pub fn default_instance() -> &'static Self {
10756            static DEFAULT: super::Object = super::Object::const_default();
10757            &DEFAULT
10758        }
10759        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10760        pub fn bcs(&self) -> &super::Bcs {
10761            self.bcs
10762                .as_ref()
10763                .map(|field| field as _)
10764                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10765        }
10766        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10767        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10768            self.bcs.as_mut().map(|field| field as _)
10769        }
10770        ///Returns a mutable reference to `bcs`.
10771        ///If the field is unset, it is first initialized with the default value.
10772        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10773            self.bcs.get_or_insert_default()
10774        }
10775        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10776        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10777            self.bcs.as_ref().map(|field| field as _)
10778        }
10779        ///Sets `bcs` with the provided value.
10780        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10781            self.bcs = Some(field.into().into());
10782        }
10783        ///Sets `bcs` with the provided value.
10784        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10785            self.set_bcs(field.into());
10786            self
10787        }
10788        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10789        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10790            self.object_id.as_mut().map(|field| field as _)
10791        }
10792        ///Returns a mutable reference to `object_id`.
10793        ///If the field is unset, it is first initialized with the default value.
10794        pub fn object_id_mut(&mut self) -> &mut String {
10795            self.object_id.get_or_insert_default()
10796        }
10797        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10798        pub fn object_id_opt(&self) -> Option<&str> {
10799            self.object_id.as_ref().map(|field| field as _)
10800        }
10801        ///Sets `object_id` with the provided value.
10802        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10803            self.object_id = Some(field.into().into());
10804        }
10805        ///Sets `object_id` with the provided value.
10806        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10807            self.set_object_id(field.into());
10808            self
10809        }
10810        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10811        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10812            self.version.as_mut().map(|field| field as _)
10813        }
10814        ///Returns a mutable reference to `version`.
10815        ///If the field is unset, it is first initialized with the default value.
10816        pub fn version_mut(&mut self) -> &mut u64 {
10817            self.version.get_or_insert_default()
10818        }
10819        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10820        pub fn version_opt(&self) -> Option<u64> {
10821            self.version.as_ref().map(|field| *field)
10822        }
10823        ///Sets `version` with the provided value.
10824        pub fn set_version(&mut self, field: u64) {
10825            self.version = Some(field);
10826        }
10827        ///Sets `version` with the provided value.
10828        pub fn with_version(mut self, field: u64) -> Self {
10829            self.set_version(field);
10830            self
10831        }
10832        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10833        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10834            self.digest.as_mut().map(|field| field as _)
10835        }
10836        ///Returns a mutable reference to `digest`.
10837        ///If the field is unset, it is first initialized with the default value.
10838        pub fn digest_mut(&mut self) -> &mut String {
10839            self.digest.get_or_insert_default()
10840        }
10841        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10842        pub fn digest_opt(&self) -> Option<&str> {
10843            self.digest.as_ref().map(|field| field as _)
10844        }
10845        ///Sets `digest` with the provided value.
10846        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10847            self.digest = Some(field.into().into());
10848        }
10849        ///Sets `digest` with the provided value.
10850        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10851            self.set_digest(field.into());
10852            self
10853        }
10854        ///Returns the value of `owner`, or the default value if `owner` is unset.
10855        pub fn owner(&self) -> &super::Owner {
10856            self.owner
10857                .as_ref()
10858                .map(|field| field as _)
10859                .unwrap_or_else(|| super::Owner::default_instance() as _)
10860        }
10861        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10862        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10863            self.owner.as_mut().map(|field| field as _)
10864        }
10865        ///Returns a mutable reference to `owner`.
10866        ///If the field is unset, it is first initialized with the default value.
10867        pub fn owner_mut(&mut self) -> &mut super::Owner {
10868            self.owner.get_or_insert_default()
10869        }
10870        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10871        pub fn owner_opt(&self) -> Option<&super::Owner> {
10872            self.owner.as_ref().map(|field| field as _)
10873        }
10874        ///Sets `owner` with the provided value.
10875        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10876            self.owner = Some(field.into().into());
10877        }
10878        ///Sets `owner` with the provided value.
10879        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10880            self.set_owner(field.into());
10881            self
10882        }
10883        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10884        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10885            self.object_type.as_mut().map(|field| field as _)
10886        }
10887        ///Returns a mutable reference to `object_type`.
10888        ///If the field is unset, it is first initialized with the default value.
10889        pub fn object_type_mut(&mut self) -> &mut String {
10890            self.object_type.get_or_insert_default()
10891        }
10892        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10893        pub fn object_type_opt(&self) -> Option<&str> {
10894            self.object_type.as_ref().map(|field| field as _)
10895        }
10896        ///Sets `object_type` with the provided value.
10897        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10898            self.object_type = Some(field.into().into());
10899        }
10900        ///Sets `object_type` with the provided value.
10901        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10902            self.set_object_type(field.into());
10903            self
10904        }
10905        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10906        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10907            self.has_public_transfer.as_mut().map(|field| field as _)
10908        }
10909        ///Returns a mutable reference to `has_public_transfer`.
10910        ///If the field is unset, it is first initialized with the default value.
10911        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10912            self.has_public_transfer.get_or_insert_default()
10913        }
10914        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10915        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10916            self.has_public_transfer.as_ref().map(|field| *field)
10917        }
10918        ///Sets `has_public_transfer` with the provided value.
10919        pub fn set_has_public_transfer(&mut self, field: bool) {
10920            self.has_public_transfer = Some(field);
10921        }
10922        ///Sets `has_public_transfer` with the provided value.
10923        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10924            self.set_has_public_transfer(field);
10925            self
10926        }
10927        ///Returns the value of `contents`, or the default value if `contents` is unset.
10928        pub fn contents(&self) -> &super::Bcs {
10929            self.contents
10930                .as_ref()
10931                .map(|field| field as _)
10932                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10933        }
10934        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10935        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10936            self.contents.as_mut().map(|field| field as _)
10937        }
10938        ///Returns a mutable reference to `contents`.
10939        ///If the field is unset, it is first initialized with the default value.
10940        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10941            self.contents.get_or_insert_default()
10942        }
10943        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10944        pub fn contents_opt(&self) -> Option<&super::Bcs> {
10945            self.contents.as_ref().map(|field| field as _)
10946        }
10947        ///Sets `contents` with the provided value.
10948        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10949            self.contents = Some(field.into().into());
10950        }
10951        ///Sets `contents` with the provided value.
10952        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10953            self.set_contents(field.into());
10954            self
10955        }
10956        ///Returns the value of `package`, or the default value if `package` is unset.
10957        pub fn package(&self) -> &super::Package {
10958            self.package
10959                .as_ref()
10960                .map(|field| field as _)
10961                .unwrap_or_else(|| super::Package::default_instance() as _)
10962        }
10963        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10964        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10965            self.package.as_mut().map(|field| field as _)
10966        }
10967        ///Returns a mutable reference to `package`.
10968        ///If the field is unset, it is first initialized with the default value.
10969        pub fn package_mut(&mut self) -> &mut super::Package {
10970            self.package.get_or_insert_default()
10971        }
10972        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10973        pub fn package_opt(&self) -> Option<&super::Package> {
10974            self.package.as_ref().map(|field| field as _)
10975        }
10976        ///Sets `package` with the provided value.
10977        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10978            self.package = Some(field.into().into());
10979        }
10980        ///Sets `package` with the provided value.
10981        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10982            self.set_package(field.into());
10983            self
10984        }
10985        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10986        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10987            self.previous_transaction.as_mut().map(|field| field as _)
10988        }
10989        ///Returns a mutable reference to `previous_transaction`.
10990        ///If the field is unset, it is first initialized with the default value.
10991        pub fn previous_transaction_mut(&mut self) -> &mut String {
10992            self.previous_transaction.get_or_insert_default()
10993        }
10994        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10995        pub fn previous_transaction_opt(&self) -> Option<&str> {
10996            self.previous_transaction.as_ref().map(|field| field as _)
10997        }
10998        ///Sets `previous_transaction` with the provided value.
10999        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
11000            self.previous_transaction = Some(field.into().into());
11001        }
11002        ///Sets `previous_transaction` with the provided value.
11003        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
11004            self.set_previous_transaction(field.into());
11005            self
11006        }
11007        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11008        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
11009            self.storage_rebate.as_mut().map(|field| field as _)
11010        }
11011        ///Returns a mutable reference to `storage_rebate`.
11012        ///If the field is unset, it is first initialized with the default value.
11013        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
11014            self.storage_rebate.get_or_insert_default()
11015        }
11016        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
11017        pub fn storage_rebate_opt(&self) -> Option<u64> {
11018            self.storage_rebate.as_ref().map(|field| *field)
11019        }
11020        ///Sets `storage_rebate` with the provided value.
11021        pub fn set_storage_rebate(&mut self, field: u64) {
11022            self.storage_rebate = Some(field);
11023        }
11024        ///Sets `storage_rebate` with the provided value.
11025        pub fn with_storage_rebate(mut self, field: u64) -> Self {
11026            self.set_storage_rebate(field);
11027            self
11028        }
11029        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11030        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
11031            self.json.as_mut().map(|field| field as _)
11032        }
11033        ///Returns a mutable reference to `json`.
11034        ///If the field is unset, it is first initialized with the default value.
11035        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
11036            self.json.get_or_insert_default()
11037        }
11038        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11039        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
11040            self.json.as_ref().map(|field| field as _)
11041        }
11042        ///Sets `json` with the provided value.
11043        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
11044            self.json = Some(field.into().into());
11045        }
11046        ///Sets `json` with the provided value.
11047        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
11048            self.set_json(field.into());
11049            self
11050        }
11051        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11052        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
11053            self.balance.as_mut().map(|field| field as _)
11054        }
11055        ///Returns a mutable reference to `balance`.
11056        ///If the field is unset, it is first initialized with the default value.
11057        pub fn balance_mut(&mut self) -> &mut u64 {
11058            self.balance.get_or_insert_default()
11059        }
11060        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
11061        pub fn balance_opt(&self) -> Option<u64> {
11062            self.balance.as_ref().map(|field| *field)
11063        }
11064        ///Sets `balance` with the provided value.
11065        pub fn set_balance(&mut self, field: u64) {
11066            self.balance = Some(field);
11067        }
11068        ///Sets `balance` with the provided value.
11069        pub fn with_balance(mut self, field: u64) -> Self {
11070            self.set_balance(field);
11071            self
11072        }
11073    }
11074    impl super::ObjectReference {
11075        pub const fn const_default() -> Self {
11076            Self {
11077                object_id: None,
11078                version: None,
11079                digest: None,
11080            }
11081        }
11082        #[doc(hidden)]
11083        pub fn default_instance() -> &'static Self {
11084            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11085            &DEFAULT
11086        }
11087        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11088        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11089            self.object_id.as_mut().map(|field| field as _)
11090        }
11091        ///Returns a mutable reference to `object_id`.
11092        ///If the field is unset, it is first initialized with the default value.
11093        pub fn object_id_mut(&mut self) -> &mut String {
11094            self.object_id.get_or_insert_default()
11095        }
11096        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11097        pub fn object_id_opt(&self) -> Option<&str> {
11098            self.object_id.as_ref().map(|field| field as _)
11099        }
11100        ///Sets `object_id` with the provided value.
11101        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11102            self.object_id = Some(field.into().into());
11103        }
11104        ///Sets `object_id` with the provided value.
11105        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11106            self.set_object_id(field.into());
11107            self
11108        }
11109        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11110        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11111            self.version.as_mut().map(|field| field as _)
11112        }
11113        ///Returns a mutable reference to `version`.
11114        ///If the field is unset, it is first initialized with the default value.
11115        pub fn version_mut(&mut self) -> &mut u64 {
11116            self.version.get_or_insert_default()
11117        }
11118        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11119        pub fn version_opt(&self) -> Option<u64> {
11120            self.version.as_ref().map(|field| *field)
11121        }
11122        ///Sets `version` with the provided value.
11123        pub fn set_version(&mut self, field: u64) {
11124            self.version = Some(field);
11125        }
11126        ///Sets `version` with the provided value.
11127        pub fn with_version(mut self, field: u64) -> Self {
11128            self.set_version(field);
11129            self
11130        }
11131        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11132        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11133            self.digest.as_mut().map(|field| field as _)
11134        }
11135        ///Returns a mutable reference to `digest`.
11136        ///If the field is unset, it is first initialized with the default value.
11137        pub fn digest_mut(&mut self) -> &mut String {
11138            self.digest.get_or_insert_default()
11139        }
11140        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11141        pub fn digest_opt(&self) -> Option<&str> {
11142            self.digest.as_ref().map(|field| field as _)
11143        }
11144        ///Sets `digest` with the provided value.
11145        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11146            self.digest = Some(field.into().into());
11147        }
11148        ///Sets `digest` with the provided value.
11149        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11150            self.set_digest(field.into());
11151            self
11152        }
11153    }
11154    impl super::ObjectSet {
11155        pub const fn const_default() -> Self {
11156            Self { objects: Vec::new() }
11157        }
11158        #[doc(hidden)]
11159        pub fn default_instance() -> &'static Self {
11160            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11161            &DEFAULT
11162        }
11163        ///Returns the value of `objects`, or the default value if `objects` is unset.
11164        pub fn objects(&self) -> &[super::Object] {
11165            &self.objects
11166        }
11167        ///Returns a mutable reference to `objects`.
11168        ///If the field is unset, it is first initialized with the default value.
11169        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11170            &mut self.objects
11171        }
11172        ///Sets `objects` with the provided value.
11173        pub fn set_objects(&mut self, field: Vec<super::Object>) {
11174            self.objects = field;
11175        }
11176        ///Sets `objects` with the provided value.
11177        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11178            self.set_objects(field);
11179            self
11180        }
11181    }
11182    impl super::OpenSignature {
11183        pub const fn const_default() -> Self {
11184            Self {
11185                reference: None,
11186                body: None,
11187            }
11188        }
11189        #[doc(hidden)]
11190        pub fn default_instance() -> &'static Self {
11191            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11192            &DEFAULT
11193        }
11194        ///Sets `reference` with the provided value.
11195        pub fn with_reference<T: Into<super::open_signature::Reference>>(
11196            mut self,
11197            field: T,
11198        ) -> Self {
11199            self.set_reference(field.into());
11200            self
11201        }
11202        ///Returns the value of `body`, or the default value if `body` is unset.
11203        pub fn body(&self) -> &super::OpenSignatureBody {
11204            self.body
11205                .as_ref()
11206                .map(|field| field as _)
11207                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11208        }
11209        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11210        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11211            self.body.as_mut().map(|field| field as _)
11212        }
11213        ///Returns a mutable reference to `body`.
11214        ///If the field is unset, it is first initialized with the default value.
11215        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11216            self.body.get_or_insert_default()
11217        }
11218        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
11219        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11220            self.body.as_ref().map(|field| field as _)
11221        }
11222        ///Sets `body` with the provided value.
11223        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11224            self.body = Some(field.into().into());
11225        }
11226        ///Sets `body` with the provided value.
11227        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11228            self.set_body(field.into());
11229            self
11230        }
11231    }
11232    impl super::OpenSignatureBody {
11233        pub const fn const_default() -> Self {
11234            Self {
11235                r#type: None,
11236                type_name: None,
11237                type_parameter_instantiation: Vec::new(),
11238                type_parameter: None,
11239            }
11240        }
11241        #[doc(hidden)]
11242        pub fn default_instance() -> &'static Self {
11243            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11244            &DEFAULT
11245        }
11246        ///Sets `r#type` with the provided value.
11247        pub fn with_type<T: Into<super::open_signature_body::Type>>(
11248            mut self,
11249            field: T,
11250        ) -> Self {
11251            self.set_type(field.into());
11252            self
11253        }
11254        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11255        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11256            self.type_name.as_mut().map(|field| field as _)
11257        }
11258        ///Returns a mutable reference to `type_name`.
11259        ///If the field is unset, it is first initialized with the default value.
11260        pub fn type_name_mut(&mut self) -> &mut String {
11261            self.type_name.get_or_insert_default()
11262        }
11263        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11264        pub fn type_name_opt(&self) -> Option<&str> {
11265            self.type_name.as_ref().map(|field| field as _)
11266        }
11267        ///Sets `type_name` with the provided value.
11268        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11269            self.type_name = Some(field.into().into());
11270        }
11271        ///Sets `type_name` with the provided value.
11272        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11273            self.set_type_name(field.into());
11274            self
11275        }
11276        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
11277        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11278            &self.type_parameter_instantiation
11279        }
11280        ///Returns a mutable reference to `type_parameter_instantiation`.
11281        ///If the field is unset, it is first initialized with the default value.
11282        pub fn type_parameter_instantiation_mut(
11283            &mut self,
11284        ) -> &mut Vec<super::OpenSignatureBody> {
11285            &mut self.type_parameter_instantiation
11286        }
11287        ///Sets `type_parameter_instantiation` with the provided value.
11288        pub fn set_type_parameter_instantiation(
11289            &mut self,
11290            field: Vec<super::OpenSignatureBody>,
11291        ) {
11292            self.type_parameter_instantiation = field;
11293        }
11294        ///Sets `type_parameter_instantiation` with the provided value.
11295        pub fn with_type_parameter_instantiation(
11296            mut self,
11297            field: Vec<super::OpenSignatureBody>,
11298        ) -> Self {
11299            self.set_type_parameter_instantiation(field);
11300            self
11301        }
11302        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11303        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11304            self.type_parameter.as_mut().map(|field| field as _)
11305        }
11306        ///Returns a mutable reference to `type_parameter`.
11307        ///If the field is unset, it is first initialized with the default value.
11308        pub fn type_parameter_mut(&mut self) -> &mut u32 {
11309            self.type_parameter.get_or_insert_default()
11310        }
11311        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
11312        pub fn type_parameter_opt(&self) -> Option<u32> {
11313            self.type_parameter.as_ref().map(|field| *field)
11314        }
11315        ///Sets `type_parameter` with the provided value.
11316        pub fn set_type_parameter(&mut self, field: u32) {
11317            self.type_parameter = Some(field);
11318        }
11319        ///Sets `type_parameter` with the provided value.
11320        pub fn with_type_parameter(mut self, field: u32) -> Self {
11321            self.set_type_parameter(field);
11322            self
11323        }
11324    }
11325    impl super::Owner {
11326        pub const fn const_default() -> Self {
11327            Self {
11328                kind: None,
11329                address: None,
11330                version: None,
11331            }
11332        }
11333        #[doc(hidden)]
11334        pub fn default_instance() -> &'static Self {
11335            static DEFAULT: super::Owner = super::Owner::const_default();
11336            &DEFAULT
11337        }
11338        ///Sets `kind` with the provided value.
11339        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11340            self.set_kind(field.into());
11341            self
11342        }
11343        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11344        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11345            self.address.as_mut().map(|field| field as _)
11346        }
11347        ///Returns a mutable reference to `address`.
11348        ///If the field is unset, it is first initialized with the default value.
11349        pub fn address_mut(&mut self) -> &mut String {
11350            self.address.get_or_insert_default()
11351        }
11352        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11353        pub fn address_opt(&self) -> Option<&str> {
11354            self.address.as_ref().map(|field| field as _)
11355        }
11356        ///Sets `address` with the provided value.
11357        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11358            self.address = Some(field.into().into());
11359        }
11360        ///Sets `address` with the provided value.
11361        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11362            self.set_address(field.into());
11363            self
11364        }
11365        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11366        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11367            self.version.as_mut().map(|field| field as _)
11368        }
11369        ///Returns a mutable reference to `version`.
11370        ///If the field is unset, it is first initialized with the default value.
11371        pub fn version_mut(&mut self) -> &mut u64 {
11372            self.version.get_or_insert_default()
11373        }
11374        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11375        pub fn version_opt(&self) -> Option<u64> {
11376            self.version.as_ref().map(|field| *field)
11377        }
11378        ///Sets `version` with the provided value.
11379        pub fn set_version(&mut self, field: u64) {
11380            self.version = Some(field);
11381        }
11382        ///Sets `version` with the provided value.
11383        pub fn with_version(mut self, field: u64) -> Self {
11384            self.set_version(field);
11385            self
11386        }
11387    }
11388    impl super::Package {
11389        pub const fn const_default() -> Self {
11390            Self {
11391                storage_id: None,
11392                original_id: None,
11393                version: None,
11394                modules: Vec::new(),
11395                type_origins: Vec::new(),
11396                linkage: Vec::new(),
11397            }
11398        }
11399        #[doc(hidden)]
11400        pub fn default_instance() -> &'static Self {
11401            static DEFAULT: super::Package = super::Package::const_default();
11402            &DEFAULT
11403        }
11404        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11405        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11406            self.storage_id.as_mut().map(|field| field as _)
11407        }
11408        ///Returns a mutable reference to `storage_id`.
11409        ///If the field is unset, it is first initialized with the default value.
11410        pub fn storage_id_mut(&mut self) -> &mut String {
11411            self.storage_id.get_or_insert_default()
11412        }
11413        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11414        pub fn storage_id_opt(&self) -> Option<&str> {
11415            self.storage_id.as_ref().map(|field| field as _)
11416        }
11417        ///Sets `storage_id` with the provided value.
11418        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11419            self.storage_id = Some(field.into().into());
11420        }
11421        ///Sets `storage_id` with the provided value.
11422        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11423            self.set_storage_id(field.into());
11424            self
11425        }
11426        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11427        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11428            self.original_id.as_mut().map(|field| field as _)
11429        }
11430        ///Returns a mutable reference to `original_id`.
11431        ///If the field is unset, it is first initialized with the default value.
11432        pub fn original_id_mut(&mut self) -> &mut String {
11433            self.original_id.get_or_insert_default()
11434        }
11435        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11436        pub fn original_id_opt(&self) -> Option<&str> {
11437            self.original_id.as_ref().map(|field| field as _)
11438        }
11439        ///Sets `original_id` with the provided value.
11440        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11441            self.original_id = Some(field.into().into());
11442        }
11443        ///Sets `original_id` with the provided value.
11444        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11445            self.set_original_id(field.into());
11446            self
11447        }
11448        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11449        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11450            self.version.as_mut().map(|field| field as _)
11451        }
11452        ///Returns a mutable reference to `version`.
11453        ///If the field is unset, it is first initialized with the default value.
11454        pub fn version_mut(&mut self) -> &mut u64 {
11455            self.version.get_or_insert_default()
11456        }
11457        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11458        pub fn version_opt(&self) -> Option<u64> {
11459            self.version.as_ref().map(|field| *field)
11460        }
11461        ///Sets `version` with the provided value.
11462        pub fn set_version(&mut self, field: u64) {
11463            self.version = Some(field);
11464        }
11465        ///Sets `version` with the provided value.
11466        pub fn with_version(mut self, field: u64) -> Self {
11467            self.set_version(field);
11468            self
11469        }
11470        ///Returns the value of `modules`, or the default value if `modules` is unset.
11471        pub fn modules(&self) -> &[super::Module] {
11472            &self.modules
11473        }
11474        ///Returns a mutable reference to `modules`.
11475        ///If the field is unset, it is first initialized with the default value.
11476        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11477            &mut self.modules
11478        }
11479        ///Sets `modules` with the provided value.
11480        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11481            self.modules = field;
11482        }
11483        ///Sets `modules` with the provided value.
11484        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11485            self.set_modules(field);
11486            self
11487        }
11488        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11489        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11490            &self.type_origins
11491        }
11492        ///Returns a mutable reference to `type_origins`.
11493        ///If the field is unset, it is first initialized with the default value.
11494        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11495            &mut self.type_origins
11496        }
11497        ///Sets `type_origins` with the provided value.
11498        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11499            self.type_origins = field;
11500        }
11501        ///Sets `type_origins` with the provided value.
11502        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11503            self.set_type_origins(field);
11504            self
11505        }
11506        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11507        pub fn linkage(&self) -> &[super::Linkage] {
11508            &self.linkage
11509        }
11510        ///Returns a mutable reference to `linkage`.
11511        ///If the field is unset, it is first initialized with the default value.
11512        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11513            &mut self.linkage
11514        }
11515        ///Sets `linkage` with the provided value.
11516        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11517            self.linkage = field;
11518        }
11519        ///Sets `linkage` with the provided value.
11520        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11521            self.set_linkage(field);
11522            self
11523        }
11524    }
11525    impl super::PackageUpgradeError {
11526        pub const fn const_default() -> Self {
11527            Self {
11528                kind: None,
11529                package_id: None,
11530                digest: None,
11531                policy: None,
11532                ticket_id: None,
11533            }
11534        }
11535        #[doc(hidden)]
11536        pub fn default_instance() -> &'static Self {
11537            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11538            &DEFAULT
11539        }
11540        ///Sets `kind` with the provided value.
11541        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11542            mut self,
11543            field: T,
11544        ) -> Self {
11545            self.set_kind(field.into());
11546            self
11547        }
11548        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11549        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11550            self.package_id.as_mut().map(|field| field as _)
11551        }
11552        ///Returns a mutable reference to `package_id`.
11553        ///If the field is unset, it is first initialized with the default value.
11554        pub fn package_id_mut(&mut self) -> &mut String {
11555            self.package_id.get_or_insert_default()
11556        }
11557        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11558        pub fn package_id_opt(&self) -> Option<&str> {
11559            self.package_id.as_ref().map(|field| field as _)
11560        }
11561        ///Sets `package_id` with the provided value.
11562        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11563            self.package_id = Some(field.into().into());
11564        }
11565        ///Sets `package_id` with the provided value.
11566        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11567            self.set_package_id(field.into());
11568            self
11569        }
11570        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11571        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11572            self.digest.as_mut().map(|field| field as _)
11573        }
11574        ///Returns a mutable reference to `digest`.
11575        ///If the field is unset, it is first initialized with the default value.
11576        pub fn digest_mut(&mut self) -> &mut String {
11577            self.digest.get_or_insert_default()
11578        }
11579        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11580        pub fn digest_opt(&self) -> Option<&str> {
11581            self.digest.as_ref().map(|field| field as _)
11582        }
11583        ///Sets `digest` with the provided value.
11584        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11585            self.digest = Some(field.into().into());
11586        }
11587        ///Sets `digest` with the provided value.
11588        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11589            self.set_digest(field.into());
11590            self
11591        }
11592        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11593        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11594            self.policy.as_mut().map(|field| field as _)
11595        }
11596        ///Returns a mutable reference to `policy`.
11597        ///If the field is unset, it is first initialized with the default value.
11598        pub fn policy_mut(&mut self) -> &mut u32 {
11599            self.policy.get_or_insert_default()
11600        }
11601        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11602        pub fn policy_opt(&self) -> Option<u32> {
11603            self.policy.as_ref().map(|field| *field)
11604        }
11605        ///Sets `policy` with the provided value.
11606        pub fn set_policy(&mut self, field: u32) {
11607            self.policy = Some(field);
11608        }
11609        ///Sets `policy` with the provided value.
11610        pub fn with_policy(mut self, field: u32) -> Self {
11611            self.set_policy(field);
11612            self
11613        }
11614        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11615        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11616            self.ticket_id.as_mut().map(|field| field as _)
11617        }
11618        ///Returns a mutable reference to `ticket_id`.
11619        ///If the field is unset, it is first initialized with the default value.
11620        pub fn ticket_id_mut(&mut self) -> &mut String {
11621            self.ticket_id.get_or_insert_default()
11622        }
11623        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11624        pub fn ticket_id_opt(&self) -> Option<&str> {
11625            self.ticket_id.as_ref().map(|field| field as _)
11626        }
11627        ///Sets `ticket_id` with the provided value.
11628        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11629            self.ticket_id = Some(field.into().into());
11630        }
11631        ///Sets `ticket_id` with the provided value.
11632        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11633            self.set_ticket_id(field.into());
11634            self
11635        }
11636    }
11637    impl super::PackageVersion {
11638        pub const fn const_default() -> Self {
11639            Self {
11640                package_id: None,
11641                version: None,
11642            }
11643        }
11644        #[doc(hidden)]
11645        pub fn default_instance() -> &'static Self {
11646            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11647            &DEFAULT
11648        }
11649        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11650        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11651            self.package_id.as_mut().map(|field| field as _)
11652        }
11653        ///Returns a mutable reference to `package_id`.
11654        ///If the field is unset, it is first initialized with the default value.
11655        pub fn package_id_mut(&mut self) -> &mut String {
11656            self.package_id.get_or_insert_default()
11657        }
11658        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11659        pub fn package_id_opt(&self) -> Option<&str> {
11660            self.package_id.as_ref().map(|field| field as _)
11661        }
11662        ///Sets `package_id` with the provided value.
11663        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11664            self.package_id = Some(field.into().into());
11665        }
11666        ///Sets `package_id` with the provided value.
11667        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11668            self.set_package_id(field.into());
11669            self
11670        }
11671        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11672        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11673            self.version.as_mut().map(|field| field as _)
11674        }
11675        ///Returns a mutable reference to `version`.
11676        ///If the field is unset, it is first initialized with the default value.
11677        pub fn version_mut(&mut self) -> &mut u64 {
11678            self.version.get_or_insert_default()
11679        }
11680        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11681        pub fn version_opt(&self) -> Option<u64> {
11682            self.version.as_ref().map(|field| *field)
11683        }
11684        ///Sets `version` with the provided value.
11685        pub fn set_version(&mut self, field: u64) {
11686            self.version = Some(field);
11687        }
11688        ///Sets `version` with the provided value.
11689        pub fn with_version(mut self, field: u64) -> Self {
11690            self.set_version(field);
11691            self
11692        }
11693    }
11694    impl super::PasskeyAuthenticator {
11695        pub const fn const_default() -> Self {
11696            Self {
11697                authenticator_data: None,
11698                client_data_json: None,
11699                signature: None,
11700            }
11701        }
11702        #[doc(hidden)]
11703        pub fn default_instance() -> &'static Self {
11704            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11705            &DEFAULT
11706        }
11707        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11708        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11709            self.authenticator_data.as_ref().map(|field| field as _)
11710        }
11711        ///Sets `authenticator_data` with the provided value.
11712        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11713            &mut self,
11714            field: T,
11715        ) {
11716            self.authenticator_data = Some(field.into().into());
11717        }
11718        ///Sets `authenticator_data` with the provided value.
11719        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11720            mut self,
11721            field: T,
11722        ) -> Self {
11723            self.set_authenticator_data(field.into());
11724            self
11725        }
11726        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11727        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11728            self.client_data_json.as_mut().map(|field| field as _)
11729        }
11730        ///Returns a mutable reference to `client_data_json`.
11731        ///If the field is unset, it is first initialized with the default value.
11732        pub fn client_data_json_mut(&mut self) -> &mut String {
11733            self.client_data_json.get_or_insert_default()
11734        }
11735        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11736        pub fn client_data_json_opt(&self) -> Option<&str> {
11737            self.client_data_json.as_ref().map(|field| field as _)
11738        }
11739        ///Sets `client_data_json` with the provided value.
11740        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11741            self.client_data_json = Some(field.into().into());
11742        }
11743        ///Sets `client_data_json` with the provided value.
11744        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11745            self.set_client_data_json(field.into());
11746            self
11747        }
11748        ///Returns the value of `signature`, or the default value if `signature` is unset.
11749        pub fn signature(&self) -> &super::SimpleSignature {
11750            self.signature
11751                .as_ref()
11752                .map(|field| field as _)
11753                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11754        }
11755        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11756        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11757            self.signature.as_mut().map(|field| field as _)
11758        }
11759        ///Returns a mutable reference to `signature`.
11760        ///If the field is unset, it is first initialized with the default value.
11761        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11762            self.signature.get_or_insert_default()
11763        }
11764        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11765        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11766            self.signature.as_ref().map(|field| field as _)
11767        }
11768        ///Sets `signature` with the provided value.
11769        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11770            self.signature = Some(field.into().into());
11771        }
11772        ///Sets `signature` with the provided value.
11773        pub fn with_signature<T: Into<super::SimpleSignature>>(
11774            mut self,
11775            field: T,
11776        ) -> Self {
11777            self.set_signature(field.into());
11778            self
11779        }
11780    }
11781    impl super::ProgrammableTransaction {
11782        pub const fn const_default() -> Self {
11783            Self {
11784                inputs: Vec::new(),
11785                commands: Vec::new(),
11786            }
11787        }
11788        #[doc(hidden)]
11789        pub fn default_instance() -> &'static Self {
11790            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11791            &DEFAULT
11792        }
11793        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11794        pub fn inputs(&self) -> &[super::Input] {
11795            &self.inputs
11796        }
11797        ///Returns a mutable reference to `inputs`.
11798        ///If the field is unset, it is first initialized with the default value.
11799        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11800            &mut self.inputs
11801        }
11802        ///Sets `inputs` with the provided value.
11803        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11804            self.inputs = field;
11805        }
11806        ///Sets `inputs` with the provided value.
11807        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11808            self.set_inputs(field);
11809            self
11810        }
11811        ///Returns the value of `commands`, or the default value if `commands` is unset.
11812        pub fn commands(&self) -> &[super::Command] {
11813            &self.commands
11814        }
11815        ///Returns a mutable reference to `commands`.
11816        ///If the field is unset, it is first initialized with the default value.
11817        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11818            &mut self.commands
11819        }
11820        ///Sets `commands` with the provided value.
11821        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11822            self.commands = field;
11823        }
11824        ///Sets `commands` with the provided value.
11825        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11826            self.set_commands(field);
11827            self
11828        }
11829    }
11830    impl super::ProtocolConfig {
11831        pub const fn const_default() -> Self {
11832            Self {
11833                protocol_version: None,
11834                feature_flags: std::collections::BTreeMap::new(),
11835                attributes: std::collections::BTreeMap::new(),
11836            }
11837        }
11838        #[doc(hidden)]
11839        pub fn default_instance() -> &'static Self {
11840            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11841            &DEFAULT
11842        }
11843        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11844        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11845            self.protocol_version.as_mut().map(|field| field as _)
11846        }
11847        ///Returns a mutable reference to `protocol_version`.
11848        ///If the field is unset, it is first initialized with the default value.
11849        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11850            self.protocol_version.get_or_insert_default()
11851        }
11852        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11853        pub fn protocol_version_opt(&self) -> Option<u64> {
11854            self.protocol_version.as_ref().map(|field| *field)
11855        }
11856        ///Sets `protocol_version` with the provided value.
11857        pub fn set_protocol_version(&mut self, field: u64) {
11858            self.protocol_version = Some(field);
11859        }
11860        ///Sets `protocol_version` with the provided value.
11861        pub fn with_protocol_version(mut self, field: u64) -> Self {
11862            self.set_protocol_version(field);
11863            self
11864        }
11865        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11866        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11867            &self.feature_flags
11868        }
11869        ///Returns a mutable reference to `feature_flags`.
11870        ///If the field is unset, it is first initialized with the default value.
11871        pub fn feature_flags_mut(
11872            &mut self,
11873        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11874            &mut self.feature_flags
11875        }
11876        ///Sets `feature_flags` with the provided value.
11877        pub fn set_feature_flags(
11878            &mut self,
11879            field: ::std::collections::BTreeMap<String, bool>,
11880        ) {
11881            self.feature_flags = field;
11882        }
11883        ///Sets `feature_flags` with the provided value.
11884        pub fn with_feature_flags(
11885            mut self,
11886            field: ::std::collections::BTreeMap<String, bool>,
11887        ) -> Self {
11888            self.set_feature_flags(field);
11889            self
11890        }
11891        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11892        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11893            &self.attributes
11894        }
11895        ///Returns a mutable reference to `attributes`.
11896        ///If the field is unset, it is first initialized with the default value.
11897        pub fn attributes_mut(
11898            &mut self,
11899        ) -> &mut ::std::collections::BTreeMap<String, String> {
11900            &mut self.attributes
11901        }
11902        ///Sets `attributes` with the provided value.
11903        pub fn set_attributes(
11904            &mut self,
11905            field: ::std::collections::BTreeMap<String, String>,
11906        ) {
11907            self.attributes = field;
11908        }
11909        ///Sets `attributes` with the provided value.
11910        pub fn with_attributes(
11911            mut self,
11912            field: ::std::collections::BTreeMap<String, String>,
11913        ) -> Self {
11914            self.set_attributes(field);
11915            self
11916        }
11917    }
11918    impl super::Publish {
11919        pub const fn const_default() -> Self {
11920            Self {
11921                modules: Vec::new(),
11922                dependencies: Vec::new(),
11923            }
11924        }
11925        #[doc(hidden)]
11926        pub fn default_instance() -> &'static Self {
11927            static DEFAULT: super::Publish = super::Publish::const_default();
11928            &DEFAULT
11929        }
11930        ///Returns the value of `modules`, or the default value if `modules` is unset.
11931        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11932            &self.modules
11933        }
11934        ///Returns a mutable reference to `modules`.
11935        ///If the field is unset, it is first initialized with the default value.
11936        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11937            &mut self.modules
11938        }
11939        ///Sets `modules` with the provided value.
11940        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11941            self.modules = field;
11942        }
11943        ///Sets `modules` with the provided value.
11944        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11945            self.set_modules(field);
11946            self
11947        }
11948        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
11949        pub fn dependencies(&self) -> &[String] {
11950            &self.dependencies
11951        }
11952        ///Returns a mutable reference to `dependencies`.
11953        ///If the field is unset, it is first initialized with the default value.
11954        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11955            &mut self.dependencies
11956        }
11957        ///Sets `dependencies` with the provided value.
11958        pub fn set_dependencies(&mut self, field: Vec<String>) {
11959            self.dependencies = field;
11960        }
11961        ///Sets `dependencies` with the provided value.
11962        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11963            self.set_dependencies(field);
11964            self
11965        }
11966    }
11967    impl super::RandomnessStateUpdate {
11968        pub const fn const_default() -> Self {
11969            Self {
11970                epoch: None,
11971                randomness_round: None,
11972                random_bytes: None,
11973                randomness_object_initial_shared_version: None,
11974            }
11975        }
11976        #[doc(hidden)]
11977        pub fn default_instance() -> &'static Self {
11978            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11979            &DEFAULT
11980        }
11981        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11982        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11983            self.epoch.as_mut().map(|field| field as _)
11984        }
11985        ///Returns a mutable reference to `epoch`.
11986        ///If the field is unset, it is first initialized with the default value.
11987        pub fn epoch_mut(&mut self) -> &mut u64 {
11988            self.epoch.get_or_insert_default()
11989        }
11990        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
11991        pub fn epoch_opt(&self) -> Option<u64> {
11992            self.epoch.as_ref().map(|field| *field)
11993        }
11994        ///Sets `epoch` with the provided value.
11995        pub fn set_epoch(&mut self, field: u64) {
11996            self.epoch = Some(field);
11997        }
11998        ///Sets `epoch` with the provided value.
11999        pub fn with_epoch(mut self, field: u64) -> Self {
12000            self.set_epoch(field);
12001            self
12002        }
12003        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12004        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12005            self.randomness_round.as_mut().map(|field| field as _)
12006        }
12007        ///Returns a mutable reference to `randomness_round`.
12008        ///If the field is unset, it is first initialized with the default value.
12009        pub fn randomness_round_mut(&mut self) -> &mut u64 {
12010            self.randomness_round.get_or_insert_default()
12011        }
12012        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
12013        pub fn randomness_round_opt(&self) -> Option<u64> {
12014            self.randomness_round.as_ref().map(|field| *field)
12015        }
12016        ///Sets `randomness_round` with the provided value.
12017        pub fn set_randomness_round(&mut self, field: u64) {
12018            self.randomness_round = Some(field);
12019        }
12020        ///Sets `randomness_round` with the provided value.
12021        pub fn with_randomness_round(mut self, field: u64) -> Self {
12022            self.set_randomness_round(field);
12023            self
12024        }
12025        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
12026        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12027            self.random_bytes.as_ref().map(|field| field as _)
12028        }
12029        ///Sets `random_bytes` with the provided value.
12030        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12031            self.random_bytes = Some(field.into().into());
12032        }
12033        ///Sets `random_bytes` with the provided value.
12034        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12035            mut self,
12036            field: T,
12037        ) -> Self {
12038            self.set_random_bytes(field.into());
12039            self
12040        }
12041        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12042        pub fn randomness_object_initial_shared_version_opt_mut(
12043            &mut self,
12044        ) -> Option<&mut u64> {
12045            self.randomness_object_initial_shared_version
12046                .as_mut()
12047                .map(|field| field as _)
12048        }
12049        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
12050        ///If the field is unset, it is first initialized with the default value.
12051        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12052            self.randomness_object_initial_shared_version.get_or_insert_default()
12053        }
12054        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12055        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12056            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12057        }
12058        ///Sets `randomness_object_initial_shared_version` with the provided value.
12059        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12060            self.randomness_object_initial_shared_version = Some(field);
12061        }
12062        ///Sets `randomness_object_initial_shared_version` with the provided value.
12063        pub fn with_randomness_object_initial_shared_version(
12064            mut self,
12065            field: u64,
12066        ) -> Self {
12067            self.set_randomness_object_initial_shared_version(field);
12068            self
12069        }
12070    }
12071    impl super::RegulatedCoinMetadata {
12072        pub const fn const_default() -> Self {
12073            Self {
12074                id: None,
12075                coin_metadata_object: None,
12076                deny_cap_object: None,
12077                allow_global_pause: None,
12078                variant: None,
12079                coin_regulated_state: None,
12080            }
12081        }
12082        #[doc(hidden)]
12083        pub fn default_instance() -> &'static Self {
12084            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12085            &DEFAULT
12086        }
12087        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12088        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12089            self.id.as_mut().map(|field| field as _)
12090        }
12091        ///Returns a mutable reference to `id`.
12092        ///If the field is unset, it is first initialized with the default value.
12093        pub fn id_mut(&mut self) -> &mut String {
12094            self.id.get_or_insert_default()
12095        }
12096        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12097        pub fn id_opt(&self) -> Option<&str> {
12098            self.id.as_ref().map(|field| field as _)
12099        }
12100        ///Sets `id` with the provided value.
12101        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12102            self.id = Some(field.into().into());
12103        }
12104        ///Sets `id` with the provided value.
12105        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12106            self.set_id(field.into());
12107            self
12108        }
12109        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12110        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12111            self.coin_metadata_object.as_mut().map(|field| field as _)
12112        }
12113        ///Returns a mutable reference to `coin_metadata_object`.
12114        ///If the field is unset, it is first initialized with the default value.
12115        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12116            self.coin_metadata_object.get_or_insert_default()
12117        }
12118        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12119        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12120            self.coin_metadata_object.as_ref().map(|field| field as _)
12121        }
12122        ///Sets `coin_metadata_object` with the provided value.
12123        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12124            self.coin_metadata_object = Some(field.into().into());
12125        }
12126        ///Sets `coin_metadata_object` with the provided value.
12127        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12128            self.set_coin_metadata_object(field.into());
12129            self
12130        }
12131        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12132        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12133            self.deny_cap_object.as_mut().map(|field| field as _)
12134        }
12135        ///Returns a mutable reference to `deny_cap_object`.
12136        ///If the field is unset, it is first initialized with the default value.
12137        pub fn deny_cap_object_mut(&mut self) -> &mut String {
12138            self.deny_cap_object.get_or_insert_default()
12139        }
12140        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12141        pub fn deny_cap_object_opt(&self) -> Option<&str> {
12142            self.deny_cap_object.as_ref().map(|field| field as _)
12143        }
12144        ///Sets `deny_cap_object` with the provided value.
12145        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12146            self.deny_cap_object = Some(field.into().into());
12147        }
12148        ///Sets `deny_cap_object` with the provided value.
12149        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12150            self.set_deny_cap_object(field.into());
12151            self
12152        }
12153        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12154        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12155            self.allow_global_pause.as_mut().map(|field| field as _)
12156        }
12157        ///Returns a mutable reference to `allow_global_pause`.
12158        ///If the field is unset, it is first initialized with the default value.
12159        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12160            self.allow_global_pause.get_or_insert_default()
12161        }
12162        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
12163        pub fn allow_global_pause_opt(&self) -> Option<bool> {
12164            self.allow_global_pause.as_ref().map(|field| *field)
12165        }
12166        ///Sets `allow_global_pause` with the provided value.
12167        pub fn set_allow_global_pause(&mut self, field: bool) {
12168            self.allow_global_pause = Some(field);
12169        }
12170        ///Sets `allow_global_pause` with the provided value.
12171        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12172            self.set_allow_global_pause(field);
12173            self
12174        }
12175        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12176        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12177            self.variant.as_mut().map(|field| field as _)
12178        }
12179        ///Returns a mutable reference to `variant`.
12180        ///If the field is unset, it is first initialized with the default value.
12181        pub fn variant_mut(&mut self) -> &mut u32 {
12182            self.variant.get_or_insert_default()
12183        }
12184        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
12185        pub fn variant_opt(&self) -> Option<u32> {
12186            self.variant.as_ref().map(|field| *field)
12187        }
12188        ///Sets `variant` with the provided value.
12189        pub fn set_variant(&mut self, field: u32) {
12190            self.variant = Some(field);
12191        }
12192        ///Sets `variant` with the provided value.
12193        pub fn with_variant(mut self, field: u32) -> Self {
12194            self.set_variant(field);
12195            self
12196        }
12197        ///Sets `coin_regulated_state` with the provided value.
12198        pub fn with_coin_regulated_state<
12199            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12200        >(mut self, field: T) -> Self {
12201            self.set_coin_regulated_state(field.into());
12202            self
12203        }
12204    }
12205    impl super::ReverseLookupNameRequest {
12206        pub const fn const_default() -> Self {
12207            Self { address: None }
12208        }
12209        #[doc(hidden)]
12210        pub fn default_instance() -> &'static Self {
12211            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12212            &DEFAULT
12213        }
12214        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12215        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12216            self.address.as_mut().map(|field| field as _)
12217        }
12218        ///Returns a mutable reference to `address`.
12219        ///If the field is unset, it is first initialized with the default value.
12220        pub fn address_mut(&mut self) -> &mut String {
12221            self.address.get_or_insert_default()
12222        }
12223        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12224        pub fn address_opt(&self) -> Option<&str> {
12225            self.address.as_ref().map(|field| field as _)
12226        }
12227        ///Sets `address` with the provided value.
12228        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12229            self.address = Some(field.into().into());
12230        }
12231        ///Sets `address` with the provided value.
12232        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12233            self.set_address(field.into());
12234            self
12235        }
12236    }
12237    impl super::ReverseLookupNameResponse {
12238        pub const fn const_default() -> Self {
12239            Self { record: None }
12240        }
12241        #[doc(hidden)]
12242        pub fn default_instance() -> &'static Self {
12243            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12244            &DEFAULT
12245        }
12246        ///Returns the value of `record`, or the default value if `record` is unset.
12247        pub fn record(&self) -> &super::NameRecord {
12248            self.record
12249                .as_ref()
12250                .map(|field| field as _)
12251                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12252        }
12253        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12254        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12255            self.record.as_mut().map(|field| field as _)
12256        }
12257        ///Returns a mutable reference to `record`.
12258        ///If the field is unset, it is first initialized with the default value.
12259        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12260            self.record.get_or_insert_default()
12261        }
12262        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12263        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12264            self.record.as_ref().map(|field| field as _)
12265        }
12266        ///Sets `record` with the provided value.
12267        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12268            self.record = Some(field.into().into());
12269        }
12270        ///Sets `record` with the provided value.
12271        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12272            self.set_record(field.into());
12273            self
12274        }
12275    }
12276    impl super::SimpleSignature {
12277        pub const fn const_default() -> Self {
12278            Self {
12279                scheme: None,
12280                signature: None,
12281                public_key: None,
12282            }
12283        }
12284        #[doc(hidden)]
12285        pub fn default_instance() -> &'static Self {
12286            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12287            &DEFAULT
12288        }
12289        ///Sets `scheme` with the provided value.
12290        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12291            self.set_scheme(field.into());
12292            self
12293        }
12294        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12295        pub fn signature_opt(&self) -> Option<&[u8]> {
12296            self.signature.as_ref().map(|field| field as _)
12297        }
12298        ///Sets `signature` with the provided value.
12299        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12300            self.signature = Some(field.into().into());
12301        }
12302        ///Sets `signature` with the provided value.
12303        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12304            mut self,
12305            field: T,
12306        ) -> Self {
12307            self.set_signature(field.into());
12308            self
12309        }
12310        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12311        pub fn public_key_opt(&self) -> Option<&[u8]> {
12312            self.public_key.as_ref().map(|field| field as _)
12313        }
12314        ///Sets `public_key` with the provided value.
12315        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12316            self.public_key = Some(field.into().into());
12317        }
12318        ///Sets `public_key` with the provided value.
12319        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12320            mut self,
12321            field: T,
12322        ) -> Self {
12323            self.set_public_key(field.into());
12324            self
12325        }
12326    }
12327    impl super::SimulateTransactionRequest {
12328        pub const fn const_default() -> Self {
12329            Self {
12330                transaction: None,
12331                read_mask: None,
12332                checks: None,
12333                do_gas_selection: None,
12334            }
12335        }
12336        #[doc(hidden)]
12337        pub fn default_instance() -> &'static Self {
12338            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12339            &DEFAULT
12340        }
12341        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12342        pub fn transaction(&self) -> &super::Transaction {
12343            self.transaction
12344                .as_ref()
12345                .map(|field| field as _)
12346                .unwrap_or_else(|| super::Transaction::default_instance() as _)
12347        }
12348        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12349        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12350            self.transaction.as_mut().map(|field| field as _)
12351        }
12352        ///Returns a mutable reference to `transaction`.
12353        ///If the field is unset, it is first initialized with the default value.
12354        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12355            self.transaction.get_or_insert_default()
12356        }
12357        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12358        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12359            self.transaction.as_ref().map(|field| field as _)
12360        }
12361        ///Sets `transaction` with the provided value.
12362        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12363            self.transaction = Some(field.into().into());
12364        }
12365        ///Sets `transaction` with the provided value.
12366        pub fn with_transaction<T: Into<super::Transaction>>(
12367            mut self,
12368            field: T,
12369        ) -> Self {
12370            self.set_transaction(field.into());
12371            self
12372        }
12373        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12374        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12375            self.read_mask.as_mut().map(|field| field as _)
12376        }
12377        ///Returns a mutable reference to `read_mask`.
12378        ///If the field is unset, it is first initialized with the default value.
12379        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12380            self.read_mask.get_or_insert_default()
12381        }
12382        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12383        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12384            self.read_mask.as_ref().map(|field| field as _)
12385        }
12386        ///Sets `read_mask` with the provided value.
12387        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12388            self.read_mask = Some(field.into().into());
12389        }
12390        ///Sets `read_mask` with the provided value.
12391        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12392            mut self,
12393            field: T,
12394        ) -> Self {
12395            self.set_read_mask(field.into());
12396            self
12397        }
12398        ///Sets `checks` with the provided value.
12399        pub fn with_checks<
12400            T: Into<super::simulate_transaction_request::TransactionChecks>,
12401        >(mut self, field: T) -> Self {
12402            self.set_checks(field.into());
12403            self
12404        }
12405        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12406        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12407            self.do_gas_selection.as_mut().map(|field| field as _)
12408        }
12409        ///Returns a mutable reference to `do_gas_selection`.
12410        ///If the field is unset, it is first initialized with the default value.
12411        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12412            self.do_gas_selection.get_or_insert_default()
12413        }
12414        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12415        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12416            self.do_gas_selection.as_ref().map(|field| *field)
12417        }
12418        ///Sets `do_gas_selection` with the provided value.
12419        pub fn set_do_gas_selection(&mut self, field: bool) {
12420            self.do_gas_selection = Some(field);
12421        }
12422        ///Sets `do_gas_selection` with the provided value.
12423        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12424            self.set_do_gas_selection(field);
12425            self
12426        }
12427    }
12428    impl super::SimulateTransactionResponse {
12429        pub const fn const_default() -> Self {
12430            Self {
12431                transaction: None,
12432                command_outputs: Vec::new(),
12433            }
12434        }
12435        #[doc(hidden)]
12436        pub fn default_instance() -> &'static Self {
12437            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12438            &DEFAULT
12439        }
12440        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12441        pub fn transaction(&self) -> &super::ExecutedTransaction {
12442            self.transaction
12443                .as_ref()
12444                .map(|field| field as _)
12445                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12446        }
12447        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12448        pub fn transaction_opt_mut(
12449            &mut self,
12450        ) -> Option<&mut super::ExecutedTransaction> {
12451            self.transaction.as_mut().map(|field| field as _)
12452        }
12453        ///Returns a mutable reference to `transaction`.
12454        ///If the field is unset, it is first initialized with the default value.
12455        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12456            self.transaction.get_or_insert_default()
12457        }
12458        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12459        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12460            self.transaction.as_ref().map(|field| field as _)
12461        }
12462        ///Sets `transaction` with the provided value.
12463        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12464            &mut self,
12465            field: T,
12466        ) {
12467            self.transaction = Some(field.into().into());
12468        }
12469        ///Sets `transaction` with the provided value.
12470        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12471            mut self,
12472            field: T,
12473        ) -> Self {
12474            self.set_transaction(field.into());
12475            self
12476        }
12477        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12478        pub fn command_outputs(&self) -> &[super::CommandResult] {
12479            &self.command_outputs
12480        }
12481        ///Returns a mutable reference to `command_outputs`.
12482        ///If the field is unset, it is first initialized with the default value.
12483        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12484            &mut self.command_outputs
12485        }
12486        ///Sets `command_outputs` with the provided value.
12487        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12488            self.command_outputs = field;
12489        }
12490        ///Sets `command_outputs` with the provided value.
12491        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12492            self.set_command_outputs(field);
12493            self
12494        }
12495    }
12496    impl super::SizeError {
12497        pub const fn const_default() -> Self {
12498            Self { size: None, max_size: None }
12499        }
12500        #[doc(hidden)]
12501        pub fn default_instance() -> &'static Self {
12502            static DEFAULT: super::SizeError = super::SizeError::const_default();
12503            &DEFAULT
12504        }
12505        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12506        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12507            self.size.as_mut().map(|field| field as _)
12508        }
12509        ///Returns a mutable reference to `size`.
12510        ///If the field is unset, it is first initialized with the default value.
12511        pub fn size_mut(&mut self) -> &mut u64 {
12512            self.size.get_or_insert_default()
12513        }
12514        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12515        pub fn size_opt(&self) -> Option<u64> {
12516            self.size.as_ref().map(|field| *field)
12517        }
12518        ///Sets `size` with the provided value.
12519        pub fn set_size(&mut self, field: u64) {
12520            self.size = Some(field);
12521        }
12522        ///Sets `size` with the provided value.
12523        pub fn with_size(mut self, field: u64) -> Self {
12524            self.set_size(field);
12525            self
12526        }
12527        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12528        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12529            self.max_size.as_mut().map(|field| field as _)
12530        }
12531        ///Returns a mutable reference to `max_size`.
12532        ///If the field is unset, it is first initialized with the default value.
12533        pub fn max_size_mut(&mut self) -> &mut u64 {
12534            self.max_size.get_or_insert_default()
12535        }
12536        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12537        pub fn max_size_opt(&self) -> Option<u64> {
12538            self.max_size.as_ref().map(|field| *field)
12539        }
12540        ///Sets `max_size` with the provided value.
12541        pub fn set_max_size(&mut self, field: u64) {
12542            self.max_size = Some(field);
12543        }
12544        ///Sets `max_size` with the provided value.
12545        pub fn with_max_size(mut self, field: u64) -> Self {
12546            self.set_max_size(field);
12547            self
12548        }
12549    }
12550    impl super::SplitCoins {
12551        pub const fn const_default() -> Self {
12552            Self {
12553                coin: None,
12554                amounts: Vec::new(),
12555            }
12556        }
12557        #[doc(hidden)]
12558        pub fn default_instance() -> &'static Self {
12559            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12560            &DEFAULT
12561        }
12562        ///Returns the value of `coin`, or the default value if `coin` is unset.
12563        pub fn coin(&self) -> &super::Argument {
12564            self.coin
12565                .as_ref()
12566                .map(|field| field as _)
12567                .unwrap_or_else(|| super::Argument::default_instance() as _)
12568        }
12569        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12570        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12571            self.coin.as_mut().map(|field| field as _)
12572        }
12573        ///Returns a mutable reference to `coin`.
12574        ///If the field is unset, it is first initialized with the default value.
12575        pub fn coin_mut(&mut self) -> &mut super::Argument {
12576            self.coin.get_or_insert_default()
12577        }
12578        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12579        pub fn coin_opt(&self) -> Option<&super::Argument> {
12580            self.coin.as_ref().map(|field| field as _)
12581        }
12582        ///Sets `coin` with the provided value.
12583        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12584            self.coin = Some(field.into().into());
12585        }
12586        ///Sets `coin` with the provided value.
12587        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12588            self.set_coin(field.into());
12589            self
12590        }
12591        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12592        pub fn amounts(&self) -> &[super::Argument] {
12593            &self.amounts
12594        }
12595        ///Returns a mutable reference to `amounts`.
12596        ///If the field is unset, it is first initialized with the default value.
12597        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12598            &mut self.amounts
12599        }
12600        ///Sets `amounts` with the provided value.
12601        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12602            self.amounts = field;
12603        }
12604        ///Sets `amounts` with the provided value.
12605        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12606            self.set_amounts(field);
12607            self
12608        }
12609    }
12610    impl super::StakeSubsidy {
12611        pub const fn const_default() -> Self {
12612            Self {
12613                balance: None,
12614                distribution_counter: None,
12615                current_distribution_amount: None,
12616                stake_subsidy_period_length: None,
12617                stake_subsidy_decrease_rate: None,
12618                extra_fields: None,
12619            }
12620        }
12621        #[doc(hidden)]
12622        pub fn default_instance() -> &'static Self {
12623            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12624            &DEFAULT
12625        }
12626        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12627        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12628            self.balance.as_mut().map(|field| field as _)
12629        }
12630        ///Returns a mutable reference to `balance`.
12631        ///If the field is unset, it is first initialized with the default value.
12632        pub fn balance_mut(&mut self) -> &mut u64 {
12633            self.balance.get_or_insert_default()
12634        }
12635        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12636        pub fn balance_opt(&self) -> Option<u64> {
12637            self.balance.as_ref().map(|field| *field)
12638        }
12639        ///Sets `balance` with the provided value.
12640        pub fn set_balance(&mut self, field: u64) {
12641            self.balance = Some(field);
12642        }
12643        ///Sets `balance` with the provided value.
12644        pub fn with_balance(mut self, field: u64) -> Self {
12645            self.set_balance(field);
12646            self
12647        }
12648        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12649        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12650            self.distribution_counter.as_mut().map(|field| field as _)
12651        }
12652        ///Returns a mutable reference to `distribution_counter`.
12653        ///If the field is unset, it is first initialized with the default value.
12654        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12655            self.distribution_counter.get_or_insert_default()
12656        }
12657        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12658        pub fn distribution_counter_opt(&self) -> Option<u64> {
12659            self.distribution_counter.as_ref().map(|field| *field)
12660        }
12661        ///Sets `distribution_counter` with the provided value.
12662        pub fn set_distribution_counter(&mut self, field: u64) {
12663            self.distribution_counter = Some(field);
12664        }
12665        ///Sets `distribution_counter` with the provided value.
12666        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12667            self.set_distribution_counter(field);
12668            self
12669        }
12670        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12671        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12672            self.current_distribution_amount.as_mut().map(|field| field as _)
12673        }
12674        ///Returns a mutable reference to `current_distribution_amount`.
12675        ///If the field is unset, it is first initialized with the default value.
12676        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12677            self.current_distribution_amount.get_or_insert_default()
12678        }
12679        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12680        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12681            self.current_distribution_amount.as_ref().map(|field| *field)
12682        }
12683        ///Sets `current_distribution_amount` with the provided value.
12684        pub fn set_current_distribution_amount(&mut self, field: u64) {
12685            self.current_distribution_amount = Some(field);
12686        }
12687        ///Sets `current_distribution_amount` with the provided value.
12688        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12689            self.set_current_distribution_amount(field);
12690            self
12691        }
12692        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12693        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12694            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12695        }
12696        ///Returns a mutable reference to `stake_subsidy_period_length`.
12697        ///If the field is unset, it is first initialized with the default value.
12698        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12699            self.stake_subsidy_period_length.get_or_insert_default()
12700        }
12701        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12702        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12703            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12704        }
12705        ///Sets `stake_subsidy_period_length` with the provided value.
12706        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12707            self.stake_subsidy_period_length = Some(field);
12708        }
12709        ///Sets `stake_subsidy_period_length` with the provided value.
12710        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12711            self.set_stake_subsidy_period_length(field);
12712            self
12713        }
12714        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12715        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12716            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12717        }
12718        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12719        ///If the field is unset, it is first initialized with the default value.
12720        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12721            self.stake_subsidy_decrease_rate.get_or_insert_default()
12722        }
12723        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12724        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12725            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12726        }
12727        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12728        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12729            self.stake_subsidy_decrease_rate = Some(field);
12730        }
12731        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12732        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12733            self.set_stake_subsidy_decrease_rate(field);
12734            self
12735        }
12736        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12737        pub fn extra_fields(&self) -> &super::MoveTable {
12738            self.extra_fields
12739                .as_ref()
12740                .map(|field| field as _)
12741                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12742        }
12743        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12744        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12745            self.extra_fields.as_mut().map(|field| field as _)
12746        }
12747        ///Returns a mutable reference to `extra_fields`.
12748        ///If the field is unset, it is first initialized with the default value.
12749        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12750            self.extra_fields.get_or_insert_default()
12751        }
12752        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12753        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12754            self.extra_fields.as_ref().map(|field| field as _)
12755        }
12756        ///Sets `extra_fields` with the provided value.
12757        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12758            self.extra_fields = Some(field.into().into());
12759        }
12760        ///Sets `extra_fields` with the provided value.
12761        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12762            self.set_extra_fields(field.into());
12763            self
12764        }
12765    }
12766    impl super::StakingPool {
12767        pub const fn const_default() -> Self {
12768            Self {
12769                id: None,
12770                activation_epoch: None,
12771                deactivation_epoch: None,
12772                sui_balance: None,
12773                rewards_pool: None,
12774                pool_token_balance: None,
12775                exchange_rates: None,
12776                pending_stake: None,
12777                pending_total_sui_withdraw: None,
12778                pending_pool_token_withdraw: None,
12779                extra_fields: None,
12780            }
12781        }
12782        #[doc(hidden)]
12783        pub fn default_instance() -> &'static Self {
12784            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12785            &DEFAULT
12786        }
12787        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12788        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12789            self.id.as_mut().map(|field| field as _)
12790        }
12791        ///Returns a mutable reference to `id`.
12792        ///If the field is unset, it is first initialized with the default value.
12793        pub fn id_mut(&mut self) -> &mut String {
12794            self.id.get_or_insert_default()
12795        }
12796        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12797        pub fn id_opt(&self) -> Option<&str> {
12798            self.id.as_ref().map(|field| field as _)
12799        }
12800        ///Sets `id` with the provided value.
12801        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12802            self.id = Some(field.into().into());
12803        }
12804        ///Sets `id` with the provided value.
12805        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12806            self.set_id(field.into());
12807            self
12808        }
12809        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12810        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12811            self.activation_epoch.as_mut().map(|field| field as _)
12812        }
12813        ///Returns a mutable reference to `activation_epoch`.
12814        ///If the field is unset, it is first initialized with the default value.
12815        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12816            self.activation_epoch.get_or_insert_default()
12817        }
12818        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12819        pub fn activation_epoch_opt(&self) -> Option<u64> {
12820            self.activation_epoch.as_ref().map(|field| *field)
12821        }
12822        ///Sets `activation_epoch` with the provided value.
12823        pub fn set_activation_epoch(&mut self, field: u64) {
12824            self.activation_epoch = Some(field);
12825        }
12826        ///Sets `activation_epoch` with the provided value.
12827        pub fn with_activation_epoch(mut self, field: u64) -> Self {
12828            self.set_activation_epoch(field);
12829            self
12830        }
12831        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12832        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12833            self.deactivation_epoch.as_mut().map(|field| field as _)
12834        }
12835        ///Returns a mutable reference to `deactivation_epoch`.
12836        ///If the field is unset, it is first initialized with the default value.
12837        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12838            self.deactivation_epoch.get_or_insert_default()
12839        }
12840        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12841        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12842            self.deactivation_epoch.as_ref().map(|field| *field)
12843        }
12844        ///Sets `deactivation_epoch` with the provided value.
12845        pub fn set_deactivation_epoch(&mut self, field: u64) {
12846            self.deactivation_epoch = Some(field);
12847        }
12848        ///Sets `deactivation_epoch` with the provided value.
12849        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12850            self.set_deactivation_epoch(field);
12851            self
12852        }
12853        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12854        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12855            self.sui_balance.as_mut().map(|field| field as _)
12856        }
12857        ///Returns a mutable reference to `sui_balance`.
12858        ///If the field is unset, it is first initialized with the default value.
12859        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12860            self.sui_balance.get_or_insert_default()
12861        }
12862        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12863        pub fn sui_balance_opt(&self) -> Option<u64> {
12864            self.sui_balance.as_ref().map(|field| *field)
12865        }
12866        ///Sets `sui_balance` with the provided value.
12867        pub fn set_sui_balance(&mut self, field: u64) {
12868            self.sui_balance = Some(field);
12869        }
12870        ///Sets `sui_balance` with the provided value.
12871        pub fn with_sui_balance(mut self, field: u64) -> Self {
12872            self.set_sui_balance(field);
12873            self
12874        }
12875        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12876        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12877            self.rewards_pool.as_mut().map(|field| field as _)
12878        }
12879        ///Returns a mutable reference to `rewards_pool`.
12880        ///If the field is unset, it is first initialized with the default value.
12881        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12882            self.rewards_pool.get_or_insert_default()
12883        }
12884        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12885        pub fn rewards_pool_opt(&self) -> Option<u64> {
12886            self.rewards_pool.as_ref().map(|field| *field)
12887        }
12888        ///Sets `rewards_pool` with the provided value.
12889        pub fn set_rewards_pool(&mut self, field: u64) {
12890            self.rewards_pool = Some(field);
12891        }
12892        ///Sets `rewards_pool` with the provided value.
12893        pub fn with_rewards_pool(mut self, field: u64) -> Self {
12894            self.set_rewards_pool(field);
12895            self
12896        }
12897        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12898        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12899            self.pool_token_balance.as_mut().map(|field| field as _)
12900        }
12901        ///Returns a mutable reference to `pool_token_balance`.
12902        ///If the field is unset, it is first initialized with the default value.
12903        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12904            self.pool_token_balance.get_or_insert_default()
12905        }
12906        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12907        pub fn pool_token_balance_opt(&self) -> Option<u64> {
12908            self.pool_token_balance.as_ref().map(|field| *field)
12909        }
12910        ///Sets `pool_token_balance` with the provided value.
12911        pub fn set_pool_token_balance(&mut self, field: u64) {
12912            self.pool_token_balance = Some(field);
12913        }
12914        ///Sets `pool_token_balance` with the provided value.
12915        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12916            self.set_pool_token_balance(field);
12917            self
12918        }
12919        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
12920        pub fn exchange_rates(&self) -> &super::MoveTable {
12921            self.exchange_rates
12922                .as_ref()
12923                .map(|field| field as _)
12924                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12925        }
12926        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12927        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12928            self.exchange_rates.as_mut().map(|field| field as _)
12929        }
12930        ///Returns a mutable reference to `exchange_rates`.
12931        ///If the field is unset, it is first initialized with the default value.
12932        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12933            self.exchange_rates.get_or_insert_default()
12934        }
12935        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12936        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12937            self.exchange_rates.as_ref().map(|field| field as _)
12938        }
12939        ///Sets `exchange_rates` with the provided value.
12940        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12941            self.exchange_rates = Some(field.into().into());
12942        }
12943        ///Sets `exchange_rates` with the provided value.
12944        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12945            mut self,
12946            field: T,
12947        ) -> Self {
12948            self.set_exchange_rates(field.into());
12949            self
12950        }
12951        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12952        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12953            self.pending_stake.as_mut().map(|field| field as _)
12954        }
12955        ///Returns a mutable reference to `pending_stake`.
12956        ///If the field is unset, it is first initialized with the default value.
12957        pub fn pending_stake_mut(&mut self) -> &mut u64 {
12958            self.pending_stake.get_or_insert_default()
12959        }
12960        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12961        pub fn pending_stake_opt(&self) -> Option<u64> {
12962            self.pending_stake.as_ref().map(|field| *field)
12963        }
12964        ///Sets `pending_stake` with the provided value.
12965        pub fn set_pending_stake(&mut self, field: u64) {
12966            self.pending_stake = Some(field);
12967        }
12968        ///Sets `pending_stake` with the provided value.
12969        pub fn with_pending_stake(mut self, field: u64) -> Self {
12970            self.set_pending_stake(field);
12971            self
12972        }
12973        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12974        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12975            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12976        }
12977        ///Returns a mutable reference to `pending_total_sui_withdraw`.
12978        ///If the field is unset, it is first initialized with the default value.
12979        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12980            self.pending_total_sui_withdraw.get_or_insert_default()
12981        }
12982        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12983        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12984            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12985        }
12986        ///Sets `pending_total_sui_withdraw` with the provided value.
12987        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12988            self.pending_total_sui_withdraw = Some(field);
12989        }
12990        ///Sets `pending_total_sui_withdraw` with the provided value.
12991        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12992            self.set_pending_total_sui_withdraw(field);
12993            self
12994        }
12995        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12996        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12997            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12998        }
12999        ///Returns a mutable reference to `pending_pool_token_withdraw`.
13000        ///If the field is unset, it is first initialized with the default value.
13001        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13002            self.pending_pool_token_withdraw.get_or_insert_default()
13003        }
13004        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13005        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13006            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13007        }
13008        ///Sets `pending_pool_token_withdraw` with the provided value.
13009        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13010            self.pending_pool_token_withdraw = Some(field);
13011        }
13012        ///Sets `pending_pool_token_withdraw` with the provided value.
13013        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13014            self.set_pending_pool_token_withdraw(field);
13015            self
13016        }
13017        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13018        pub fn extra_fields(&self) -> &super::MoveTable {
13019            self.extra_fields
13020                .as_ref()
13021                .map(|field| field as _)
13022                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13023        }
13024        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13025        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13026            self.extra_fields.as_mut().map(|field| field as _)
13027        }
13028        ///Returns a mutable reference to `extra_fields`.
13029        ///If the field is unset, it is first initialized with the default value.
13030        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13031            self.extra_fields.get_or_insert_default()
13032        }
13033        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13034        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13035            self.extra_fields.as_ref().map(|field| field as _)
13036        }
13037        ///Sets `extra_fields` with the provided value.
13038        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13039            self.extra_fields = Some(field.into().into());
13040        }
13041        ///Sets `extra_fields` with the provided value.
13042        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13043            self.set_extra_fields(field.into());
13044            self
13045        }
13046    }
13047    impl super::StorageFund {
13048        pub const fn const_default() -> Self {
13049            Self {
13050                total_object_storage_rebates: None,
13051                non_refundable_balance: None,
13052            }
13053        }
13054        #[doc(hidden)]
13055        pub fn default_instance() -> &'static Self {
13056            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13057            &DEFAULT
13058        }
13059        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13060        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13061            self.total_object_storage_rebates.as_mut().map(|field| field as _)
13062        }
13063        ///Returns a mutable reference to `total_object_storage_rebates`.
13064        ///If the field is unset, it is first initialized with the default value.
13065        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13066            self.total_object_storage_rebates.get_or_insert_default()
13067        }
13068        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13069        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13070            self.total_object_storage_rebates.as_ref().map(|field| *field)
13071        }
13072        ///Sets `total_object_storage_rebates` with the provided value.
13073        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13074            self.total_object_storage_rebates = Some(field);
13075        }
13076        ///Sets `total_object_storage_rebates` with the provided value.
13077        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13078            self.set_total_object_storage_rebates(field);
13079            self
13080        }
13081        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13082        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13083            self.non_refundable_balance.as_mut().map(|field| field as _)
13084        }
13085        ///Returns a mutable reference to `non_refundable_balance`.
13086        ///If the field is unset, it is first initialized with the default value.
13087        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13088            self.non_refundable_balance.get_or_insert_default()
13089        }
13090        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13091        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13092            self.non_refundable_balance.as_ref().map(|field| *field)
13093        }
13094        ///Sets `non_refundable_balance` with the provided value.
13095        pub fn set_non_refundable_balance(&mut self, field: u64) {
13096            self.non_refundable_balance = Some(field);
13097        }
13098        ///Sets `non_refundable_balance` with the provided value.
13099        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13100            self.set_non_refundable_balance(field);
13101            self
13102        }
13103    }
13104    impl super::SubscribeCheckpointsRequest {
13105        pub const fn const_default() -> Self {
13106            Self { read_mask: None }
13107        }
13108        #[doc(hidden)]
13109        pub fn default_instance() -> &'static Self {
13110            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13111            &DEFAULT
13112        }
13113        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13114        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13115            self.read_mask.as_mut().map(|field| field as _)
13116        }
13117        ///Returns a mutable reference to `read_mask`.
13118        ///If the field is unset, it is first initialized with the default value.
13119        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13120            self.read_mask.get_or_insert_default()
13121        }
13122        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
13123        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13124            self.read_mask.as_ref().map(|field| field as _)
13125        }
13126        ///Sets `read_mask` with the provided value.
13127        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13128            self.read_mask = Some(field.into().into());
13129        }
13130        ///Sets `read_mask` with the provided value.
13131        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13132            mut self,
13133            field: T,
13134        ) -> Self {
13135            self.set_read_mask(field.into());
13136            self
13137        }
13138    }
13139    impl super::SubscribeCheckpointsResponse {
13140        pub const fn const_default() -> Self {
13141            Self {
13142                cursor: None,
13143                checkpoint: None,
13144            }
13145        }
13146        #[doc(hidden)]
13147        pub fn default_instance() -> &'static Self {
13148            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13149            &DEFAULT
13150        }
13151        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13152        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13153            self.cursor.as_mut().map(|field| field as _)
13154        }
13155        ///Returns a mutable reference to `cursor`.
13156        ///If the field is unset, it is first initialized with the default value.
13157        pub fn cursor_mut(&mut self) -> &mut u64 {
13158            self.cursor.get_or_insert_default()
13159        }
13160        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
13161        pub fn cursor_opt(&self) -> Option<u64> {
13162            self.cursor.as_ref().map(|field| *field)
13163        }
13164        ///Sets `cursor` with the provided value.
13165        pub fn set_cursor(&mut self, field: u64) {
13166            self.cursor = Some(field);
13167        }
13168        ///Sets `cursor` with the provided value.
13169        pub fn with_cursor(mut self, field: u64) -> Self {
13170            self.set_cursor(field);
13171            self
13172        }
13173        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
13174        pub fn checkpoint(&self) -> &super::Checkpoint {
13175            self.checkpoint
13176                .as_ref()
13177                .map(|field| field as _)
13178                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13179        }
13180        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13181        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13182            self.checkpoint.as_mut().map(|field| field as _)
13183        }
13184        ///Returns a mutable reference to `checkpoint`.
13185        ///If the field is unset, it is first initialized with the default value.
13186        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13187            self.checkpoint.get_or_insert_default()
13188        }
13189        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
13190        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13191            self.checkpoint.as_ref().map(|field| field as _)
13192        }
13193        ///Sets `checkpoint` with the provided value.
13194        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13195            self.checkpoint = Some(field.into().into());
13196        }
13197        ///Sets `checkpoint` with the provided value.
13198        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13199            self.set_checkpoint(field.into());
13200            self
13201        }
13202    }
13203    impl super::SystemPackage {
13204        pub const fn const_default() -> Self {
13205            Self {
13206                version: None,
13207                modules: Vec::new(),
13208                dependencies: Vec::new(),
13209            }
13210        }
13211        #[doc(hidden)]
13212        pub fn default_instance() -> &'static Self {
13213            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13214            &DEFAULT
13215        }
13216        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13217        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13218            self.version.as_mut().map(|field| field as _)
13219        }
13220        ///Returns a mutable reference to `version`.
13221        ///If the field is unset, it is first initialized with the default value.
13222        pub fn version_mut(&mut self) -> &mut u64 {
13223            self.version.get_or_insert_default()
13224        }
13225        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13226        pub fn version_opt(&self) -> Option<u64> {
13227            self.version.as_ref().map(|field| *field)
13228        }
13229        ///Sets `version` with the provided value.
13230        pub fn set_version(&mut self, field: u64) {
13231            self.version = Some(field);
13232        }
13233        ///Sets `version` with the provided value.
13234        pub fn with_version(mut self, field: u64) -> Self {
13235            self.set_version(field);
13236            self
13237        }
13238        ///Returns the value of `modules`, or the default value if `modules` is unset.
13239        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13240            &self.modules
13241        }
13242        ///Returns a mutable reference to `modules`.
13243        ///If the field is unset, it is first initialized with the default value.
13244        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13245            &mut self.modules
13246        }
13247        ///Sets `modules` with the provided value.
13248        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13249            self.modules = field;
13250        }
13251        ///Sets `modules` with the provided value.
13252        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13253            self.set_modules(field);
13254            self
13255        }
13256        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13257        pub fn dependencies(&self) -> &[String] {
13258            &self.dependencies
13259        }
13260        ///Returns a mutable reference to `dependencies`.
13261        ///If the field is unset, it is first initialized with the default value.
13262        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13263            &mut self.dependencies
13264        }
13265        ///Sets `dependencies` with the provided value.
13266        pub fn set_dependencies(&mut self, field: Vec<String>) {
13267            self.dependencies = field;
13268        }
13269        ///Sets `dependencies` with the provided value.
13270        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13271            self.set_dependencies(field);
13272            self
13273        }
13274    }
13275    impl super::SystemParameters {
13276        pub const fn const_default() -> Self {
13277            Self {
13278                epoch_duration_ms: None,
13279                stake_subsidy_start_epoch: None,
13280                min_validator_count: None,
13281                max_validator_count: None,
13282                min_validator_joining_stake: None,
13283                validator_low_stake_threshold: None,
13284                validator_very_low_stake_threshold: None,
13285                validator_low_stake_grace_period: None,
13286                extra_fields: None,
13287            }
13288        }
13289        #[doc(hidden)]
13290        pub fn default_instance() -> &'static Self {
13291            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13292            &DEFAULT
13293        }
13294        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13295        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13296            self.epoch_duration_ms.as_mut().map(|field| field as _)
13297        }
13298        ///Returns a mutable reference to `epoch_duration_ms`.
13299        ///If the field is unset, it is first initialized with the default value.
13300        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13301            self.epoch_duration_ms.get_or_insert_default()
13302        }
13303        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13304        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13305            self.epoch_duration_ms.as_ref().map(|field| *field)
13306        }
13307        ///Sets `epoch_duration_ms` with the provided value.
13308        pub fn set_epoch_duration_ms(&mut self, field: u64) {
13309            self.epoch_duration_ms = Some(field);
13310        }
13311        ///Sets `epoch_duration_ms` with the provided value.
13312        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13313            self.set_epoch_duration_ms(field);
13314            self
13315        }
13316        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13317        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13318            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13319        }
13320        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
13321        ///If the field is unset, it is first initialized with the default value.
13322        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13323            self.stake_subsidy_start_epoch.get_or_insert_default()
13324        }
13325        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13326        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13327            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13328        }
13329        ///Sets `stake_subsidy_start_epoch` with the provided value.
13330        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13331            self.stake_subsidy_start_epoch = Some(field);
13332        }
13333        ///Sets `stake_subsidy_start_epoch` with the provided value.
13334        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13335            self.set_stake_subsidy_start_epoch(field);
13336            self
13337        }
13338        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13339        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13340            self.min_validator_count.as_mut().map(|field| field as _)
13341        }
13342        ///Returns a mutable reference to `min_validator_count`.
13343        ///If the field is unset, it is first initialized with the default value.
13344        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13345            self.min_validator_count.get_or_insert_default()
13346        }
13347        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13348        pub fn min_validator_count_opt(&self) -> Option<u64> {
13349            self.min_validator_count.as_ref().map(|field| *field)
13350        }
13351        ///Sets `min_validator_count` with the provided value.
13352        pub fn set_min_validator_count(&mut self, field: u64) {
13353            self.min_validator_count = Some(field);
13354        }
13355        ///Sets `min_validator_count` with the provided value.
13356        pub fn with_min_validator_count(mut self, field: u64) -> Self {
13357            self.set_min_validator_count(field);
13358            self
13359        }
13360        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13361        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13362            self.max_validator_count.as_mut().map(|field| field as _)
13363        }
13364        ///Returns a mutable reference to `max_validator_count`.
13365        ///If the field is unset, it is first initialized with the default value.
13366        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13367            self.max_validator_count.get_or_insert_default()
13368        }
13369        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13370        pub fn max_validator_count_opt(&self) -> Option<u64> {
13371            self.max_validator_count.as_ref().map(|field| *field)
13372        }
13373        ///Sets `max_validator_count` with the provided value.
13374        pub fn set_max_validator_count(&mut self, field: u64) {
13375            self.max_validator_count = Some(field);
13376        }
13377        ///Sets `max_validator_count` with the provided value.
13378        pub fn with_max_validator_count(mut self, field: u64) -> Self {
13379            self.set_max_validator_count(field);
13380            self
13381        }
13382        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13383        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13384            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13385        }
13386        ///Returns a mutable reference to `min_validator_joining_stake`.
13387        ///If the field is unset, it is first initialized with the default value.
13388        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13389            self.min_validator_joining_stake.get_or_insert_default()
13390        }
13391        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13392        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13393            self.min_validator_joining_stake.as_ref().map(|field| *field)
13394        }
13395        ///Sets `min_validator_joining_stake` with the provided value.
13396        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13397            self.min_validator_joining_stake = Some(field);
13398        }
13399        ///Sets `min_validator_joining_stake` with the provided value.
13400        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13401            self.set_min_validator_joining_stake(field);
13402            self
13403        }
13404        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13405        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13406            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13407        }
13408        ///Returns a mutable reference to `validator_low_stake_threshold`.
13409        ///If the field is unset, it is first initialized with the default value.
13410        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13411            self.validator_low_stake_threshold.get_or_insert_default()
13412        }
13413        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13414        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13415            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13416        }
13417        ///Sets `validator_low_stake_threshold` with the provided value.
13418        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13419            self.validator_low_stake_threshold = Some(field);
13420        }
13421        ///Sets `validator_low_stake_threshold` with the provided value.
13422        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13423            self.set_validator_low_stake_threshold(field);
13424            self
13425        }
13426        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13427        pub fn validator_very_low_stake_threshold_opt_mut(
13428            &mut self,
13429        ) -> Option<&mut u64> {
13430            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13431        }
13432        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13433        ///If the field is unset, it is first initialized with the default value.
13434        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13435            self.validator_very_low_stake_threshold.get_or_insert_default()
13436        }
13437        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13438        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13439            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13440        }
13441        ///Sets `validator_very_low_stake_threshold` with the provided value.
13442        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13443            self.validator_very_low_stake_threshold = Some(field);
13444        }
13445        ///Sets `validator_very_low_stake_threshold` with the provided value.
13446        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13447            self.set_validator_very_low_stake_threshold(field);
13448            self
13449        }
13450        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13451        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13452            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13453        }
13454        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13455        ///If the field is unset, it is first initialized with the default value.
13456        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13457            self.validator_low_stake_grace_period.get_or_insert_default()
13458        }
13459        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13460        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13461            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13462        }
13463        ///Sets `validator_low_stake_grace_period` with the provided value.
13464        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13465            self.validator_low_stake_grace_period = Some(field);
13466        }
13467        ///Sets `validator_low_stake_grace_period` with the provided value.
13468        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13469            self.set_validator_low_stake_grace_period(field);
13470            self
13471        }
13472        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13473        pub fn extra_fields(&self) -> &super::MoveTable {
13474            self.extra_fields
13475                .as_ref()
13476                .map(|field| field as _)
13477                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13478        }
13479        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13480        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13481            self.extra_fields.as_mut().map(|field| field as _)
13482        }
13483        ///Returns a mutable reference to `extra_fields`.
13484        ///If the field is unset, it is first initialized with the default value.
13485        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13486            self.extra_fields.get_or_insert_default()
13487        }
13488        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13489        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13490            self.extra_fields.as_ref().map(|field| field as _)
13491        }
13492        ///Sets `extra_fields` with the provided value.
13493        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13494            self.extra_fields = Some(field.into().into());
13495        }
13496        ///Sets `extra_fields` with the provided value.
13497        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13498            self.set_extra_fields(field.into());
13499            self
13500        }
13501    }
13502    impl super::SystemState {
13503        pub const fn const_default() -> Self {
13504            Self {
13505                version: None,
13506                epoch: None,
13507                protocol_version: None,
13508                validators: None,
13509                storage_fund: None,
13510                parameters: None,
13511                reference_gas_price: None,
13512                validator_report_records: Vec::new(),
13513                stake_subsidy: None,
13514                safe_mode: None,
13515                safe_mode_storage_rewards: None,
13516                safe_mode_computation_rewards: None,
13517                safe_mode_storage_rebates: None,
13518                safe_mode_non_refundable_storage_fee: None,
13519                epoch_start_timestamp_ms: None,
13520                extra_fields: None,
13521            }
13522        }
13523        #[doc(hidden)]
13524        pub fn default_instance() -> &'static Self {
13525            static DEFAULT: super::SystemState = super::SystemState::const_default();
13526            &DEFAULT
13527        }
13528        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13529        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13530            self.version.as_mut().map(|field| field as _)
13531        }
13532        ///Returns a mutable reference to `version`.
13533        ///If the field is unset, it is first initialized with the default value.
13534        pub fn version_mut(&mut self) -> &mut u64 {
13535            self.version.get_or_insert_default()
13536        }
13537        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13538        pub fn version_opt(&self) -> Option<u64> {
13539            self.version.as_ref().map(|field| *field)
13540        }
13541        ///Sets `version` with the provided value.
13542        pub fn set_version(&mut self, field: u64) {
13543            self.version = Some(field);
13544        }
13545        ///Sets `version` with the provided value.
13546        pub fn with_version(mut self, field: u64) -> Self {
13547            self.set_version(field);
13548            self
13549        }
13550        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13551        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13552            self.epoch.as_mut().map(|field| field as _)
13553        }
13554        ///Returns a mutable reference to `epoch`.
13555        ///If the field is unset, it is first initialized with the default value.
13556        pub fn epoch_mut(&mut self) -> &mut u64 {
13557            self.epoch.get_or_insert_default()
13558        }
13559        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13560        pub fn epoch_opt(&self) -> Option<u64> {
13561            self.epoch.as_ref().map(|field| *field)
13562        }
13563        ///Sets `epoch` with the provided value.
13564        pub fn set_epoch(&mut self, field: u64) {
13565            self.epoch = Some(field);
13566        }
13567        ///Sets `epoch` with the provided value.
13568        pub fn with_epoch(mut self, field: u64) -> Self {
13569            self.set_epoch(field);
13570            self
13571        }
13572        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13573        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13574            self.protocol_version.as_mut().map(|field| field as _)
13575        }
13576        ///Returns a mutable reference to `protocol_version`.
13577        ///If the field is unset, it is first initialized with the default value.
13578        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13579            self.protocol_version.get_or_insert_default()
13580        }
13581        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13582        pub fn protocol_version_opt(&self) -> Option<u64> {
13583            self.protocol_version.as_ref().map(|field| *field)
13584        }
13585        ///Sets `protocol_version` with the provided value.
13586        pub fn set_protocol_version(&mut self, field: u64) {
13587            self.protocol_version = Some(field);
13588        }
13589        ///Sets `protocol_version` with the provided value.
13590        pub fn with_protocol_version(mut self, field: u64) -> Self {
13591            self.set_protocol_version(field);
13592            self
13593        }
13594        ///Returns the value of `validators`, or the default value if `validators` is unset.
13595        pub fn validators(&self) -> &super::ValidatorSet {
13596            self.validators
13597                .as_ref()
13598                .map(|field| field as _)
13599                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13600        }
13601        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13602        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13603            self.validators.as_mut().map(|field| field as _)
13604        }
13605        ///Returns a mutable reference to `validators`.
13606        ///If the field is unset, it is first initialized with the default value.
13607        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13608            self.validators.get_or_insert_default()
13609        }
13610        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13611        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13612            self.validators.as_ref().map(|field| field as _)
13613        }
13614        ///Sets `validators` with the provided value.
13615        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13616            self.validators = Some(field.into().into());
13617        }
13618        ///Sets `validators` with the provided value.
13619        pub fn with_validators<T: Into<super::ValidatorSet>>(
13620            mut self,
13621            field: T,
13622        ) -> Self {
13623            self.set_validators(field.into());
13624            self
13625        }
13626        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13627        pub fn storage_fund(&self) -> &super::StorageFund {
13628            self.storage_fund
13629                .as_ref()
13630                .map(|field| field as _)
13631                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13632        }
13633        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13634        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13635            self.storage_fund.as_mut().map(|field| field as _)
13636        }
13637        ///Returns a mutable reference to `storage_fund`.
13638        ///If the field is unset, it is first initialized with the default value.
13639        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13640            self.storage_fund.get_or_insert_default()
13641        }
13642        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13643        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13644            self.storage_fund.as_ref().map(|field| field as _)
13645        }
13646        ///Sets `storage_fund` with the provided value.
13647        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13648            self.storage_fund = Some(field.into().into());
13649        }
13650        ///Sets `storage_fund` with the provided value.
13651        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13652            mut self,
13653            field: T,
13654        ) -> Self {
13655            self.set_storage_fund(field.into());
13656            self
13657        }
13658        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13659        pub fn parameters(&self) -> &super::SystemParameters {
13660            self.parameters
13661                .as_ref()
13662                .map(|field| field as _)
13663                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13664        }
13665        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13666        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13667            self.parameters.as_mut().map(|field| field as _)
13668        }
13669        ///Returns a mutable reference to `parameters`.
13670        ///If the field is unset, it is first initialized with the default value.
13671        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13672            self.parameters.get_or_insert_default()
13673        }
13674        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13675        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13676            self.parameters.as_ref().map(|field| field as _)
13677        }
13678        ///Sets `parameters` with the provided value.
13679        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13680            self.parameters = Some(field.into().into());
13681        }
13682        ///Sets `parameters` with the provided value.
13683        pub fn with_parameters<T: Into<super::SystemParameters>>(
13684            mut self,
13685            field: T,
13686        ) -> Self {
13687            self.set_parameters(field.into());
13688            self
13689        }
13690        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13691        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13692            self.reference_gas_price.as_mut().map(|field| field as _)
13693        }
13694        ///Returns a mutable reference to `reference_gas_price`.
13695        ///If the field is unset, it is first initialized with the default value.
13696        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13697            self.reference_gas_price.get_or_insert_default()
13698        }
13699        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13700        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13701            self.reference_gas_price.as_ref().map(|field| *field)
13702        }
13703        ///Sets `reference_gas_price` with the provided value.
13704        pub fn set_reference_gas_price(&mut self, field: u64) {
13705            self.reference_gas_price = Some(field);
13706        }
13707        ///Sets `reference_gas_price` with the provided value.
13708        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13709            self.set_reference_gas_price(field);
13710            self
13711        }
13712        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13713        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13714            &self.validator_report_records
13715        }
13716        ///Returns a mutable reference to `validator_report_records`.
13717        ///If the field is unset, it is first initialized with the default value.
13718        pub fn validator_report_records_mut(
13719            &mut self,
13720        ) -> &mut Vec<super::ValidatorReportRecord> {
13721            &mut self.validator_report_records
13722        }
13723        ///Sets `validator_report_records` with the provided value.
13724        pub fn set_validator_report_records(
13725            &mut self,
13726            field: Vec<super::ValidatorReportRecord>,
13727        ) {
13728            self.validator_report_records = field;
13729        }
13730        ///Sets `validator_report_records` with the provided value.
13731        pub fn with_validator_report_records(
13732            mut self,
13733            field: Vec<super::ValidatorReportRecord>,
13734        ) -> Self {
13735            self.set_validator_report_records(field);
13736            self
13737        }
13738        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13739        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13740            self.stake_subsidy
13741                .as_ref()
13742                .map(|field| field as _)
13743                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13744        }
13745        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13746        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13747            self.stake_subsidy.as_mut().map(|field| field as _)
13748        }
13749        ///Returns a mutable reference to `stake_subsidy`.
13750        ///If the field is unset, it is first initialized with the default value.
13751        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13752            self.stake_subsidy.get_or_insert_default()
13753        }
13754        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13755        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13756            self.stake_subsidy.as_ref().map(|field| field as _)
13757        }
13758        ///Sets `stake_subsidy` with the provided value.
13759        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13760            self.stake_subsidy = Some(field.into().into());
13761        }
13762        ///Sets `stake_subsidy` with the provided value.
13763        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13764            mut self,
13765            field: T,
13766        ) -> Self {
13767            self.set_stake_subsidy(field.into());
13768            self
13769        }
13770        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13771        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13772            self.safe_mode.as_mut().map(|field| field as _)
13773        }
13774        ///Returns a mutable reference to `safe_mode`.
13775        ///If the field is unset, it is first initialized with the default value.
13776        pub fn safe_mode_mut(&mut self) -> &mut bool {
13777            self.safe_mode.get_or_insert_default()
13778        }
13779        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13780        pub fn safe_mode_opt(&self) -> Option<bool> {
13781            self.safe_mode.as_ref().map(|field| *field)
13782        }
13783        ///Sets `safe_mode` with the provided value.
13784        pub fn set_safe_mode(&mut self, field: bool) {
13785            self.safe_mode = Some(field);
13786        }
13787        ///Sets `safe_mode` with the provided value.
13788        pub fn with_safe_mode(mut self, field: bool) -> Self {
13789            self.set_safe_mode(field);
13790            self
13791        }
13792        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13793        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13794            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13795        }
13796        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13797        ///If the field is unset, it is first initialized with the default value.
13798        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13799            self.safe_mode_storage_rewards.get_or_insert_default()
13800        }
13801        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13802        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13803            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13804        }
13805        ///Sets `safe_mode_storage_rewards` with the provided value.
13806        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13807            self.safe_mode_storage_rewards = Some(field);
13808        }
13809        ///Sets `safe_mode_storage_rewards` with the provided value.
13810        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13811            self.set_safe_mode_storage_rewards(field);
13812            self
13813        }
13814        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13815        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13816            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13817        }
13818        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13819        ///If the field is unset, it is first initialized with the default value.
13820        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13821            self.safe_mode_computation_rewards.get_or_insert_default()
13822        }
13823        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13824        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13825            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13826        }
13827        ///Sets `safe_mode_computation_rewards` with the provided value.
13828        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13829            self.safe_mode_computation_rewards = Some(field);
13830        }
13831        ///Sets `safe_mode_computation_rewards` with the provided value.
13832        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13833            self.set_safe_mode_computation_rewards(field);
13834            self
13835        }
13836        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13837        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13838            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13839        }
13840        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13841        ///If the field is unset, it is first initialized with the default value.
13842        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13843            self.safe_mode_storage_rebates.get_or_insert_default()
13844        }
13845        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13846        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13847            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13848        }
13849        ///Sets `safe_mode_storage_rebates` with the provided value.
13850        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13851            self.safe_mode_storage_rebates = Some(field);
13852        }
13853        ///Sets `safe_mode_storage_rebates` with the provided value.
13854        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13855            self.set_safe_mode_storage_rebates(field);
13856            self
13857        }
13858        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13859        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13860            &mut self,
13861        ) -> Option<&mut u64> {
13862            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13863        }
13864        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13865        ///If the field is unset, it is first initialized with the default value.
13866        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13867            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13868        }
13869        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13870        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13871            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13872        }
13873        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13874        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13875            self.safe_mode_non_refundable_storage_fee = Some(field);
13876        }
13877        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13878        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13879            self.set_safe_mode_non_refundable_storage_fee(field);
13880            self
13881        }
13882        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13883        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13884            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13885        }
13886        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13887        ///If the field is unset, it is first initialized with the default value.
13888        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13889            self.epoch_start_timestamp_ms.get_or_insert_default()
13890        }
13891        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13892        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13893            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13894        }
13895        ///Sets `epoch_start_timestamp_ms` with the provided value.
13896        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13897            self.epoch_start_timestamp_ms = Some(field);
13898        }
13899        ///Sets `epoch_start_timestamp_ms` with the provided value.
13900        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13901            self.set_epoch_start_timestamp_ms(field);
13902            self
13903        }
13904        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13905        pub fn extra_fields(&self) -> &super::MoveTable {
13906            self.extra_fields
13907                .as_ref()
13908                .map(|field| field as _)
13909                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13910        }
13911        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13912        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13913            self.extra_fields.as_mut().map(|field| field as _)
13914        }
13915        ///Returns a mutable reference to `extra_fields`.
13916        ///If the field is unset, it is first initialized with the default value.
13917        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13918            self.extra_fields.get_or_insert_default()
13919        }
13920        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13921        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13922            self.extra_fields.as_ref().map(|field| field as _)
13923        }
13924        ///Sets `extra_fields` with the provided value.
13925        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13926            self.extra_fields = Some(field.into().into());
13927        }
13928        ///Sets `extra_fields` with the provided value.
13929        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13930            self.set_extra_fields(field.into());
13931            self
13932        }
13933    }
13934    impl super::Transaction {
13935        pub const fn const_default() -> Self {
13936            Self {
13937                bcs: None,
13938                digest: None,
13939                version: None,
13940                kind: None,
13941                sender: None,
13942                gas_payment: None,
13943                expiration: None,
13944            }
13945        }
13946        #[doc(hidden)]
13947        pub fn default_instance() -> &'static Self {
13948            static DEFAULT: super::Transaction = super::Transaction::const_default();
13949            &DEFAULT
13950        }
13951        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13952        pub fn bcs(&self) -> &super::Bcs {
13953            self.bcs
13954                .as_ref()
13955                .map(|field| field as _)
13956                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13957        }
13958        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13959        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13960            self.bcs.as_mut().map(|field| field as _)
13961        }
13962        ///Returns a mutable reference to `bcs`.
13963        ///If the field is unset, it is first initialized with the default value.
13964        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13965            self.bcs.get_or_insert_default()
13966        }
13967        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13968        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13969            self.bcs.as_ref().map(|field| field as _)
13970        }
13971        ///Sets `bcs` with the provided value.
13972        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13973            self.bcs = Some(field.into().into());
13974        }
13975        ///Sets `bcs` with the provided value.
13976        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13977            self.set_bcs(field.into());
13978            self
13979        }
13980        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13981        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13982            self.digest.as_mut().map(|field| field as _)
13983        }
13984        ///Returns a mutable reference to `digest`.
13985        ///If the field is unset, it is first initialized with the default value.
13986        pub fn digest_mut(&mut self) -> &mut String {
13987            self.digest.get_or_insert_default()
13988        }
13989        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13990        pub fn digest_opt(&self) -> Option<&str> {
13991            self.digest.as_ref().map(|field| field as _)
13992        }
13993        ///Sets `digest` with the provided value.
13994        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13995            self.digest = Some(field.into().into());
13996        }
13997        ///Sets `digest` with the provided value.
13998        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13999            self.set_digest(field.into());
14000            self
14001        }
14002        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14003        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14004            self.version.as_mut().map(|field| field as _)
14005        }
14006        ///Returns a mutable reference to `version`.
14007        ///If the field is unset, it is first initialized with the default value.
14008        pub fn version_mut(&mut self) -> &mut i32 {
14009            self.version.get_or_insert_default()
14010        }
14011        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14012        pub fn version_opt(&self) -> Option<i32> {
14013            self.version.as_ref().map(|field| *field)
14014        }
14015        ///Sets `version` with the provided value.
14016        pub fn set_version(&mut self, field: i32) {
14017            self.version = Some(field);
14018        }
14019        ///Sets `version` with the provided value.
14020        pub fn with_version(mut self, field: i32) -> Self {
14021            self.set_version(field);
14022            self
14023        }
14024        ///Returns the value of `kind`, or the default value if `kind` is unset.
14025        pub fn kind(&self) -> &super::TransactionKind {
14026            self.kind
14027                .as_ref()
14028                .map(|field| field as _)
14029                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14030        }
14031        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14032        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14033            self.kind.as_mut().map(|field| field as _)
14034        }
14035        ///Returns a mutable reference to `kind`.
14036        ///If the field is unset, it is first initialized with the default value.
14037        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14038            self.kind.get_or_insert_default()
14039        }
14040        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
14041        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14042            self.kind.as_ref().map(|field| field as _)
14043        }
14044        ///Sets `kind` with the provided value.
14045        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14046            self.kind = Some(field.into().into());
14047        }
14048        ///Sets `kind` with the provided value.
14049        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14050            self.set_kind(field.into());
14051            self
14052        }
14053        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14054        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14055            self.sender.as_mut().map(|field| field as _)
14056        }
14057        ///Returns a mutable reference to `sender`.
14058        ///If the field is unset, it is first initialized with the default value.
14059        pub fn sender_mut(&mut self) -> &mut String {
14060            self.sender.get_or_insert_default()
14061        }
14062        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
14063        pub fn sender_opt(&self) -> Option<&str> {
14064            self.sender.as_ref().map(|field| field as _)
14065        }
14066        ///Sets `sender` with the provided value.
14067        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14068            self.sender = Some(field.into().into());
14069        }
14070        ///Sets `sender` with the provided value.
14071        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14072            self.set_sender(field.into());
14073            self
14074        }
14075        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
14076        pub fn gas_payment(&self) -> &super::GasPayment {
14077            self.gas_payment
14078                .as_ref()
14079                .map(|field| field as _)
14080                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14081        }
14082        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14083        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14084            self.gas_payment.as_mut().map(|field| field as _)
14085        }
14086        ///Returns a mutable reference to `gas_payment`.
14087        ///If the field is unset, it is first initialized with the default value.
14088        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14089            self.gas_payment.get_or_insert_default()
14090        }
14091        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
14092        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14093            self.gas_payment.as_ref().map(|field| field as _)
14094        }
14095        ///Sets `gas_payment` with the provided value.
14096        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14097            self.gas_payment = Some(field.into().into());
14098        }
14099        ///Sets `gas_payment` with the provided value.
14100        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14101            self.set_gas_payment(field.into());
14102            self
14103        }
14104        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
14105        pub fn expiration(&self) -> &super::TransactionExpiration {
14106            self.expiration
14107                .as_ref()
14108                .map(|field| field as _)
14109                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14110        }
14111        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14112        pub fn expiration_opt_mut(
14113            &mut self,
14114        ) -> Option<&mut super::TransactionExpiration> {
14115            self.expiration.as_mut().map(|field| field as _)
14116        }
14117        ///Returns a mutable reference to `expiration`.
14118        ///If the field is unset, it is first initialized with the default value.
14119        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14120            self.expiration.get_or_insert_default()
14121        }
14122        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
14123        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14124            self.expiration.as_ref().map(|field| field as _)
14125        }
14126        ///Sets `expiration` with the provided value.
14127        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14128            &mut self,
14129            field: T,
14130        ) {
14131            self.expiration = Some(field.into().into());
14132        }
14133        ///Sets `expiration` with the provided value.
14134        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14135            mut self,
14136            field: T,
14137        ) -> Self {
14138            self.set_expiration(field.into());
14139            self
14140        }
14141    }
14142    impl super::TransactionEffects {
14143        pub const fn const_default() -> Self {
14144            Self {
14145                bcs: None,
14146                digest: None,
14147                version: None,
14148                status: None,
14149                epoch: None,
14150                gas_used: None,
14151                transaction_digest: None,
14152                gas_object: None,
14153                events_digest: None,
14154                dependencies: Vec::new(),
14155                lamport_version: None,
14156                changed_objects: Vec::new(),
14157                unchanged_consensus_objects: Vec::new(),
14158                auxiliary_data_digest: None,
14159                unchanged_loaded_runtime_objects: Vec::new(),
14160            }
14161        }
14162        #[doc(hidden)]
14163        pub fn default_instance() -> &'static Self {
14164            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14165            &DEFAULT
14166        }
14167        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14168        pub fn bcs(&self) -> &super::Bcs {
14169            self.bcs
14170                .as_ref()
14171                .map(|field| field as _)
14172                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14173        }
14174        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14175        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14176            self.bcs.as_mut().map(|field| field as _)
14177        }
14178        ///Returns a mutable reference to `bcs`.
14179        ///If the field is unset, it is first initialized with the default value.
14180        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14181            self.bcs.get_or_insert_default()
14182        }
14183        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14184        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14185            self.bcs.as_ref().map(|field| field as _)
14186        }
14187        ///Sets `bcs` with the provided value.
14188        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14189            self.bcs = Some(field.into().into());
14190        }
14191        ///Sets `bcs` with the provided value.
14192        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14193            self.set_bcs(field.into());
14194            self
14195        }
14196        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14197        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14198            self.digest.as_mut().map(|field| field as _)
14199        }
14200        ///Returns a mutable reference to `digest`.
14201        ///If the field is unset, it is first initialized with the default value.
14202        pub fn digest_mut(&mut self) -> &mut String {
14203            self.digest.get_or_insert_default()
14204        }
14205        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14206        pub fn digest_opt(&self) -> Option<&str> {
14207            self.digest.as_ref().map(|field| field as _)
14208        }
14209        ///Sets `digest` with the provided value.
14210        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14211            self.digest = Some(field.into().into());
14212        }
14213        ///Sets `digest` with the provided value.
14214        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14215            self.set_digest(field.into());
14216            self
14217        }
14218        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14219        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14220            self.version.as_mut().map(|field| field as _)
14221        }
14222        ///Returns a mutable reference to `version`.
14223        ///If the field is unset, it is first initialized with the default value.
14224        pub fn version_mut(&mut self) -> &mut i32 {
14225            self.version.get_or_insert_default()
14226        }
14227        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14228        pub fn version_opt(&self) -> Option<i32> {
14229            self.version.as_ref().map(|field| *field)
14230        }
14231        ///Sets `version` with the provided value.
14232        pub fn set_version(&mut self, field: i32) {
14233            self.version = Some(field);
14234        }
14235        ///Sets `version` with the provided value.
14236        pub fn with_version(mut self, field: i32) -> Self {
14237            self.set_version(field);
14238            self
14239        }
14240        ///Returns the value of `status`, or the default value if `status` is unset.
14241        pub fn status(&self) -> &super::ExecutionStatus {
14242            self.status
14243                .as_ref()
14244                .map(|field| field as _)
14245                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14246        }
14247        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14248        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14249            self.status.as_mut().map(|field| field as _)
14250        }
14251        ///Returns a mutable reference to `status`.
14252        ///If the field is unset, it is first initialized with the default value.
14253        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14254            self.status.get_or_insert_default()
14255        }
14256        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
14257        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14258            self.status.as_ref().map(|field| field as _)
14259        }
14260        ///Sets `status` with the provided value.
14261        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14262            self.status = Some(field.into().into());
14263        }
14264        ///Sets `status` with the provided value.
14265        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14266            self.set_status(field.into());
14267            self
14268        }
14269        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14270        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14271            self.epoch.as_mut().map(|field| field as _)
14272        }
14273        ///Returns a mutable reference to `epoch`.
14274        ///If the field is unset, it is first initialized with the default value.
14275        pub fn epoch_mut(&mut self) -> &mut u64 {
14276            self.epoch.get_or_insert_default()
14277        }
14278        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14279        pub fn epoch_opt(&self) -> Option<u64> {
14280            self.epoch.as_ref().map(|field| *field)
14281        }
14282        ///Sets `epoch` with the provided value.
14283        pub fn set_epoch(&mut self, field: u64) {
14284            self.epoch = Some(field);
14285        }
14286        ///Sets `epoch` with the provided value.
14287        pub fn with_epoch(mut self, field: u64) -> Self {
14288            self.set_epoch(field);
14289            self
14290        }
14291        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
14292        pub fn gas_used(&self) -> &super::GasCostSummary {
14293            self.gas_used
14294                .as_ref()
14295                .map(|field| field as _)
14296                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14297        }
14298        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14299        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14300            self.gas_used.as_mut().map(|field| field as _)
14301        }
14302        ///Returns a mutable reference to `gas_used`.
14303        ///If the field is unset, it is first initialized with the default value.
14304        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14305            self.gas_used.get_or_insert_default()
14306        }
14307        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
14308        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14309            self.gas_used.as_ref().map(|field| field as _)
14310        }
14311        ///Sets `gas_used` with the provided value.
14312        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14313            self.gas_used = Some(field.into().into());
14314        }
14315        ///Sets `gas_used` with the provided value.
14316        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14317            mut self,
14318            field: T,
14319        ) -> Self {
14320            self.set_gas_used(field.into());
14321            self
14322        }
14323        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14324        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14325            self.transaction_digest.as_mut().map(|field| field as _)
14326        }
14327        ///Returns a mutable reference to `transaction_digest`.
14328        ///If the field is unset, it is first initialized with the default value.
14329        pub fn transaction_digest_mut(&mut self) -> &mut String {
14330            self.transaction_digest.get_or_insert_default()
14331        }
14332        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14333        pub fn transaction_digest_opt(&self) -> Option<&str> {
14334            self.transaction_digest.as_ref().map(|field| field as _)
14335        }
14336        ///Sets `transaction_digest` with the provided value.
14337        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14338            self.transaction_digest = Some(field.into().into());
14339        }
14340        ///Sets `transaction_digest` with the provided value.
14341        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14342            self.set_transaction_digest(field.into());
14343            self
14344        }
14345        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14346        pub fn gas_object(&self) -> &super::ChangedObject {
14347            self.gas_object
14348                .as_ref()
14349                .map(|field| field as _)
14350                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14351        }
14352        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14353        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14354            self.gas_object.as_mut().map(|field| field as _)
14355        }
14356        ///Returns a mutable reference to `gas_object`.
14357        ///If the field is unset, it is first initialized with the default value.
14358        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14359            self.gas_object.get_or_insert_default()
14360        }
14361        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14362        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14363            self.gas_object.as_ref().map(|field| field as _)
14364        }
14365        ///Sets `gas_object` with the provided value.
14366        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14367            self.gas_object = Some(field.into().into());
14368        }
14369        ///Sets `gas_object` with the provided value.
14370        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14371            mut self,
14372            field: T,
14373        ) -> Self {
14374            self.set_gas_object(field.into());
14375            self
14376        }
14377        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14378        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14379            self.events_digest.as_mut().map(|field| field as _)
14380        }
14381        ///Returns a mutable reference to `events_digest`.
14382        ///If the field is unset, it is first initialized with the default value.
14383        pub fn events_digest_mut(&mut self) -> &mut String {
14384            self.events_digest.get_or_insert_default()
14385        }
14386        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14387        pub fn events_digest_opt(&self) -> Option<&str> {
14388            self.events_digest.as_ref().map(|field| field as _)
14389        }
14390        ///Sets `events_digest` with the provided value.
14391        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14392            self.events_digest = Some(field.into().into());
14393        }
14394        ///Sets `events_digest` with the provided value.
14395        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14396            self.set_events_digest(field.into());
14397            self
14398        }
14399        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14400        pub fn dependencies(&self) -> &[String] {
14401            &self.dependencies
14402        }
14403        ///Returns a mutable reference to `dependencies`.
14404        ///If the field is unset, it is first initialized with the default value.
14405        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14406            &mut self.dependencies
14407        }
14408        ///Sets `dependencies` with the provided value.
14409        pub fn set_dependencies(&mut self, field: Vec<String>) {
14410            self.dependencies = field;
14411        }
14412        ///Sets `dependencies` with the provided value.
14413        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14414            self.set_dependencies(field);
14415            self
14416        }
14417        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14418        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14419            self.lamport_version.as_mut().map(|field| field as _)
14420        }
14421        ///Returns a mutable reference to `lamport_version`.
14422        ///If the field is unset, it is first initialized with the default value.
14423        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14424            self.lamport_version.get_or_insert_default()
14425        }
14426        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14427        pub fn lamport_version_opt(&self) -> Option<u64> {
14428            self.lamport_version.as_ref().map(|field| *field)
14429        }
14430        ///Sets `lamport_version` with the provided value.
14431        pub fn set_lamport_version(&mut self, field: u64) {
14432            self.lamport_version = Some(field);
14433        }
14434        ///Sets `lamport_version` with the provided value.
14435        pub fn with_lamport_version(mut self, field: u64) -> Self {
14436            self.set_lamport_version(field);
14437            self
14438        }
14439        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14440        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14441            &self.changed_objects
14442        }
14443        ///Returns a mutable reference to `changed_objects`.
14444        ///If the field is unset, it is first initialized with the default value.
14445        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14446            &mut self.changed_objects
14447        }
14448        ///Sets `changed_objects` with the provided value.
14449        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14450            self.changed_objects = field;
14451        }
14452        ///Sets `changed_objects` with the provided value.
14453        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14454            self.set_changed_objects(field);
14455            self
14456        }
14457        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14458        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14459            &self.unchanged_consensus_objects
14460        }
14461        ///Returns a mutable reference to `unchanged_consensus_objects`.
14462        ///If the field is unset, it is first initialized with the default value.
14463        pub fn unchanged_consensus_objects_mut(
14464            &mut self,
14465        ) -> &mut Vec<super::UnchangedConsensusObject> {
14466            &mut self.unchanged_consensus_objects
14467        }
14468        ///Sets `unchanged_consensus_objects` with the provided value.
14469        pub fn set_unchanged_consensus_objects(
14470            &mut self,
14471            field: Vec<super::UnchangedConsensusObject>,
14472        ) {
14473            self.unchanged_consensus_objects = field;
14474        }
14475        ///Sets `unchanged_consensus_objects` with the provided value.
14476        pub fn with_unchanged_consensus_objects(
14477            mut self,
14478            field: Vec<super::UnchangedConsensusObject>,
14479        ) -> Self {
14480            self.set_unchanged_consensus_objects(field);
14481            self
14482        }
14483        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14484        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14485            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14486        }
14487        ///Returns a mutable reference to `auxiliary_data_digest`.
14488        ///If the field is unset, it is first initialized with the default value.
14489        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14490            self.auxiliary_data_digest.get_or_insert_default()
14491        }
14492        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14493        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14494            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14495        }
14496        ///Sets `auxiliary_data_digest` with the provided value.
14497        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14498            self.auxiliary_data_digest = Some(field.into().into());
14499        }
14500        ///Sets `auxiliary_data_digest` with the provided value.
14501        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14502            self.set_auxiliary_data_digest(field.into());
14503            self
14504        }
14505        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14506        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14507            &self.unchanged_loaded_runtime_objects
14508        }
14509        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14510        ///If the field is unset, it is first initialized with the default value.
14511        pub fn unchanged_loaded_runtime_objects_mut(
14512            &mut self,
14513        ) -> &mut Vec<super::ObjectReference> {
14514            &mut self.unchanged_loaded_runtime_objects
14515        }
14516        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14517        pub fn set_unchanged_loaded_runtime_objects(
14518            &mut self,
14519            field: Vec<super::ObjectReference>,
14520        ) {
14521            self.unchanged_loaded_runtime_objects = field;
14522        }
14523        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14524        pub fn with_unchanged_loaded_runtime_objects(
14525            mut self,
14526            field: Vec<super::ObjectReference>,
14527        ) -> Self {
14528            self.set_unchanged_loaded_runtime_objects(field);
14529            self
14530        }
14531    }
14532    impl super::TransactionEvents {
14533        pub const fn const_default() -> Self {
14534            Self {
14535                bcs: None,
14536                digest: None,
14537                events: Vec::new(),
14538            }
14539        }
14540        #[doc(hidden)]
14541        pub fn default_instance() -> &'static Self {
14542            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14543            &DEFAULT
14544        }
14545        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14546        pub fn bcs(&self) -> &super::Bcs {
14547            self.bcs
14548                .as_ref()
14549                .map(|field| field as _)
14550                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14551        }
14552        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14553        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14554            self.bcs.as_mut().map(|field| field as _)
14555        }
14556        ///Returns a mutable reference to `bcs`.
14557        ///If the field is unset, it is first initialized with the default value.
14558        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14559            self.bcs.get_or_insert_default()
14560        }
14561        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14562        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14563            self.bcs.as_ref().map(|field| field as _)
14564        }
14565        ///Sets `bcs` with the provided value.
14566        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14567            self.bcs = Some(field.into().into());
14568        }
14569        ///Sets `bcs` with the provided value.
14570        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14571            self.set_bcs(field.into());
14572            self
14573        }
14574        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14575        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14576            self.digest.as_mut().map(|field| field as _)
14577        }
14578        ///Returns a mutable reference to `digest`.
14579        ///If the field is unset, it is first initialized with the default value.
14580        pub fn digest_mut(&mut self) -> &mut String {
14581            self.digest.get_or_insert_default()
14582        }
14583        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14584        pub fn digest_opt(&self) -> Option<&str> {
14585            self.digest.as_ref().map(|field| field as _)
14586        }
14587        ///Sets `digest` with the provided value.
14588        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14589            self.digest = Some(field.into().into());
14590        }
14591        ///Sets `digest` with the provided value.
14592        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14593            self.set_digest(field.into());
14594            self
14595        }
14596        ///Returns the value of `events`, or the default value if `events` is unset.
14597        pub fn events(&self) -> &[super::Event] {
14598            &self.events
14599        }
14600        ///Returns a mutable reference to `events`.
14601        ///If the field is unset, it is first initialized with the default value.
14602        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14603            &mut self.events
14604        }
14605        ///Sets `events` with the provided value.
14606        pub fn set_events(&mut self, field: Vec<super::Event>) {
14607            self.events = field;
14608        }
14609        ///Sets `events` with the provided value.
14610        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14611            self.set_events(field);
14612            self
14613        }
14614    }
14615    impl super::TransactionExpiration {
14616        pub const fn const_default() -> Self {
14617            Self {
14618                kind: None,
14619                epoch: None,
14620                min_epoch: None,
14621                min_timestamp: None,
14622                max_timestamp: None,
14623                chain: None,
14624                nonce: None,
14625            }
14626        }
14627        #[doc(hidden)]
14628        pub fn default_instance() -> &'static Self {
14629            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14630            &DEFAULT
14631        }
14632        ///Sets `kind` with the provided value.
14633        pub fn with_kind<
14634            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14635        >(mut self, field: T) -> Self {
14636            self.set_kind(field.into());
14637            self
14638        }
14639        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14640        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14641            self.epoch.as_mut().map(|field| field as _)
14642        }
14643        ///Returns a mutable reference to `epoch`.
14644        ///If the field is unset, it is first initialized with the default value.
14645        pub fn epoch_mut(&mut self) -> &mut u64 {
14646            self.epoch.get_or_insert_default()
14647        }
14648        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14649        pub fn epoch_opt(&self) -> Option<u64> {
14650            self.epoch.as_ref().map(|field| *field)
14651        }
14652        ///Sets `epoch` with the provided value.
14653        pub fn set_epoch(&mut self, field: u64) {
14654            self.epoch = Some(field);
14655        }
14656        ///Sets `epoch` with the provided value.
14657        pub fn with_epoch(mut self, field: u64) -> Self {
14658            self.set_epoch(field);
14659            self
14660        }
14661        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14662        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14663            self.min_epoch.as_mut().map(|field| field as _)
14664        }
14665        ///Returns a mutable reference to `min_epoch`.
14666        ///If the field is unset, it is first initialized with the default value.
14667        pub fn min_epoch_mut(&mut self) -> &mut u64 {
14668            self.min_epoch.get_or_insert_default()
14669        }
14670        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14671        pub fn min_epoch_opt(&self) -> Option<u64> {
14672            self.min_epoch.as_ref().map(|field| *field)
14673        }
14674        ///Sets `min_epoch` with the provided value.
14675        pub fn set_min_epoch(&mut self, field: u64) {
14676            self.min_epoch = Some(field);
14677        }
14678        ///Sets `min_epoch` with the provided value.
14679        pub fn with_min_epoch(mut self, field: u64) -> Self {
14680            self.set_min_epoch(field);
14681            self
14682        }
14683        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14684        pub fn min_timestamp_opt_mut(
14685            &mut self,
14686        ) -> Option<&mut ::prost_types::Timestamp> {
14687            self.min_timestamp.as_mut().map(|field| field as _)
14688        }
14689        ///Returns a mutable reference to `min_timestamp`.
14690        ///If the field is unset, it is first initialized with the default value.
14691        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14692            self.min_timestamp.get_or_insert_default()
14693        }
14694        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14695        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14696            self.min_timestamp.as_ref().map(|field| field as _)
14697        }
14698        ///Sets `min_timestamp` with the provided value.
14699        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14700            &mut self,
14701            field: T,
14702        ) {
14703            self.min_timestamp = Some(field.into().into());
14704        }
14705        ///Sets `min_timestamp` with the provided value.
14706        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14707            mut self,
14708            field: T,
14709        ) -> Self {
14710            self.set_min_timestamp(field.into());
14711            self
14712        }
14713        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14714        pub fn max_timestamp_opt_mut(
14715            &mut self,
14716        ) -> Option<&mut ::prost_types::Timestamp> {
14717            self.max_timestamp.as_mut().map(|field| field as _)
14718        }
14719        ///Returns a mutable reference to `max_timestamp`.
14720        ///If the field is unset, it is first initialized with the default value.
14721        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14722            self.max_timestamp.get_or_insert_default()
14723        }
14724        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14725        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14726            self.max_timestamp.as_ref().map(|field| field as _)
14727        }
14728        ///Sets `max_timestamp` with the provided value.
14729        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14730            &mut self,
14731            field: T,
14732        ) {
14733            self.max_timestamp = Some(field.into().into());
14734        }
14735        ///Sets `max_timestamp` with the provided value.
14736        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14737            mut self,
14738            field: T,
14739        ) -> Self {
14740            self.set_max_timestamp(field.into());
14741            self
14742        }
14743        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14744        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14745            self.chain.as_mut().map(|field| field as _)
14746        }
14747        ///Returns a mutable reference to `chain`.
14748        ///If the field is unset, it is first initialized with the default value.
14749        pub fn chain_mut(&mut self) -> &mut String {
14750            self.chain.get_or_insert_default()
14751        }
14752        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
14753        pub fn chain_opt(&self) -> Option<&str> {
14754            self.chain.as_ref().map(|field| field as _)
14755        }
14756        ///Sets `chain` with the provided value.
14757        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14758            self.chain = Some(field.into().into());
14759        }
14760        ///Sets `chain` with the provided value.
14761        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14762            self.set_chain(field.into());
14763            self
14764        }
14765        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14766        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14767            self.nonce.as_mut().map(|field| field as _)
14768        }
14769        ///Returns a mutable reference to `nonce`.
14770        ///If the field is unset, it is first initialized with the default value.
14771        pub fn nonce_mut(&mut self) -> &mut u32 {
14772            self.nonce.get_or_insert_default()
14773        }
14774        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
14775        pub fn nonce_opt(&self) -> Option<u32> {
14776            self.nonce.as_ref().map(|field| *field)
14777        }
14778        ///Sets `nonce` with the provided value.
14779        pub fn set_nonce(&mut self, field: u32) {
14780            self.nonce = Some(field);
14781        }
14782        ///Sets `nonce` with the provided value.
14783        pub fn with_nonce(mut self, field: u32) -> Self {
14784            self.set_nonce(field);
14785            self
14786        }
14787    }
14788    impl super::TransactionKind {
14789        pub const fn const_default() -> Self {
14790            Self { kind: None, data: None }
14791        }
14792        #[doc(hidden)]
14793        pub fn default_instance() -> &'static Self {
14794            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14795            &DEFAULT
14796        }
14797        ///Sets `kind` with the provided value.
14798        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14799            mut self,
14800            field: T,
14801        ) -> Self {
14802            self.set_kind(field.into());
14803            self
14804        }
14805        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14806        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14807            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14808                .data
14809            {
14810                field as _
14811            } else {
14812                super::ProgrammableTransaction::default_instance() as _
14813            }
14814        }
14815        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14816        pub fn programmable_transaction_opt(
14817            &self,
14818        ) -> Option<&super::ProgrammableTransaction> {
14819            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14820                .data
14821            {
14822                Some(field as _)
14823            } else {
14824                None
14825            }
14826        }
14827        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14828        pub fn programmable_transaction_opt_mut(
14829            &mut self,
14830        ) -> Option<&mut super::ProgrammableTransaction> {
14831            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14832                .data
14833            {
14834                Some(field as _)
14835            } else {
14836                None
14837            }
14838        }
14839        ///Returns a mutable reference to `programmable_transaction`.
14840        ///If the field is unset, it is first initialized with the default value.
14841        ///If any other oneof field in the same oneof is set, it will be cleared.
14842        pub fn programmable_transaction_mut(
14843            &mut self,
14844        ) -> &mut super::ProgrammableTransaction {
14845            if self.programmable_transaction_opt_mut().is_none() {
14846                self.data = Some(
14847                    super::transaction_kind::Data::ProgrammableTransaction(
14848                        super::ProgrammableTransaction::default(),
14849                    ),
14850                );
14851            }
14852            self.programmable_transaction_opt_mut().unwrap()
14853        }
14854        ///Sets `programmable_transaction` with the provided value.
14855        ///If any other oneof field in the same oneof is set, it will be cleared.
14856        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14857            &mut self,
14858            field: T,
14859        ) {
14860            self.data = Some(
14861                super::transaction_kind::Data::ProgrammableTransaction(
14862                    field.into().into(),
14863                ),
14864            );
14865        }
14866        ///Sets `programmable_transaction` with the provided value.
14867        ///If any other oneof field in the same oneof is set, it will be cleared.
14868        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14869            mut self,
14870            field: T,
14871        ) -> Self {
14872            self.set_programmable_transaction(field.into());
14873            self
14874        }
14875        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14876        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14877            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14878                field as _
14879            } else {
14880                super::ChangeEpoch::default_instance() as _
14881            }
14882        }
14883        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14884        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14885            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14886                Some(field as _)
14887            } else {
14888                None
14889            }
14890        }
14891        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14892        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14893            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14894                .data
14895            {
14896                Some(field as _)
14897            } else {
14898                None
14899            }
14900        }
14901        ///Returns a mutable reference to `change_epoch`.
14902        ///If the field is unset, it is first initialized with the default value.
14903        ///If any other oneof field in the same oneof is set, it will be cleared.
14904        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14905            if self.change_epoch_opt_mut().is_none() {
14906                self.data = Some(
14907                    super::transaction_kind::Data::ChangeEpoch(
14908                        super::ChangeEpoch::default(),
14909                    ),
14910                );
14911            }
14912            self.change_epoch_opt_mut().unwrap()
14913        }
14914        ///Sets `change_epoch` with the provided value.
14915        ///If any other oneof field in the same oneof is set, it will be cleared.
14916        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14917            self.data = Some(
14918                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14919            );
14920        }
14921        ///Sets `change_epoch` with the provided value.
14922        ///If any other oneof field in the same oneof is set, it will be cleared.
14923        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14924            mut self,
14925            field: T,
14926        ) -> Self {
14927            self.set_change_epoch(field.into());
14928            self
14929        }
14930        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
14931        pub fn genesis(&self) -> &super::GenesisTransaction {
14932            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14933                field as _
14934            } else {
14935                super::GenesisTransaction::default_instance() as _
14936            }
14937        }
14938        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
14939        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14940            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14941                Some(field as _)
14942            } else {
14943                None
14944            }
14945        }
14946        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14947        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14948            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14949                Some(field as _)
14950            } else {
14951                None
14952            }
14953        }
14954        ///Returns a mutable reference to `genesis`.
14955        ///If the field is unset, it is first initialized with the default value.
14956        ///If any other oneof field in the same oneof is set, it will be cleared.
14957        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14958            if self.genesis_opt_mut().is_none() {
14959                self.data = Some(
14960                    super::transaction_kind::Data::Genesis(
14961                        super::GenesisTransaction::default(),
14962                    ),
14963                );
14964            }
14965            self.genesis_opt_mut().unwrap()
14966        }
14967        ///Sets `genesis` with the provided value.
14968        ///If any other oneof field in the same oneof is set, it will be cleared.
14969        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14970            self.data = Some(
14971                super::transaction_kind::Data::Genesis(field.into().into()),
14972            );
14973        }
14974        ///Sets `genesis` with the provided value.
14975        ///If any other oneof field in the same oneof is set, it will be cleared.
14976        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14977            mut self,
14978            field: T,
14979        ) -> Self {
14980            self.set_genesis(field.into());
14981            self
14982        }
14983        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
14984        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14985            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14986                .data
14987            {
14988                field as _
14989            } else {
14990                super::ConsensusCommitPrologue::default_instance() as _
14991            }
14992        }
14993        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
14994        pub fn consensus_commit_prologue_opt(
14995            &self,
14996        ) -> Option<&super::ConsensusCommitPrologue> {
14997            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14998                .data
14999            {
15000                Some(field as _)
15001            } else {
15002                None
15003            }
15004        }
15005        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15006        pub fn consensus_commit_prologue_opt_mut(
15007            &mut self,
15008        ) -> Option<&mut super::ConsensusCommitPrologue> {
15009            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15010                .data
15011            {
15012                Some(field as _)
15013            } else {
15014                None
15015            }
15016        }
15017        ///Returns a mutable reference to `consensus_commit_prologue`.
15018        ///If the field is unset, it is first initialized with the default value.
15019        ///If any other oneof field in the same oneof is set, it will be cleared.
15020        pub fn consensus_commit_prologue_mut(
15021            &mut self,
15022        ) -> &mut super::ConsensusCommitPrologue {
15023            if self.consensus_commit_prologue_opt_mut().is_none() {
15024                self.data = Some(
15025                    super::transaction_kind::Data::ConsensusCommitPrologue(
15026                        super::ConsensusCommitPrologue::default(),
15027                    ),
15028                );
15029            }
15030            self.consensus_commit_prologue_opt_mut().unwrap()
15031        }
15032        ///Sets `consensus_commit_prologue` with the provided value.
15033        ///If any other oneof field in the same oneof is set, it will be cleared.
15034        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15035            &mut self,
15036            field: T,
15037        ) {
15038            self.data = Some(
15039                super::transaction_kind::Data::ConsensusCommitPrologue(
15040                    field.into().into(),
15041                ),
15042            );
15043        }
15044        ///Sets `consensus_commit_prologue` with the provided value.
15045        ///If any other oneof field in the same oneof is set, it will be cleared.
15046        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15047            mut self,
15048            field: T,
15049        ) -> Self {
15050            self.set_consensus_commit_prologue(field.into());
15051            self
15052        }
15053        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
15054        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15055            if let Some(
15056                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15057            ) = &self.data
15058            {
15059                field as _
15060            } else {
15061                super::AuthenticatorStateUpdate::default_instance() as _
15062            }
15063        }
15064        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15065        pub fn authenticator_state_update_opt(
15066            &self,
15067        ) -> Option<&super::AuthenticatorStateUpdate> {
15068            if let Some(
15069                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15070            ) = &self.data
15071            {
15072                Some(field as _)
15073            } else {
15074                None
15075            }
15076        }
15077        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15078        pub fn authenticator_state_update_opt_mut(
15079            &mut self,
15080        ) -> Option<&mut super::AuthenticatorStateUpdate> {
15081            if let Some(
15082                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15083            ) = &mut self.data
15084            {
15085                Some(field as _)
15086            } else {
15087                None
15088            }
15089        }
15090        ///Returns a mutable reference to `authenticator_state_update`.
15091        ///If the field is unset, it is first initialized with the default value.
15092        ///If any other oneof field in the same oneof is set, it will be cleared.
15093        pub fn authenticator_state_update_mut(
15094            &mut self,
15095        ) -> &mut super::AuthenticatorStateUpdate {
15096            if self.authenticator_state_update_opt_mut().is_none() {
15097                self.data = Some(
15098                    super::transaction_kind::Data::AuthenticatorStateUpdate(
15099                        super::AuthenticatorStateUpdate::default(),
15100                    ),
15101                );
15102            }
15103            self.authenticator_state_update_opt_mut().unwrap()
15104        }
15105        ///Sets `authenticator_state_update` with the provided value.
15106        ///If any other oneof field in the same oneof is set, it will be cleared.
15107        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15108            &mut self,
15109            field: T,
15110        ) {
15111            self.data = Some(
15112                super::transaction_kind::Data::AuthenticatorStateUpdate(
15113                    field.into().into(),
15114                ),
15115            );
15116        }
15117        ///Sets `authenticator_state_update` with the provided value.
15118        ///If any other oneof field in the same oneof is set, it will be cleared.
15119        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15120            mut self,
15121            field: T,
15122        ) -> Self {
15123            self.set_authenticator_state_update(field.into());
15124            self
15125        }
15126        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
15127        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15128            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15129                field as _
15130            } else {
15131                super::EndOfEpochTransaction::default_instance() as _
15132            }
15133        }
15134        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15135        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15136            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15137                Some(field as _)
15138            } else {
15139                None
15140            }
15141        }
15142        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15143        pub fn end_of_epoch_opt_mut(
15144            &mut self,
15145        ) -> Option<&mut super::EndOfEpochTransaction> {
15146            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15147                .data
15148            {
15149                Some(field as _)
15150            } else {
15151                None
15152            }
15153        }
15154        ///Returns a mutable reference to `end_of_epoch`.
15155        ///If the field is unset, it is first initialized with the default value.
15156        ///If any other oneof field in the same oneof is set, it will be cleared.
15157        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15158            if self.end_of_epoch_opt_mut().is_none() {
15159                self.data = Some(
15160                    super::transaction_kind::Data::EndOfEpoch(
15161                        super::EndOfEpochTransaction::default(),
15162                    ),
15163                );
15164            }
15165            self.end_of_epoch_opt_mut().unwrap()
15166        }
15167        ///Sets `end_of_epoch` with the provided value.
15168        ///If any other oneof field in the same oneof is set, it will be cleared.
15169        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15170            &mut self,
15171            field: T,
15172        ) {
15173            self.data = Some(
15174                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15175            );
15176        }
15177        ///Sets `end_of_epoch` with the provided value.
15178        ///If any other oneof field in the same oneof is set, it will be cleared.
15179        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15180            mut self,
15181            field: T,
15182        ) -> Self {
15183            self.set_end_of_epoch(field.into());
15184            self
15185        }
15186        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
15187        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15188            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15189                .data
15190            {
15191                field as _
15192            } else {
15193                super::RandomnessStateUpdate::default_instance() as _
15194            }
15195        }
15196        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15197        pub fn randomness_state_update_opt(
15198            &self,
15199        ) -> Option<&super::RandomnessStateUpdate> {
15200            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15201                .data
15202            {
15203                Some(field as _)
15204            } else {
15205                None
15206            }
15207        }
15208        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15209        pub fn randomness_state_update_opt_mut(
15210            &mut self,
15211        ) -> Option<&mut super::RandomnessStateUpdate> {
15212            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15213                .data
15214            {
15215                Some(field as _)
15216            } else {
15217                None
15218            }
15219        }
15220        ///Returns a mutable reference to `randomness_state_update`.
15221        ///If the field is unset, it is first initialized with the default value.
15222        ///If any other oneof field in the same oneof is set, it will be cleared.
15223        pub fn randomness_state_update_mut(
15224            &mut self,
15225        ) -> &mut super::RandomnessStateUpdate {
15226            if self.randomness_state_update_opt_mut().is_none() {
15227                self.data = Some(
15228                    super::transaction_kind::Data::RandomnessStateUpdate(
15229                        super::RandomnessStateUpdate::default(),
15230                    ),
15231                );
15232            }
15233            self.randomness_state_update_opt_mut().unwrap()
15234        }
15235        ///Sets `randomness_state_update` with the provided value.
15236        ///If any other oneof field in the same oneof is set, it will be cleared.
15237        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15238            &mut self,
15239            field: T,
15240        ) {
15241            self.data = Some(
15242                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15243            );
15244        }
15245        ///Sets `randomness_state_update` with the provided value.
15246        ///If any other oneof field in the same oneof is set, it will be cleared.
15247        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15248            mut self,
15249            field: T,
15250        ) -> Self {
15251            self.set_randomness_state_update(field.into());
15252            self
15253        }
15254    }
15255    impl super::TransferObjects {
15256        pub const fn const_default() -> Self {
15257            Self {
15258                objects: Vec::new(),
15259                address: None,
15260            }
15261        }
15262        #[doc(hidden)]
15263        pub fn default_instance() -> &'static Self {
15264            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15265            &DEFAULT
15266        }
15267        ///Returns the value of `objects`, or the default value if `objects` is unset.
15268        pub fn objects(&self) -> &[super::Argument] {
15269            &self.objects
15270        }
15271        ///Returns a mutable reference to `objects`.
15272        ///If the field is unset, it is first initialized with the default value.
15273        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15274            &mut self.objects
15275        }
15276        ///Sets `objects` with the provided value.
15277        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15278            self.objects = field;
15279        }
15280        ///Sets `objects` with the provided value.
15281        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15282            self.set_objects(field);
15283            self
15284        }
15285        ///Returns the value of `address`, or the default value if `address` is unset.
15286        pub fn address(&self) -> &super::Argument {
15287            self.address
15288                .as_ref()
15289                .map(|field| field as _)
15290                .unwrap_or_else(|| super::Argument::default_instance() as _)
15291        }
15292        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15293        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15294            self.address.as_mut().map(|field| field as _)
15295        }
15296        ///Returns a mutable reference to `address`.
15297        ///If the field is unset, it is first initialized with the default value.
15298        pub fn address_mut(&mut self) -> &mut super::Argument {
15299            self.address.get_or_insert_default()
15300        }
15301        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15302        pub fn address_opt(&self) -> Option<&super::Argument> {
15303            self.address.as_ref().map(|field| field as _)
15304        }
15305        ///Sets `address` with the provided value.
15306        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15307            self.address = Some(field.into().into());
15308        }
15309        ///Sets `address` with the provided value.
15310        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15311            self.set_address(field.into());
15312            self
15313        }
15314    }
15315    impl super::TypeArgumentError {
15316        pub const fn const_default() -> Self {
15317            Self {
15318                type_argument: None,
15319                kind: None,
15320            }
15321        }
15322        #[doc(hidden)]
15323        pub fn default_instance() -> &'static Self {
15324            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15325            &DEFAULT
15326        }
15327        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15328        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15329            self.type_argument.as_mut().map(|field| field as _)
15330        }
15331        ///Returns a mutable reference to `type_argument`.
15332        ///If the field is unset, it is first initialized with the default value.
15333        pub fn type_argument_mut(&mut self) -> &mut u32 {
15334            self.type_argument.get_or_insert_default()
15335        }
15336        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15337        pub fn type_argument_opt(&self) -> Option<u32> {
15338            self.type_argument.as_ref().map(|field| *field)
15339        }
15340        ///Sets `type_argument` with the provided value.
15341        pub fn set_type_argument(&mut self, field: u32) {
15342            self.type_argument = Some(field);
15343        }
15344        ///Sets `type_argument` with the provided value.
15345        pub fn with_type_argument(mut self, field: u32) -> Self {
15346            self.set_type_argument(field);
15347            self
15348        }
15349        ///Sets `kind` with the provided value.
15350        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15351            mut self,
15352            field: T,
15353        ) -> Self {
15354            self.set_kind(field.into());
15355            self
15356        }
15357    }
15358    impl super::TypeOrigin {
15359        pub const fn const_default() -> Self {
15360            Self {
15361                module_name: None,
15362                datatype_name: None,
15363                package_id: None,
15364            }
15365        }
15366        #[doc(hidden)]
15367        pub fn default_instance() -> &'static Self {
15368            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15369            &DEFAULT
15370        }
15371        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15372        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15373            self.module_name.as_mut().map(|field| field as _)
15374        }
15375        ///Returns a mutable reference to `module_name`.
15376        ///If the field is unset, it is first initialized with the default value.
15377        pub fn module_name_mut(&mut self) -> &mut String {
15378            self.module_name.get_or_insert_default()
15379        }
15380        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15381        pub fn module_name_opt(&self) -> Option<&str> {
15382            self.module_name.as_ref().map(|field| field as _)
15383        }
15384        ///Sets `module_name` with the provided value.
15385        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15386            self.module_name = Some(field.into().into());
15387        }
15388        ///Sets `module_name` with the provided value.
15389        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15390            self.set_module_name(field.into());
15391            self
15392        }
15393        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15394        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15395            self.datatype_name.as_mut().map(|field| field as _)
15396        }
15397        ///Returns a mutable reference to `datatype_name`.
15398        ///If the field is unset, it is first initialized with the default value.
15399        pub fn datatype_name_mut(&mut self) -> &mut String {
15400            self.datatype_name.get_or_insert_default()
15401        }
15402        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15403        pub fn datatype_name_opt(&self) -> Option<&str> {
15404            self.datatype_name.as_ref().map(|field| field as _)
15405        }
15406        ///Sets `datatype_name` with the provided value.
15407        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15408            self.datatype_name = Some(field.into().into());
15409        }
15410        ///Sets `datatype_name` with the provided value.
15411        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15412            self.set_datatype_name(field.into());
15413            self
15414        }
15415        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15416        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15417            self.package_id.as_mut().map(|field| field as _)
15418        }
15419        ///Returns a mutable reference to `package_id`.
15420        ///If the field is unset, it is first initialized with the default value.
15421        pub fn package_id_mut(&mut self) -> &mut String {
15422            self.package_id.get_or_insert_default()
15423        }
15424        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15425        pub fn package_id_opt(&self) -> Option<&str> {
15426            self.package_id.as_ref().map(|field| field as _)
15427        }
15428        ///Sets `package_id` with the provided value.
15429        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15430            self.package_id = Some(field.into().into());
15431        }
15432        ///Sets `package_id` with the provided value.
15433        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15434            self.set_package_id(field.into());
15435            self
15436        }
15437    }
15438    impl super::TypeParameter {
15439        pub const fn const_default() -> Self {
15440            Self {
15441                constraints: Vec::new(),
15442                is_phantom: None,
15443            }
15444        }
15445        #[doc(hidden)]
15446        pub fn default_instance() -> &'static Self {
15447            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15448            &DEFAULT
15449        }
15450        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15451        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15452            self.is_phantom.as_mut().map(|field| field as _)
15453        }
15454        ///Returns a mutable reference to `is_phantom`.
15455        ///If the field is unset, it is first initialized with the default value.
15456        pub fn is_phantom_mut(&mut self) -> &mut bool {
15457            self.is_phantom.get_or_insert_default()
15458        }
15459        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15460        pub fn is_phantom_opt(&self) -> Option<bool> {
15461            self.is_phantom.as_ref().map(|field| *field)
15462        }
15463        ///Sets `is_phantom` with the provided value.
15464        pub fn set_is_phantom(&mut self, field: bool) {
15465            self.is_phantom = Some(field);
15466        }
15467        ///Sets `is_phantom` with the provided value.
15468        pub fn with_is_phantom(mut self, field: bool) -> Self {
15469            self.set_is_phantom(field);
15470            self
15471        }
15472    }
15473    impl super::UnchangedConsensusObject {
15474        pub const fn const_default() -> Self {
15475            Self {
15476                kind: None,
15477                object_id: None,
15478                version: None,
15479                digest: None,
15480                object_type: None,
15481            }
15482        }
15483        #[doc(hidden)]
15484        pub fn default_instance() -> &'static Self {
15485            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15486            &DEFAULT
15487        }
15488        ///Sets `kind` with the provided value.
15489        pub fn with_kind<
15490            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15491        >(mut self, field: T) -> Self {
15492            self.set_kind(field.into());
15493            self
15494        }
15495        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15496        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15497            self.object_id.as_mut().map(|field| field as _)
15498        }
15499        ///Returns a mutable reference to `object_id`.
15500        ///If the field is unset, it is first initialized with the default value.
15501        pub fn object_id_mut(&mut self) -> &mut String {
15502            self.object_id.get_or_insert_default()
15503        }
15504        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15505        pub fn object_id_opt(&self) -> Option<&str> {
15506            self.object_id.as_ref().map(|field| field as _)
15507        }
15508        ///Sets `object_id` with the provided value.
15509        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15510            self.object_id = Some(field.into().into());
15511        }
15512        ///Sets `object_id` with the provided value.
15513        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15514            self.set_object_id(field.into());
15515            self
15516        }
15517        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15518        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15519            self.version.as_mut().map(|field| field as _)
15520        }
15521        ///Returns a mutable reference to `version`.
15522        ///If the field is unset, it is first initialized with the default value.
15523        pub fn version_mut(&mut self) -> &mut u64 {
15524            self.version.get_or_insert_default()
15525        }
15526        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15527        pub fn version_opt(&self) -> Option<u64> {
15528            self.version.as_ref().map(|field| *field)
15529        }
15530        ///Sets `version` with the provided value.
15531        pub fn set_version(&mut self, field: u64) {
15532            self.version = Some(field);
15533        }
15534        ///Sets `version` with the provided value.
15535        pub fn with_version(mut self, field: u64) -> Self {
15536            self.set_version(field);
15537            self
15538        }
15539        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15540        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15541            self.digest.as_mut().map(|field| field as _)
15542        }
15543        ///Returns a mutable reference to `digest`.
15544        ///If the field is unset, it is first initialized with the default value.
15545        pub fn digest_mut(&mut self) -> &mut String {
15546            self.digest.get_or_insert_default()
15547        }
15548        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15549        pub fn digest_opt(&self) -> Option<&str> {
15550            self.digest.as_ref().map(|field| field as _)
15551        }
15552        ///Sets `digest` with the provided value.
15553        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15554            self.digest = Some(field.into().into());
15555        }
15556        ///Sets `digest` with the provided value.
15557        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15558            self.set_digest(field.into());
15559            self
15560        }
15561        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15562        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15563            self.object_type.as_mut().map(|field| field as _)
15564        }
15565        ///Returns a mutable reference to `object_type`.
15566        ///If the field is unset, it is first initialized with the default value.
15567        pub fn object_type_mut(&mut self) -> &mut String {
15568            self.object_type.get_or_insert_default()
15569        }
15570        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15571        pub fn object_type_opt(&self) -> Option<&str> {
15572            self.object_type.as_ref().map(|field| field as _)
15573        }
15574        ///Sets `object_type` with the provided value.
15575        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15576            self.object_type = Some(field.into().into());
15577        }
15578        ///Sets `object_type` with the provided value.
15579        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15580            self.set_object_type(field.into());
15581            self
15582        }
15583    }
15584    impl super::Upgrade {
15585        pub const fn const_default() -> Self {
15586            Self {
15587                modules: Vec::new(),
15588                dependencies: Vec::new(),
15589                package: None,
15590                ticket: None,
15591            }
15592        }
15593        #[doc(hidden)]
15594        pub fn default_instance() -> &'static Self {
15595            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15596            &DEFAULT
15597        }
15598        ///Returns the value of `modules`, or the default value if `modules` is unset.
15599        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15600            &self.modules
15601        }
15602        ///Returns a mutable reference to `modules`.
15603        ///If the field is unset, it is first initialized with the default value.
15604        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15605            &mut self.modules
15606        }
15607        ///Sets `modules` with the provided value.
15608        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15609            self.modules = field;
15610        }
15611        ///Sets `modules` with the provided value.
15612        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15613            self.set_modules(field);
15614            self
15615        }
15616        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15617        pub fn dependencies(&self) -> &[String] {
15618            &self.dependencies
15619        }
15620        ///Returns a mutable reference to `dependencies`.
15621        ///If the field is unset, it is first initialized with the default value.
15622        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15623            &mut self.dependencies
15624        }
15625        ///Sets `dependencies` with the provided value.
15626        pub fn set_dependencies(&mut self, field: Vec<String>) {
15627            self.dependencies = field;
15628        }
15629        ///Sets `dependencies` with the provided value.
15630        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15631            self.set_dependencies(field);
15632            self
15633        }
15634        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15635        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15636            self.package.as_mut().map(|field| field as _)
15637        }
15638        ///Returns a mutable reference to `package`.
15639        ///If the field is unset, it is first initialized with the default value.
15640        pub fn package_mut(&mut self) -> &mut String {
15641            self.package.get_or_insert_default()
15642        }
15643        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15644        pub fn package_opt(&self) -> Option<&str> {
15645            self.package.as_ref().map(|field| field as _)
15646        }
15647        ///Sets `package` with the provided value.
15648        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15649            self.package = Some(field.into().into());
15650        }
15651        ///Sets `package` with the provided value.
15652        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15653            self.set_package(field.into());
15654            self
15655        }
15656        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15657        pub fn ticket(&self) -> &super::Argument {
15658            self.ticket
15659                .as_ref()
15660                .map(|field| field as _)
15661                .unwrap_or_else(|| super::Argument::default_instance() as _)
15662        }
15663        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15664        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15665            self.ticket.as_mut().map(|field| field as _)
15666        }
15667        ///Returns a mutable reference to `ticket`.
15668        ///If the field is unset, it is first initialized with the default value.
15669        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15670            self.ticket.get_or_insert_default()
15671        }
15672        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15673        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15674            self.ticket.as_ref().map(|field| field as _)
15675        }
15676        ///Sets `ticket` with the provided value.
15677        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15678            self.ticket = Some(field.into().into());
15679        }
15680        ///Sets `ticket` with the provided value.
15681        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15682            self.set_ticket(field.into());
15683            self
15684        }
15685    }
15686    impl super::UserSignature {
15687        pub const fn const_default() -> Self {
15688            Self {
15689                bcs: None,
15690                scheme: None,
15691                signature: None,
15692            }
15693        }
15694        #[doc(hidden)]
15695        pub fn default_instance() -> &'static Self {
15696            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15697            &DEFAULT
15698        }
15699        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15700        pub fn bcs(&self) -> &super::Bcs {
15701            self.bcs
15702                .as_ref()
15703                .map(|field| field as _)
15704                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15705        }
15706        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15707        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15708            self.bcs.as_mut().map(|field| field as _)
15709        }
15710        ///Returns a mutable reference to `bcs`.
15711        ///If the field is unset, it is first initialized with the default value.
15712        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15713            self.bcs.get_or_insert_default()
15714        }
15715        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15716        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15717            self.bcs.as_ref().map(|field| field as _)
15718        }
15719        ///Sets `bcs` with the provided value.
15720        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15721            self.bcs = Some(field.into().into());
15722        }
15723        ///Sets `bcs` with the provided value.
15724        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15725            self.set_bcs(field.into());
15726            self
15727        }
15728        ///Sets `scheme` with the provided value.
15729        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15730            self.set_scheme(field.into());
15731            self
15732        }
15733        ///Returns the value of `simple`, or the default value if `simple` is unset.
15734        pub fn simple(&self) -> &super::SimpleSignature {
15735            if let Some(super::user_signature::Signature::Simple(field)) = &self
15736                .signature
15737            {
15738                field as _
15739            } else {
15740                super::SimpleSignature::default_instance() as _
15741            }
15742        }
15743        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15744        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15745            if let Some(super::user_signature::Signature::Simple(field)) = &self
15746                .signature
15747            {
15748                Some(field as _)
15749            } else {
15750                None
15751            }
15752        }
15753        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15754        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15755            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15756                .signature
15757            {
15758                Some(field as _)
15759            } else {
15760                None
15761            }
15762        }
15763        ///Returns a mutable reference to `simple`.
15764        ///If the field is unset, it is first initialized with the default value.
15765        ///If any other oneof field in the same oneof is set, it will be cleared.
15766        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15767            if self.simple_opt_mut().is_none() {
15768                self.signature = Some(
15769                    super::user_signature::Signature::Simple(
15770                        super::SimpleSignature::default(),
15771                    ),
15772                );
15773            }
15774            self.simple_opt_mut().unwrap()
15775        }
15776        ///Sets `simple` with the provided value.
15777        ///If any other oneof field in the same oneof is set, it will be cleared.
15778        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15779            self.signature = Some(
15780                super::user_signature::Signature::Simple(field.into().into()),
15781            );
15782        }
15783        ///Sets `simple` with the provided value.
15784        ///If any other oneof field in the same oneof is set, it will be cleared.
15785        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15786            self.set_simple(field.into());
15787            self
15788        }
15789        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15790        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15791            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15792                .signature
15793            {
15794                field as _
15795            } else {
15796                super::MultisigAggregatedSignature::default_instance() as _
15797            }
15798        }
15799        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15800        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15801            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15802                .signature
15803            {
15804                Some(field as _)
15805            } else {
15806                None
15807            }
15808        }
15809        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15810        pub fn multisig_opt_mut(
15811            &mut self,
15812        ) -> Option<&mut super::MultisigAggregatedSignature> {
15813            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15814                .signature
15815            {
15816                Some(field as _)
15817            } else {
15818                None
15819            }
15820        }
15821        ///Returns a mutable reference to `multisig`.
15822        ///If the field is unset, it is first initialized with the default value.
15823        ///If any other oneof field in the same oneof is set, it will be cleared.
15824        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15825            if self.multisig_opt_mut().is_none() {
15826                self.signature = Some(
15827                    super::user_signature::Signature::Multisig(
15828                        super::MultisigAggregatedSignature::default(),
15829                    ),
15830                );
15831            }
15832            self.multisig_opt_mut().unwrap()
15833        }
15834        ///Sets `multisig` with the provided value.
15835        ///If any other oneof field in the same oneof is set, it will be cleared.
15836        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15837            &mut self,
15838            field: T,
15839        ) {
15840            self.signature = Some(
15841                super::user_signature::Signature::Multisig(field.into().into()),
15842            );
15843        }
15844        ///Sets `multisig` with the provided value.
15845        ///If any other oneof field in the same oneof is set, it will be cleared.
15846        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15847            mut self,
15848            field: T,
15849        ) -> Self {
15850            self.set_multisig(field.into());
15851            self
15852        }
15853        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15854        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15855            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15856                .signature
15857            {
15858                field as _
15859            } else {
15860                super::ZkLoginAuthenticator::default_instance() as _
15861            }
15862        }
15863        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15864        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15865            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15866                .signature
15867            {
15868                Some(field as _)
15869            } else {
15870                None
15871            }
15872        }
15873        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15874        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15875            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15876                .signature
15877            {
15878                Some(field as _)
15879            } else {
15880                None
15881            }
15882        }
15883        ///Returns a mutable reference to `zklogin`.
15884        ///If the field is unset, it is first initialized with the default value.
15885        ///If any other oneof field in the same oneof is set, it will be cleared.
15886        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15887            if self.zklogin_opt_mut().is_none() {
15888                self.signature = Some(
15889                    super::user_signature::Signature::Zklogin(
15890                        super::ZkLoginAuthenticator::default(),
15891                    ),
15892                );
15893            }
15894            self.zklogin_opt_mut().unwrap()
15895        }
15896        ///Sets `zklogin` with the provided value.
15897        ///If any other oneof field in the same oneof is set, it will be cleared.
15898        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15899            self.signature = Some(
15900                super::user_signature::Signature::Zklogin(field.into().into()),
15901            );
15902        }
15903        ///Sets `zklogin` with the provided value.
15904        ///If any other oneof field in the same oneof is set, it will be cleared.
15905        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15906            mut self,
15907            field: T,
15908        ) -> Self {
15909            self.set_zklogin(field.into());
15910            self
15911        }
15912        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
15913        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15914            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15915                .signature
15916            {
15917                field as _
15918            } else {
15919                super::PasskeyAuthenticator::default_instance() as _
15920            }
15921        }
15922        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
15923        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15924            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15925                .signature
15926            {
15927                Some(field as _)
15928            } else {
15929                None
15930            }
15931        }
15932        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15933        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15934            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15935                .signature
15936            {
15937                Some(field as _)
15938            } else {
15939                None
15940            }
15941        }
15942        ///Returns a mutable reference to `passkey`.
15943        ///If the field is unset, it is first initialized with the default value.
15944        ///If any other oneof field in the same oneof is set, it will be cleared.
15945        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15946            if self.passkey_opt_mut().is_none() {
15947                self.signature = Some(
15948                    super::user_signature::Signature::Passkey(
15949                        super::PasskeyAuthenticator::default(),
15950                    ),
15951                );
15952            }
15953            self.passkey_opt_mut().unwrap()
15954        }
15955        ///Sets `passkey` with the provided value.
15956        ///If any other oneof field in the same oneof is set, it will be cleared.
15957        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15958            self.signature = Some(
15959                super::user_signature::Signature::Passkey(field.into().into()),
15960            );
15961        }
15962        ///Sets `passkey` with the provided value.
15963        ///If any other oneof field in the same oneof is set, it will be cleared.
15964        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15965            mut self,
15966            field: T,
15967        ) -> Self {
15968            self.set_passkey(field.into());
15969            self
15970        }
15971    }
15972    impl super::Validator {
15973        pub const fn const_default() -> Self {
15974            Self {
15975                name: None,
15976                address: None,
15977                description: None,
15978                image_url: None,
15979                project_url: None,
15980                protocol_public_key: None,
15981                proof_of_possession: None,
15982                network_public_key: None,
15983                worker_public_key: None,
15984                network_address: None,
15985                p2p_address: None,
15986                primary_address: None,
15987                worker_address: None,
15988                next_epoch_protocol_public_key: None,
15989                next_epoch_proof_of_possession: None,
15990                next_epoch_network_public_key: None,
15991                next_epoch_worker_public_key: None,
15992                next_epoch_network_address: None,
15993                next_epoch_p2p_address: None,
15994                next_epoch_primary_address: None,
15995                next_epoch_worker_address: None,
15996                metadata_extra_fields: None,
15997                voting_power: None,
15998                operation_cap_id: None,
15999                gas_price: None,
16000                staking_pool: None,
16001                commission_rate: None,
16002                next_epoch_stake: None,
16003                next_epoch_gas_price: None,
16004                next_epoch_commission_rate: None,
16005                extra_fields: None,
16006            }
16007        }
16008        #[doc(hidden)]
16009        pub fn default_instance() -> &'static Self {
16010            static DEFAULT: super::Validator = super::Validator::const_default();
16011            &DEFAULT
16012        }
16013        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16014        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16015            self.name.as_mut().map(|field| field as _)
16016        }
16017        ///Returns a mutable reference to `name`.
16018        ///If the field is unset, it is first initialized with the default value.
16019        pub fn name_mut(&mut self) -> &mut String {
16020            self.name.get_or_insert_default()
16021        }
16022        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
16023        pub fn name_opt(&self) -> Option<&str> {
16024            self.name.as_ref().map(|field| field as _)
16025        }
16026        ///Sets `name` with the provided value.
16027        pub fn set_name<T: Into<String>>(&mut self, field: T) {
16028            self.name = Some(field.into().into());
16029        }
16030        ///Sets `name` with the provided value.
16031        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16032            self.set_name(field.into());
16033            self
16034        }
16035        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16036        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16037            self.address.as_mut().map(|field| field as _)
16038        }
16039        ///Returns a mutable reference to `address`.
16040        ///If the field is unset, it is first initialized with the default value.
16041        pub fn address_mut(&mut self) -> &mut String {
16042            self.address.get_or_insert_default()
16043        }
16044        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16045        pub fn address_opt(&self) -> Option<&str> {
16046            self.address.as_ref().map(|field| field as _)
16047        }
16048        ///Sets `address` with the provided value.
16049        pub fn set_address<T: Into<String>>(&mut self, field: T) {
16050            self.address = Some(field.into().into());
16051        }
16052        ///Sets `address` with the provided value.
16053        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16054            self.set_address(field.into());
16055            self
16056        }
16057        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16058        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16059            self.description.as_mut().map(|field| field as _)
16060        }
16061        ///Returns a mutable reference to `description`.
16062        ///If the field is unset, it is first initialized with the default value.
16063        pub fn description_mut(&mut self) -> &mut String {
16064            self.description.get_or_insert_default()
16065        }
16066        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
16067        pub fn description_opt(&self) -> Option<&str> {
16068            self.description.as_ref().map(|field| field as _)
16069        }
16070        ///Sets `description` with the provided value.
16071        pub fn set_description<T: Into<String>>(&mut self, field: T) {
16072            self.description = Some(field.into().into());
16073        }
16074        ///Sets `description` with the provided value.
16075        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16076            self.set_description(field.into());
16077            self
16078        }
16079        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16080        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16081            self.image_url.as_mut().map(|field| field as _)
16082        }
16083        ///Returns a mutable reference to `image_url`.
16084        ///If the field is unset, it is first initialized with the default value.
16085        pub fn image_url_mut(&mut self) -> &mut String {
16086            self.image_url.get_or_insert_default()
16087        }
16088        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16089        pub fn image_url_opt(&self) -> Option<&str> {
16090            self.image_url.as_ref().map(|field| field as _)
16091        }
16092        ///Sets `image_url` with the provided value.
16093        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16094            self.image_url = Some(field.into().into());
16095        }
16096        ///Sets `image_url` with the provided value.
16097        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16098            self.set_image_url(field.into());
16099            self
16100        }
16101        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16102        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16103            self.project_url.as_mut().map(|field| field as _)
16104        }
16105        ///Returns a mutable reference to `project_url`.
16106        ///If the field is unset, it is first initialized with the default value.
16107        pub fn project_url_mut(&mut self) -> &mut String {
16108            self.project_url.get_or_insert_default()
16109        }
16110        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16111        pub fn project_url_opt(&self) -> Option<&str> {
16112            self.project_url.as_ref().map(|field| field as _)
16113        }
16114        ///Sets `project_url` with the provided value.
16115        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16116            self.project_url = Some(field.into().into());
16117        }
16118        ///Sets `project_url` with the provided value.
16119        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16120            self.set_project_url(field.into());
16121            self
16122        }
16123        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16124        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16125            self.protocol_public_key.as_ref().map(|field| field as _)
16126        }
16127        ///Sets `protocol_public_key` with the provided value.
16128        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16129            &mut self,
16130            field: T,
16131        ) {
16132            self.protocol_public_key = Some(field.into().into());
16133        }
16134        ///Sets `protocol_public_key` with the provided value.
16135        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16136            mut self,
16137            field: T,
16138        ) -> Self {
16139            self.set_protocol_public_key(field.into());
16140            self
16141        }
16142        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16143        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16144            self.proof_of_possession.as_ref().map(|field| field as _)
16145        }
16146        ///Sets `proof_of_possession` with the provided value.
16147        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16148            &mut self,
16149            field: T,
16150        ) {
16151            self.proof_of_possession = Some(field.into().into());
16152        }
16153        ///Sets `proof_of_possession` with the provided value.
16154        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16155            mut self,
16156            field: T,
16157        ) -> Self {
16158            self.set_proof_of_possession(field.into());
16159            self
16160        }
16161        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16162        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16163            self.network_public_key.as_ref().map(|field| field as _)
16164        }
16165        ///Sets `network_public_key` with the provided value.
16166        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16167            &mut self,
16168            field: T,
16169        ) {
16170            self.network_public_key = Some(field.into().into());
16171        }
16172        ///Sets `network_public_key` with the provided value.
16173        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16174            mut self,
16175            field: T,
16176        ) -> Self {
16177            self.set_network_public_key(field.into());
16178            self
16179        }
16180        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16181        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16182            self.worker_public_key.as_ref().map(|field| field as _)
16183        }
16184        ///Sets `worker_public_key` with the provided value.
16185        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16186            &mut self,
16187            field: T,
16188        ) {
16189            self.worker_public_key = Some(field.into().into());
16190        }
16191        ///Sets `worker_public_key` with the provided value.
16192        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16193            mut self,
16194            field: T,
16195        ) -> Self {
16196            self.set_worker_public_key(field.into());
16197            self
16198        }
16199        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16200        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16201            self.network_address.as_mut().map(|field| field as _)
16202        }
16203        ///Returns a mutable reference to `network_address`.
16204        ///If the field is unset, it is first initialized with the default value.
16205        pub fn network_address_mut(&mut self) -> &mut String {
16206            self.network_address.get_or_insert_default()
16207        }
16208        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16209        pub fn network_address_opt(&self) -> Option<&str> {
16210            self.network_address.as_ref().map(|field| field as _)
16211        }
16212        ///Sets `network_address` with the provided value.
16213        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16214            self.network_address = Some(field.into().into());
16215        }
16216        ///Sets `network_address` with the provided value.
16217        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16218            self.set_network_address(field.into());
16219            self
16220        }
16221        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16222        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16223            self.p2p_address.as_mut().map(|field| field as _)
16224        }
16225        ///Returns a mutable reference to `p2p_address`.
16226        ///If the field is unset, it is first initialized with the default value.
16227        pub fn p2p_address_mut(&mut self) -> &mut String {
16228            self.p2p_address.get_or_insert_default()
16229        }
16230        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16231        pub fn p2p_address_opt(&self) -> Option<&str> {
16232            self.p2p_address.as_ref().map(|field| field as _)
16233        }
16234        ///Sets `p2p_address` with the provided value.
16235        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16236            self.p2p_address = Some(field.into().into());
16237        }
16238        ///Sets `p2p_address` with the provided value.
16239        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16240            self.set_p2p_address(field.into());
16241            self
16242        }
16243        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16244        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16245            self.primary_address.as_mut().map(|field| field as _)
16246        }
16247        ///Returns a mutable reference to `primary_address`.
16248        ///If the field is unset, it is first initialized with the default value.
16249        pub fn primary_address_mut(&mut self) -> &mut String {
16250            self.primary_address.get_or_insert_default()
16251        }
16252        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16253        pub fn primary_address_opt(&self) -> Option<&str> {
16254            self.primary_address.as_ref().map(|field| field as _)
16255        }
16256        ///Sets `primary_address` with the provided value.
16257        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16258            self.primary_address = Some(field.into().into());
16259        }
16260        ///Sets `primary_address` with the provided value.
16261        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16262            self.set_primary_address(field.into());
16263            self
16264        }
16265        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16266        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16267            self.worker_address.as_mut().map(|field| field as _)
16268        }
16269        ///Returns a mutable reference to `worker_address`.
16270        ///If the field is unset, it is first initialized with the default value.
16271        pub fn worker_address_mut(&mut self) -> &mut String {
16272            self.worker_address.get_or_insert_default()
16273        }
16274        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16275        pub fn worker_address_opt(&self) -> Option<&str> {
16276            self.worker_address.as_ref().map(|field| field as _)
16277        }
16278        ///Sets `worker_address` with the provided value.
16279        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16280            self.worker_address = Some(field.into().into());
16281        }
16282        ///Sets `worker_address` with the provided value.
16283        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16284            self.set_worker_address(field.into());
16285            self
16286        }
16287        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16288        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16289            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16290        }
16291        ///Sets `next_epoch_protocol_public_key` with the provided value.
16292        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16293            &mut self,
16294            field: T,
16295        ) {
16296            self.next_epoch_protocol_public_key = Some(field.into().into());
16297        }
16298        ///Sets `next_epoch_protocol_public_key` with the provided value.
16299        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16300            mut self,
16301            field: T,
16302        ) -> Self {
16303            self.set_next_epoch_protocol_public_key(field.into());
16304            self
16305        }
16306        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16307        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16308            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16309        }
16310        ///Sets `next_epoch_proof_of_possession` with the provided value.
16311        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16312            &mut self,
16313            field: T,
16314        ) {
16315            self.next_epoch_proof_of_possession = Some(field.into().into());
16316        }
16317        ///Sets `next_epoch_proof_of_possession` with the provided value.
16318        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16319            mut self,
16320            field: T,
16321        ) -> Self {
16322            self.set_next_epoch_proof_of_possession(field.into());
16323            self
16324        }
16325        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16326        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16327            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16328        }
16329        ///Sets `next_epoch_network_public_key` with the provided value.
16330        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16331            &mut self,
16332            field: T,
16333        ) {
16334            self.next_epoch_network_public_key = Some(field.into().into());
16335        }
16336        ///Sets `next_epoch_network_public_key` with the provided value.
16337        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16338            mut self,
16339            field: T,
16340        ) -> Self {
16341            self.set_next_epoch_network_public_key(field.into());
16342            self
16343        }
16344        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16345        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16346            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16347        }
16348        ///Sets `next_epoch_worker_public_key` with the provided value.
16349        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16350            &mut self,
16351            field: T,
16352        ) {
16353            self.next_epoch_worker_public_key = Some(field.into().into());
16354        }
16355        ///Sets `next_epoch_worker_public_key` with the provided value.
16356        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16357            mut self,
16358            field: T,
16359        ) -> Self {
16360            self.set_next_epoch_worker_public_key(field.into());
16361            self
16362        }
16363        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16364        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16365            self.next_epoch_network_address.as_mut().map(|field| field as _)
16366        }
16367        ///Returns a mutable reference to `next_epoch_network_address`.
16368        ///If the field is unset, it is first initialized with the default value.
16369        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16370            self.next_epoch_network_address.get_or_insert_default()
16371        }
16372        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16373        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16374            self.next_epoch_network_address.as_ref().map(|field| field as _)
16375        }
16376        ///Sets `next_epoch_network_address` with the provided value.
16377        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16378            self.next_epoch_network_address = Some(field.into().into());
16379        }
16380        ///Sets `next_epoch_network_address` with the provided value.
16381        pub fn with_next_epoch_network_address<T: Into<String>>(
16382            mut self,
16383            field: T,
16384        ) -> Self {
16385            self.set_next_epoch_network_address(field.into());
16386            self
16387        }
16388        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16389        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16390            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16391        }
16392        ///Returns a mutable reference to `next_epoch_p2p_address`.
16393        ///If the field is unset, it is first initialized with the default value.
16394        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16395            self.next_epoch_p2p_address.get_or_insert_default()
16396        }
16397        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16398        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16399            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16400        }
16401        ///Sets `next_epoch_p2p_address` with the provided value.
16402        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16403            self.next_epoch_p2p_address = Some(field.into().into());
16404        }
16405        ///Sets `next_epoch_p2p_address` with the provided value.
16406        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16407            self.set_next_epoch_p2p_address(field.into());
16408            self
16409        }
16410        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16411        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16412            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16413        }
16414        ///Returns a mutable reference to `next_epoch_primary_address`.
16415        ///If the field is unset, it is first initialized with the default value.
16416        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16417            self.next_epoch_primary_address.get_or_insert_default()
16418        }
16419        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16420        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16421            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16422        }
16423        ///Sets `next_epoch_primary_address` with the provided value.
16424        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16425            self.next_epoch_primary_address = Some(field.into().into());
16426        }
16427        ///Sets `next_epoch_primary_address` with the provided value.
16428        pub fn with_next_epoch_primary_address<T: Into<String>>(
16429            mut self,
16430            field: T,
16431        ) -> Self {
16432            self.set_next_epoch_primary_address(field.into());
16433            self
16434        }
16435        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16436        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16437            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16438        }
16439        ///Returns a mutable reference to `next_epoch_worker_address`.
16440        ///If the field is unset, it is first initialized with the default value.
16441        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16442            self.next_epoch_worker_address.get_or_insert_default()
16443        }
16444        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16445        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16446            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16447        }
16448        ///Sets `next_epoch_worker_address` with the provided value.
16449        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16450            self.next_epoch_worker_address = Some(field.into().into());
16451        }
16452        ///Sets `next_epoch_worker_address` with the provided value.
16453        pub fn with_next_epoch_worker_address<T: Into<String>>(
16454            mut self,
16455            field: T,
16456        ) -> Self {
16457            self.set_next_epoch_worker_address(field.into());
16458            self
16459        }
16460        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16461        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16462            self.metadata_extra_fields
16463                .as_ref()
16464                .map(|field| field as _)
16465                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16466        }
16467        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16468        pub fn metadata_extra_fields_opt_mut(
16469            &mut self,
16470        ) -> Option<&mut super::MoveTable> {
16471            self.metadata_extra_fields.as_mut().map(|field| field as _)
16472        }
16473        ///Returns a mutable reference to `metadata_extra_fields`.
16474        ///If the field is unset, it is first initialized with the default value.
16475        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16476            self.metadata_extra_fields.get_or_insert_default()
16477        }
16478        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16479        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16480            self.metadata_extra_fields.as_ref().map(|field| field as _)
16481        }
16482        ///Sets `metadata_extra_fields` with the provided value.
16483        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16484            &mut self,
16485            field: T,
16486        ) {
16487            self.metadata_extra_fields = Some(field.into().into());
16488        }
16489        ///Sets `metadata_extra_fields` with the provided value.
16490        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16491            mut self,
16492            field: T,
16493        ) -> Self {
16494            self.set_metadata_extra_fields(field.into());
16495            self
16496        }
16497        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16498        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16499            self.voting_power.as_mut().map(|field| field as _)
16500        }
16501        ///Returns a mutable reference to `voting_power`.
16502        ///If the field is unset, it is first initialized with the default value.
16503        pub fn voting_power_mut(&mut self) -> &mut u64 {
16504            self.voting_power.get_or_insert_default()
16505        }
16506        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16507        pub fn voting_power_opt(&self) -> Option<u64> {
16508            self.voting_power.as_ref().map(|field| *field)
16509        }
16510        ///Sets `voting_power` with the provided value.
16511        pub fn set_voting_power(&mut self, field: u64) {
16512            self.voting_power = Some(field);
16513        }
16514        ///Sets `voting_power` with the provided value.
16515        pub fn with_voting_power(mut self, field: u64) -> Self {
16516            self.set_voting_power(field);
16517            self
16518        }
16519        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16520        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16521            self.operation_cap_id.as_mut().map(|field| field as _)
16522        }
16523        ///Returns a mutable reference to `operation_cap_id`.
16524        ///If the field is unset, it is first initialized with the default value.
16525        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16526            self.operation_cap_id.get_or_insert_default()
16527        }
16528        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16529        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16530            self.operation_cap_id.as_ref().map(|field| field as _)
16531        }
16532        ///Sets `operation_cap_id` with the provided value.
16533        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16534            self.operation_cap_id = Some(field.into().into());
16535        }
16536        ///Sets `operation_cap_id` with the provided value.
16537        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16538            self.set_operation_cap_id(field.into());
16539            self
16540        }
16541        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16542        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16543            self.gas_price.as_mut().map(|field| field as _)
16544        }
16545        ///Returns a mutable reference to `gas_price`.
16546        ///If the field is unset, it is first initialized with the default value.
16547        pub fn gas_price_mut(&mut self) -> &mut u64 {
16548            self.gas_price.get_or_insert_default()
16549        }
16550        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16551        pub fn gas_price_opt(&self) -> Option<u64> {
16552            self.gas_price.as_ref().map(|field| *field)
16553        }
16554        ///Sets `gas_price` with the provided value.
16555        pub fn set_gas_price(&mut self, field: u64) {
16556            self.gas_price = Some(field);
16557        }
16558        ///Sets `gas_price` with the provided value.
16559        pub fn with_gas_price(mut self, field: u64) -> Self {
16560            self.set_gas_price(field);
16561            self
16562        }
16563        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16564        pub fn staking_pool(&self) -> &super::StakingPool {
16565            self.staking_pool
16566                .as_ref()
16567                .map(|field| field as _)
16568                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16569        }
16570        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16571        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16572            self.staking_pool.as_mut().map(|field| field as _)
16573        }
16574        ///Returns a mutable reference to `staking_pool`.
16575        ///If the field is unset, it is first initialized with the default value.
16576        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16577            self.staking_pool.get_or_insert_default()
16578        }
16579        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16580        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16581            self.staking_pool.as_ref().map(|field| field as _)
16582        }
16583        ///Sets `staking_pool` with the provided value.
16584        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16585            self.staking_pool = Some(field.into().into());
16586        }
16587        ///Sets `staking_pool` with the provided value.
16588        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16589            mut self,
16590            field: T,
16591        ) -> Self {
16592            self.set_staking_pool(field.into());
16593            self
16594        }
16595        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16596        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16597            self.commission_rate.as_mut().map(|field| field as _)
16598        }
16599        ///Returns a mutable reference to `commission_rate`.
16600        ///If the field is unset, it is first initialized with the default value.
16601        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16602            self.commission_rate.get_or_insert_default()
16603        }
16604        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16605        pub fn commission_rate_opt(&self) -> Option<u64> {
16606            self.commission_rate.as_ref().map(|field| *field)
16607        }
16608        ///Sets `commission_rate` with the provided value.
16609        pub fn set_commission_rate(&mut self, field: u64) {
16610            self.commission_rate = Some(field);
16611        }
16612        ///Sets `commission_rate` with the provided value.
16613        pub fn with_commission_rate(mut self, field: u64) -> Self {
16614            self.set_commission_rate(field);
16615            self
16616        }
16617        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16618        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16619            self.next_epoch_stake.as_mut().map(|field| field as _)
16620        }
16621        ///Returns a mutable reference to `next_epoch_stake`.
16622        ///If the field is unset, it is first initialized with the default value.
16623        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16624            self.next_epoch_stake.get_or_insert_default()
16625        }
16626        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16627        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16628            self.next_epoch_stake.as_ref().map(|field| *field)
16629        }
16630        ///Sets `next_epoch_stake` with the provided value.
16631        pub fn set_next_epoch_stake(&mut self, field: u64) {
16632            self.next_epoch_stake = Some(field);
16633        }
16634        ///Sets `next_epoch_stake` with the provided value.
16635        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16636            self.set_next_epoch_stake(field);
16637            self
16638        }
16639        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16640        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16641            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16642        }
16643        ///Returns a mutable reference to `next_epoch_gas_price`.
16644        ///If the field is unset, it is first initialized with the default value.
16645        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16646            self.next_epoch_gas_price.get_or_insert_default()
16647        }
16648        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16649        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16650            self.next_epoch_gas_price.as_ref().map(|field| *field)
16651        }
16652        ///Sets `next_epoch_gas_price` with the provided value.
16653        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16654            self.next_epoch_gas_price = Some(field);
16655        }
16656        ///Sets `next_epoch_gas_price` with the provided value.
16657        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16658            self.set_next_epoch_gas_price(field);
16659            self
16660        }
16661        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16662        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16663            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16664        }
16665        ///Returns a mutable reference to `next_epoch_commission_rate`.
16666        ///If the field is unset, it is first initialized with the default value.
16667        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16668            self.next_epoch_commission_rate.get_or_insert_default()
16669        }
16670        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16671        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16672            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16673        }
16674        ///Sets `next_epoch_commission_rate` with the provided value.
16675        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16676            self.next_epoch_commission_rate = Some(field);
16677        }
16678        ///Sets `next_epoch_commission_rate` with the provided value.
16679        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16680            self.set_next_epoch_commission_rate(field);
16681            self
16682        }
16683        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16684        pub fn extra_fields(&self) -> &super::MoveTable {
16685            self.extra_fields
16686                .as_ref()
16687                .map(|field| field as _)
16688                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16689        }
16690        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16691        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16692            self.extra_fields.as_mut().map(|field| field as _)
16693        }
16694        ///Returns a mutable reference to `extra_fields`.
16695        ///If the field is unset, it is first initialized with the default value.
16696        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16697            self.extra_fields.get_or_insert_default()
16698        }
16699        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16700        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16701            self.extra_fields.as_ref().map(|field| field as _)
16702        }
16703        ///Sets `extra_fields` with the provided value.
16704        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16705            self.extra_fields = Some(field.into().into());
16706        }
16707        ///Sets `extra_fields` with the provided value.
16708        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16709            self.set_extra_fields(field.into());
16710            self
16711        }
16712    }
16713    impl super::ValidatorAggregatedSignature {
16714        pub const fn const_default() -> Self {
16715            Self {
16716                epoch: None,
16717                signature: None,
16718                bitmap: None,
16719            }
16720        }
16721        #[doc(hidden)]
16722        pub fn default_instance() -> &'static Self {
16723            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16724            &DEFAULT
16725        }
16726        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16727        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16728            self.epoch.as_mut().map(|field| field as _)
16729        }
16730        ///Returns a mutable reference to `epoch`.
16731        ///If the field is unset, it is first initialized with the default value.
16732        pub fn epoch_mut(&mut self) -> &mut u64 {
16733            self.epoch.get_or_insert_default()
16734        }
16735        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16736        pub fn epoch_opt(&self) -> Option<u64> {
16737            self.epoch.as_ref().map(|field| *field)
16738        }
16739        ///Sets `epoch` with the provided value.
16740        pub fn set_epoch(&mut self, field: u64) {
16741            self.epoch = Some(field);
16742        }
16743        ///Sets `epoch` with the provided value.
16744        pub fn with_epoch(mut self, field: u64) -> Self {
16745            self.set_epoch(field);
16746            self
16747        }
16748        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16749        pub fn signature_opt(&self) -> Option<&[u8]> {
16750            self.signature.as_ref().map(|field| field as _)
16751        }
16752        ///Sets `signature` with the provided value.
16753        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16754            self.signature = Some(field.into().into());
16755        }
16756        ///Sets `signature` with the provided value.
16757        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16758            mut self,
16759            field: T,
16760        ) -> Self {
16761            self.set_signature(field.into());
16762            self
16763        }
16764        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16765        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16766            self.bitmap.as_ref().map(|field| field as _)
16767        }
16768        ///Sets `bitmap` with the provided value.
16769        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16770            self.bitmap = Some(field.into().into());
16771        }
16772        ///Sets `bitmap` with the provided value.
16773        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16774            self.set_bitmap(field.into());
16775            self
16776        }
16777    }
16778    impl super::ValidatorCommittee {
16779        pub const fn const_default() -> Self {
16780            Self {
16781                epoch: None,
16782                members: Vec::new(),
16783            }
16784        }
16785        #[doc(hidden)]
16786        pub fn default_instance() -> &'static Self {
16787            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16788            &DEFAULT
16789        }
16790        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16791        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16792            self.epoch.as_mut().map(|field| field as _)
16793        }
16794        ///Returns a mutable reference to `epoch`.
16795        ///If the field is unset, it is first initialized with the default value.
16796        pub fn epoch_mut(&mut self) -> &mut u64 {
16797            self.epoch.get_or_insert_default()
16798        }
16799        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16800        pub fn epoch_opt(&self) -> Option<u64> {
16801            self.epoch.as_ref().map(|field| *field)
16802        }
16803        ///Sets `epoch` with the provided value.
16804        pub fn set_epoch(&mut self, field: u64) {
16805            self.epoch = Some(field);
16806        }
16807        ///Sets `epoch` with the provided value.
16808        pub fn with_epoch(mut self, field: u64) -> Self {
16809            self.set_epoch(field);
16810            self
16811        }
16812        ///Returns the value of `members`, or the default value if `members` is unset.
16813        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16814            &self.members
16815        }
16816        ///Returns a mutable reference to `members`.
16817        ///If the field is unset, it is first initialized with the default value.
16818        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16819            &mut self.members
16820        }
16821        ///Sets `members` with the provided value.
16822        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16823            self.members = field;
16824        }
16825        ///Sets `members` with the provided value.
16826        pub fn with_members(
16827            mut self,
16828            field: Vec<super::ValidatorCommitteeMember>,
16829        ) -> Self {
16830            self.set_members(field);
16831            self
16832        }
16833    }
16834    impl super::ValidatorCommitteeMember {
16835        pub const fn const_default() -> Self {
16836            Self {
16837                public_key: None,
16838                weight: None,
16839            }
16840        }
16841        #[doc(hidden)]
16842        pub fn default_instance() -> &'static Self {
16843            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16844            &DEFAULT
16845        }
16846        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16847        pub fn public_key_opt(&self) -> Option<&[u8]> {
16848            self.public_key.as_ref().map(|field| field as _)
16849        }
16850        ///Sets `public_key` with the provided value.
16851        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16852            self.public_key = Some(field.into().into());
16853        }
16854        ///Sets `public_key` with the provided value.
16855        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16856            mut self,
16857            field: T,
16858        ) -> Self {
16859            self.set_public_key(field.into());
16860            self
16861        }
16862        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16863        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16864            self.weight.as_mut().map(|field| field as _)
16865        }
16866        ///Returns a mutable reference to `weight`.
16867        ///If the field is unset, it is first initialized with the default value.
16868        pub fn weight_mut(&mut self) -> &mut u64 {
16869            self.weight.get_or_insert_default()
16870        }
16871        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16872        pub fn weight_opt(&self) -> Option<u64> {
16873            self.weight.as_ref().map(|field| *field)
16874        }
16875        ///Sets `weight` with the provided value.
16876        pub fn set_weight(&mut self, field: u64) {
16877            self.weight = Some(field);
16878        }
16879        ///Sets `weight` with the provided value.
16880        pub fn with_weight(mut self, field: u64) -> Self {
16881            self.set_weight(field);
16882            self
16883        }
16884    }
16885    impl super::ValidatorExecutionTimeObservation {
16886        pub const fn const_default() -> Self {
16887            Self {
16888                validator: None,
16889                duration: None,
16890            }
16891        }
16892        #[doc(hidden)]
16893        pub fn default_instance() -> &'static Self {
16894            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16895            &DEFAULT
16896        }
16897        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
16898        pub fn validator_opt(&self) -> Option<&[u8]> {
16899            self.validator.as_ref().map(|field| field as _)
16900        }
16901        ///Sets `validator` with the provided value.
16902        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16903            self.validator = Some(field.into().into());
16904        }
16905        ///Sets `validator` with the provided value.
16906        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16907            mut self,
16908            field: T,
16909        ) -> Self {
16910            self.set_validator(field.into());
16911            self
16912        }
16913        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16914        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16915            self.duration.as_mut().map(|field| field as _)
16916        }
16917        ///Returns a mutable reference to `duration`.
16918        ///If the field is unset, it is first initialized with the default value.
16919        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16920            self.duration.get_or_insert_default()
16921        }
16922        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16923        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16924            self.duration.as_ref().map(|field| field as _)
16925        }
16926        ///Sets `duration` with the provided value.
16927        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16928            self.duration = Some(field.into().into());
16929        }
16930        ///Sets `duration` with the provided value.
16931        pub fn with_duration<T: Into<::prost_types::Duration>>(
16932            mut self,
16933            field: T,
16934        ) -> Self {
16935            self.set_duration(field.into());
16936            self
16937        }
16938    }
16939    impl super::ValidatorReportRecord {
16940        pub const fn const_default() -> Self {
16941            Self {
16942                reported: None,
16943                reporters: Vec::new(),
16944            }
16945        }
16946        #[doc(hidden)]
16947        pub fn default_instance() -> &'static Self {
16948            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16949            &DEFAULT
16950        }
16951        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16952        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16953            self.reported.as_mut().map(|field| field as _)
16954        }
16955        ///Returns a mutable reference to `reported`.
16956        ///If the field is unset, it is first initialized with the default value.
16957        pub fn reported_mut(&mut self) -> &mut String {
16958            self.reported.get_or_insert_default()
16959        }
16960        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
16961        pub fn reported_opt(&self) -> Option<&str> {
16962            self.reported.as_ref().map(|field| field as _)
16963        }
16964        ///Sets `reported` with the provided value.
16965        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16966            self.reported = Some(field.into().into());
16967        }
16968        ///Sets `reported` with the provided value.
16969        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16970            self.set_reported(field.into());
16971            self
16972        }
16973        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
16974        pub fn reporters(&self) -> &[String] {
16975            &self.reporters
16976        }
16977        ///Returns a mutable reference to `reporters`.
16978        ///If the field is unset, it is first initialized with the default value.
16979        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16980            &mut self.reporters
16981        }
16982        ///Sets `reporters` with the provided value.
16983        pub fn set_reporters(&mut self, field: Vec<String>) {
16984            self.reporters = field;
16985        }
16986        ///Sets `reporters` with the provided value.
16987        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16988            self.set_reporters(field);
16989            self
16990        }
16991    }
16992    impl super::ValidatorSet {
16993        pub const fn const_default() -> Self {
16994            Self {
16995                total_stake: None,
16996                active_validators: Vec::new(),
16997                pending_active_validators: None,
16998                pending_removals: Vec::new(),
16999                staking_pool_mappings: None,
17000                inactive_validators: None,
17001                validator_candidates: None,
17002                at_risk_validators: std::collections::BTreeMap::new(),
17003                extra_fields: None,
17004            }
17005        }
17006        #[doc(hidden)]
17007        pub fn default_instance() -> &'static Self {
17008            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17009            &DEFAULT
17010        }
17011        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17012        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17013            self.total_stake.as_mut().map(|field| field as _)
17014        }
17015        ///Returns a mutable reference to `total_stake`.
17016        ///If the field is unset, it is first initialized with the default value.
17017        pub fn total_stake_mut(&mut self) -> &mut u64 {
17018            self.total_stake.get_or_insert_default()
17019        }
17020        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
17021        pub fn total_stake_opt(&self) -> Option<u64> {
17022            self.total_stake.as_ref().map(|field| *field)
17023        }
17024        ///Sets `total_stake` with the provided value.
17025        pub fn set_total_stake(&mut self, field: u64) {
17026            self.total_stake = Some(field);
17027        }
17028        ///Sets `total_stake` with the provided value.
17029        pub fn with_total_stake(mut self, field: u64) -> Self {
17030            self.set_total_stake(field);
17031            self
17032        }
17033        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
17034        pub fn active_validators(&self) -> &[super::Validator] {
17035            &self.active_validators
17036        }
17037        ///Returns a mutable reference to `active_validators`.
17038        ///If the field is unset, it is first initialized with the default value.
17039        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17040            &mut self.active_validators
17041        }
17042        ///Sets `active_validators` with the provided value.
17043        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17044            self.active_validators = field;
17045        }
17046        ///Sets `active_validators` with the provided value.
17047        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17048            self.set_active_validators(field);
17049            self
17050        }
17051        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
17052        pub fn pending_active_validators(&self) -> &super::MoveTable {
17053            self.pending_active_validators
17054                .as_ref()
17055                .map(|field| field as _)
17056                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17057        }
17058        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17059        pub fn pending_active_validators_opt_mut(
17060            &mut self,
17061        ) -> Option<&mut super::MoveTable> {
17062            self.pending_active_validators.as_mut().map(|field| field as _)
17063        }
17064        ///Returns a mutable reference to `pending_active_validators`.
17065        ///If the field is unset, it is first initialized with the default value.
17066        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17067            self.pending_active_validators.get_or_insert_default()
17068        }
17069        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17070        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17071            self.pending_active_validators.as_ref().map(|field| field as _)
17072        }
17073        ///Sets `pending_active_validators` with the provided value.
17074        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17075            &mut self,
17076            field: T,
17077        ) {
17078            self.pending_active_validators = Some(field.into().into());
17079        }
17080        ///Sets `pending_active_validators` with the provided value.
17081        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17082            mut self,
17083            field: T,
17084        ) -> Self {
17085            self.set_pending_active_validators(field.into());
17086            self
17087        }
17088        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
17089        pub fn pending_removals(&self) -> &[u64] {
17090            &self.pending_removals
17091        }
17092        ///Returns a mutable reference to `pending_removals`.
17093        ///If the field is unset, it is first initialized with the default value.
17094        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17095            &mut self.pending_removals
17096        }
17097        ///Sets `pending_removals` with the provided value.
17098        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17099            self.pending_removals = field;
17100        }
17101        ///Sets `pending_removals` with the provided value.
17102        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17103            self.set_pending_removals(field);
17104            self
17105        }
17106        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
17107        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17108            self.staking_pool_mappings
17109                .as_ref()
17110                .map(|field| field as _)
17111                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17112        }
17113        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17114        pub fn staking_pool_mappings_opt_mut(
17115            &mut self,
17116        ) -> Option<&mut super::MoveTable> {
17117            self.staking_pool_mappings.as_mut().map(|field| field as _)
17118        }
17119        ///Returns a mutable reference to `staking_pool_mappings`.
17120        ///If the field is unset, it is first initialized with the default value.
17121        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17122            self.staking_pool_mappings.get_or_insert_default()
17123        }
17124        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
17125        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17126            self.staking_pool_mappings.as_ref().map(|field| field as _)
17127        }
17128        ///Sets `staking_pool_mappings` with the provided value.
17129        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17130            &mut self,
17131            field: T,
17132        ) {
17133            self.staking_pool_mappings = Some(field.into().into());
17134        }
17135        ///Sets `staking_pool_mappings` with the provided value.
17136        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17137            mut self,
17138            field: T,
17139        ) -> Self {
17140            self.set_staking_pool_mappings(field.into());
17141            self
17142        }
17143        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17144        pub fn inactive_validators(&self) -> &super::MoveTable {
17145            self.inactive_validators
17146                .as_ref()
17147                .map(|field| field as _)
17148                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17149        }
17150        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17151        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17152            self.inactive_validators.as_mut().map(|field| field as _)
17153        }
17154        ///Returns a mutable reference to `inactive_validators`.
17155        ///If the field is unset, it is first initialized with the default value.
17156        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17157            self.inactive_validators.get_or_insert_default()
17158        }
17159        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17160        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17161            self.inactive_validators.as_ref().map(|field| field as _)
17162        }
17163        ///Sets `inactive_validators` with the provided value.
17164        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17165            self.inactive_validators = Some(field.into().into());
17166        }
17167        ///Sets `inactive_validators` with the provided value.
17168        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17169            mut self,
17170            field: T,
17171        ) -> Self {
17172            self.set_inactive_validators(field.into());
17173            self
17174        }
17175        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17176        pub fn validator_candidates(&self) -> &super::MoveTable {
17177            self.validator_candidates
17178                .as_ref()
17179                .map(|field| field as _)
17180                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17181        }
17182        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17183        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17184            self.validator_candidates.as_mut().map(|field| field as _)
17185        }
17186        ///Returns a mutable reference to `validator_candidates`.
17187        ///If the field is unset, it is first initialized with the default value.
17188        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17189            self.validator_candidates.get_or_insert_default()
17190        }
17191        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17192        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17193            self.validator_candidates.as_ref().map(|field| field as _)
17194        }
17195        ///Sets `validator_candidates` with the provided value.
17196        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17197            self.validator_candidates = Some(field.into().into());
17198        }
17199        ///Sets `validator_candidates` with the provided value.
17200        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17201            mut self,
17202            field: T,
17203        ) -> Self {
17204            self.set_validator_candidates(field.into());
17205            self
17206        }
17207        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17208        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17209            &self.at_risk_validators
17210        }
17211        ///Returns a mutable reference to `at_risk_validators`.
17212        ///If the field is unset, it is first initialized with the default value.
17213        pub fn at_risk_validators_mut(
17214            &mut self,
17215        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17216            &mut self.at_risk_validators
17217        }
17218        ///Sets `at_risk_validators` with the provided value.
17219        pub fn set_at_risk_validators(
17220            &mut self,
17221            field: ::std::collections::BTreeMap<String, u64>,
17222        ) {
17223            self.at_risk_validators = field;
17224        }
17225        ///Sets `at_risk_validators` with the provided value.
17226        pub fn with_at_risk_validators(
17227            mut self,
17228            field: ::std::collections::BTreeMap<String, u64>,
17229        ) -> Self {
17230            self.set_at_risk_validators(field);
17231            self
17232        }
17233        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17234        pub fn extra_fields(&self) -> &super::MoveTable {
17235            self.extra_fields
17236                .as_ref()
17237                .map(|field| field as _)
17238                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17239        }
17240        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17241        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17242            self.extra_fields.as_mut().map(|field| field as _)
17243        }
17244        ///Returns a mutable reference to `extra_fields`.
17245        ///If the field is unset, it is first initialized with the default value.
17246        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17247            self.extra_fields.get_or_insert_default()
17248        }
17249        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17250        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17251            self.extra_fields.as_ref().map(|field| field as _)
17252        }
17253        ///Sets `extra_fields` with the provided value.
17254        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17255            self.extra_fields = Some(field.into().into());
17256        }
17257        ///Sets `extra_fields` with the provided value.
17258        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17259            self.set_extra_fields(field.into());
17260            self
17261        }
17262    }
17263    impl super::VariantDescriptor {
17264        pub const fn const_default() -> Self {
17265            Self {
17266                name: None,
17267                position: None,
17268                fields: Vec::new(),
17269            }
17270        }
17271        #[doc(hidden)]
17272        pub fn default_instance() -> &'static Self {
17273            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17274            &DEFAULT
17275        }
17276        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17277        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17278            self.name.as_mut().map(|field| field as _)
17279        }
17280        ///Returns a mutable reference to `name`.
17281        ///If the field is unset, it is first initialized with the default value.
17282        pub fn name_mut(&mut self) -> &mut String {
17283            self.name.get_or_insert_default()
17284        }
17285        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17286        pub fn name_opt(&self) -> Option<&str> {
17287            self.name.as_ref().map(|field| field as _)
17288        }
17289        ///Sets `name` with the provided value.
17290        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17291            self.name = Some(field.into().into());
17292        }
17293        ///Sets `name` with the provided value.
17294        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17295            self.set_name(field.into());
17296            self
17297        }
17298        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17299        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17300            self.position.as_mut().map(|field| field as _)
17301        }
17302        ///Returns a mutable reference to `position`.
17303        ///If the field is unset, it is first initialized with the default value.
17304        pub fn position_mut(&mut self) -> &mut u32 {
17305            self.position.get_or_insert_default()
17306        }
17307        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17308        pub fn position_opt(&self) -> Option<u32> {
17309            self.position.as_ref().map(|field| *field)
17310        }
17311        ///Sets `position` with the provided value.
17312        pub fn set_position(&mut self, field: u32) {
17313            self.position = Some(field);
17314        }
17315        ///Sets `position` with the provided value.
17316        pub fn with_position(mut self, field: u32) -> Self {
17317            self.set_position(field);
17318            self
17319        }
17320        ///Returns the value of `fields`, or the default value if `fields` is unset.
17321        pub fn fields(&self) -> &[super::FieldDescriptor] {
17322            &self.fields
17323        }
17324        ///Returns a mutable reference to `fields`.
17325        ///If the field is unset, it is first initialized with the default value.
17326        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17327            &mut self.fields
17328        }
17329        ///Sets `fields` with the provided value.
17330        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17331            self.fields = field;
17332        }
17333        ///Sets `fields` with the provided value.
17334        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17335            self.set_fields(field);
17336            self
17337        }
17338    }
17339    impl super::VerifySignatureRequest {
17340        pub const fn const_default() -> Self {
17341            Self {
17342                message: None,
17343                signature: None,
17344                address: None,
17345                jwks: Vec::new(),
17346            }
17347        }
17348        #[doc(hidden)]
17349        pub fn default_instance() -> &'static Self {
17350            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17351            &DEFAULT
17352        }
17353        ///Returns the value of `message`, or the default value if `message` is unset.
17354        pub fn message(&self) -> &super::Bcs {
17355            self.message
17356                .as_ref()
17357                .map(|field| field as _)
17358                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17359        }
17360        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17361        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17362            self.message.as_mut().map(|field| field as _)
17363        }
17364        ///Returns a mutable reference to `message`.
17365        ///If the field is unset, it is first initialized with the default value.
17366        pub fn message_mut(&mut self) -> &mut super::Bcs {
17367            self.message.get_or_insert_default()
17368        }
17369        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17370        pub fn message_opt(&self) -> Option<&super::Bcs> {
17371            self.message.as_ref().map(|field| field as _)
17372        }
17373        ///Sets `message` with the provided value.
17374        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17375            self.message = Some(field.into().into());
17376        }
17377        ///Sets `message` with the provided value.
17378        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17379            self.set_message(field.into());
17380            self
17381        }
17382        ///Returns the value of `signature`, or the default value if `signature` is unset.
17383        pub fn signature(&self) -> &super::UserSignature {
17384            self.signature
17385                .as_ref()
17386                .map(|field| field as _)
17387                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17388        }
17389        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17390        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17391            self.signature.as_mut().map(|field| field as _)
17392        }
17393        ///Returns a mutable reference to `signature`.
17394        ///If the field is unset, it is first initialized with the default value.
17395        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17396            self.signature.get_or_insert_default()
17397        }
17398        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17399        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17400            self.signature.as_ref().map(|field| field as _)
17401        }
17402        ///Sets `signature` with the provided value.
17403        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17404            self.signature = Some(field.into().into());
17405        }
17406        ///Sets `signature` with the provided value.
17407        pub fn with_signature<T: Into<super::UserSignature>>(
17408            mut self,
17409            field: T,
17410        ) -> Self {
17411            self.set_signature(field.into());
17412            self
17413        }
17414        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17415        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17416            self.address.as_mut().map(|field| field as _)
17417        }
17418        ///Returns a mutable reference to `address`.
17419        ///If the field is unset, it is first initialized with the default value.
17420        pub fn address_mut(&mut self) -> &mut String {
17421            self.address.get_or_insert_default()
17422        }
17423        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17424        pub fn address_opt(&self) -> Option<&str> {
17425            self.address.as_ref().map(|field| field as _)
17426        }
17427        ///Sets `address` with the provided value.
17428        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17429            self.address = Some(field.into().into());
17430        }
17431        ///Sets `address` with the provided value.
17432        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17433            self.set_address(field.into());
17434            self
17435        }
17436        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17437        pub fn jwks(&self) -> &[super::ActiveJwk] {
17438            &self.jwks
17439        }
17440        ///Returns a mutable reference to `jwks`.
17441        ///If the field is unset, it is first initialized with the default value.
17442        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17443            &mut self.jwks
17444        }
17445        ///Sets `jwks` with the provided value.
17446        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17447            self.jwks = field;
17448        }
17449        ///Sets `jwks` with the provided value.
17450        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17451            self.set_jwks(field);
17452            self
17453        }
17454    }
17455    impl super::VerifySignatureResponse {
17456        pub const fn const_default() -> Self {
17457            Self {
17458                is_valid: None,
17459                reason: None,
17460            }
17461        }
17462        #[doc(hidden)]
17463        pub fn default_instance() -> &'static Self {
17464            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17465            &DEFAULT
17466        }
17467        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17468        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17469            self.is_valid.as_mut().map(|field| field as _)
17470        }
17471        ///Returns a mutable reference to `is_valid`.
17472        ///If the field is unset, it is first initialized with the default value.
17473        pub fn is_valid_mut(&mut self) -> &mut bool {
17474            self.is_valid.get_or_insert_default()
17475        }
17476        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17477        pub fn is_valid_opt(&self) -> Option<bool> {
17478            self.is_valid.as_ref().map(|field| *field)
17479        }
17480        ///Sets `is_valid` with the provided value.
17481        pub fn set_is_valid(&mut self, field: bool) {
17482            self.is_valid = Some(field);
17483        }
17484        ///Sets `is_valid` with the provided value.
17485        pub fn with_is_valid(mut self, field: bool) -> Self {
17486            self.set_is_valid(field);
17487            self
17488        }
17489        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17490        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17491            self.reason.as_mut().map(|field| field as _)
17492        }
17493        ///Returns a mutable reference to `reason`.
17494        ///If the field is unset, it is first initialized with the default value.
17495        pub fn reason_mut(&mut self) -> &mut String {
17496            self.reason.get_or_insert_default()
17497        }
17498        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17499        pub fn reason_opt(&self) -> Option<&str> {
17500            self.reason.as_ref().map(|field| field as _)
17501        }
17502        ///Sets `reason` with the provided value.
17503        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17504            self.reason = Some(field.into().into());
17505        }
17506        ///Sets `reason` with the provided value.
17507        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17508            self.set_reason(field.into());
17509            self
17510        }
17511    }
17512    impl super::VersionAssignment {
17513        pub const fn const_default() -> Self {
17514            Self {
17515                object_id: None,
17516                start_version: None,
17517                version: None,
17518            }
17519        }
17520        #[doc(hidden)]
17521        pub fn default_instance() -> &'static Self {
17522            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17523            &DEFAULT
17524        }
17525        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17526        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17527            self.object_id.as_mut().map(|field| field as _)
17528        }
17529        ///Returns a mutable reference to `object_id`.
17530        ///If the field is unset, it is first initialized with the default value.
17531        pub fn object_id_mut(&mut self) -> &mut String {
17532            self.object_id.get_or_insert_default()
17533        }
17534        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17535        pub fn object_id_opt(&self) -> Option<&str> {
17536            self.object_id.as_ref().map(|field| field as _)
17537        }
17538        ///Sets `object_id` with the provided value.
17539        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17540            self.object_id = Some(field.into().into());
17541        }
17542        ///Sets `object_id` with the provided value.
17543        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17544            self.set_object_id(field.into());
17545            self
17546        }
17547        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17548        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17549            self.start_version.as_mut().map(|field| field as _)
17550        }
17551        ///Returns a mutable reference to `start_version`.
17552        ///If the field is unset, it is first initialized with the default value.
17553        pub fn start_version_mut(&mut self) -> &mut u64 {
17554            self.start_version.get_or_insert_default()
17555        }
17556        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17557        pub fn start_version_opt(&self) -> Option<u64> {
17558            self.start_version.as_ref().map(|field| *field)
17559        }
17560        ///Sets `start_version` with the provided value.
17561        pub fn set_start_version(&mut self, field: u64) {
17562            self.start_version = Some(field);
17563        }
17564        ///Sets `start_version` with the provided value.
17565        pub fn with_start_version(mut self, field: u64) -> Self {
17566            self.set_start_version(field);
17567            self
17568        }
17569        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17570        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17571            self.version.as_mut().map(|field| field as _)
17572        }
17573        ///Returns a mutable reference to `version`.
17574        ///If the field is unset, it is first initialized with the default value.
17575        pub fn version_mut(&mut self) -> &mut u64 {
17576            self.version.get_or_insert_default()
17577        }
17578        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17579        pub fn version_opt(&self) -> Option<u64> {
17580            self.version.as_ref().map(|field| *field)
17581        }
17582        ///Sets `version` with the provided value.
17583        pub fn set_version(&mut self, field: u64) {
17584            self.version = Some(field);
17585        }
17586        ///Sets `version` with the provided value.
17587        pub fn with_version(mut self, field: u64) -> Self {
17588            self.set_version(field);
17589            self
17590        }
17591    }
17592    impl super::ZkLoginAuthenticator {
17593        pub const fn const_default() -> Self {
17594            Self {
17595                inputs: None,
17596                max_epoch: None,
17597                signature: None,
17598                public_identifier: None,
17599                jwk_id: None,
17600            }
17601        }
17602        #[doc(hidden)]
17603        pub fn default_instance() -> &'static Self {
17604            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17605            &DEFAULT
17606        }
17607        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17608        pub fn inputs(&self) -> &super::ZkLoginInputs {
17609            self.inputs
17610                .as_ref()
17611                .map(|field| field as _)
17612                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17613        }
17614        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17615        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17616            self.inputs.as_mut().map(|field| field as _)
17617        }
17618        ///Returns a mutable reference to `inputs`.
17619        ///If the field is unset, it is first initialized with the default value.
17620        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17621            self.inputs.get_or_insert_default()
17622        }
17623        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17624        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17625            self.inputs.as_ref().map(|field| field as _)
17626        }
17627        ///Sets `inputs` with the provided value.
17628        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17629            self.inputs = Some(field.into().into());
17630        }
17631        ///Sets `inputs` with the provided value.
17632        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17633            self.set_inputs(field.into());
17634            self
17635        }
17636        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17637        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17638            self.max_epoch.as_mut().map(|field| field as _)
17639        }
17640        ///Returns a mutable reference to `max_epoch`.
17641        ///If the field is unset, it is first initialized with the default value.
17642        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17643            self.max_epoch.get_or_insert_default()
17644        }
17645        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17646        pub fn max_epoch_opt(&self) -> Option<u64> {
17647            self.max_epoch.as_ref().map(|field| *field)
17648        }
17649        ///Sets `max_epoch` with the provided value.
17650        pub fn set_max_epoch(&mut self, field: u64) {
17651            self.max_epoch = Some(field);
17652        }
17653        ///Sets `max_epoch` with the provided value.
17654        pub fn with_max_epoch(mut self, field: u64) -> Self {
17655            self.set_max_epoch(field);
17656            self
17657        }
17658        ///Returns the value of `signature`, or the default value if `signature` is unset.
17659        pub fn signature(&self) -> &super::SimpleSignature {
17660            self.signature
17661                .as_ref()
17662                .map(|field| field as _)
17663                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17664        }
17665        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17666        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17667            self.signature.as_mut().map(|field| field as _)
17668        }
17669        ///Returns a mutable reference to `signature`.
17670        ///If the field is unset, it is first initialized with the default value.
17671        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17672            self.signature.get_or_insert_default()
17673        }
17674        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17675        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17676            self.signature.as_ref().map(|field| field as _)
17677        }
17678        ///Sets `signature` with the provided value.
17679        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17680            self.signature = Some(field.into().into());
17681        }
17682        ///Sets `signature` with the provided value.
17683        pub fn with_signature<T: Into<super::SimpleSignature>>(
17684            mut self,
17685            field: T,
17686        ) -> Self {
17687            self.set_signature(field.into());
17688            self
17689        }
17690        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17691        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17692            self.public_identifier
17693                .as_ref()
17694                .map(|field| field as _)
17695                .unwrap_or_else(|| {
17696                    super::ZkLoginPublicIdentifier::default_instance() as _
17697                })
17698        }
17699        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17700        pub fn public_identifier_opt_mut(
17701            &mut self,
17702        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17703            self.public_identifier.as_mut().map(|field| field as _)
17704        }
17705        ///Returns a mutable reference to `public_identifier`.
17706        ///If the field is unset, it is first initialized with the default value.
17707        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17708            self.public_identifier.get_or_insert_default()
17709        }
17710        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17711        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17712            self.public_identifier.as_ref().map(|field| field as _)
17713        }
17714        ///Sets `public_identifier` with the provided value.
17715        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17716            &mut self,
17717            field: T,
17718        ) {
17719            self.public_identifier = Some(field.into().into());
17720        }
17721        ///Sets `public_identifier` with the provided value.
17722        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17723            mut self,
17724            field: T,
17725        ) -> Self {
17726            self.set_public_identifier(field.into());
17727            self
17728        }
17729        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17730        pub fn jwk_id(&self) -> &super::JwkId {
17731            self.jwk_id
17732                .as_ref()
17733                .map(|field| field as _)
17734                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17735        }
17736        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17737        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17738            self.jwk_id.as_mut().map(|field| field as _)
17739        }
17740        ///Returns a mutable reference to `jwk_id`.
17741        ///If the field is unset, it is first initialized with the default value.
17742        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17743            self.jwk_id.get_or_insert_default()
17744        }
17745        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17746        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17747            self.jwk_id.as_ref().map(|field| field as _)
17748        }
17749        ///Sets `jwk_id` with the provided value.
17750        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17751            self.jwk_id = Some(field.into().into());
17752        }
17753        ///Sets `jwk_id` with the provided value.
17754        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17755            self.set_jwk_id(field.into());
17756            self
17757        }
17758    }
17759    impl super::ZkLoginClaim {
17760        pub const fn const_default() -> Self {
17761            Self {
17762                value: None,
17763                index_mod_4: None,
17764            }
17765        }
17766        #[doc(hidden)]
17767        pub fn default_instance() -> &'static Self {
17768            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17769            &DEFAULT
17770        }
17771        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17772        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17773            self.value.as_mut().map(|field| field as _)
17774        }
17775        ///Returns a mutable reference to `value`.
17776        ///If the field is unset, it is first initialized with the default value.
17777        pub fn value_mut(&mut self) -> &mut String {
17778            self.value.get_or_insert_default()
17779        }
17780        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17781        pub fn value_opt(&self) -> Option<&str> {
17782            self.value.as_ref().map(|field| field as _)
17783        }
17784        ///Sets `value` with the provided value.
17785        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17786            self.value = Some(field.into().into());
17787        }
17788        ///Sets `value` with the provided value.
17789        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17790            self.set_value(field.into());
17791            self
17792        }
17793        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17794        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17795            self.index_mod_4.as_mut().map(|field| field as _)
17796        }
17797        ///Returns a mutable reference to `index_mod_4`.
17798        ///If the field is unset, it is first initialized with the default value.
17799        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17800            self.index_mod_4.get_or_insert_default()
17801        }
17802        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17803        pub fn index_mod_4_opt(&self) -> Option<u32> {
17804            self.index_mod_4.as_ref().map(|field| *field)
17805        }
17806        ///Sets `index_mod_4` with the provided value.
17807        pub fn set_index_mod_4(&mut self, field: u32) {
17808            self.index_mod_4 = Some(field);
17809        }
17810        ///Sets `index_mod_4` with the provided value.
17811        pub fn with_index_mod_4(mut self, field: u32) -> Self {
17812            self.set_index_mod_4(field);
17813            self
17814        }
17815    }
17816    impl super::ZkLoginInputs {
17817        pub const fn const_default() -> Self {
17818            Self {
17819                proof_points: None,
17820                iss_base64_details: None,
17821                header_base64: None,
17822                address_seed: None,
17823            }
17824        }
17825        #[doc(hidden)]
17826        pub fn default_instance() -> &'static Self {
17827            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17828            &DEFAULT
17829        }
17830        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17831        pub fn proof_points(&self) -> &super::ZkLoginProof {
17832            self.proof_points
17833                .as_ref()
17834                .map(|field| field as _)
17835                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17836        }
17837        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17838        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17839            self.proof_points.as_mut().map(|field| field as _)
17840        }
17841        ///Returns a mutable reference to `proof_points`.
17842        ///If the field is unset, it is first initialized with the default value.
17843        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17844            self.proof_points.get_or_insert_default()
17845        }
17846        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17847        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17848            self.proof_points.as_ref().map(|field| field as _)
17849        }
17850        ///Sets `proof_points` with the provided value.
17851        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17852            self.proof_points = Some(field.into().into());
17853        }
17854        ///Sets `proof_points` with the provided value.
17855        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17856            mut self,
17857            field: T,
17858        ) -> Self {
17859            self.set_proof_points(field.into());
17860            self
17861        }
17862        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17863        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17864            self.iss_base64_details
17865                .as_ref()
17866                .map(|field| field as _)
17867                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17868        }
17869        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17870        pub fn iss_base64_details_opt_mut(
17871            &mut self,
17872        ) -> Option<&mut super::ZkLoginClaim> {
17873            self.iss_base64_details.as_mut().map(|field| field as _)
17874        }
17875        ///Returns a mutable reference to `iss_base64_details`.
17876        ///If the field is unset, it is first initialized with the default value.
17877        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17878            self.iss_base64_details.get_or_insert_default()
17879        }
17880        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17881        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17882            self.iss_base64_details.as_ref().map(|field| field as _)
17883        }
17884        ///Sets `iss_base64_details` with the provided value.
17885        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17886            &mut self,
17887            field: T,
17888        ) {
17889            self.iss_base64_details = Some(field.into().into());
17890        }
17891        ///Sets `iss_base64_details` with the provided value.
17892        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17893            mut self,
17894            field: T,
17895        ) -> Self {
17896            self.set_iss_base64_details(field.into());
17897            self
17898        }
17899        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17900        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17901            self.header_base64.as_mut().map(|field| field as _)
17902        }
17903        ///Returns a mutable reference to `header_base64`.
17904        ///If the field is unset, it is first initialized with the default value.
17905        pub fn header_base64_mut(&mut self) -> &mut String {
17906            self.header_base64.get_or_insert_default()
17907        }
17908        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
17909        pub fn header_base64_opt(&self) -> Option<&str> {
17910            self.header_base64.as_ref().map(|field| field as _)
17911        }
17912        ///Sets `header_base64` with the provided value.
17913        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17914            self.header_base64 = Some(field.into().into());
17915        }
17916        ///Sets `header_base64` with the provided value.
17917        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17918            self.set_header_base64(field.into());
17919            self
17920        }
17921        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17922        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17923            self.address_seed.as_mut().map(|field| field as _)
17924        }
17925        ///Returns a mutable reference to `address_seed`.
17926        ///If the field is unset, it is first initialized with the default value.
17927        pub fn address_seed_mut(&mut self) -> &mut String {
17928            self.address_seed.get_or_insert_default()
17929        }
17930        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17931        pub fn address_seed_opt(&self) -> Option<&str> {
17932            self.address_seed.as_ref().map(|field| field as _)
17933        }
17934        ///Sets `address_seed` with the provided value.
17935        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17936            self.address_seed = Some(field.into().into());
17937        }
17938        ///Sets `address_seed` with the provided value.
17939        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17940            self.set_address_seed(field.into());
17941            self
17942        }
17943    }
17944    impl super::ZkLoginProof {
17945        pub const fn const_default() -> Self {
17946            Self { a: None, b: None, c: None }
17947        }
17948        #[doc(hidden)]
17949        pub fn default_instance() -> &'static Self {
17950            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17951            &DEFAULT
17952        }
17953        ///Returns the value of `a`, or the default value if `a` is unset.
17954        pub fn a(&self) -> &super::CircomG1 {
17955            self.a
17956                .as_ref()
17957                .map(|field| field as _)
17958                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17959        }
17960        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17961        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17962            self.a.as_mut().map(|field| field as _)
17963        }
17964        ///Returns a mutable reference to `a`.
17965        ///If the field is unset, it is first initialized with the default value.
17966        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17967            self.a.get_or_insert_default()
17968        }
17969        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
17970        pub fn a_opt(&self) -> Option<&super::CircomG1> {
17971            self.a.as_ref().map(|field| field as _)
17972        }
17973        ///Sets `a` with the provided value.
17974        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17975            self.a = Some(field.into().into());
17976        }
17977        ///Sets `a` with the provided value.
17978        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17979            self.set_a(field.into());
17980            self
17981        }
17982        ///Returns the value of `b`, or the default value if `b` is unset.
17983        pub fn b(&self) -> &super::CircomG2 {
17984            self.b
17985                .as_ref()
17986                .map(|field| field as _)
17987                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17988        }
17989        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17990        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17991            self.b.as_mut().map(|field| field as _)
17992        }
17993        ///Returns a mutable reference to `b`.
17994        ///If the field is unset, it is first initialized with the default value.
17995        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17996            self.b.get_or_insert_default()
17997        }
17998        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
17999        pub fn b_opt(&self) -> Option<&super::CircomG2> {
18000            self.b.as_ref().map(|field| field as _)
18001        }
18002        ///Sets `b` with the provided value.
18003        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18004            self.b = Some(field.into().into());
18005        }
18006        ///Sets `b` with the provided value.
18007        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18008            self.set_b(field.into());
18009            self
18010        }
18011        ///Returns the value of `c`, or the default value if `c` is unset.
18012        pub fn c(&self) -> &super::CircomG1 {
18013            self.c
18014                .as_ref()
18015                .map(|field| field as _)
18016                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18017        }
18018        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18019        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18020            self.c.as_mut().map(|field| field as _)
18021        }
18022        ///Returns a mutable reference to `c`.
18023        ///If the field is unset, it is first initialized with the default value.
18024        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18025            self.c.get_or_insert_default()
18026        }
18027        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
18028        pub fn c_opt(&self) -> Option<&super::CircomG1> {
18029            self.c.as_ref().map(|field| field as _)
18030        }
18031        ///Sets `c` with the provided value.
18032        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18033            self.c = Some(field.into().into());
18034        }
18035        ///Sets `c` with the provided value.
18036        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18037            self.set_c(field.into());
18038            self
18039        }
18040    }
18041    impl super::ZkLoginPublicIdentifier {
18042        pub const fn const_default() -> Self {
18043            Self {
18044                iss: None,
18045                address_seed: None,
18046            }
18047        }
18048        #[doc(hidden)]
18049        pub fn default_instance() -> &'static Self {
18050            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18051            &DEFAULT
18052        }
18053        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18054        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18055            self.iss.as_mut().map(|field| field as _)
18056        }
18057        ///Returns a mutable reference to `iss`.
18058        ///If the field is unset, it is first initialized with the default value.
18059        pub fn iss_mut(&mut self) -> &mut String {
18060            self.iss.get_or_insert_default()
18061        }
18062        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
18063        pub fn iss_opt(&self) -> Option<&str> {
18064            self.iss.as_ref().map(|field| field as _)
18065        }
18066        ///Sets `iss` with the provided value.
18067        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18068            self.iss = Some(field.into().into());
18069        }
18070        ///Sets `iss` with the provided value.
18071        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18072            self.set_iss(field.into());
18073            self
18074        }
18075        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18076        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18077            self.address_seed.as_mut().map(|field| field as _)
18078        }
18079        ///Returns a mutable reference to `address_seed`.
18080        ///If the field is unset, it is first initialized with the default value.
18081        pub fn address_seed_mut(&mut self) -> &mut String {
18082            self.address_seed.get_or_insert_default()
18083        }
18084        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18085        pub fn address_seed_opt(&self) -> Option<&str> {
18086            self.address_seed.as_ref().map(|field| field as _)
18087        }
18088        ///Sets `address_seed` with the provided value.
18089        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18090            self.address_seed = Some(field.into().into());
18091        }
18092        ///Sets `address_seed` with the provided value.
18093        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18094            self.set_address_seed(field.into());
18095            self
18096        }
18097    }
18098}