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::Display {
3984        pub const fn const_default() -> Self {
3985            Self { output: None, errors: None }
3986        }
3987        #[doc(hidden)]
3988        pub fn default_instance() -> &'static Self {
3989            static DEFAULT: super::Display = super::Display::const_default();
3990            &DEFAULT
3991        }
3992        ///If `output` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3993        pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3994            self.output.as_mut().map(|field| field as _)
3995        }
3996        ///Returns a mutable reference to `output`.
3997        ///If the field is unset, it is first initialized with the default value.
3998        pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
3999            self.output.get_or_insert_default()
4000        }
4001        ///If `output` is set, returns [`Some`] with the value; otherwise returns [`None`].
4002        pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4003            self.output.as_ref().map(|field| field as _)
4004        }
4005        ///Sets `output` with the provided value.
4006        pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4007            self.output = Some(field.into().into());
4008        }
4009        ///Sets `output` with the provided value.
4010        pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4011            self.set_output(field.into());
4012            self
4013        }
4014        ///If `errors` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4015        pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4016            self.errors.as_mut().map(|field| field as _)
4017        }
4018        ///Returns a mutable reference to `errors`.
4019        ///If the field is unset, it is first initialized with the default value.
4020        pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4021            self.errors.get_or_insert_default()
4022        }
4023        ///If `errors` is set, returns [`Some`] with the value; otherwise returns [`None`].
4024        pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4025            self.errors.as_ref().map(|field| field as _)
4026        }
4027        ///Sets `errors` with the provided value.
4028        pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4029            self.errors = Some(field.into().into());
4030        }
4031        ///Sets `errors` with the provided value.
4032        pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4033            self.set_errors(field.into());
4034            self
4035        }
4036    }
4037    impl super::DynamicField {
4038        pub const fn const_default() -> Self {
4039            Self {
4040                kind: None,
4041                parent: None,
4042                field_id: None,
4043                field_object: None,
4044                name: None,
4045                value: None,
4046                value_type: None,
4047                child_id: None,
4048                child_object: None,
4049            }
4050        }
4051        #[doc(hidden)]
4052        pub fn default_instance() -> &'static Self {
4053            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4054            &DEFAULT
4055        }
4056        ///Sets `kind` with the provided value.
4057        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4058            mut self,
4059            field: T,
4060        ) -> Self {
4061            self.set_kind(field.into());
4062            self
4063        }
4064        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4065        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4066            self.parent.as_mut().map(|field| field as _)
4067        }
4068        ///Returns a mutable reference to `parent`.
4069        ///If the field is unset, it is first initialized with the default value.
4070        pub fn parent_mut(&mut self) -> &mut String {
4071            self.parent.get_or_insert_default()
4072        }
4073        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
4074        pub fn parent_opt(&self) -> Option<&str> {
4075            self.parent.as_ref().map(|field| field as _)
4076        }
4077        ///Sets `parent` with the provided value.
4078        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4079            self.parent = Some(field.into().into());
4080        }
4081        ///Sets `parent` with the provided value.
4082        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4083            self.set_parent(field.into());
4084            self
4085        }
4086        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4087        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4088            self.field_id.as_mut().map(|field| field as _)
4089        }
4090        ///Returns a mutable reference to `field_id`.
4091        ///If the field is unset, it is first initialized with the default value.
4092        pub fn field_id_mut(&mut self) -> &mut String {
4093            self.field_id.get_or_insert_default()
4094        }
4095        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4096        pub fn field_id_opt(&self) -> Option<&str> {
4097            self.field_id.as_ref().map(|field| field as _)
4098        }
4099        ///Sets `field_id` with the provided value.
4100        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4101            self.field_id = Some(field.into().into());
4102        }
4103        ///Sets `field_id` with the provided value.
4104        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4105            self.set_field_id(field.into());
4106            self
4107        }
4108        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4109        pub fn field_object(&self) -> &super::Object {
4110            self.field_object
4111                .as_ref()
4112                .map(|field| field as _)
4113                .unwrap_or_else(|| super::Object::default_instance() as _)
4114        }
4115        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4116        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4117            self.field_object.as_mut().map(|field| field as _)
4118        }
4119        ///Returns a mutable reference to `field_object`.
4120        ///If the field is unset, it is first initialized with the default value.
4121        pub fn field_object_mut(&mut self) -> &mut super::Object {
4122            self.field_object.get_or_insert_default()
4123        }
4124        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4125        pub fn field_object_opt(&self) -> Option<&super::Object> {
4126            self.field_object.as_ref().map(|field| field as _)
4127        }
4128        ///Sets `field_object` with the provided value.
4129        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4130            self.field_object = Some(field.into().into());
4131        }
4132        ///Sets `field_object` with the provided value.
4133        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4134            self.set_field_object(field.into());
4135            self
4136        }
4137        ///Returns the value of `name`, or the default value if `name` is unset.
4138        pub fn name(&self) -> &super::Bcs {
4139            self.name
4140                .as_ref()
4141                .map(|field| field as _)
4142                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4143        }
4144        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4145        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4146            self.name.as_mut().map(|field| field as _)
4147        }
4148        ///Returns a mutable reference to `name`.
4149        ///If the field is unset, it is first initialized with the default value.
4150        pub fn name_mut(&mut self) -> &mut super::Bcs {
4151            self.name.get_or_insert_default()
4152        }
4153        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4154        pub fn name_opt(&self) -> Option<&super::Bcs> {
4155            self.name.as_ref().map(|field| field as _)
4156        }
4157        ///Sets `name` with the provided value.
4158        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4159            self.name = Some(field.into().into());
4160        }
4161        ///Sets `name` with the provided value.
4162        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4163            self.set_name(field.into());
4164            self
4165        }
4166        ///Returns the value of `value`, or the default value if `value` is unset.
4167        pub fn value(&self) -> &super::Bcs {
4168            self.value
4169                .as_ref()
4170                .map(|field| field as _)
4171                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4172        }
4173        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4174        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4175            self.value.as_mut().map(|field| field as _)
4176        }
4177        ///Returns a mutable reference to `value`.
4178        ///If the field is unset, it is first initialized with the default value.
4179        pub fn value_mut(&mut self) -> &mut super::Bcs {
4180            self.value.get_or_insert_default()
4181        }
4182        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4183        pub fn value_opt(&self) -> Option<&super::Bcs> {
4184            self.value.as_ref().map(|field| field as _)
4185        }
4186        ///Sets `value` with the provided value.
4187        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4188            self.value = Some(field.into().into());
4189        }
4190        ///Sets `value` with the provided value.
4191        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4192            self.set_value(field.into());
4193            self
4194        }
4195        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4196        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4197            self.value_type.as_mut().map(|field| field as _)
4198        }
4199        ///Returns a mutable reference to `value_type`.
4200        ///If the field is unset, it is first initialized with the default value.
4201        pub fn value_type_mut(&mut self) -> &mut String {
4202            self.value_type.get_or_insert_default()
4203        }
4204        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4205        pub fn value_type_opt(&self) -> Option<&str> {
4206            self.value_type.as_ref().map(|field| field as _)
4207        }
4208        ///Sets `value_type` with the provided value.
4209        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4210            self.value_type = Some(field.into().into());
4211        }
4212        ///Sets `value_type` with the provided value.
4213        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4214            self.set_value_type(field.into());
4215            self
4216        }
4217        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4218        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4219            self.child_id.as_mut().map(|field| field as _)
4220        }
4221        ///Returns a mutable reference to `child_id`.
4222        ///If the field is unset, it is first initialized with the default value.
4223        pub fn child_id_mut(&mut self) -> &mut String {
4224            self.child_id.get_or_insert_default()
4225        }
4226        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4227        pub fn child_id_opt(&self) -> Option<&str> {
4228            self.child_id.as_ref().map(|field| field as _)
4229        }
4230        ///Sets `child_id` with the provided value.
4231        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4232            self.child_id = Some(field.into().into());
4233        }
4234        ///Sets `child_id` with the provided value.
4235        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4236            self.set_child_id(field.into());
4237            self
4238        }
4239        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4240        pub fn child_object(&self) -> &super::Object {
4241            self.child_object
4242                .as_ref()
4243                .map(|field| field as _)
4244                .unwrap_or_else(|| super::Object::default_instance() as _)
4245        }
4246        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4247        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4248            self.child_object.as_mut().map(|field| field as _)
4249        }
4250        ///Returns a mutable reference to `child_object`.
4251        ///If the field is unset, it is first initialized with the default value.
4252        pub fn child_object_mut(&mut self) -> &mut super::Object {
4253            self.child_object.get_or_insert_default()
4254        }
4255        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4256        pub fn child_object_opt(&self) -> Option<&super::Object> {
4257            self.child_object.as_ref().map(|field| field as _)
4258        }
4259        ///Sets `child_object` with the provided value.
4260        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4261            self.child_object = Some(field.into().into());
4262        }
4263        ///Sets `child_object` with the provided value.
4264        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4265            self.set_child_object(field.into());
4266            self
4267        }
4268    }
4269    impl super::EndOfEpochData {
4270        pub const fn const_default() -> Self {
4271            Self {
4272                next_epoch_committee: Vec::new(),
4273                next_epoch_protocol_version: None,
4274                epoch_commitments: Vec::new(),
4275            }
4276        }
4277        #[doc(hidden)]
4278        pub fn default_instance() -> &'static Self {
4279            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4280            &DEFAULT
4281        }
4282        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4283        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4284            &self.next_epoch_committee
4285        }
4286        ///Returns a mutable reference to `next_epoch_committee`.
4287        ///If the field is unset, it is first initialized with the default value.
4288        pub fn next_epoch_committee_mut(
4289            &mut self,
4290        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4291            &mut self.next_epoch_committee
4292        }
4293        ///Sets `next_epoch_committee` with the provided value.
4294        pub fn set_next_epoch_committee(
4295            &mut self,
4296            field: Vec<super::ValidatorCommitteeMember>,
4297        ) {
4298            self.next_epoch_committee = field;
4299        }
4300        ///Sets `next_epoch_committee` with the provided value.
4301        pub fn with_next_epoch_committee(
4302            mut self,
4303            field: Vec<super::ValidatorCommitteeMember>,
4304        ) -> Self {
4305            self.set_next_epoch_committee(field);
4306            self
4307        }
4308        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4309        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4310            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4311        }
4312        ///Returns a mutable reference to `next_epoch_protocol_version`.
4313        ///If the field is unset, it is first initialized with the default value.
4314        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4315            self.next_epoch_protocol_version.get_or_insert_default()
4316        }
4317        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4318        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4319            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4320        }
4321        ///Sets `next_epoch_protocol_version` with the provided value.
4322        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4323            self.next_epoch_protocol_version = Some(field);
4324        }
4325        ///Sets `next_epoch_protocol_version` with the provided value.
4326        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4327            self.set_next_epoch_protocol_version(field);
4328            self
4329        }
4330        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4331        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4332            &self.epoch_commitments
4333        }
4334        ///Returns a mutable reference to `epoch_commitments`.
4335        ///If the field is unset, it is first initialized with the default value.
4336        pub fn epoch_commitments_mut(
4337            &mut self,
4338        ) -> &mut Vec<super::CheckpointCommitment> {
4339            &mut self.epoch_commitments
4340        }
4341        ///Sets `epoch_commitments` with the provided value.
4342        pub fn set_epoch_commitments(
4343            &mut self,
4344            field: Vec<super::CheckpointCommitment>,
4345        ) {
4346            self.epoch_commitments = field;
4347        }
4348        ///Sets `epoch_commitments` with the provided value.
4349        pub fn with_epoch_commitments(
4350            mut self,
4351            field: Vec<super::CheckpointCommitment>,
4352        ) -> Self {
4353            self.set_epoch_commitments(field);
4354            self
4355        }
4356    }
4357    impl super::EndOfEpochTransaction {
4358        pub const fn const_default() -> Self {
4359            Self { transactions: Vec::new() }
4360        }
4361        #[doc(hidden)]
4362        pub fn default_instance() -> &'static Self {
4363            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4364            &DEFAULT
4365        }
4366        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4367        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4368            &self.transactions
4369        }
4370        ///Returns a mutable reference to `transactions`.
4371        ///If the field is unset, it is first initialized with the default value.
4372        pub fn transactions_mut(
4373            &mut self,
4374        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4375            &mut self.transactions
4376        }
4377        ///Sets `transactions` with the provided value.
4378        pub fn set_transactions(
4379            &mut self,
4380            field: Vec<super::EndOfEpochTransactionKind>,
4381        ) {
4382            self.transactions = field;
4383        }
4384        ///Sets `transactions` with the provided value.
4385        pub fn with_transactions(
4386            mut self,
4387            field: Vec<super::EndOfEpochTransactionKind>,
4388        ) -> Self {
4389            self.set_transactions(field);
4390            self
4391        }
4392    }
4393    impl super::EndOfEpochTransactionKind {
4394        pub const fn const_default() -> Self {
4395            Self { kind: None, data: None }
4396        }
4397        #[doc(hidden)]
4398        pub fn default_instance() -> &'static Self {
4399            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4400            &DEFAULT
4401        }
4402        ///Sets `kind` with the provided value.
4403        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4404            mut self,
4405            field: T,
4406        ) -> Self {
4407            self.set_kind(field.into());
4408            self
4409        }
4410        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4411        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4412            if let Some(
4413                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4414            ) = &self.data
4415            {
4416                field as _
4417            } else {
4418                super::ChangeEpoch::default_instance() as _
4419            }
4420        }
4421        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4422        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4423            if let Some(
4424                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4425            ) = &self.data
4426            {
4427                Some(field as _)
4428            } else {
4429                None
4430            }
4431        }
4432        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4433        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4434            if let Some(
4435                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4436            ) = &mut self.data
4437            {
4438                Some(field as _)
4439            } else {
4440                None
4441            }
4442        }
4443        ///Returns a mutable reference to `change_epoch`.
4444        ///If the field is unset, it is first initialized with the default value.
4445        ///If any other oneof field in the same oneof is set, it will be cleared.
4446        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4447            if self.change_epoch_opt_mut().is_none() {
4448                self.data = Some(
4449                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4450                        super::ChangeEpoch::default(),
4451                    ),
4452                );
4453            }
4454            self.change_epoch_opt_mut().unwrap()
4455        }
4456        ///Sets `change_epoch` with the provided value.
4457        ///If any other oneof field in the same oneof is set, it will be cleared.
4458        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4459            self.data = Some(
4460                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4461                    field.into().into(),
4462                ),
4463            );
4464        }
4465        ///Sets `change_epoch` with the provided value.
4466        ///If any other oneof field in the same oneof is set, it will be cleared.
4467        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4468            mut self,
4469            field: T,
4470        ) -> Self {
4471            self.set_change_epoch(field.into());
4472            self
4473        }
4474        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4475        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4476            if let Some(
4477                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4478                    field,
4479                ),
4480            ) = &self.data
4481            {
4482                field as _
4483            } else {
4484                super::AuthenticatorStateExpire::default_instance() as _
4485            }
4486        }
4487        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4488        pub fn authenticator_state_expire_opt(
4489            &self,
4490        ) -> Option<&super::AuthenticatorStateExpire> {
4491            if let Some(
4492                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4493                    field,
4494                ),
4495            ) = &self.data
4496            {
4497                Some(field as _)
4498            } else {
4499                None
4500            }
4501        }
4502        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4503        pub fn authenticator_state_expire_opt_mut(
4504            &mut self,
4505        ) -> Option<&mut super::AuthenticatorStateExpire> {
4506            if let Some(
4507                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4508                    field,
4509                ),
4510            ) = &mut self.data
4511            {
4512                Some(field as _)
4513            } else {
4514                None
4515            }
4516        }
4517        ///Returns a mutable reference to `authenticator_state_expire`.
4518        ///If the field is unset, it is first initialized with the default value.
4519        ///If any other oneof field in the same oneof is set, it will be cleared.
4520        pub fn authenticator_state_expire_mut(
4521            &mut self,
4522        ) -> &mut super::AuthenticatorStateExpire {
4523            if self.authenticator_state_expire_opt_mut().is_none() {
4524                self.data = Some(
4525                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4526                        super::AuthenticatorStateExpire::default(),
4527                    ),
4528                );
4529            }
4530            self.authenticator_state_expire_opt_mut().unwrap()
4531        }
4532        ///Sets `authenticator_state_expire` with the provided value.
4533        ///If any other oneof field in the same oneof is set, it will be cleared.
4534        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4535            &mut self,
4536            field: T,
4537        ) {
4538            self.data = Some(
4539                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4540                    field.into().into(),
4541                ),
4542            );
4543        }
4544        ///Sets `authenticator_state_expire` with the provided value.
4545        ///If any other oneof field in the same oneof is set, it will be cleared.
4546        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4547            mut self,
4548            field: T,
4549        ) -> Self {
4550            self.set_authenticator_state_expire(field.into());
4551            self
4552        }
4553        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4554        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4555            if let Some(
4556                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4557                    field,
4558                ),
4559            ) = &self.data
4560            {
4561                field as _
4562            } else {
4563                super::ExecutionTimeObservations::default_instance() as _
4564            }
4565        }
4566        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4567        pub fn execution_time_observations_opt(
4568            &self,
4569        ) -> Option<&super::ExecutionTimeObservations> {
4570            if let Some(
4571                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4572                    field,
4573                ),
4574            ) = &self.data
4575            {
4576                Some(field as _)
4577            } else {
4578                None
4579            }
4580        }
4581        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4582        pub fn execution_time_observations_opt_mut(
4583            &mut self,
4584        ) -> Option<&mut super::ExecutionTimeObservations> {
4585            if let Some(
4586                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4587                    field,
4588                ),
4589            ) = &mut self.data
4590            {
4591                Some(field as _)
4592            } else {
4593                None
4594            }
4595        }
4596        ///Returns a mutable reference to `execution_time_observations`.
4597        ///If the field is unset, it is first initialized with the default value.
4598        ///If any other oneof field in the same oneof is set, it will be cleared.
4599        pub fn execution_time_observations_mut(
4600            &mut self,
4601        ) -> &mut super::ExecutionTimeObservations {
4602            if self.execution_time_observations_opt_mut().is_none() {
4603                self.data = Some(
4604                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4605                        super::ExecutionTimeObservations::default(),
4606                    ),
4607                );
4608            }
4609            self.execution_time_observations_opt_mut().unwrap()
4610        }
4611        ///Sets `execution_time_observations` with the provided value.
4612        ///If any other oneof field in the same oneof is set, it will be cleared.
4613        pub fn set_execution_time_observations<
4614            T: Into<super::ExecutionTimeObservations>,
4615        >(&mut self, field: T) {
4616            self.data = Some(
4617                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4618                    field.into().into(),
4619                ),
4620            );
4621        }
4622        ///Sets `execution_time_observations` with the provided value.
4623        ///If any other oneof field in the same oneof is set, it will be cleared.
4624        pub fn with_execution_time_observations<
4625            T: Into<super::ExecutionTimeObservations>,
4626        >(mut self, field: T) -> Self {
4627            self.set_execution_time_observations(field.into());
4628            self
4629        }
4630        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4631        pub fn bridge_chain_id(&self) -> &str {
4632            if let Some(
4633                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4634            ) = &self.data
4635            {
4636                field as _
4637            } else {
4638                ""
4639            }
4640        }
4641        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4642        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4643            if let Some(
4644                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4645            ) = &self.data
4646            {
4647                Some(field as _)
4648            } else {
4649                None
4650            }
4651        }
4652        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4653        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4654            if let Some(
4655                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4656            ) = &mut self.data
4657            {
4658                Some(field as _)
4659            } else {
4660                None
4661            }
4662        }
4663        ///Returns a mutable reference to `bridge_chain_id`.
4664        ///If the field is unset, it is first initialized with the default value.
4665        ///If any other oneof field in the same oneof is set, it will be cleared.
4666        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4667            if self.bridge_chain_id_opt_mut().is_none() {
4668                self.data = Some(
4669                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4670                        String::default(),
4671                    ),
4672                );
4673            }
4674            self.bridge_chain_id_opt_mut().unwrap()
4675        }
4676        ///Sets `bridge_chain_id` with the provided value.
4677        ///If any other oneof field in the same oneof is set, it will be cleared.
4678        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4679            self.data = Some(
4680                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4681                    field.into().into(),
4682                ),
4683            );
4684        }
4685        ///Sets `bridge_chain_id` with the provided value.
4686        ///If any other oneof field in the same oneof is set, it will be cleared.
4687        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4688            self.set_bridge_chain_id(field.into());
4689            self
4690        }
4691        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4692        pub fn bridge_object_version(&self) -> u64 {
4693            if let Some(
4694                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4695            ) = &self.data
4696            {
4697                *field
4698            } else {
4699                0u64
4700            }
4701        }
4702        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4703        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4704            if let Some(
4705                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4706            ) = &self.data
4707            {
4708                Some(*field)
4709            } else {
4710                None
4711            }
4712        }
4713        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4714        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4715            if let Some(
4716                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4717            ) = &mut self.data
4718            {
4719                Some(field as _)
4720            } else {
4721                None
4722            }
4723        }
4724        ///Returns a mutable reference to `bridge_object_version`.
4725        ///If the field is unset, it is first initialized with the default value.
4726        ///If any other oneof field in the same oneof is set, it will be cleared.
4727        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4728            if self.bridge_object_version_opt_mut().is_none() {
4729                self.data = Some(
4730                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4731                        u64::default(),
4732                    ),
4733                );
4734            }
4735            self.bridge_object_version_opt_mut().unwrap()
4736        }
4737        ///Sets `bridge_object_version` with the provided value.
4738        ///If any other oneof field in the same oneof is set, it will be cleared.
4739        pub fn set_bridge_object_version(&mut self, field: u64) {
4740            self.data = Some(
4741                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4742            );
4743        }
4744        ///Sets `bridge_object_version` with the provided value.
4745        ///If any other oneof field in the same oneof is set, it will be cleared.
4746        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4747            self.set_bridge_object_version(field);
4748            self
4749        }
4750        ///Returns the value of `storage_cost`, or the default value if `storage_cost` is unset.
4751        pub fn storage_cost(&self) -> u64 {
4752            if let Some(
4753                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4754            ) = &self.data
4755            {
4756                *field
4757            } else {
4758                0u64
4759            }
4760        }
4761        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
4762        pub fn storage_cost_opt(&self) -> Option<u64> {
4763            if let Some(
4764                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4765            ) = &self.data
4766            {
4767                Some(*field)
4768            } else {
4769                None
4770            }
4771        }
4772        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4773        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4774            if let Some(
4775                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4776            ) = &mut self.data
4777            {
4778                Some(field as _)
4779            } else {
4780                None
4781            }
4782        }
4783        ///Returns a mutable reference to `storage_cost`.
4784        ///If the field is unset, it is first initialized with the default value.
4785        ///If any other oneof field in the same oneof is set, it will be cleared.
4786        pub fn storage_cost_mut(&mut self) -> &mut u64 {
4787            if self.storage_cost_opt_mut().is_none() {
4788                self.data = Some(
4789                    super::end_of_epoch_transaction_kind::Data::StorageCost(
4790                        u64::default(),
4791                    ),
4792                );
4793            }
4794            self.storage_cost_opt_mut().unwrap()
4795        }
4796        ///Sets `storage_cost` with the provided value.
4797        ///If any other oneof field in the same oneof is set, it will be cleared.
4798        pub fn set_storage_cost(&mut self, field: u64) {
4799            self.data = Some(
4800                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4801            );
4802        }
4803        ///Sets `storage_cost` with the provided value.
4804        ///If any other oneof field in the same oneof is set, it will be cleared.
4805        pub fn with_storage_cost(mut self, field: u64) -> Self {
4806            self.set_storage_cost(field);
4807            self
4808        }
4809    }
4810    impl super::Epoch {
4811        pub const fn const_default() -> Self {
4812            Self {
4813                epoch: None,
4814                committee: None,
4815                system_state: None,
4816                first_checkpoint: None,
4817                last_checkpoint: None,
4818                start: None,
4819                end: None,
4820                reference_gas_price: None,
4821                protocol_config: None,
4822            }
4823        }
4824        #[doc(hidden)]
4825        pub fn default_instance() -> &'static Self {
4826            static DEFAULT: super::Epoch = super::Epoch::const_default();
4827            &DEFAULT
4828        }
4829        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4830        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4831            self.epoch.as_mut().map(|field| field as _)
4832        }
4833        ///Returns a mutable reference to `epoch`.
4834        ///If the field is unset, it is first initialized with the default value.
4835        pub fn epoch_mut(&mut self) -> &mut u64 {
4836            self.epoch.get_or_insert_default()
4837        }
4838        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4839        pub fn epoch_opt(&self) -> Option<u64> {
4840            self.epoch.as_ref().map(|field| *field)
4841        }
4842        ///Sets `epoch` with the provided value.
4843        pub fn set_epoch(&mut self, field: u64) {
4844            self.epoch = Some(field);
4845        }
4846        ///Sets `epoch` with the provided value.
4847        pub fn with_epoch(mut self, field: u64) -> Self {
4848            self.set_epoch(field);
4849            self
4850        }
4851        ///Returns the value of `committee`, or the default value if `committee` is unset.
4852        pub fn committee(&self) -> &super::ValidatorCommittee {
4853            self.committee
4854                .as_ref()
4855                .map(|field| field as _)
4856                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4857        }
4858        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4859        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4860            self.committee.as_mut().map(|field| field as _)
4861        }
4862        ///Returns a mutable reference to `committee`.
4863        ///If the field is unset, it is first initialized with the default value.
4864        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4865            self.committee.get_or_insert_default()
4866        }
4867        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4868        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4869            self.committee.as_ref().map(|field| field as _)
4870        }
4871        ///Sets `committee` with the provided value.
4872        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4873            self.committee = Some(field.into().into());
4874        }
4875        ///Sets `committee` with the provided value.
4876        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4877            mut self,
4878            field: T,
4879        ) -> Self {
4880            self.set_committee(field.into());
4881            self
4882        }
4883        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4884        pub fn system_state(&self) -> &super::SystemState {
4885            self.system_state
4886                .as_ref()
4887                .map(|field| field as _)
4888                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4889        }
4890        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4891        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4892            self.system_state.as_mut().map(|field| field as _)
4893        }
4894        ///Returns a mutable reference to `system_state`.
4895        ///If the field is unset, it is first initialized with the default value.
4896        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4897            self.system_state.get_or_insert_default()
4898        }
4899        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4900        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4901            self.system_state.as_ref().map(|field| field as _)
4902        }
4903        ///Sets `system_state` with the provided value.
4904        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4905            self.system_state = Some(field.into().into());
4906        }
4907        ///Sets `system_state` with the provided value.
4908        pub fn with_system_state<T: Into<super::SystemState>>(
4909            mut self,
4910            field: T,
4911        ) -> Self {
4912            self.set_system_state(field.into());
4913            self
4914        }
4915        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4916        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4917            self.first_checkpoint.as_mut().map(|field| field as _)
4918        }
4919        ///Returns a mutable reference to `first_checkpoint`.
4920        ///If the field is unset, it is first initialized with the default value.
4921        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4922            self.first_checkpoint.get_or_insert_default()
4923        }
4924        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4925        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4926            self.first_checkpoint.as_ref().map(|field| *field)
4927        }
4928        ///Sets `first_checkpoint` with the provided value.
4929        pub fn set_first_checkpoint(&mut self, field: u64) {
4930            self.first_checkpoint = Some(field);
4931        }
4932        ///Sets `first_checkpoint` with the provided value.
4933        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4934            self.set_first_checkpoint(field);
4935            self
4936        }
4937        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4938        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4939            self.last_checkpoint.as_mut().map(|field| field as _)
4940        }
4941        ///Returns a mutable reference to `last_checkpoint`.
4942        ///If the field is unset, it is first initialized with the default value.
4943        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4944            self.last_checkpoint.get_or_insert_default()
4945        }
4946        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4947        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4948            self.last_checkpoint.as_ref().map(|field| *field)
4949        }
4950        ///Sets `last_checkpoint` with the provided value.
4951        pub fn set_last_checkpoint(&mut self, field: u64) {
4952            self.last_checkpoint = Some(field);
4953        }
4954        ///Sets `last_checkpoint` with the provided value.
4955        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4956            self.set_last_checkpoint(field);
4957            self
4958        }
4959        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4960        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4961            self.start.as_mut().map(|field| field as _)
4962        }
4963        ///Returns a mutable reference to `start`.
4964        ///If the field is unset, it is first initialized with the default value.
4965        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4966            self.start.get_or_insert_default()
4967        }
4968        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4969        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4970            self.start.as_ref().map(|field| field as _)
4971        }
4972        ///Sets `start` with the provided value.
4973        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4974            self.start = Some(field.into().into());
4975        }
4976        ///Sets `start` with the provided value.
4977        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4978            mut self,
4979            field: T,
4980        ) -> Self {
4981            self.set_start(field.into());
4982            self
4983        }
4984        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4985        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4986            self.end.as_mut().map(|field| field as _)
4987        }
4988        ///Returns a mutable reference to `end`.
4989        ///If the field is unset, it is first initialized with the default value.
4990        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4991            self.end.get_or_insert_default()
4992        }
4993        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4994        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4995            self.end.as_ref().map(|field| field as _)
4996        }
4997        ///Sets `end` with the provided value.
4998        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4999            self.end = Some(field.into().into());
5000        }
5001        ///Sets `end` with the provided value.
5002        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5003            self.set_end(field.into());
5004            self
5005        }
5006        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5007        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5008            self.reference_gas_price.as_mut().map(|field| field as _)
5009        }
5010        ///Returns a mutable reference to `reference_gas_price`.
5011        ///If the field is unset, it is first initialized with the default value.
5012        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5013            self.reference_gas_price.get_or_insert_default()
5014        }
5015        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
5016        pub fn reference_gas_price_opt(&self) -> Option<u64> {
5017            self.reference_gas_price.as_ref().map(|field| *field)
5018        }
5019        ///Sets `reference_gas_price` with the provided value.
5020        pub fn set_reference_gas_price(&mut self, field: u64) {
5021            self.reference_gas_price = Some(field);
5022        }
5023        ///Sets `reference_gas_price` with the provided value.
5024        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5025            self.set_reference_gas_price(field);
5026            self
5027        }
5028        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
5029        pub fn protocol_config(&self) -> &super::ProtocolConfig {
5030            self.protocol_config
5031                .as_ref()
5032                .map(|field| field as _)
5033                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5034        }
5035        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5036        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5037            self.protocol_config.as_mut().map(|field| field as _)
5038        }
5039        ///Returns a mutable reference to `protocol_config`.
5040        ///If the field is unset, it is first initialized with the default value.
5041        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5042            self.protocol_config.get_or_insert_default()
5043        }
5044        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
5045        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5046            self.protocol_config.as_ref().map(|field| field as _)
5047        }
5048        ///Sets `protocol_config` with the provided value.
5049        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5050            self.protocol_config = Some(field.into().into());
5051        }
5052        ///Sets `protocol_config` with the provided value.
5053        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5054            mut self,
5055            field: T,
5056        ) -> Self {
5057            self.set_protocol_config(field.into());
5058            self
5059        }
5060    }
5061    impl super::Event {
5062        pub const fn const_default() -> Self {
5063            Self {
5064                package_id: None,
5065                module: None,
5066                sender: None,
5067                event_type: None,
5068                contents: None,
5069                json: None,
5070            }
5071        }
5072        #[doc(hidden)]
5073        pub fn default_instance() -> &'static Self {
5074            static DEFAULT: super::Event = super::Event::const_default();
5075            &DEFAULT
5076        }
5077        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5078        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5079            self.package_id.as_mut().map(|field| field as _)
5080        }
5081        ///Returns a mutable reference to `package_id`.
5082        ///If the field is unset, it is first initialized with the default value.
5083        pub fn package_id_mut(&mut self) -> &mut String {
5084            self.package_id.get_or_insert_default()
5085        }
5086        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5087        pub fn package_id_opt(&self) -> Option<&str> {
5088            self.package_id.as_ref().map(|field| field as _)
5089        }
5090        ///Sets `package_id` with the provided value.
5091        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5092            self.package_id = Some(field.into().into());
5093        }
5094        ///Sets `package_id` with the provided value.
5095        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5096            self.set_package_id(field.into());
5097            self
5098        }
5099        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5100        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5101            self.module.as_mut().map(|field| field as _)
5102        }
5103        ///Returns a mutable reference to `module`.
5104        ///If the field is unset, it is first initialized with the default value.
5105        pub fn module_mut(&mut self) -> &mut String {
5106            self.module.get_or_insert_default()
5107        }
5108        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5109        pub fn module_opt(&self) -> Option<&str> {
5110            self.module.as_ref().map(|field| field as _)
5111        }
5112        ///Sets `module` with the provided value.
5113        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5114            self.module = Some(field.into().into());
5115        }
5116        ///Sets `module` with the provided value.
5117        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5118            self.set_module(field.into());
5119            self
5120        }
5121        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5122        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5123            self.sender.as_mut().map(|field| field as _)
5124        }
5125        ///Returns a mutable reference to `sender`.
5126        ///If the field is unset, it is first initialized with the default value.
5127        pub fn sender_mut(&mut self) -> &mut String {
5128            self.sender.get_or_insert_default()
5129        }
5130        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5131        pub fn sender_opt(&self) -> Option<&str> {
5132            self.sender.as_ref().map(|field| field as _)
5133        }
5134        ///Sets `sender` with the provided value.
5135        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5136            self.sender = Some(field.into().into());
5137        }
5138        ///Sets `sender` with the provided value.
5139        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5140            self.set_sender(field.into());
5141            self
5142        }
5143        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5144        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5145            self.event_type.as_mut().map(|field| field as _)
5146        }
5147        ///Returns a mutable reference to `event_type`.
5148        ///If the field is unset, it is first initialized with the default value.
5149        pub fn event_type_mut(&mut self) -> &mut String {
5150            self.event_type.get_or_insert_default()
5151        }
5152        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5153        pub fn event_type_opt(&self) -> Option<&str> {
5154            self.event_type.as_ref().map(|field| field as _)
5155        }
5156        ///Sets `event_type` with the provided value.
5157        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5158            self.event_type = Some(field.into().into());
5159        }
5160        ///Sets `event_type` with the provided value.
5161        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5162            self.set_event_type(field.into());
5163            self
5164        }
5165        ///Returns the value of `contents`, or the default value if `contents` is unset.
5166        pub fn contents(&self) -> &super::Bcs {
5167            self.contents
5168                .as_ref()
5169                .map(|field| field as _)
5170                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5171        }
5172        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5173        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5174            self.contents.as_mut().map(|field| field as _)
5175        }
5176        ///Returns a mutable reference to `contents`.
5177        ///If the field is unset, it is first initialized with the default value.
5178        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5179            self.contents.get_or_insert_default()
5180        }
5181        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5182        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5183            self.contents.as_ref().map(|field| field as _)
5184        }
5185        ///Sets `contents` with the provided value.
5186        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5187            self.contents = Some(field.into().into());
5188        }
5189        ///Sets `contents` with the provided value.
5190        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5191            self.set_contents(field.into());
5192            self
5193        }
5194        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5195        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5196            self.json.as_mut().map(|field| field as _)
5197        }
5198        ///Returns a mutable reference to `json`.
5199        ///If the field is unset, it is first initialized with the default value.
5200        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5201            self.json.get_or_insert_default()
5202        }
5203        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5204        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5205            self.json.as_ref().map(|field| field as _)
5206        }
5207        ///Sets `json` with the provided value.
5208        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5209            self.json = Some(field.into().into());
5210        }
5211        ///Sets `json` with the provided value.
5212        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5213            self.set_json(field.into());
5214            self
5215        }
5216    }
5217    impl super::ExecuteTransactionRequest {
5218        pub const fn const_default() -> Self {
5219            Self {
5220                transaction: None,
5221                signatures: Vec::new(),
5222                read_mask: None,
5223            }
5224        }
5225        #[doc(hidden)]
5226        pub fn default_instance() -> &'static Self {
5227            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5228            &DEFAULT
5229        }
5230        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5231        pub fn transaction(&self) -> &super::Transaction {
5232            self.transaction
5233                .as_ref()
5234                .map(|field| field as _)
5235                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5236        }
5237        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5238        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5239            self.transaction.as_mut().map(|field| field as _)
5240        }
5241        ///Returns a mutable reference to `transaction`.
5242        ///If the field is unset, it is first initialized with the default value.
5243        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5244            self.transaction.get_or_insert_default()
5245        }
5246        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5247        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5248            self.transaction.as_ref().map(|field| field as _)
5249        }
5250        ///Sets `transaction` with the provided value.
5251        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5252            self.transaction = Some(field.into().into());
5253        }
5254        ///Sets `transaction` with the provided value.
5255        pub fn with_transaction<T: Into<super::Transaction>>(
5256            mut self,
5257            field: T,
5258        ) -> Self {
5259            self.set_transaction(field.into());
5260            self
5261        }
5262        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5263        pub fn signatures(&self) -> &[super::UserSignature] {
5264            &self.signatures
5265        }
5266        ///Returns a mutable reference to `signatures`.
5267        ///If the field is unset, it is first initialized with the default value.
5268        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5269            &mut self.signatures
5270        }
5271        ///Sets `signatures` with the provided value.
5272        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5273            self.signatures = field;
5274        }
5275        ///Sets `signatures` with the provided value.
5276        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5277            self.set_signatures(field);
5278            self
5279        }
5280        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5281        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5282            self.read_mask.as_mut().map(|field| field as _)
5283        }
5284        ///Returns a mutable reference to `read_mask`.
5285        ///If the field is unset, it is first initialized with the default value.
5286        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5287            self.read_mask.get_or_insert_default()
5288        }
5289        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
5290        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5291            self.read_mask.as_ref().map(|field| field as _)
5292        }
5293        ///Sets `read_mask` with the provided value.
5294        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5295            self.read_mask = Some(field.into().into());
5296        }
5297        ///Sets `read_mask` with the provided value.
5298        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5299            mut self,
5300            field: T,
5301        ) -> Self {
5302            self.set_read_mask(field.into());
5303            self
5304        }
5305    }
5306    impl super::ExecuteTransactionResponse {
5307        pub const fn const_default() -> Self {
5308            Self { transaction: None }
5309        }
5310        #[doc(hidden)]
5311        pub fn default_instance() -> &'static Self {
5312            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5313            &DEFAULT
5314        }
5315        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5316        pub fn transaction(&self) -> &super::ExecutedTransaction {
5317            self.transaction
5318                .as_ref()
5319                .map(|field| field as _)
5320                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5321        }
5322        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5323        pub fn transaction_opt_mut(
5324            &mut self,
5325        ) -> Option<&mut super::ExecutedTransaction> {
5326            self.transaction.as_mut().map(|field| field as _)
5327        }
5328        ///Returns a mutable reference to `transaction`.
5329        ///If the field is unset, it is first initialized with the default value.
5330        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5331            self.transaction.get_or_insert_default()
5332        }
5333        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5334        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5335            self.transaction.as_ref().map(|field| field as _)
5336        }
5337        ///Sets `transaction` with the provided value.
5338        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5339            &mut self,
5340            field: T,
5341        ) {
5342            self.transaction = Some(field.into().into());
5343        }
5344        ///Sets `transaction` with the provided value.
5345        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5346            mut self,
5347            field: T,
5348        ) -> Self {
5349            self.set_transaction(field.into());
5350            self
5351        }
5352    }
5353    impl super::ExecutedTransaction {
5354        pub const fn const_default() -> Self {
5355            Self {
5356                digest: None,
5357                transaction: None,
5358                signatures: Vec::new(),
5359                effects: None,
5360                events: None,
5361                checkpoint: None,
5362                timestamp: None,
5363                balance_changes: Vec::new(),
5364                objects: None,
5365            }
5366        }
5367        #[doc(hidden)]
5368        pub fn default_instance() -> &'static Self {
5369            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5370            &DEFAULT
5371        }
5372        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5373        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5374            self.digest.as_mut().map(|field| field as _)
5375        }
5376        ///Returns a mutable reference to `digest`.
5377        ///If the field is unset, it is first initialized with the default value.
5378        pub fn digest_mut(&mut self) -> &mut String {
5379            self.digest.get_or_insert_default()
5380        }
5381        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5382        pub fn digest_opt(&self) -> Option<&str> {
5383            self.digest.as_ref().map(|field| field as _)
5384        }
5385        ///Sets `digest` with the provided value.
5386        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5387            self.digest = Some(field.into().into());
5388        }
5389        ///Sets `digest` with the provided value.
5390        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5391            self.set_digest(field.into());
5392            self
5393        }
5394        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5395        pub fn transaction(&self) -> &super::Transaction {
5396            self.transaction
5397                .as_ref()
5398                .map(|field| field as _)
5399                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5400        }
5401        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5402        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5403            self.transaction.as_mut().map(|field| field as _)
5404        }
5405        ///Returns a mutable reference to `transaction`.
5406        ///If the field is unset, it is first initialized with the default value.
5407        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5408            self.transaction.get_or_insert_default()
5409        }
5410        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5411        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5412            self.transaction.as_ref().map(|field| field as _)
5413        }
5414        ///Sets `transaction` with the provided value.
5415        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5416            self.transaction = Some(field.into().into());
5417        }
5418        ///Sets `transaction` with the provided value.
5419        pub fn with_transaction<T: Into<super::Transaction>>(
5420            mut self,
5421            field: T,
5422        ) -> Self {
5423            self.set_transaction(field.into());
5424            self
5425        }
5426        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5427        pub fn signatures(&self) -> &[super::UserSignature] {
5428            &self.signatures
5429        }
5430        ///Returns a mutable reference to `signatures`.
5431        ///If the field is unset, it is first initialized with the default value.
5432        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5433            &mut self.signatures
5434        }
5435        ///Sets `signatures` with the provided value.
5436        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5437            self.signatures = field;
5438        }
5439        ///Sets `signatures` with the provided value.
5440        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5441            self.set_signatures(field);
5442            self
5443        }
5444        ///Returns the value of `effects`, or the default value if `effects` is unset.
5445        pub fn effects(&self) -> &super::TransactionEffects {
5446            self.effects
5447                .as_ref()
5448                .map(|field| field as _)
5449                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5450        }
5451        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5452        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5453            self.effects.as_mut().map(|field| field as _)
5454        }
5455        ///Returns a mutable reference to `effects`.
5456        ///If the field is unset, it is first initialized with the default value.
5457        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5458            self.effects.get_or_insert_default()
5459        }
5460        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5461        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5462            self.effects.as_ref().map(|field| field as _)
5463        }
5464        ///Sets `effects` with the provided value.
5465        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5466            self.effects = Some(field.into().into());
5467        }
5468        ///Sets `effects` with the provided value.
5469        pub fn with_effects<T: Into<super::TransactionEffects>>(
5470            mut self,
5471            field: T,
5472        ) -> Self {
5473            self.set_effects(field.into());
5474            self
5475        }
5476        ///Returns the value of `events`, or the default value if `events` is unset.
5477        pub fn events(&self) -> &super::TransactionEvents {
5478            self.events
5479                .as_ref()
5480                .map(|field| field as _)
5481                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5482        }
5483        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5484        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5485            self.events.as_mut().map(|field| field as _)
5486        }
5487        ///Returns a mutable reference to `events`.
5488        ///If the field is unset, it is first initialized with the default value.
5489        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5490            self.events.get_or_insert_default()
5491        }
5492        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5493        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5494            self.events.as_ref().map(|field| field as _)
5495        }
5496        ///Sets `events` with the provided value.
5497        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5498            self.events = Some(field.into().into());
5499        }
5500        ///Sets `events` with the provided value.
5501        pub fn with_events<T: Into<super::TransactionEvents>>(
5502            mut self,
5503            field: T,
5504        ) -> Self {
5505            self.set_events(field.into());
5506            self
5507        }
5508        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5509        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5510            self.checkpoint.as_mut().map(|field| field as _)
5511        }
5512        ///Returns a mutable reference to `checkpoint`.
5513        ///If the field is unset, it is first initialized with the default value.
5514        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5515            self.checkpoint.get_or_insert_default()
5516        }
5517        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5518        pub fn checkpoint_opt(&self) -> Option<u64> {
5519            self.checkpoint.as_ref().map(|field| *field)
5520        }
5521        ///Sets `checkpoint` with the provided value.
5522        pub fn set_checkpoint(&mut self, field: u64) {
5523            self.checkpoint = Some(field);
5524        }
5525        ///Sets `checkpoint` with the provided value.
5526        pub fn with_checkpoint(mut self, field: u64) -> Self {
5527            self.set_checkpoint(field);
5528            self
5529        }
5530        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5531        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5532            self.timestamp.as_mut().map(|field| field as _)
5533        }
5534        ///Returns a mutable reference to `timestamp`.
5535        ///If the field is unset, it is first initialized with the default value.
5536        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5537            self.timestamp.get_or_insert_default()
5538        }
5539        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5540        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5541            self.timestamp.as_ref().map(|field| field as _)
5542        }
5543        ///Sets `timestamp` with the provided value.
5544        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5545            self.timestamp = Some(field.into().into());
5546        }
5547        ///Sets `timestamp` with the provided value.
5548        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5549            mut self,
5550            field: T,
5551        ) -> Self {
5552            self.set_timestamp(field.into());
5553            self
5554        }
5555        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5556        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5557            &self.balance_changes
5558        }
5559        ///Returns a mutable reference to `balance_changes`.
5560        ///If the field is unset, it is first initialized with the default value.
5561        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5562            &mut self.balance_changes
5563        }
5564        ///Sets `balance_changes` with the provided value.
5565        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5566            self.balance_changes = field;
5567        }
5568        ///Sets `balance_changes` with the provided value.
5569        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5570            self.set_balance_changes(field);
5571            self
5572        }
5573        ///Returns the value of `objects`, or the default value if `objects` is unset.
5574        pub fn objects(&self) -> &super::ObjectSet {
5575            self.objects
5576                .as_ref()
5577                .map(|field| field as _)
5578                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5579        }
5580        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5581        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5582            self.objects.as_mut().map(|field| field as _)
5583        }
5584        ///Returns a mutable reference to `objects`.
5585        ///If the field is unset, it is first initialized with the default value.
5586        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5587            self.objects.get_or_insert_default()
5588        }
5589        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5590        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5591            self.objects.as_ref().map(|field| field as _)
5592        }
5593        ///Sets `objects` with the provided value.
5594        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5595            self.objects = Some(field.into().into());
5596        }
5597        ///Sets `objects` with the provided value.
5598        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5599            self.set_objects(field.into());
5600            self
5601        }
5602    }
5603    impl super::ExecutionError {
5604        pub const fn const_default() -> Self {
5605            Self {
5606                description: None,
5607                command: None,
5608                kind: None,
5609                error_details: None,
5610            }
5611        }
5612        #[doc(hidden)]
5613        pub fn default_instance() -> &'static Self {
5614            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5615            &DEFAULT
5616        }
5617        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5618        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5619            self.description.as_mut().map(|field| field as _)
5620        }
5621        ///Returns a mutable reference to `description`.
5622        ///If the field is unset, it is first initialized with the default value.
5623        pub fn description_mut(&mut self) -> &mut String {
5624            self.description.get_or_insert_default()
5625        }
5626        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5627        pub fn description_opt(&self) -> Option<&str> {
5628            self.description.as_ref().map(|field| field as _)
5629        }
5630        ///Sets `description` with the provided value.
5631        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5632            self.description = Some(field.into().into());
5633        }
5634        ///Sets `description` with the provided value.
5635        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5636            self.set_description(field.into());
5637            self
5638        }
5639        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5640        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5641            self.command.as_mut().map(|field| field as _)
5642        }
5643        ///Returns a mutable reference to `command`.
5644        ///If the field is unset, it is first initialized with the default value.
5645        pub fn command_mut(&mut self) -> &mut u64 {
5646            self.command.get_or_insert_default()
5647        }
5648        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5649        pub fn command_opt(&self) -> Option<u64> {
5650            self.command.as_ref().map(|field| *field)
5651        }
5652        ///Sets `command` with the provided value.
5653        pub fn set_command(&mut self, field: u64) {
5654            self.command = Some(field);
5655        }
5656        ///Sets `command` with the provided value.
5657        pub fn with_command(mut self, field: u64) -> Self {
5658            self.set_command(field);
5659            self
5660        }
5661        ///Sets `kind` with the provided value.
5662        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5663            mut self,
5664            field: T,
5665        ) -> Self {
5666            self.set_kind(field.into());
5667            self
5668        }
5669        ///Returns the value of `abort`, or the default value if `abort` is unset.
5670        pub fn abort(&self) -> &super::MoveAbort {
5671            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5672                .error_details
5673            {
5674                field as _
5675            } else {
5676                super::MoveAbort::default_instance() as _
5677            }
5678        }
5679        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5680        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5681            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5682                .error_details
5683            {
5684                Some(field as _)
5685            } else {
5686                None
5687            }
5688        }
5689        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5690        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5691            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5692                .error_details
5693            {
5694                Some(field as _)
5695            } else {
5696                None
5697            }
5698        }
5699        ///Returns a mutable reference to `abort`.
5700        ///If the field is unset, it is first initialized with the default value.
5701        ///If any other oneof field in the same oneof is set, it will be cleared.
5702        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5703            if self.abort_opt_mut().is_none() {
5704                self.error_details = Some(
5705                    super::execution_error::ErrorDetails::Abort(
5706                        super::MoveAbort::default(),
5707                    ),
5708                );
5709            }
5710            self.abort_opt_mut().unwrap()
5711        }
5712        ///Sets `abort` with the provided value.
5713        ///If any other oneof field in the same oneof is set, it will be cleared.
5714        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5715            self.error_details = Some(
5716                super::execution_error::ErrorDetails::Abort(field.into().into()),
5717            );
5718        }
5719        ///Sets `abort` with the provided value.
5720        ///If any other oneof field in the same oneof is set, it will be cleared.
5721        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5722            self.set_abort(field.into());
5723            self
5724        }
5725        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5726        pub fn size_error(&self) -> &super::SizeError {
5727            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5728                .error_details
5729            {
5730                field as _
5731            } else {
5732                super::SizeError::default_instance() as _
5733            }
5734        }
5735        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5736        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5737            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5738                .error_details
5739            {
5740                Some(field as _)
5741            } else {
5742                None
5743            }
5744        }
5745        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5746        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5747            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5748                .error_details
5749            {
5750                Some(field as _)
5751            } else {
5752                None
5753            }
5754        }
5755        ///Returns a mutable reference to `size_error`.
5756        ///If the field is unset, it is first initialized with the default value.
5757        ///If any other oneof field in the same oneof is set, it will be cleared.
5758        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5759            if self.size_error_opt_mut().is_none() {
5760                self.error_details = Some(
5761                    super::execution_error::ErrorDetails::SizeError(
5762                        super::SizeError::default(),
5763                    ),
5764                );
5765            }
5766            self.size_error_opt_mut().unwrap()
5767        }
5768        ///Sets `size_error` with the provided value.
5769        ///If any other oneof field in the same oneof is set, it will be cleared.
5770        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5771            self.error_details = Some(
5772                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5773            );
5774        }
5775        ///Sets `size_error` with the provided value.
5776        ///If any other oneof field in the same oneof is set, it will be cleared.
5777        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5778            self.set_size_error(field.into());
5779            self
5780        }
5781        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5782        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5783            if let Some(
5784                super::execution_error::ErrorDetails::CommandArgumentError(field),
5785            ) = &self.error_details
5786            {
5787                field as _
5788            } else {
5789                super::CommandArgumentError::default_instance() as _
5790            }
5791        }
5792        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5793        pub fn command_argument_error_opt(
5794            &self,
5795        ) -> Option<&super::CommandArgumentError> {
5796            if let Some(
5797                super::execution_error::ErrorDetails::CommandArgumentError(field),
5798            ) = &self.error_details
5799            {
5800                Some(field as _)
5801            } else {
5802                None
5803            }
5804        }
5805        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5806        pub fn command_argument_error_opt_mut(
5807            &mut self,
5808        ) -> Option<&mut super::CommandArgumentError> {
5809            if let Some(
5810                super::execution_error::ErrorDetails::CommandArgumentError(field),
5811            ) = &mut self.error_details
5812            {
5813                Some(field as _)
5814            } else {
5815                None
5816            }
5817        }
5818        ///Returns a mutable reference to `command_argument_error`.
5819        ///If the field is unset, it is first initialized with the default value.
5820        ///If any other oneof field in the same oneof is set, it will be cleared.
5821        pub fn command_argument_error_mut(
5822            &mut self,
5823        ) -> &mut super::CommandArgumentError {
5824            if self.command_argument_error_opt_mut().is_none() {
5825                self.error_details = Some(
5826                    super::execution_error::ErrorDetails::CommandArgumentError(
5827                        super::CommandArgumentError::default(),
5828                    ),
5829                );
5830            }
5831            self.command_argument_error_opt_mut().unwrap()
5832        }
5833        ///Sets `command_argument_error` with the provided value.
5834        ///If any other oneof field in the same oneof is set, it will be cleared.
5835        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5836            &mut self,
5837            field: T,
5838        ) {
5839            self.error_details = Some(
5840                super::execution_error::ErrorDetails::CommandArgumentError(
5841                    field.into().into(),
5842                ),
5843            );
5844        }
5845        ///Sets `command_argument_error` with the provided value.
5846        ///If any other oneof field in the same oneof is set, it will be cleared.
5847        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5848            mut self,
5849            field: T,
5850        ) -> Self {
5851            self.set_command_argument_error(field.into());
5852            self
5853        }
5854        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5855        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5856            if let Some(
5857                super::execution_error::ErrorDetails::TypeArgumentError(field),
5858            ) = &self.error_details
5859            {
5860                field as _
5861            } else {
5862                super::TypeArgumentError::default_instance() as _
5863            }
5864        }
5865        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5866        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5867            if let Some(
5868                super::execution_error::ErrorDetails::TypeArgumentError(field),
5869            ) = &self.error_details
5870            {
5871                Some(field as _)
5872            } else {
5873                None
5874            }
5875        }
5876        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5877        pub fn type_argument_error_opt_mut(
5878            &mut self,
5879        ) -> Option<&mut super::TypeArgumentError> {
5880            if let Some(
5881                super::execution_error::ErrorDetails::TypeArgumentError(field),
5882            ) = &mut self.error_details
5883            {
5884                Some(field as _)
5885            } else {
5886                None
5887            }
5888        }
5889        ///Returns a mutable reference to `type_argument_error`.
5890        ///If the field is unset, it is first initialized with the default value.
5891        ///If any other oneof field in the same oneof is set, it will be cleared.
5892        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5893            if self.type_argument_error_opt_mut().is_none() {
5894                self.error_details = Some(
5895                    super::execution_error::ErrorDetails::TypeArgumentError(
5896                        super::TypeArgumentError::default(),
5897                    ),
5898                );
5899            }
5900            self.type_argument_error_opt_mut().unwrap()
5901        }
5902        ///Sets `type_argument_error` with the provided value.
5903        ///If any other oneof field in the same oneof is set, it will be cleared.
5904        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5905            &mut self,
5906            field: T,
5907        ) {
5908            self.error_details = Some(
5909                super::execution_error::ErrorDetails::TypeArgumentError(
5910                    field.into().into(),
5911                ),
5912            );
5913        }
5914        ///Sets `type_argument_error` with the provided value.
5915        ///If any other oneof field in the same oneof is set, it will be cleared.
5916        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5917            mut self,
5918            field: T,
5919        ) -> Self {
5920            self.set_type_argument_error(field.into());
5921            self
5922        }
5923        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5924        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5925            if let Some(
5926                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5927            ) = &self.error_details
5928            {
5929                field as _
5930            } else {
5931                super::PackageUpgradeError::default_instance() as _
5932            }
5933        }
5934        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5935        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5936            if let Some(
5937                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5938            ) = &self.error_details
5939            {
5940                Some(field as _)
5941            } else {
5942                None
5943            }
5944        }
5945        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5946        pub fn package_upgrade_error_opt_mut(
5947            &mut self,
5948        ) -> Option<&mut super::PackageUpgradeError> {
5949            if let Some(
5950                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5951            ) = &mut self.error_details
5952            {
5953                Some(field as _)
5954            } else {
5955                None
5956            }
5957        }
5958        ///Returns a mutable reference to `package_upgrade_error`.
5959        ///If the field is unset, it is first initialized with the default value.
5960        ///If any other oneof field in the same oneof is set, it will be cleared.
5961        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5962            if self.package_upgrade_error_opt_mut().is_none() {
5963                self.error_details = Some(
5964                    super::execution_error::ErrorDetails::PackageUpgradeError(
5965                        super::PackageUpgradeError::default(),
5966                    ),
5967                );
5968            }
5969            self.package_upgrade_error_opt_mut().unwrap()
5970        }
5971        ///Sets `package_upgrade_error` with the provided value.
5972        ///If any other oneof field in the same oneof is set, it will be cleared.
5973        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5974            &mut self,
5975            field: T,
5976        ) {
5977            self.error_details = Some(
5978                super::execution_error::ErrorDetails::PackageUpgradeError(
5979                    field.into().into(),
5980                ),
5981            );
5982        }
5983        ///Sets `package_upgrade_error` with the provided value.
5984        ///If any other oneof field in the same oneof is set, it will be cleared.
5985        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5986            mut self,
5987            field: T,
5988        ) -> Self {
5989            self.set_package_upgrade_error(field.into());
5990            self
5991        }
5992        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5993        pub fn index_error(&self) -> &super::IndexError {
5994            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5995                .error_details
5996            {
5997                field as _
5998            } else {
5999                super::IndexError::default_instance() as _
6000            }
6001        }
6002        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6003        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6004            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6005                .error_details
6006            {
6007                Some(field as _)
6008            } else {
6009                None
6010            }
6011        }
6012        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6013        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6014            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6015                .error_details
6016            {
6017                Some(field as _)
6018            } else {
6019                None
6020            }
6021        }
6022        ///Returns a mutable reference to `index_error`.
6023        ///If the field is unset, it is first initialized with the default value.
6024        ///If any other oneof field in the same oneof is set, it will be cleared.
6025        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6026            if self.index_error_opt_mut().is_none() {
6027                self.error_details = Some(
6028                    super::execution_error::ErrorDetails::IndexError(
6029                        super::IndexError::default(),
6030                    ),
6031                );
6032            }
6033            self.index_error_opt_mut().unwrap()
6034        }
6035        ///Sets `index_error` with the provided value.
6036        ///If any other oneof field in the same oneof is set, it will be cleared.
6037        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6038            self.error_details = Some(
6039                super::execution_error::ErrorDetails::IndexError(field.into().into()),
6040            );
6041        }
6042        ///Sets `index_error` with the provided value.
6043        ///If any other oneof field in the same oneof is set, it will be cleared.
6044        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6045            self.set_index_error(field.into());
6046            self
6047        }
6048        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
6049        pub fn object_id(&self) -> &str {
6050            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6051                .error_details
6052            {
6053                field as _
6054            } else {
6055                ""
6056            }
6057        }
6058        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6059        pub fn object_id_opt(&self) -> Option<&str> {
6060            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6061                .error_details
6062            {
6063                Some(field as _)
6064            } else {
6065                None
6066            }
6067        }
6068        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6069        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6070            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6071                .error_details
6072            {
6073                Some(field as _)
6074            } else {
6075                None
6076            }
6077        }
6078        ///Returns a mutable reference to `object_id`.
6079        ///If the field is unset, it is first initialized with the default value.
6080        ///If any other oneof field in the same oneof is set, it will be cleared.
6081        pub fn object_id_mut(&mut self) -> &mut String {
6082            if self.object_id_opt_mut().is_none() {
6083                self.error_details = Some(
6084                    super::execution_error::ErrorDetails::ObjectId(String::default()),
6085                );
6086            }
6087            self.object_id_opt_mut().unwrap()
6088        }
6089        ///Sets `object_id` with the provided value.
6090        ///If any other oneof field in the same oneof is set, it will be cleared.
6091        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6092            self.error_details = Some(
6093                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6094            );
6095        }
6096        ///Sets `object_id` with the provided value.
6097        ///If any other oneof field in the same oneof is set, it will be cleared.
6098        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6099            self.set_object_id(field.into());
6100            self
6101        }
6102        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
6103        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6104            if let Some(
6105                super::execution_error::ErrorDetails::CoinDenyListError(field),
6106            ) = &self.error_details
6107            {
6108                field as _
6109            } else {
6110                super::CoinDenyListError::default_instance() as _
6111            }
6112        }
6113        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6114        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6115            if let Some(
6116                super::execution_error::ErrorDetails::CoinDenyListError(field),
6117            ) = &self.error_details
6118            {
6119                Some(field as _)
6120            } else {
6121                None
6122            }
6123        }
6124        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6125        pub fn coin_deny_list_error_opt_mut(
6126            &mut self,
6127        ) -> Option<&mut super::CoinDenyListError> {
6128            if let Some(
6129                super::execution_error::ErrorDetails::CoinDenyListError(field),
6130            ) = &mut self.error_details
6131            {
6132                Some(field as _)
6133            } else {
6134                None
6135            }
6136        }
6137        ///Returns a mutable reference to `coin_deny_list_error`.
6138        ///If the field is unset, it is first initialized with the default value.
6139        ///If any other oneof field in the same oneof is set, it will be cleared.
6140        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6141            if self.coin_deny_list_error_opt_mut().is_none() {
6142                self.error_details = Some(
6143                    super::execution_error::ErrorDetails::CoinDenyListError(
6144                        super::CoinDenyListError::default(),
6145                    ),
6146                );
6147            }
6148            self.coin_deny_list_error_opt_mut().unwrap()
6149        }
6150        ///Sets `coin_deny_list_error` with the provided value.
6151        ///If any other oneof field in the same oneof is set, it will be cleared.
6152        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6153            &mut self,
6154            field: T,
6155        ) {
6156            self.error_details = Some(
6157                super::execution_error::ErrorDetails::CoinDenyListError(
6158                    field.into().into(),
6159                ),
6160            );
6161        }
6162        ///Sets `coin_deny_list_error` with the provided value.
6163        ///If any other oneof field in the same oneof is set, it will be cleared.
6164        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6165            mut self,
6166            field: T,
6167        ) -> Self {
6168            self.set_coin_deny_list_error(field.into());
6169            self
6170        }
6171        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6172        pub fn congested_objects(&self) -> &super::CongestedObjects {
6173            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6174                .error_details
6175            {
6176                field as _
6177            } else {
6178                super::CongestedObjects::default_instance() as _
6179            }
6180        }
6181        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6182        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6183            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6184                .error_details
6185            {
6186                Some(field as _)
6187            } else {
6188                None
6189            }
6190        }
6191        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6192        pub fn congested_objects_opt_mut(
6193            &mut self,
6194        ) -> Option<&mut super::CongestedObjects> {
6195            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6196                .error_details
6197            {
6198                Some(field as _)
6199            } else {
6200                None
6201            }
6202        }
6203        ///Returns a mutable reference to `congested_objects`.
6204        ///If the field is unset, it is first initialized with the default value.
6205        ///If any other oneof field in the same oneof is set, it will be cleared.
6206        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6207            if self.congested_objects_opt_mut().is_none() {
6208                self.error_details = Some(
6209                    super::execution_error::ErrorDetails::CongestedObjects(
6210                        super::CongestedObjects::default(),
6211                    ),
6212                );
6213            }
6214            self.congested_objects_opt_mut().unwrap()
6215        }
6216        ///Sets `congested_objects` with the provided value.
6217        ///If any other oneof field in the same oneof is set, it will be cleared.
6218        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6219            &mut self,
6220            field: T,
6221        ) {
6222            self.error_details = Some(
6223                super::execution_error::ErrorDetails::CongestedObjects(
6224                    field.into().into(),
6225                ),
6226            );
6227        }
6228        ///Sets `congested_objects` with the provided value.
6229        ///If any other oneof field in the same oneof is set, it will be cleared.
6230        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6231            mut self,
6232            field: T,
6233        ) -> Self {
6234            self.set_congested_objects(field.into());
6235            self
6236        }
6237    }
6238    impl super::ExecutionStatus {
6239        pub const fn const_default() -> Self {
6240            Self { success: None, error: None }
6241        }
6242        #[doc(hidden)]
6243        pub fn default_instance() -> &'static Self {
6244            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6245            &DEFAULT
6246        }
6247        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6248        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6249            self.success.as_mut().map(|field| field as _)
6250        }
6251        ///Returns a mutable reference to `success`.
6252        ///If the field is unset, it is first initialized with the default value.
6253        pub fn success_mut(&mut self) -> &mut bool {
6254            self.success.get_or_insert_default()
6255        }
6256        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
6257        pub fn success_opt(&self) -> Option<bool> {
6258            self.success.as_ref().map(|field| *field)
6259        }
6260        ///Sets `success` with the provided value.
6261        pub fn set_success(&mut self, field: bool) {
6262            self.success = Some(field);
6263        }
6264        ///Sets `success` with the provided value.
6265        pub fn with_success(mut self, field: bool) -> Self {
6266            self.set_success(field);
6267            self
6268        }
6269        ///Returns the value of `error`, or the default value if `error` is unset.
6270        pub fn error(&self) -> &super::ExecutionError {
6271            self.error
6272                .as_ref()
6273                .map(|field| field as _)
6274                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6275        }
6276        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6277        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6278            self.error.as_mut().map(|field| field as _)
6279        }
6280        ///Returns a mutable reference to `error`.
6281        ///If the field is unset, it is first initialized with the default value.
6282        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6283            self.error.get_or_insert_default()
6284        }
6285        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6286        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6287            self.error.as_ref().map(|field| field as _)
6288        }
6289        ///Sets `error` with the provided value.
6290        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6291            self.error = Some(field.into().into());
6292        }
6293        ///Sets `error` with the provided value.
6294        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6295            self.set_error(field.into());
6296            self
6297        }
6298    }
6299    impl super::ExecutionTimeObservation {
6300        pub const fn const_default() -> Self {
6301            Self {
6302                kind: None,
6303                move_entry_point: None,
6304                validator_observations: Vec::new(),
6305            }
6306        }
6307        #[doc(hidden)]
6308        pub fn default_instance() -> &'static Self {
6309            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6310            &DEFAULT
6311        }
6312        ///Sets `kind` with the provided value.
6313        pub fn with_kind<
6314            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6315        >(mut self, field: T) -> Self {
6316            self.set_kind(field.into());
6317            self
6318        }
6319        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
6320        pub fn move_entry_point(&self) -> &super::MoveCall {
6321            self.move_entry_point
6322                .as_ref()
6323                .map(|field| field as _)
6324                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6325        }
6326        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6327        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6328            self.move_entry_point.as_mut().map(|field| field as _)
6329        }
6330        ///Returns a mutable reference to `move_entry_point`.
6331        ///If the field is unset, it is first initialized with the default value.
6332        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6333            self.move_entry_point.get_or_insert_default()
6334        }
6335        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
6336        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6337            self.move_entry_point.as_ref().map(|field| field as _)
6338        }
6339        ///Sets `move_entry_point` with the provided value.
6340        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6341            self.move_entry_point = Some(field.into().into());
6342        }
6343        ///Sets `move_entry_point` with the provided value.
6344        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6345            mut self,
6346            field: T,
6347        ) -> Self {
6348            self.set_move_entry_point(field.into());
6349            self
6350        }
6351        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6352        pub fn validator_observations(
6353            &self,
6354        ) -> &[super::ValidatorExecutionTimeObservation] {
6355            &self.validator_observations
6356        }
6357        ///Returns a mutable reference to `validator_observations`.
6358        ///If the field is unset, it is first initialized with the default value.
6359        pub fn validator_observations_mut(
6360            &mut self,
6361        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6362            &mut self.validator_observations
6363        }
6364        ///Sets `validator_observations` with the provided value.
6365        pub fn set_validator_observations(
6366            &mut self,
6367            field: Vec<super::ValidatorExecutionTimeObservation>,
6368        ) {
6369            self.validator_observations = field;
6370        }
6371        ///Sets `validator_observations` with the provided value.
6372        pub fn with_validator_observations(
6373            mut self,
6374            field: Vec<super::ValidatorExecutionTimeObservation>,
6375        ) -> Self {
6376            self.set_validator_observations(field);
6377            self
6378        }
6379    }
6380    impl super::ExecutionTimeObservations {
6381        pub const fn const_default() -> Self {
6382            Self {
6383                version: None,
6384                observations: Vec::new(),
6385            }
6386        }
6387        #[doc(hidden)]
6388        pub fn default_instance() -> &'static Self {
6389            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6390            &DEFAULT
6391        }
6392        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6393        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6394            self.version.as_mut().map(|field| field as _)
6395        }
6396        ///Returns a mutable reference to `version`.
6397        ///If the field is unset, it is first initialized with the default value.
6398        pub fn version_mut(&mut self) -> &mut i32 {
6399            self.version.get_or_insert_default()
6400        }
6401        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6402        pub fn version_opt(&self) -> Option<i32> {
6403            self.version.as_ref().map(|field| *field)
6404        }
6405        ///Sets `version` with the provided value.
6406        pub fn set_version(&mut self, field: i32) {
6407            self.version = Some(field);
6408        }
6409        ///Sets `version` with the provided value.
6410        pub fn with_version(mut self, field: i32) -> Self {
6411            self.set_version(field);
6412            self
6413        }
6414        ///Returns the value of `observations`, or the default value if `observations` is unset.
6415        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6416            &self.observations
6417        }
6418        ///Returns a mutable reference to `observations`.
6419        ///If the field is unset, it is first initialized with the default value.
6420        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6421            &mut self.observations
6422        }
6423        ///Sets `observations` with the provided value.
6424        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6425            self.observations = field;
6426        }
6427        ///Sets `observations` with the provided value.
6428        pub fn with_observations(
6429            mut self,
6430            field: Vec<super::ExecutionTimeObservation>,
6431        ) -> Self {
6432            self.set_observations(field);
6433            self
6434        }
6435    }
6436    impl super::FieldDescriptor {
6437        pub const fn const_default() -> Self {
6438            Self {
6439                name: None,
6440                position: None,
6441                r#type: None,
6442            }
6443        }
6444        #[doc(hidden)]
6445        pub fn default_instance() -> &'static Self {
6446            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6447            &DEFAULT
6448        }
6449        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6450        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6451            self.name.as_mut().map(|field| field as _)
6452        }
6453        ///Returns a mutable reference to `name`.
6454        ///If the field is unset, it is first initialized with the default value.
6455        pub fn name_mut(&mut self) -> &mut String {
6456            self.name.get_or_insert_default()
6457        }
6458        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6459        pub fn name_opt(&self) -> Option<&str> {
6460            self.name.as_ref().map(|field| field as _)
6461        }
6462        ///Sets `name` with the provided value.
6463        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6464            self.name = Some(field.into().into());
6465        }
6466        ///Sets `name` with the provided value.
6467        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6468            self.set_name(field.into());
6469            self
6470        }
6471        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6472        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6473            self.position.as_mut().map(|field| field as _)
6474        }
6475        ///Returns a mutable reference to `position`.
6476        ///If the field is unset, it is first initialized with the default value.
6477        pub fn position_mut(&mut self) -> &mut u32 {
6478            self.position.get_or_insert_default()
6479        }
6480        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6481        pub fn position_opt(&self) -> Option<u32> {
6482            self.position.as_ref().map(|field| *field)
6483        }
6484        ///Sets `position` with the provided value.
6485        pub fn set_position(&mut self, field: u32) {
6486            self.position = Some(field);
6487        }
6488        ///Sets `position` with the provided value.
6489        pub fn with_position(mut self, field: u32) -> Self {
6490            self.set_position(field);
6491            self
6492        }
6493        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6494        pub fn r#type(&self) -> &super::OpenSignatureBody {
6495            self.r#type
6496                .as_ref()
6497                .map(|field| field as _)
6498                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6499        }
6500        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6501        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6502            self.r#type.as_mut().map(|field| field as _)
6503        }
6504        ///Returns a mutable reference to `r#type`.
6505        ///If the field is unset, it is first initialized with the default value.
6506        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6507            self.r#type.get_or_insert_default()
6508        }
6509        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6510        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6511            self.r#type.as_ref().map(|field| field as _)
6512        }
6513        ///Sets `r#type` with the provided value.
6514        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6515            self.r#type = Some(field.into().into());
6516        }
6517        ///Sets `r#type` with the provided value.
6518        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6519            self.set_type(field.into());
6520            self
6521        }
6522    }
6523    impl super::FunctionDescriptor {
6524        pub const fn const_default() -> Self {
6525            Self {
6526                name: None,
6527                visibility: None,
6528                is_entry: None,
6529                type_parameters: Vec::new(),
6530                parameters: Vec::new(),
6531                returns: Vec::new(),
6532            }
6533        }
6534        #[doc(hidden)]
6535        pub fn default_instance() -> &'static Self {
6536            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6537            &DEFAULT
6538        }
6539        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6540        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6541            self.name.as_mut().map(|field| field as _)
6542        }
6543        ///Returns a mutable reference to `name`.
6544        ///If the field is unset, it is first initialized with the default value.
6545        pub fn name_mut(&mut self) -> &mut String {
6546            self.name.get_or_insert_default()
6547        }
6548        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6549        pub fn name_opt(&self) -> Option<&str> {
6550            self.name.as_ref().map(|field| field as _)
6551        }
6552        ///Sets `name` with the provided value.
6553        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6554            self.name = Some(field.into().into());
6555        }
6556        ///Sets `name` with the provided value.
6557        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6558            self.set_name(field.into());
6559            self
6560        }
6561        ///Sets `visibility` with the provided value.
6562        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6563            mut self,
6564            field: T,
6565        ) -> Self {
6566            self.set_visibility(field.into());
6567            self
6568        }
6569        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6570        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6571            self.is_entry.as_mut().map(|field| field as _)
6572        }
6573        ///Returns a mutable reference to `is_entry`.
6574        ///If the field is unset, it is first initialized with the default value.
6575        pub fn is_entry_mut(&mut self) -> &mut bool {
6576            self.is_entry.get_or_insert_default()
6577        }
6578        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6579        pub fn is_entry_opt(&self) -> Option<bool> {
6580            self.is_entry.as_ref().map(|field| *field)
6581        }
6582        ///Sets `is_entry` with the provided value.
6583        pub fn set_is_entry(&mut self, field: bool) {
6584            self.is_entry = Some(field);
6585        }
6586        ///Sets `is_entry` with the provided value.
6587        pub fn with_is_entry(mut self, field: bool) -> Self {
6588            self.set_is_entry(field);
6589            self
6590        }
6591        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6592        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6593            &self.type_parameters
6594        }
6595        ///Returns a mutable reference to `type_parameters`.
6596        ///If the field is unset, it is first initialized with the default value.
6597        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6598            &mut self.type_parameters
6599        }
6600        ///Sets `type_parameters` with the provided value.
6601        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6602            self.type_parameters = field;
6603        }
6604        ///Sets `type_parameters` with the provided value.
6605        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6606            self.set_type_parameters(field);
6607            self
6608        }
6609        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6610        pub fn parameters(&self) -> &[super::OpenSignature] {
6611            &self.parameters
6612        }
6613        ///Returns a mutable reference to `parameters`.
6614        ///If the field is unset, it is first initialized with the default value.
6615        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6616            &mut self.parameters
6617        }
6618        ///Sets `parameters` with the provided value.
6619        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6620            self.parameters = field;
6621        }
6622        ///Sets `parameters` with the provided value.
6623        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6624            self.set_parameters(field);
6625            self
6626        }
6627        ///Returns the value of `returns`, or the default value if `returns` is unset.
6628        pub fn returns(&self) -> &[super::OpenSignature] {
6629            &self.returns
6630        }
6631        ///Returns a mutable reference to `returns`.
6632        ///If the field is unset, it is first initialized with the default value.
6633        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6634            &mut self.returns
6635        }
6636        ///Sets `returns` with the provided value.
6637        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6638            self.returns = field;
6639        }
6640        ///Sets `returns` with the provided value.
6641        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6642            self.set_returns(field);
6643            self
6644        }
6645    }
6646    impl super::FundsWithdrawal {
6647        pub const fn const_default() -> Self {
6648            Self {
6649                amount: None,
6650                coin_type: None,
6651                source: None,
6652            }
6653        }
6654        #[doc(hidden)]
6655        pub fn default_instance() -> &'static Self {
6656            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6657            &DEFAULT
6658        }
6659        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6660        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6661            self.amount.as_mut().map(|field| field as _)
6662        }
6663        ///Returns a mutable reference to `amount`.
6664        ///If the field is unset, it is first initialized with the default value.
6665        pub fn amount_mut(&mut self) -> &mut u64 {
6666            self.amount.get_or_insert_default()
6667        }
6668        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
6669        pub fn amount_opt(&self) -> Option<u64> {
6670            self.amount.as_ref().map(|field| *field)
6671        }
6672        ///Sets `amount` with the provided value.
6673        pub fn set_amount(&mut self, field: u64) {
6674            self.amount = Some(field);
6675        }
6676        ///Sets `amount` with the provided value.
6677        pub fn with_amount(mut self, field: u64) -> Self {
6678            self.set_amount(field);
6679            self
6680        }
6681        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6682        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6683            self.coin_type.as_mut().map(|field| field as _)
6684        }
6685        ///Returns a mutable reference to `coin_type`.
6686        ///If the field is unset, it is first initialized with the default value.
6687        pub fn coin_type_mut(&mut self) -> &mut String {
6688            self.coin_type.get_or_insert_default()
6689        }
6690        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6691        pub fn coin_type_opt(&self) -> Option<&str> {
6692            self.coin_type.as_ref().map(|field| field as _)
6693        }
6694        ///Sets `coin_type` with the provided value.
6695        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6696            self.coin_type = Some(field.into().into());
6697        }
6698        ///Sets `coin_type` with the provided value.
6699        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6700            self.set_coin_type(field.into());
6701            self
6702        }
6703        ///Sets `source` with the provided value.
6704        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6705            mut self,
6706            field: T,
6707        ) -> Self {
6708            self.set_source(field.into());
6709            self
6710        }
6711    }
6712    impl super::GasCostSummary {
6713        pub const fn const_default() -> Self {
6714            Self {
6715                computation_cost: None,
6716                storage_cost: None,
6717                storage_rebate: None,
6718                non_refundable_storage_fee: None,
6719            }
6720        }
6721        #[doc(hidden)]
6722        pub fn default_instance() -> &'static Self {
6723            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6724            &DEFAULT
6725        }
6726        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6727        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6728            self.computation_cost.as_mut().map(|field| field as _)
6729        }
6730        ///Returns a mutable reference to `computation_cost`.
6731        ///If the field is unset, it is first initialized with the default value.
6732        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6733            self.computation_cost.get_or_insert_default()
6734        }
6735        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6736        pub fn computation_cost_opt(&self) -> Option<u64> {
6737            self.computation_cost.as_ref().map(|field| *field)
6738        }
6739        ///Sets `computation_cost` with the provided value.
6740        pub fn set_computation_cost(&mut self, field: u64) {
6741            self.computation_cost = Some(field);
6742        }
6743        ///Sets `computation_cost` with the provided value.
6744        pub fn with_computation_cost(mut self, field: u64) -> Self {
6745            self.set_computation_cost(field);
6746            self
6747        }
6748        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6749        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6750            self.storage_cost.as_mut().map(|field| field as _)
6751        }
6752        ///Returns a mutable reference to `storage_cost`.
6753        ///If the field is unset, it is first initialized with the default value.
6754        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6755            self.storage_cost.get_or_insert_default()
6756        }
6757        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6758        pub fn storage_cost_opt(&self) -> Option<u64> {
6759            self.storage_cost.as_ref().map(|field| *field)
6760        }
6761        ///Sets `storage_cost` with the provided value.
6762        pub fn set_storage_cost(&mut self, field: u64) {
6763            self.storage_cost = Some(field);
6764        }
6765        ///Sets `storage_cost` with the provided value.
6766        pub fn with_storage_cost(mut self, field: u64) -> Self {
6767            self.set_storage_cost(field);
6768            self
6769        }
6770        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6771        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6772            self.storage_rebate.as_mut().map(|field| field as _)
6773        }
6774        ///Returns a mutable reference to `storage_rebate`.
6775        ///If the field is unset, it is first initialized with the default value.
6776        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6777            self.storage_rebate.get_or_insert_default()
6778        }
6779        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6780        pub fn storage_rebate_opt(&self) -> Option<u64> {
6781            self.storage_rebate.as_ref().map(|field| *field)
6782        }
6783        ///Sets `storage_rebate` with the provided value.
6784        pub fn set_storage_rebate(&mut self, field: u64) {
6785            self.storage_rebate = Some(field);
6786        }
6787        ///Sets `storage_rebate` with the provided value.
6788        pub fn with_storage_rebate(mut self, field: u64) -> Self {
6789            self.set_storage_rebate(field);
6790            self
6791        }
6792        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6793        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6794            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6795        }
6796        ///Returns a mutable reference to `non_refundable_storage_fee`.
6797        ///If the field is unset, it is first initialized with the default value.
6798        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6799            self.non_refundable_storage_fee.get_or_insert_default()
6800        }
6801        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6802        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6803            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6804        }
6805        ///Sets `non_refundable_storage_fee` with the provided value.
6806        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6807            self.non_refundable_storage_fee = Some(field);
6808        }
6809        ///Sets `non_refundable_storage_fee` with the provided value.
6810        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6811            self.set_non_refundable_storage_fee(field);
6812            self
6813        }
6814    }
6815    impl super::GasPayment {
6816        pub const fn const_default() -> Self {
6817            Self {
6818                objects: Vec::new(),
6819                owner: None,
6820                price: None,
6821                budget: None,
6822            }
6823        }
6824        #[doc(hidden)]
6825        pub fn default_instance() -> &'static Self {
6826            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6827            &DEFAULT
6828        }
6829        ///Returns the value of `objects`, or the default value if `objects` is unset.
6830        pub fn objects(&self) -> &[super::ObjectReference] {
6831            &self.objects
6832        }
6833        ///Returns a mutable reference to `objects`.
6834        ///If the field is unset, it is first initialized with the default value.
6835        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6836            &mut self.objects
6837        }
6838        ///Sets `objects` with the provided value.
6839        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6840            self.objects = field;
6841        }
6842        ///Sets `objects` with the provided value.
6843        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6844            self.set_objects(field);
6845            self
6846        }
6847        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6848        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6849            self.owner.as_mut().map(|field| field as _)
6850        }
6851        ///Returns a mutable reference to `owner`.
6852        ///If the field is unset, it is first initialized with the default value.
6853        pub fn owner_mut(&mut self) -> &mut String {
6854            self.owner.get_or_insert_default()
6855        }
6856        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6857        pub fn owner_opt(&self) -> Option<&str> {
6858            self.owner.as_ref().map(|field| field as _)
6859        }
6860        ///Sets `owner` with the provided value.
6861        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6862            self.owner = Some(field.into().into());
6863        }
6864        ///Sets `owner` with the provided value.
6865        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6866            self.set_owner(field.into());
6867            self
6868        }
6869        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6870        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6871            self.price.as_mut().map(|field| field as _)
6872        }
6873        ///Returns a mutable reference to `price`.
6874        ///If the field is unset, it is first initialized with the default value.
6875        pub fn price_mut(&mut self) -> &mut u64 {
6876            self.price.get_or_insert_default()
6877        }
6878        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6879        pub fn price_opt(&self) -> Option<u64> {
6880            self.price.as_ref().map(|field| *field)
6881        }
6882        ///Sets `price` with the provided value.
6883        pub fn set_price(&mut self, field: u64) {
6884            self.price = Some(field);
6885        }
6886        ///Sets `price` with the provided value.
6887        pub fn with_price(mut self, field: u64) -> Self {
6888            self.set_price(field);
6889            self
6890        }
6891        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6892        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6893            self.budget.as_mut().map(|field| field as _)
6894        }
6895        ///Returns a mutable reference to `budget`.
6896        ///If the field is unset, it is first initialized with the default value.
6897        pub fn budget_mut(&mut self) -> &mut u64 {
6898            self.budget.get_or_insert_default()
6899        }
6900        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6901        pub fn budget_opt(&self) -> Option<u64> {
6902            self.budget.as_ref().map(|field| *field)
6903        }
6904        ///Sets `budget` with the provided value.
6905        pub fn set_budget(&mut self, field: u64) {
6906            self.budget = Some(field);
6907        }
6908        ///Sets `budget` with the provided value.
6909        pub fn with_budget(mut self, field: u64) -> Self {
6910            self.set_budget(field);
6911            self
6912        }
6913    }
6914    impl super::GenesisTransaction {
6915        pub const fn const_default() -> Self {
6916            Self { objects: Vec::new() }
6917        }
6918        #[doc(hidden)]
6919        pub fn default_instance() -> &'static Self {
6920            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6921            &DEFAULT
6922        }
6923        ///Returns the value of `objects`, or the default value if `objects` is unset.
6924        pub fn objects(&self) -> &[super::Object] {
6925            &self.objects
6926        }
6927        ///Returns a mutable reference to `objects`.
6928        ///If the field is unset, it is first initialized with the default value.
6929        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6930            &mut self.objects
6931        }
6932        ///Sets `objects` with the provided value.
6933        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6934            self.objects = field;
6935        }
6936        ///Sets `objects` with the provided value.
6937        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6938            self.set_objects(field);
6939            self
6940        }
6941    }
6942    impl super::GetBalanceRequest {
6943        pub const fn const_default() -> Self {
6944            Self {
6945                owner: None,
6946                coin_type: None,
6947            }
6948        }
6949        #[doc(hidden)]
6950        pub fn default_instance() -> &'static Self {
6951            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6952            &DEFAULT
6953        }
6954        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6955        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6956            self.owner.as_mut().map(|field| field as _)
6957        }
6958        ///Returns a mutable reference to `owner`.
6959        ///If the field is unset, it is first initialized with the default value.
6960        pub fn owner_mut(&mut self) -> &mut String {
6961            self.owner.get_or_insert_default()
6962        }
6963        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6964        pub fn owner_opt(&self) -> Option<&str> {
6965            self.owner.as_ref().map(|field| field as _)
6966        }
6967        ///Sets `owner` with the provided value.
6968        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6969            self.owner = Some(field.into().into());
6970        }
6971        ///Sets `owner` with the provided value.
6972        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6973            self.set_owner(field.into());
6974            self
6975        }
6976        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6977        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6978            self.coin_type.as_mut().map(|field| field as _)
6979        }
6980        ///Returns a mutable reference to `coin_type`.
6981        ///If the field is unset, it is first initialized with the default value.
6982        pub fn coin_type_mut(&mut self) -> &mut String {
6983            self.coin_type.get_or_insert_default()
6984        }
6985        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6986        pub fn coin_type_opt(&self) -> Option<&str> {
6987            self.coin_type.as_ref().map(|field| field as _)
6988        }
6989        ///Sets `coin_type` with the provided value.
6990        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6991            self.coin_type = Some(field.into().into());
6992        }
6993        ///Sets `coin_type` with the provided value.
6994        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6995            self.set_coin_type(field.into());
6996            self
6997        }
6998    }
6999    impl super::GetBalanceResponse {
7000        pub const fn const_default() -> Self {
7001            Self { balance: None }
7002        }
7003        #[doc(hidden)]
7004        pub fn default_instance() -> &'static Self {
7005            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7006            &DEFAULT
7007        }
7008        ///Returns the value of `balance`, or the default value if `balance` is unset.
7009        pub fn balance(&self) -> &super::Balance {
7010            self.balance
7011                .as_ref()
7012                .map(|field| field as _)
7013                .unwrap_or_else(|| super::Balance::default_instance() as _)
7014        }
7015        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7016        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7017            self.balance.as_mut().map(|field| field as _)
7018        }
7019        ///Returns a mutable reference to `balance`.
7020        ///If the field is unset, it is first initialized with the default value.
7021        pub fn balance_mut(&mut self) -> &mut super::Balance {
7022            self.balance.get_or_insert_default()
7023        }
7024        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7025        pub fn balance_opt(&self) -> Option<&super::Balance> {
7026            self.balance.as_ref().map(|field| field as _)
7027        }
7028        ///Sets `balance` with the provided value.
7029        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7030            self.balance = Some(field.into().into());
7031        }
7032        ///Sets `balance` with the provided value.
7033        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7034            self.set_balance(field.into());
7035            self
7036        }
7037    }
7038    impl super::GetCheckpointRequest {
7039        pub const fn const_default() -> Self {
7040            Self {
7041                read_mask: None,
7042                checkpoint_id: None,
7043            }
7044        }
7045        #[doc(hidden)]
7046        pub fn default_instance() -> &'static Self {
7047            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7048            &DEFAULT
7049        }
7050        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7051        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7052            self.read_mask.as_mut().map(|field| field as _)
7053        }
7054        ///Returns a mutable reference to `read_mask`.
7055        ///If the field is unset, it is first initialized with the default value.
7056        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7057            self.read_mask.get_or_insert_default()
7058        }
7059        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7060        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7061            self.read_mask.as_ref().map(|field| field as _)
7062        }
7063        ///Sets `read_mask` with the provided value.
7064        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7065            self.read_mask = Some(field.into().into());
7066        }
7067        ///Sets `read_mask` with the provided value.
7068        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7069            mut self,
7070            field: T,
7071        ) -> Self {
7072            self.set_read_mask(field.into());
7073            self
7074        }
7075        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
7076        pub fn sequence_number(&self) -> u64 {
7077            if let Some(
7078                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7079            ) = &self.checkpoint_id
7080            {
7081                *field
7082            } else {
7083                0u64
7084            }
7085        }
7086        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
7087        pub fn sequence_number_opt(&self) -> Option<u64> {
7088            if let Some(
7089                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7090            ) = &self.checkpoint_id
7091            {
7092                Some(*field)
7093            } else {
7094                None
7095            }
7096        }
7097        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7098        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7099            if let Some(
7100                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7101            ) = &mut self.checkpoint_id
7102            {
7103                Some(field as _)
7104            } else {
7105                None
7106            }
7107        }
7108        ///Returns a mutable reference to `sequence_number`.
7109        ///If the field is unset, it is first initialized with the default value.
7110        ///If any other oneof field in the same oneof is set, it will be cleared.
7111        pub fn sequence_number_mut(&mut self) -> &mut u64 {
7112            if self.sequence_number_opt_mut().is_none() {
7113                self.checkpoint_id = Some(
7114                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7115                        u64::default(),
7116                    ),
7117                );
7118            }
7119            self.sequence_number_opt_mut().unwrap()
7120        }
7121        ///Sets `sequence_number` with the provided value.
7122        ///If any other oneof field in the same oneof is set, it will be cleared.
7123        pub fn set_sequence_number(&mut self, field: u64) {
7124            self.checkpoint_id = Some(
7125                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7126            );
7127        }
7128        ///Sets `sequence_number` with the provided value.
7129        ///If any other oneof field in the same oneof is set, it will be cleared.
7130        pub fn with_sequence_number(mut self, field: u64) -> Self {
7131            self.set_sequence_number(field);
7132            self
7133        }
7134        ///Returns the value of `digest`, or the default value if `digest` is unset.
7135        pub fn digest(&self) -> &str {
7136            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7137                .checkpoint_id
7138            {
7139                field as _
7140            } else {
7141                ""
7142            }
7143        }
7144        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7145        pub fn digest_opt(&self) -> Option<&str> {
7146            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7147                .checkpoint_id
7148            {
7149                Some(field as _)
7150            } else {
7151                None
7152            }
7153        }
7154        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7155        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7156            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7157                .checkpoint_id
7158            {
7159                Some(field as _)
7160            } else {
7161                None
7162            }
7163        }
7164        ///Returns a mutable reference to `digest`.
7165        ///If the field is unset, it is first initialized with the default value.
7166        ///If any other oneof field in the same oneof is set, it will be cleared.
7167        pub fn digest_mut(&mut self) -> &mut String {
7168            if self.digest_opt_mut().is_none() {
7169                self.checkpoint_id = Some(
7170                    super::get_checkpoint_request::CheckpointId::Digest(
7171                        String::default(),
7172                    ),
7173                );
7174            }
7175            self.digest_opt_mut().unwrap()
7176        }
7177        ///Sets `digest` with the provided value.
7178        ///If any other oneof field in the same oneof is set, it will be cleared.
7179        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7180            self.checkpoint_id = Some(
7181                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7182            );
7183        }
7184        ///Sets `digest` with the provided value.
7185        ///If any other oneof field in the same oneof is set, it will be cleared.
7186        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7187            self.set_digest(field.into());
7188            self
7189        }
7190    }
7191    impl super::GetCheckpointResponse {
7192        pub const fn const_default() -> Self {
7193            Self { checkpoint: None }
7194        }
7195        #[doc(hidden)]
7196        pub fn default_instance() -> &'static Self {
7197            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7198            &DEFAULT
7199        }
7200        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7201        pub fn checkpoint(&self) -> &super::Checkpoint {
7202            self.checkpoint
7203                .as_ref()
7204                .map(|field| field as _)
7205                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7206        }
7207        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7208        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7209            self.checkpoint.as_mut().map(|field| field as _)
7210        }
7211        ///Returns a mutable reference to `checkpoint`.
7212        ///If the field is unset, it is first initialized with the default value.
7213        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7214            self.checkpoint.get_or_insert_default()
7215        }
7216        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7217        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7218            self.checkpoint.as_ref().map(|field| field as _)
7219        }
7220        ///Sets `checkpoint` with the provided value.
7221        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7222            self.checkpoint = Some(field.into().into());
7223        }
7224        ///Sets `checkpoint` with the provided value.
7225        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7226            self.set_checkpoint(field.into());
7227            self
7228        }
7229    }
7230    impl super::GetCoinInfoRequest {
7231        pub const fn const_default() -> Self {
7232            Self { coin_type: None }
7233        }
7234        #[doc(hidden)]
7235        pub fn default_instance() -> &'static Self {
7236            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7237            &DEFAULT
7238        }
7239        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7240        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7241            self.coin_type.as_mut().map(|field| field as _)
7242        }
7243        ///Returns a mutable reference to `coin_type`.
7244        ///If the field is unset, it is first initialized with the default value.
7245        pub fn coin_type_mut(&mut self) -> &mut String {
7246            self.coin_type.get_or_insert_default()
7247        }
7248        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7249        pub fn coin_type_opt(&self) -> Option<&str> {
7250            self.coin_type.as_ref().map(|field| field as _)
7251        }
7252        ///Sets `coin_type` with the provided value.
7253        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7254            self.coin_type = Some(field.into().into());
7255        }
7256        ///Sets `coin_type` with the provided value.
7257        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7258            self.set_coin_type(field.into());
7259            self
7260        }
7261    }
7262    impl super::GetCoinInfoResponse {
7263        pub const fn const_default() -> Self {
7264            Self {
7265                coin_type: None,
7266                metadata: None,
7267                treasury: None,
7268                regulated_metadata: None,
7269            }
7270        }
7271        #[doc(hidden)]
7272        pub fn default_instance() -> &'static Self {
7273            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7274            &DEFAULT
7275        }
7276        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7277        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7278            self.coin_type.as_mut().map(|field| field as _)
7279        }
7280        ///Returns a mutable reference to `coin_type`.
7281        ///If the field is unset, it is first initialized with the default value.
7282        pub fn coin_type_mut(&mut self) -> &mut String {
7283            self.coin_type.get_or_insert_default()
7284        }
7285        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7286        pub fn coin_type_opt(&self) -> Option<&str> {
7287            self.coin_type.as_ref().map(|field| field as _)
7288        }
7289        ///Sets `coin_type` with the provided value.
7290        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7291            self.coin_type = Some(field.into().into());
7292        }
7293        ///Sets `coin_type` with the provided value.
7294        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7295            self.set_coin_type(field.into());
7296            self
7297        }
7298        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
7299        pub fn metadata(&self) -> &super::CoinMetadata {
7300            self.metadata
7301                .as_ref()
7302                .map(|field| field as _)
7303                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7304        }
7305        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7306        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7307            self.metadata.as_mut().map(|field| field as _)
7308        }
7309        ///Returns a mutable reference to `metadata`.
7310        ///If the field is unset, it is first initialized with the default value.
7311        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7312            self.metadata.get_or_insert_default()
7313        }
7314        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7315        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7316            self.metadata.as_ref().map(|field| field as _)
7317        }
7318        ///Sets `metadata` with the provided value.
7319        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7320            self.metadata = Some(field.into().into());
7321        }
7322        ///Sets `metadata` with the provided value.
7323        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7324            self.set_metadata(field.into());
7325            self
7326        }
7327        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
7328        pub fn treasury(&self) -> &super::CoinTreasury {
7329            self.treasury
7330                .as_ref()
7331                .map(|field| field as _)
7332                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7333        }
7334        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7335        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7336            self.treasury.as_mut().map(|field| field as _)
7337        }
7338        ///Returns a mutable reference to `treasury`.
7339        ///If the field is unset, it is first initialized with the default value.
7340        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7341            self.treasury.get_or_insert_default()
7342        }
7343        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
7344        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7345            self.treasury.as_ref().map(|field| field as _)
7346        }
7347        ///Sets `treasury` with the provided value.
7348        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7349            self.treasury = Some(field.into().into());
7350        }
7351        ///Sets `treasury` with the provided value.
7352        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7353            self.set_treasury(field.into());
7354            self
7355        }
7356        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
7357        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7358            self.regulated_metadata
7359                .as_ref()
7360                .map(|field| field as _)
7361                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7362        }
7363        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7364        pub fn regulated_metadata_opt_mut(
7365            &mut self,
7366        ) -> Option<&mut super::RegulatedCoinMetadata> {
7367            self.regulated_metadata.as_mut().map(|field| field as _)
7368        }
7369        ///Returns a mutable reference to `regulated_metadata`.
7370        ///If the field is unset, it is first initialized with the default value.
7371        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7372            self.regulated_metadata.get_or_insert_default()
7373        }
7374        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7375        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7376            self.regulated_metadata.as_ref().map(|field| field as _)
7377        }
7378        ///Sets `regulated_metadata` with the provided value.
7379        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7380            &mut self,
7381            field: T,
7382        ) {
7383            self.regulated_metadata = Some(field.into().into());
7384        }
7385        ///Sets `regulated_metadata` with the provided value.
7386        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7387            mut self,
7388            field: T,
7389        ) -> Self {
7390            self.set_regulated_metadata(field.into());
7391            self
7392        }
7393    }
7394    impl super::GetDatatypeRequest {
7395        pub const fn const_default() -> Self {
7396            Self {
7397                package_id: None,
7398                module_name: None,
7399                name: None,
7400            }
7401        }
7402        #[doc(hidden)]
7403        pub fn default_instance() -> &'static Self {
7404            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7405            &DEFAULT
7406        }
7407        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7408        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7409            self.package_id.as_mut().map(|field| field as _)
7410        }
7411        ///Returns a mutable reference to `package_id`.
7412        ///If the field is unset, it is first initialized with the default value.
7413        pub fn package_id_mut(&mut self) -> &mut String {
7414            self.package_id.get_or_insert_default()
7415        }
7416        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7417        pub fn package_id_opt(&self) -> Option<&str> {
7418            self.package_id.as_ref().map(|field| field as _)
7419        }
7420        ///Sets `package_id` with the provided value.
7421        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7422            self.package_id = Some(field.into().into());
7423        }
7424        ///Sets `package_id` with the provided value.
7425        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7426            self.set_package_id(field.into());
7427            self
7428        }
7429        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7430        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7431            self.module_name.as_mut().map(|field| field as _)
7432        }
7433        ///Returns a mutable reference to `module_name`.
7434        ///If the field is unset, it is first initialized with the default value.
7435        pub fn module_name_mut(&mut self) -> &mut String {
7436            self.module_name.get_or_insert_default()
7437        }
7438        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7439        pub fn module_name_opt(&self) -> Option<&str> {
7440            self.module_name.as_ref().map(|field| field as _)
7441        }
7442        ///Sets `module_name` with the provided value.
7443        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7444            self.module_name = Some(field.into().into());
7445        }
7446        ///Sets `module_name` with the provided value.
7447        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7448            self.set_module_name(field.into());
7449            self
7450        }
7451        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7452        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7453            self.name.as_mut().map(|field| field as _)
7454        }
7455        ///Returns a mutable reference to `name`.
7456        ///If the field is unset, it is first initialized with the default value.
7457        pub fn name_mut(&mut self) -> &mut String {
7458            self.name.get_or_insert_default()
7459        }
7460        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7461        pub fn name_opt(&self) -> Option<&str> {
7462            self.name.as_ref().map(|field| field as _)
7463        }
7464        ///Sets `name` with the provided value.
7465        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7466            self.name = Some(field.into().into());
7467        }
7468        ///Sets `name` with the provided value.
7469        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7470            self.set_name(field.into());
7471            self
7472        }
7473    }
7474    impl super::GetDatatypeResponse {
7475        pub const fn const_default() -> Self {
7476            Self { datatype: None }
7477        }
7478        #[doc(hidden)]
7479        pub fn default_instance() -> &'static Self {
7480            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7481            &DEFAULT
7482        }
7483        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7484        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7485            self.datatype
7486                .as_ref()
7487                .map(|field| field as _)
7488                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7489        }
7490        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7491        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7492            self.datatype.as_mut().map(|field| field as _)
7493        }
7494        ///Returns a mutable reference to `datatype`.
7495        ///If the field is unset, it is first initialized with the default value.
7496        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7497            self.datatype.get_or_insert_default()
7498        }
7499        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7500        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7501            self.datatype.as_ref().map(|field| field as _)
7502        }
7503        ///Sets `datatype` with the provided value.
7504        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7505            self.datatype = Some(field.into().into());
7506        }
7507        ///Sets `datatype` with the provided value.
7508        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7509            mut self,
7510            field: T,
7511        ) -> Self {
7512            self.set_datatype(field.into());
7513            self
7514        }
7515    }
7516    impl super::GetEpochRequest {
7517        pub const fn const_default() -> Self {
7518            Self {
7519                epoch: None,
7520                read_mask: None,
7521            }
7522        }
7523        #[doc(hidden)]
7524        pub fn default_instance() -> &'static Self {
7525            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7526            &DEFAULT
7527        }
7528        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7529        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7530            self.epoch.as_mut().map(|field| field as _)
7531        }
7532        ///Returns a mutable reference to `epoch`.
7533        ///If the field is unset, it is first initialized with the default value.
7534        pub fn epoch_mut(&mut self) -> &mut u64 {
7535            self.epoch.get_or_insert_default()
7536        }
7537        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7538        pub fn epoch_opt(&self) -> Option<u64> {
7539            self.epoch.as_ref().map(|field| *field)
7540        }
7541        ///Sets `epoch` with the provided value.
7542        pub fn set_epoch(&mut self, field: u64) {
7543            self.epoch = Some(field);
7544        }
7545        ///Sets `epoch` with the provided value.
7546        pub fn with_epoch(mut self, field: u64) -> Self {
7547            self.set_epoch(field);
7548            self
7549        }
7550        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7551        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7552            self.read_mask.as_mut().map(|field| field as _)
7553        }
7554        ///Returns a mutable reference to `read_mask`.
7555        ///If the field is unset, it is first initialized with the default value.
7556        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7557            self.read_mask.get_or_insert_default()
7558        }
7559        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7560        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7561            self.read_mask.as_ref().map(|field| field as _)
7562        }
7563        ///Sets `read_mask` with the provided value.
7564        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7565            self.read_mask = Some(field.into().into());
7566        }
7567        ///Sets `read_mask` with the provided value.
7568        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7569            mut self,
7570            field: T,
7571        ) -> Self {
7572            self.set_read_mask(field.into());
7573            self
7574        }
7575    }
7576    impl super::GetEpochResponse {
7577        pub const fn const_default() -> Self {
7578            Self { epoch: None }
7579        }
7580        #[doc(hidden)]
7581        pub fn default_instance() -> &'static Self {
7582            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7583            &DEFAULT
7584        }
7585        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7586        pub fn epoch(&self) -> &super::Epoch {
7587            self.epoch
7588                .as_ref()
7589                .map(|field| field as _)
7590                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7591        }
7592        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7593        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7594            self.epoch.as_mut().map(|field| field as _)
7595        }
7596        ///Returns a mutable reference to `epoch`.
7597        ///If the field is unset, it is first initialized with the default value.
7598        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7599            self.epoch.get_or_insert_default()
7600        }
7601        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7602        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7603            self.epoch.as_ref().map(|field| field as _)
7604        }
7605        ///Sets `epoch` with the provided value.
7606        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7607            self.epoch = Some(field.into().into());
7608        }
7609        ///Sets `epoch` with the provided value.
7610        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7611            self.set_epoch(field.into());
7612            self
7613        }
7614    }
7615    impl super::GetFunctionRequest {
7616        pub const fn const_default() -> Self {
7617            Self {
7618                package_id: None,
7619                module_name: None,
7620                name: None,
7621            }
7622        }
7623        #[doc(hidden)]
7624        pub fn default_instance() -> &'static Self {
7625            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7626            &DEFAULT
7627        }
7628        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7629        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7630            self.package_id.as_mut().map(|field| field as _)
7631        }
7632        ///Returns a mutable reference to `package_id`.
7633        ///If the field is unset, it is first initialized with the default value.
7634        pub fn package_id_mut(&mut self) -> &mut String {
7635            self.package_id.get_or_insert_default()
7636        }
7637        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7638        pub fn package_id_opt(&self) -> Option<&str> {
7639            self.package_id.as_ref().map(|field| field as _)
7640        }
7641        ///Sets `package_id` with the provided value.
7642        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7643            self.package_id = Some(field.into().into());
7644        }
7645        ///Sets `package_id` with the provided value.
7646        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7647            self.set_package_id(field.into());
7648            self
7649        }
7650        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7651        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7652            self.module_name.as_mut().map(|field| field as _)
7653        }
7654        ///Returns a mutable reference to `module_name`.
7655        ///If the field is unset, it is first initialized with the default value.
7656        pub fn module_name_mut(&mut self) -> &mut String {
7657            self.module_name.get_or_insert_default()
7658        }
7659        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7660        pub fn module_name_opt(&self) -> Option<&str> {
7661            self.module_name.as_ref().map(|field| field as _)
7662        }
7663        ///Sets `module_name` with the provided value.
7664        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7665            self.module_name = Some(field.into().into());
7666        }
7667        ///Sets `module_name` with the provided value.
7668        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7669            self.set_module_name(field.into());
7670            self
7671        }
7672        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7673        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7674            self.name.as_mut().map(|field| field as _)
7675        }
7676        ///Returns a mutable reference to `name`.
7677        ///If the field is unset, it is first initialized with the default value.
7678        pub fn name_mut(&mut self) -> &mut String {
7679            self.name.get_or_insert_default()
7680        }
7681        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7682        pub fn name_opt(&self) -> Option<&str> {
7683            self.name.as_ref().map(|field| field as _)
7684        }
7685        ///Sets `name` with the provided value.
7686        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7687            self.name = Some(field.into().into());
7688        }
7689        ///Sets `name` with the provided value.
7690        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7691            self.set_name(field.into());
7692            self
7693        }
7694    }
7695    impl super::GetFunctionResponse {
7696        pub const fn const_default() -> Self {
7697            Self { function: None }
7698        }
7699        #[doc(hidden)]
7700        pub fn default_instance() -> &'static Self {
7701            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7702            &DEFAULT
7703        }
7704        ///Returns the value of `function`, or the default value if `function` is unset.
7705        pub fn function(&self) -> &super::FunctionDescriptor {
7706            self.function
7707                .as_ref()
7708                .map(|field| field as _)
7709                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7710        }
7711        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7712        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7713            self.function.as_mut().map(|field| field as _)
7714        }
7715        ///Returns a mutable reference to `function`.
7716        ///If the field is unset, it is first initialized with the default value.
7717        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7718            self.function.get_or_insert_default()
7719        }
7720        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7721        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7722            self.function.as_ref().map(|field| field as _)
7723        }
7724        ///Sets `function` with the provided value.
7725        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7726            self.function = Some(field.into().into());
7727        }
7728        ///Sets `function` with the provided value.
7729        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7730            mut self,
7731            field: T,
7732        ) -> Self {
7733            self.set_function(field.into());
7734            self
7735        }
7736    }
7737    impl super::GetObjectRequest {
7738        pub const fn const_default() -> Self {
7739            Self {
7740                object_id: None,
7741                version: None,
7742                read_mask: None,
7743            }
7744        }
7745        #[doc(hidden)]
7746        pub fn default_instance() -> &'static Self {
7747            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7748            &DEFAULT
7749        }
7750        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7751        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7752            self.object_id.as_mut().map(|field| field as _)
7753        }
7754        ///Returns a mutable reference to `object_id`.
7755        ///If the field is unset, it is first initialized with the default value.
7756        pub fn object_id_mut(&mut self) -> &mut String {
7757            self.object_id.get_or_insert_default()
7758        }
7759        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7760        pub fn object_id_opt(&self) -> Option<&str> {
7761            self.object_id.as_ref().map(|field| field as _)
7762        }
7763        ///Sets `object_id` with the provided value.
7764        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7765            self.object_id = Some(field.into().into());
7766        }
7767        ///Sets `object_id` with the provided value.
7768        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7769            self.set_object_id(field.into());
7770            self
7771        }
7772        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7773        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7774            self.version.as_mut().map(|field| field as _)
7775        }
7776        ///Returns a mutable reference to `version`.
7777        ///If the field is unset, it is first initialized with the default value.
7778        pub fn version_mut(&mut self) -> &mut u64 {
7779            self.version.get_or_insert_default()
7780        }
7781        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7782        pub fn version_opt(&self) -> Option<u64> {
7783            self.version.as_ref().map(|field| *field)
7784        }
7785        ///Sets `version` with the provided value.
7786        pub fn set_version(&mut self, field: u64) {
7787            self.version = Some(field);
7788        }
7789        ///Sets `version` with the provided value.
7790        pub fn with_version(mut self, field: u64) -> Self {
7791            self.set_version(field);
7792            self
7793        }
7794        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7795        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7796            self.read_mask.as_mut().map(|field| field as _)
7797        }
7798        ///Returns a mutable reference to `read_mask`.
7799        ///If the field is unset, it is first initialized with the default value.
7800        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7801            self.read_mask.get_or_insert_default()
7802        }
7803        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7804        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7805            self.read_mask.as_ref().map(|field| field as _)
7806        }
7807        ///Sets `read_mask` with the provided value.
7808        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7809            self.read_mask = Some(field.into().into());
7810        }
7811        ///Sets `read_mask` with the provided value.
7812        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7813            mut self,
7814            field: T,
7815        ) -> Self {
7816            self.set_read_mask(field.into());
7817            self
7818        }
7819    }
7820    impl super::GetObjectResponse {
7821        pub const fn const_default() -> Self {
7822            Self { object: None }
7823        }
7824        #[doc(hidden)]
7825        pub fn default_instance() -> &'static Self {
7826            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7827            &DEFAULT
7828        }
7829        ///Returns the value of `object`, or the default value if `object` is unset.
7830        pub fn object(&self) -> &super::Object {
7831            self.object
7832                .as_ref()
7833                .map(|field| field as _)
7834                .unwrap_or_else(|| super::Object::default_instance() as _)
7835        }
7836        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7837        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7838            self.object.as_mut().map(|field| field as _)
7839        }
7840        ///Returns a mutable reference to `object`.
7841        ///If the field is unset, it is first initialized with the default value.
7842        pub fn object_mut(&mut self) -> &mut super::Object {
7843            self.object.get_or_insert_default()
7844        }
7845        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7846        pub fn object_opt(&self) -> Option<&super::Object> {
7847            self.object.as_ref().map(|field| field as _)
7848        }
7849        ///Sets `object` with the provided value.
7850        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7851            self.object = Some(field.into().into());
7852        }
7853        ///Sets `object` with the provided value.
7854        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7855            self.set_object(field.into());
7856            self
7857        }
7858    }
7859    impl super::GetObjectResult {
7860        pub const fn const_default() -> Self {
7861            Self { result: None }
7862        }
7863        #[doc(hidden)]
7864        pub fn default_instance() -> &'static Self {
7865            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7866            &DEFAULT
7867        }
7868        ///Returns the value of `object`, or the default value if `object` is unset.
7869        pub fn object(&self) -> &super::Object {
7870            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7871                field as _
7872            } else {
7873                super::Object::default_instance() as _
7874            }
7875        }
7876        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7877        pub fn object_opt(&self) -> Option<&super::Object> {
7878            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7879                Some(field as _)
7880            } else {
7881                None
7882            }
7883        }
7884        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7885        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7886            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7887                .result
7888            {
7889                Some(field as _)
7890            } else {
7891                None
7892            }
7893        }
7894        ///Returns a mutable reference to `object`.
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 object_mut(&mut self) -> &mut super::Object {
7898            if self.object_opt_mut().is_none() {
7899                self.result = Some(
7900                    super::get_object_result::Result::Object(super::Object::default()),
7901                );
7902            }
7903            self.object_opt_mut().unwrap()
7904        }
7905        ///Sets `object` with the provided value.
7906        ///If any other oneof field in the same oneof is set, it will be cleared.
7907        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7908            self.result = Some(
7909                super::get_object_result::Result::Object(field.into().into()),
7910            );
7911        }
7912        ///Sets `object` with the provided value.
7913        ///If any other oneof field in the same oneof is set, it will be cleared.
7914        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7915            self.set_object(field.into());
7916            self
7917        }
7918        ///Returns the value of `error`, or the default value if `error` is unset.
7919        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7920            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7921                field as _
7922            } else {
7923                super::super::super::super::google::rpc::Status::default_instance() as _
7924            }
7925        }
7926        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7927        pub fn error_opt(
7928            &self,
7929        ) -> Option<&super::super::super::super::google::rpc::Status> {
7930            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7931                Some(field as _)
7932            } else {
7933                None
7934            }
7935        }
7936        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7937        pub fn error_opt_mut(
7938            &mut self,
7939        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7940            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7941                .result
7942            {
7943                Some(field as _)
7944            } else {
7945                None
7946            }
7947        }
7948        ///Returns a mutable reference to `error`.
7949        ///If the field is unset, it is first initialized with the default value.
7950        ///If any other oneof field in the same oneof is set, it will be cleared.
7951        pub fn error_mut(
7952            &mut self,
7953        ) -> &mut super::super::super::super::google::rpc::Status {
7954            if self.error_opt_mut().is_none() {
7955                self.result = Some(
7956                    super::get_object_result::Result::Error(
7957                        super::super::super::super::google::rpc::Status::default(),
7958                    ),
7959                );
7960            }
7961            self.error_opt_mut().unwrap()
7962        }
7963        ///Sets `error` with the provided value.
7964        ///If any other oneof field in the same oneof is set, it will be cleared.
7965        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7966            &mut self,
7967            field: T,
7968        ) {
7969            self.result = Some(
7970                super::get_object_result::Result::Error(field.into().into()),
7971            );
7972        }
7973        ///Sets `error` with the provided value.
7974        ///If any other oneof field in the same oneof is set, it will be cleared.
7975        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7976            mut self,
7977            field: T,
7978        ) -> Self {
7979            self.set_error(field.into());
7980            self
7981        }
7982    }
7983    impl super::GetPackageRequest {
7984        pub const fn const_default() -> Self {
7985            Self { package_id: None }
7986        }
7987        #[doc(hidden)]
7988        pub fn default_instance() -> &'static Self {
7989            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7990            &DEFAULT
7991        }
7992        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7993        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7994            self.package_id.as_mut().map(|field| field as _)
7995        }
7996        ///Returns a mutable reference to `package_id`.
7997        ///If the field is unset, it is first initialized with the default value.
7998        pub fn package_id_mut(&mut self) -> &mut String {
7999            self.package_id.get_or_insert_default()
8000        }
8001        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8002        pub fn package_id_opt(&self) -> Option<&str> {
8003            self.package_id.as_ref().map(|field| field as _)
8004        }
8005        ///Sets `package_id` with the provided value.
8006        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8007            self.package_id = Some(field.into().into());
8008        }
8009        ///Sets `package_id` with the provided value.
8010        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8011            self.set_package_id(field.into());
8012            self
8013        }
8014    }
8015    impl super::GetPackageResponse {
8016        pub const fn const_default() -> Self {
8017            Self { package: None }
8018        }
8019        #[doc(hidden)]
8020        pub fn default_instance() -> &'static Self {
8021            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8022            &DEFAULT
8023        }
8024        ///Returns the value of `package`, or the default value if `package` is unset.
8025        pub fn package(&self) -> &super::Package {
8026            self.package
8027                .as_ref()
8028                .map(|field| field as _)
8029                .unwrap_or_else(|| super::Package::default_instance() as _)
8030        }
8031        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8032        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8033            self.package.as_mut().map(|field| field as _)
8034        }
8035        ///Returns a mutable reference to `package`.
8036        ///If the field is unset, it is first initialized with the default value.
8037        pub fn package_mut(&mut self) -> &mut super::Package {
8038            self.package.get_or_insert_default()
8039        }
8040        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
8041        pub fn package_opt(&self) -> Option<&super::Package> {
8042            self.package.as_ref().map(|field| field as _)
8043        }
8044        ///Sets `package` with the provided value.
8045        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8046            self.package = Some(field.into().into());
8047        }
8048        ///Sets `package` with the provided value.
8049        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8050            self.set_package(field.into());
8051            self
8052        }
8053    }
8054    impl super::GetServiceInfoRequest {
8055        pub const fn const_default() -> Self {
8056            Self {}
8057        }
8058        #[doc(hidden)]
8059        pub fn default_instance() -> &'static Self {
8060            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8061            &DEFAULT
8062        }
8063    }
8064    impl super::GetServiceInfoResponse {
8065        pub const fn const_default() -> Self {
8066            Self {
8067                chain_id: None,
8068                chain: None,
8069                epoch: None,
8070                checkpoint_height: None,
8071                timestamp: None,
8072                lowest_available_checkpoint: None,
8073                lowest_available_checkpoint_objects: None,
8074                server: None,
8075            }
8076        }
8077        #[doc(hidden)]
8078        pub fn default_instance() -> &'static Self {
8079            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8080            &DEFAULT
8081        }
8082        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8083        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8084            self.chain_id.as_mut().map(|field| field as _)
8085        }
8086        ///Returns a mutable reference to `chain_id`.
8087        ///If the field is unset, it is first initialized with the default value.
8088        pub fn chain_id_mut(&mut self) -> &mut String {
8089            self.chain_id.get_or_insert_default()
8090        }
8091        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8092        pub fn chain_id_opt(&self) -> Option<&str> {
8093            self.chain_id.as_ref().map(|field| field as _)
8094        }
8095        ///Sets `chain_id` with the provided value.
8096        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8097            self.chain_id = Some(field.into().into());
8098        }
8099        ///Sets `chain_id` with the provided value.
8100        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8101            self.set_chain_id(field.into());
8102            self
8103        }
8104        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8105        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8106            self.chain.as_mut().map(|field| field as _)
8107        }
8108        ///Returns a mutable reference to `chain`.
8109        ///If the field is unset, it is first initialized with the default value.
8110        pub fn chain_mut(&mut self) -> &mut String {
8111            self.chain.get_or_insert_default()
8112        }
8113        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8114        pub fn chain_opt(&self) -> Option<&str> {
8115            self.chain.as_ref().map(|field| field as _)
8116        }
8117        ///Sets `chain` with the provided value.
8118        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8119            self.chain = Some(field.into().into());
8120        }
8121        ///Sets `chain` with the provided value.
8122        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8123            self.set_chain(field.into());
8124            self
8125        }
8126        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8127        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8128            self.epoch.as_mut().map(|field| field as _)
8129        }
8130        ///Returns a mutable reference to `epoch`.
8131        ///If the field is unset, it is first initialized with the default value.
8132        pub fn epoch_mut(&mut self) -> &mut u64 {
8133            self.epoch.get_or_insert_default()
8134        }
8135        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8136        pub fn epoch_opt(&self) -> Option<u64> {
8137            self.epoch.as_ref().map(|field| *field)
8138        }
8139        ///Sets `epoch` with the provided value.
8140        pub fn set_epoch(&mut self, field: u64) {
8141            self.epoch = Some(field);
8142        }
8143        ///Sets `epoch` with the provided value.
8144        pub fn with_epoch(mut self, field: u64) -> Self {
8145            self.set_epoch(field);
8146            self
8147        }
8148        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8149        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8150            self.checkpoint_height.as_mut().map(|field| field as _)
8151        }
8152        ///Returns a mutable reference to `checkpoint_height`.
8153        ///If the field is unset, it is first initialized with the default value.
8154        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8155            self.checkpoint_height.get_or_insert_default()
8156        }
8157        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8158        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8159            self.checkpoint_height.as_ref().map(|field| *field)
8160        }
8161        ///Sets `checkpoint_height` with the provided value.
8162        pub fn set_checkpoint_height(&mut self, field: u64) {
8163            self.checkpoint_height = Some(field);
8164        }
8165        ///Sets `checkpoint_height` with the provided value.
8166        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8167            self.set_checkpoint_height(field);
8168            self
8169        }
8170        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8171        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8172            self.timestamp.as_mut().map(|field| field as _)
8173        }
8174        ///Returns a mutable reference to `timestamp`.
8175        ///If the field is unset, it is first initialized with the default value.
8176        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8177            self.timestamp.get_or_insert_default()
8178        }
8179        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8180        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8181            self.timestamp.as_ref().map(|field| field as _)
8182        }
8183        ///Sets `timestamp` with the provided value.
8184        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8185            self.timestamp = Some(field.into().into());
8186        }
8187        ///Sets `timestamp` with the provided value.
8188        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8189            mut self,
8190            field: T,
8191        ) -> Self {
8192            self.set_timestamp(field.into());
8193            self
8194        }
8195        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8196        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8197            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8198        }
8199        ///Returns a mutable reference to `lowest_available_checkpoint`.
8200        ///If the field is unset, it is first initialized with the default value.
8201        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8202            self.lowest_available_checkpoint.get_or_insert_default()
8203        }
8204        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8205        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8206            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8207        }
8208        ///Sets `lowest_available_checkpoint` with the provided value.
8209        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8210            self.lowest_available_checkpoint = Some(field);
8211        }
8212        ///Sets `lowest_available_checkpoint` with the provided value.
8213        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8214            self.set_lowest_available_checkpoint(field);
8215            self
8216        }
8217        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8218        pub fn lowest_available_checkpoint_objects_opt_mut(
8219            &mut self,
8220        ) -> Option<&mut u64> {
8221            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8222        }
8223        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8224        ///If the field is unset, it is first initialized with the default value.
8225        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8226            self.lowest_available_checkpoint_objects.get_or_insert_default()
8227        }
8228        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8229        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8230            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8231        }
8232        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8233        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8234            self.lowest_available_checkpoint_objects = Some(field);
8235        }
8236        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8237        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8238            self.set_lowest_available_checkpoint_objects(field);
8239            self
8240        }
8241        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8242        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8243            self.server.as_mut().map(|field| field as _)
8244        }
8245        ///Returns a mutable reference to `server`.
8246        ///If the field is unset, it is first initialized with the default value.
8247        pub fn server_mut(&mut self) -> &mut String {
8248            self.server.get_or_insert_default()
8249        }
8250        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8251        pub fn server_opt(&self) -> Option<&str> {
8252            self.server.as_ref().map(|field| field as _)
8253        }
8254        ///Sets `server` with the provided value.
8255        pub fn set_server<T: Into<String>>(&mut self, field: T) {
8256            self.server = Some(field.into().into());
8257        }
8258        ///Sets `server` with the provided value.
8259        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8260            self.set_server(field.into());
8261            self
8262        }
8263    }
8264    impl super::GetTransactionRequest {
8265        pub const fn const_default() -> Self {
8266            Self {
8267                digest: None,
8268                read_mask: None,
8269            }
8270        }
8271        #[doc(hidden)]
8272        pub fn default_instance() -> &'static Self {
8273            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8274            &DEFAULT
8275        }
8276        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8277        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8278            self.digest.as_mut().map(|field| field as _)
8279        }
8280        ///Returns a mutable reference to `digest`.
8281        ///If the field is unset, it is first initialized with the default value.
8282        pub fn digest_mut(&mut self) -> &mut String {
8283            self.digest.get_or_insert_default()
8284        }
8285        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8286        pub fn digest_opt(&self) -> Option<&str> {
8287            self.digest.as_ref().map(|field| field as _)
8288        }
8289        ///Sets `digest` with the provided value.
8290        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8291            self.digest = Some(field.into().into());
8292        }
8293        ///Sets `digest` with the provided value.
8294        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8295            self.set_digest(field.into());
8296            self
8297        }
8298        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8299        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8300            self.read_mask.as_mut().map(|field| field as _)
8301        }
8302        ///Returns a mutable reference to `read_mask`.
8303        ///If the field is unset, it is first initialized with the default value.
8304        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8305            self.read_mask.get_or_insert_default()
8306        }
8307        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8308        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8309            self.read_mask.as_ref().map(|field| field as _)
8310        }
8311        ///Sets `read_mask` with the provided value.
8312        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8313            self.read_mask = Some(field.into().into());
8314        }
8315        ///Sets `read_mask` with the provided value.
8316        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8317            mut self,
8318            field: T,
8319        ) -> Self {
8320            self.set_read_mask(field.into());
8321            self
8322        }
8323    }
8324    impl super::GetTransactionResponse {
8325        pub const fn const_default() -> Self {
8326            Self { transaction: None }
8327        }
8328        #[doc(hidden)]
8329        pub fn default_instance() -> &'static Self {
8330            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8331            &DEFAULT
8332        }
8333        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8334        pub fn transaction(&self) -> &super::ExecutedTransaction {
8335            self.transaction
8336                .as_ref()
8337                .map(|field| field as _)
8338                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8339        }
8340        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8341        pub fn transaction_opt_mut(
8342            &mut self,
8343        ) -> Option<&mut super::ExecutedTransaction> {
8344            self.transaction.as_mut().map(|field| field as _)
8345        }
8346        ///Returns a mutable reference to `transaction`.
8347        ///If the field is unset, it is first initialized with the default value.
8348        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8349            self.transaction.get_or_insert_default()
8350        }
8351        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8352        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8353            self.transaction.as_ref().map(|field| field as _)
8354        }
8355        ///Sets `transaction` with the provided value.
8356        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8357            &mut self,
8358            field: T,
8359        ) {
8360            self.transaction = Some(field.into().into());
8361        }
8362        ///Sets `transaction` with the provided value.
8363        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8364            mut self,
8365            field: T,
8366        ) -> Self {
8367            self.set_transaction(field.into());
8368            self
8369        }
8370    }
8371    impl super::GetTransactionResult {
8372        pub const fn const_default() -> Self {
8373            Self { result: None }
8374        }
8375        #[doc(hidden)]
8376        pub fn default_instance() -> &'static Self {
8377            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8378            &DEFAULT
8379        }
8380        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8381        pub fn transaction(&self) -> &super::ExecutedTransaction {
8382            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8383                .result
8384            {
8385                field as _
8386            } else {
8387                super::ExecutedTransaction::default_instance() as _
8388            }
8389        }
8390        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8391        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8392            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8393                .result
8394            {
8395                Some(field as _)
8396            } else {
8397                None
8398            }
8399        }
8400        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8401        pub fn transaction_opt_mut(
8402            &mut self,
8403        ) -> Option<&mut super::ExecutedTransaction> {
8404            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8405                .result
8406            {
8407                Some(field as _)
8408            } else {
8409                None
8410            }
8411        }
8412        ///Returns a mutable reference to `transaction`.
8413        ///If the field is unset, it is first initialized with the default value.
8414        ///If any other oneof field in the same oneof is set, it will be cleared.
8415        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8416            if self.transaction_opt_mut().is_none() {
8417                self.result = Some(
8418                    super::get_transaction_result::Result::Transaction(
8419                        super::ExecutedTransaction::default(),
8420                    ),
8421                );
8422            }
8423            self.transaction_opt_mut().unwrap()
8424        }
8425        ///Sets `transaction` with the provided value.
8426        ///If any other oneof field in the same oneof is set, it will be cleared.
8427        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8428            &mut self,
8429            field: T,
8430        ) {
8431            self.result = Some(
8432                super::get_transaction_result::Result::Transaction(field.into().into()),
8433            );
8434        }
8435        ///Sets `transaction` with the provided value.
8436        ///If any other oneof field in the same oneof is set, it will be cleared.
8437        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8438            mut self,
8439            field: T,
8440        ) -> Self {
8441            self.set_transaction(field.into());
8442            self
8443        }
8444        ///Returns the value of `error`, or the default value if `error` is unset.
8445        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8446            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8447                .result
8448            {
8449                field as _
8450            } else {
8451                super::super::super::super::google::rpc::Status::default_instance() as _
8452            }
8453        }
8454        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8455        pub fn error_opt(
8456            &self,
8457        ) -> Option<&super::super::super::super::google::rpc::Status> {
8458            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8459                .result
8460            {
8461                Some(field as _)
8462            } else {
8463                None
8464            }
8465        }
8466        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8467        pub fn error_opt_mut(
8468            &mut self,
8469        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8470            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8471                .result
8472            {
8473                Some(field as _)
8474            } else {
8475                None
8476            }
8477        }
8478        ///Returns a mutable reference to `error`.
8479        ///If the field is unset, it is first initialized with the default value.
8480        ///If any other oneof field in the same oneof is set, it will be cleared.
8481        pub fn error_mut(
8482            &mut self,
8483        ) -> &mut super::super::super::super::google::rpc::Status {
8484            if self.error_opt_mut().is_none() {
8485                self.result = Some(
8486                    super::get_transaction_result::Result::Error(
8487                        super::super::super::super::google::rpc::Status::default(),
8488                    ),
8489                );
8490            }
8491            self.error_opt_mut().unwrap()
8492        }
8493        ///Sets `error` with the provided value.
8494        ///If any other oneof field in the same oneof is set, it will be cleared.
8495        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8496            &mut self,
8497            field: T,
8498        ) {
8499            self.result = Some(
8500                super::get_transaction_result::Result::Error(field.into().into()),
8501            );
8502        }
8503        ///Sets `error` with the provided value.
8504        ///If any other oneof field in the same oneof is set, it will be cleared.
8505        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8506            mut self,
8507            field: T,
8508        ) -> Self {
8509            self.set_error(field.into());
8510            self
8511        }
8512    }
8513    impl super::IndexError {
8514        pub const fn const_default() -> Self {
8515            Self {
8516                index: None,
8517                subresult: None,
8518            }
8519        }
8520        #[doc(hidden)]
8521        pub fn default_instance() -> &'static Self {
8522            static DEFAULT: super::IndexError = super::IndexError::const_default();
8523            &DEFAULT
8524        }
8525        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8526        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8527            self.index.as_mut().map(|field| field as _)
8528        }
8529        ///Returns a mutable reference to `index`.
8530        ///If the field is unset, it is first initialized with the default value.
8531        pub fn index_mut(&mut self) -> &mut u32 {
8532            self.index.get_or_insert_default()
8533        }
8534        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8535        pub fn index_opt(&self) -> Option<u32> {
8536            self.index.as_ref().map(|field| *field)
8537        }
8538        ///Sets `index` with the provided value.
8539        pub fn set_index(&mut self, field: u32) {
8540            self.index = Some(field);
8541        }
8542        ///Sets `index` with the provided value.
8543        pub fn with_index(mut self, field: u32) -> Self {
8544            self.set_index(field);
8545            self
8546        }
8547        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8548        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8549            self.subresult.as_mut().map(|field| field as _)
8550        }
8551        ///Returns a mutable reference to `subresult`.
8552        ///If the field is unset, it is first initialized with the default value.
8553        pub fn subresult_mut(&mut self) -> &mut u32 {
8554            self.subresult.get_or_insert_default()
8555        }
8556        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8557        pub fn subresult_opt(&self) -> Option<u32> {
8558            self.subresult.as_ref().map(|field| *field)
8559        }
8560        ///Sets `subresult` with the provided value.
8561        pub fn set_subresult(&mut self, field: u32) {
8562            self.subresult = Some(field);
8563        }
8564        ///Sets `subresult` with the provided value.
8565        pub fn with_subresult(mut self, field: u32) -> Self {
8566            self.set_subresult(field);
8567            self
8568        }
8569    }
8570    impl super::Input {
8571        pub const fn const_default() -> Self {
8572            Self {
8573                kind: None,
8574                pure: None,
8575                object_id: None,
8576                version: None,
8577                digest: None,
8578                mutable: None,
8579                mutability: None,
8580                funds_withdrawal: None,
8581                literal: None,
8582            }
8583        }
8584        #[doc(hidden)]
8585        pub fn default_instance() -> &'static Self {
8586            static DEFAULT: super::Input = super::Input::const_default();
8587            &DEFAULT
8588        }
8589        ///Sets `kind` with the provided value.
8590        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8591            self.set_kind(field.into());
8592            self
8593        }
8594        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8595        pub fn pure_opt(&self) -> Option<&[u8]> {
8596            self.pure.as_ref().map(|field| field as _)
8597        }
8598        ///Sets `pure` with the provided value.
8599        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8600            self.pure = Some(field.into().into());
8601        }
8602        ///Sets `pure` with the provided value.
8603        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8604            self.set_pure(field.into());
8605            self
8606        }
8607        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8608        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8609            self.object_id.as_mut().map(|field| field as _)
8610        }
8611        ///Returns a mutable reference to `object_id`.
8612        ///If the field is unset, it is first initialized with the default value.
8613        pub fn object_id_mut(&mut self) -> &mut String {
8614            self.object_id.get_or_insert_default()
8615        }
8616        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8617        pub fn object_id_opt(&self) -> Option<&str> {
8618            self.object_id.as_ref().map(|field| field as _)
8619        }
8620        ///Sets `object_id` with the provided value.
8621        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8622            self.object_id = Some(field.into().into());
8623        }
8624        ///Sets `object_id` with the provided value.
8625        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8626            self.set_object_id(field.into());
8627            self
8628        }
8629        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8630        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8631            self.version.as_mut().map(|field| field as _)
8632        }
8633        ///Returns a mutable reference to `version`.
8634        ///If the field is unset, it is first initialized with the default value.
8635        pub fn version_mut(&mut self) -> &mut u64 {
8636            self.version.get_or_insert_default()
8637        }
8638        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8639        pub fn version_opt(&self) -> Option<u64> {
8640            self.version.as_ref().map(|field| *field)
8641        }
8642        ///Sets `version` with the provided value.
8643        pub fn set_version(&mut self, field: u64) {
8644            self.version = Some(field);
8645        }
8646        ///Sets `version` with the provided value.
8647        pub fn with_version(mut self, field: u64) -> Self {
8648            self.set_version(field);
8649            self
8650        }
8651        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8652        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8653            self.digest.as_mut().map(|field| field as _)
8654        }
8655        ///Returns a mutable reference to `digest`.
8656        ///If the field is unset, it is first initialized with the default value.
8657        pub fn digest_mut(&mut self) -> &mut String {
8658            self.digest.get_or_insert_default()
8659        }
8660        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8661        pub fn digest_opt(&self) -> Option<&str> {
8662            self.digest.as_ref().map(|field| field as _)
8663        }
8664        ///Sets `digest` with the provided value.
8665        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8666            self.digest = Some(field.into().into());
8667        }
8668        ///Sets `digest` with the provided value.
8669        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8670            self.set_digest(field.into());
8671            self
8672        }
8673        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8674        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8675            self.mutable.as_mut().map(|field| field as _)
8676        }
8677        ///Returns a mutable reference to `mutable`.
8678        ///If the field is unset, it is first initialized with the default value.
8679        pub fn mutable_mut(&mut self) -> &mut bool {
8680            self.mutable.get_or_insert_default()
8681        }
8682        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8683        pub fn mutable_opt(&self) -> Option<bool> {
8684            self.mutable.as_ref().map(|field| *field)
8685        }
8686        ///Sets `mutable` with the provided value.
8687        pub fn set_mutable(&mut self, field: bool) {
8688            self.mutable = Some(field);
8689        }
8690        ///Sets `mutable` with the provided value.
8691        pub fn with_mutable(mut self, field: bool) -> Self {
8692            self.set_mutable(field);
8693            self
8694        }
8695        ///Sets `mutability` with the provided value.
8696        pub fn with_mutability<T: Into<super::input::Mutability>>(
8697            mut self,
8698            field: T,
8699        ) -> Self {
8700            self.set_mutability(field.into());
8701            self
8702        }
8703        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
8704        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8705            self.funds_withdrawal
8706                .as_ref()
8707                .map(|field| field as _)
8708                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8709        }
8710        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8711        pub fn funds_withdrawal_opt_mut(
8712            &mut self,
8713        ) -> Option<&mut super::FundsWithdrawal> {
8714            self.funds_withdrawal.as_mut().map(|field| field as _)
8715        }
8716        ///Returns a mutable reference to `funds_withdrawal`.
8717        ///If the field is unset, it is first initialized with the default value.
8718        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8719            self.funds_withdrawal.get_or_insert_default()
8720        }
8721        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8722        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8723            self.funds_withdrawal.as_ref().map(|field| field as _)
8724        }
8725        ///Sets `funds_withdrawal` with the provided value.
8726        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8727            &mut self,
8728            field: T,
8729        ) {
8730            self.funds_withdrawal = Some(field.into().into());
8731        }
8732        ///Sets `funds_withdrawal` with the provided value.
8733        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8734            mut self,
8735            field: T,
8736        ) -> Self {
8737            self.set_funds_withdrawal(field.into());
8738            self
8739        }
8740        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8741        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8742            self.literal.as_mut().map(|field| field as _)
8743        }
8744        ///Returns a mutable reference to `literal`.
8745        ///If the field is unset, it is first initialized with the default value.
8746        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8747            self.literal.get_or_insert_default()
8748        }
8749        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8750        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8751            self.literal.as_ref().map(|field| field as _)
8752        }
8753        ///Sets `literal` with the provided value.
8754        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8755            self.literal = Some(field.into().into());
8756        }
8757        ///Sets `literal` with the provided value.
8758        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8759            self.set_literal(field.into());
8760            self
8761        }
8762    }
8763    impl super::Jwk {
8764        pub const fn const_default() -> Self {
8765            Self {
8766                kty: None,
8767                e: None,
8768                n: None,
8769                alg: None,
8770            }
8771        }
8772        #[doc(hidden)]
8773        pub fn default_instance() -> &'static Self {
8774            static DEFAULT: super::Jwk = super::Jwk::const_default();
8775            &DEFAULT
8776        }
8777        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8778        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8779            self.kty.as_mut().map(|field| field as _)
8780        }
8781        ///Returns a mutable reference to `kty`.
8782        ///If the field is unset, it is first initialized with the default value.
8783        pub fn kty_mut(&mut self) -> &mut String {
8784            self.kty.get_or_insert_default()
8785        }
8786        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8787        pub fn kty_opt(&self) -> Option<&str> {
8788            self.kty.as_ref().map(|field| field as _)
8789        }
8790        ///Sets `kty` with the provided value.
8791        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8792            self.kty = Some(field.into().into());
8793        }
8794        ///Sets `kty` with the provided value.
8795        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8796            self.set_kty(field.into());
8797            self
8798        }
8799        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8800        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8801            self.e.as_mut().map(|field| field as _)
8802        }
8803        ///Returns a mutable reference to `e`.
8804        ///If the field is unset, it is first initialized with the default value.
8805        pub fn e_mut(&mut self) -> &mut String {
8806            self.e.get_or_insert_default()
8807        }
8808        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8809        pub fn e_opt(&self) -> Option<&str> {
8810            self.e.as_ref().map(|field| field as _)
8811        }
8812        ///Sets `e` with the provided value.
8813        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8814            self.e = Some(field.into().into());
8815        }
8816        ///Sets `e` with the provided value.
8817        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8818            self.set_e(field.into());
8819            self
8820        }
8821        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8822        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8823            self.n.as_mut().map(|field| field as _)
8824        }
8825        ///Returns a mutable reference to `n`.
8826        ///If the field is unset, it is first initialized with the default value.
8827        pub fn n_mut(&mut self) -> &mut String {
8828            self.n.get_or_insert_default()
8829        }
8830        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8831        pub fn n_opt(&self) -> Option<&str> {
8832            self.n.as_ref().map(|field| field as _)
8833        }
8834        ///Sets `n` with the provided value.
8835        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8836            self.n = Some(field.into().into());
8837        }
8838        ///Sets `n` with the provided value.
8839        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8840            self.set_n(field.into());
8841            self
8842        }
8843        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8844        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8845            self.alg.as_mut().map(|field| field as _)
8846        }
8847        ///Returns a mutable reference to `alg`.
8848        ///If the field is unset, it is first initialized with the default value.
8849        pub fn alg_mut(&mut self) -> &mut String {
8850            self.alg.get_or_insert_default()
8851        }
8852        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8853        pub fn alg_opt(&self) -> Option<&str> {
8854            self.alg.as_ref().map(|field| field as _)
8855        }
8856        ///Sets `alg` with the provided value.
8857        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8858            self.alg = Some(field.into().into());
8859        }
8860        ///Sets `alg` with the provided value.
8861        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8862            self.set_alg(field.into());
8863            self
8864        }
8865    }
8866    impl super::JwkId {
8867        pub const fn const_default() -> Self {
8868            Self { iss: None, kid: None }
8869        }
8870        #[doc(hidden)]
8871        pub fn default_instance() -> &'static Self {
8872            static DEFAULT: super::JwkId = super::JwkId::const_default();
8873            &DEFAULT
8874        }
8875        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8876        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8877            self.iss.as_mut().map(|field| field as _)
8878        }
8879        ///Returns a mutable reference to `iss`.
8880        ///If the field is unset, it is first initialized with the default value.
8881        pub fn iss_mut(&mut self) -> &mut String {
8882            self.iss.get_or_insert_default()
8883        }
8884        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8885        pub fn iss_opt(&self) -> Option<&str> {
8886            self.iss.as_ref().map(|field| field as _)
8887        }
8888        ///Sets `iss` with the provided value.
8889        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8890            self.iss = Some(field.into().into());
8891        }
8892        ///Sets `iss` with the provided value.
8893        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8894            self.set_iss(field.into());
8895            self
8896        }
8897        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8898        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8899            self.kid.as_mut().map(|field| field as _)
8900        }
8901        ///Returns a mutable reference to `kid`.
8902        ///If the field is unset, it is first initialized with the default value.
8903        pub fn kid_mut(&mut self) -> &mut String {
8904            self.kid.get_or_insert_default()
8905        }
8906        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8907        pub fn kid_opt(&self) -> Option<&str> {
8908            self.kid.as_ref().map(|field| field as _)
8909        }
8910        ///Sets `kid` with the provided value.
8911        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8912            self.kid = Some(field.into().into());
8913        }
8914        ///Sets `kid` with the provided value.
8915        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8916            self.set_kid(field.into());
8917            self
8918        }
8919    }
8920    impl super::Linkage {
8921        pub const fn const_default() -> Self {
8922            Self {
8923                original_id: None,
8924                upgraded_id: None,
8925                upgraded_version: None,
8926            }
8927        }
8928        #[doc(hidden)]
8929        pub fn default_instance() -> &'static Self {
8930            static DEFAULT: super::Linkage = super::Linkage::const_default();
8931            &DEFAULT
8932        }
8933        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8934        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8935            self.original_id.as_mut().map(|field| field as _)
8936        }
8937        ///Returns a mutable reference to `original_id`.
8938        ///If the field is unset, it is first initialized with the default value.
8939        pub fn original_id_mut(&mut self) -> &mut String {
8940            self.original_id.get_or_insert_default()
8941        }
8942        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8943        pub fn original_id_opt(&self) -> Option<&str> {
8944            self.original_id.as_ref().map(|field| field as _)
8945        }
8946        ///Sets `original_id` with the provided value.
8947        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8948            self.original_id = Some(field.into().into());
8949        }
8950        ///Sets `original_id` with the provided value.
8951        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8952            self.set_original_id(field.into());
8953            self
8954        }
8955        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8956        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8957            self.upgraded_id.as_mut().map(|field| field as _)
8958        }
8959        ///Returns a mutable reference to `upgraded_id`.
8960        ///If the field is unset, it is first initialized with the default value.
8961        pub fn upgraded_id_mut(&mut self) -> &mut String {
8962            self.upgraded_id.get_or_insert_default()
8963        }
8964        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8965        pub fn upgraded_id_opt(&self) -> Option<&str> {
8966            self.upgraded_id.as_ref().map(|field| field as _)
8967        }
8968        ///Sets `upgraded_id` with the provided value.
8969        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8970            self.upgraded_id = Some(field.into().into());
8971        }
8972        ///Sets `upgraded_id` with the provided value.
8973        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8974            self.set_upgraded_id(field.into());
8975            self
8976        }
8977        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8978        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8979            self.upgraded_version.as_mut().map(|field| field as _)
8980        }
8981        ///Returns a mutable reference to `upgraded_version`.
8982        ///If the field is unset, it is first initialized with the default value.
8983        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8984            self.upgraded_version.get_or_insert_default()
8985        }
8986        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8987        pub fn upgraded_version_opt(&self) -> Option<u64> {
8988            self.upgraded_version.as_ref().map(|field| *field)
8989        }
8990        ///Sets `upgraded_version` with the provided value.
8991        pub fn set_upgraded_version(&mut self, field: u64) {
8992            self.upgraded_version = Some(field);
8993        }
8994        ///Sets `upgraded_version` with the provided value.
8995        pub fn with_upgraded_version(mut self, field: u64) -> Self {
8996            self.set_upgraded_version(field);
8997            self
8998        }
8999    }
9000    impl super::ListBalancesRequest {
9001        pub const fn const_default() -> Self {
9002            Self {
9003                owner: None,
9004                page_size: None,
9005                page_token: None,
9006            }
9007        }
9008        #[doc(hidden)]
9009        pub fn default_instance() -> &'static Self {
9010            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9011            &DEFAULT
9012        }
9013        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9014        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9015            self.owner.as_mut().map(|field| field as _)
9016        }
9017        ///Returns a mutable reference to `owner`.
9018        ///If the field is unset, it is first initialized with the default value.
9019        pub fn owner_mut(&mut self) -> &mut String {
9020            self.owner.get_or_insert_default()
9021        }
9022        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9023        pub fn owner_opt(&self) -> Option<&str> {
9024            self.owner.as_ref().map(|field| field as _)
9025        }
9026        ///Sets `owner` with the provided value.
9027        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9028            self.owner = Some(field.into().into());
9029        }
9030        ///Sets `owner` with the provided value.
9031        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9032            self.set_owner(field.into());
9033            self
9034        }
9035        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9036        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9037            self.page_size.as_mut().map(|field| field as _)
9038        }
9039        ///Returns a mutable reference to `page_size`.
9040        ///If the field is unset, it is first initialized with the default value.
9041        pub fn page_size_mut(&mut self) -> &mut u32 {
9042            self.page_size.get_or_insert_default()
9043        }
9044        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9045        pub fn page_size_opt(&self) -> Option<u32> {
9046            self.page_size.as_ref().map(|field| *field)
9047        }
9048        ///Sets `page_size` with the provided value.
9049        pub fn set_page_size(&mut self, field: u32) {
9050            self.page_size = Some(field);
9051        }
9052        ///Sets `page_size` with the provided value.
9053        pub fn with_page_size(mut self, field: u32) -> Self {
9054            self.set_page_size(field);
9055            self
9056        }
9057        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9058        pub fn page_token_opt(&self) -> Option<&[u8]> {
9059            self.page_token.as_ref().map(|field| field as _)
9060        }
9061        ///Sets `page_token` with the provided value.
9062        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9063            self.page_token = Some(field.into().into());
9064        }
9065        ///Sets `page_token` with the provided value.
9066        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9067            mut self,
9068            field: T,
9069        ) -> Self {
9070            self.set_page_token(field.into());
9071            self
9072        }
9073    }
9074    impl super::ListBalancesResponse {
9075        pub const fn const_default() -> Self {
9076            Self {
9077                balances: Vec::new(),
9078                next_page_token: None,
9079            }
9080        }
9081        #[doc(hidden)]
9082        pub fn default_instance() -> &'static Self {
9083            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9084            &DEFAULT
9085        }
9086        ///Returns the value of `balances`, or the default value if `balances` is unset.
9087        pub fn balances(&self) -> &[super::Balance] {
9088            &self.balances
9089        }
9090        ///Returns a mutable reference to `balances`.
9091        ///If the field is unset, it is first initialized with the default value.
9092        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9093            &mut self.balances
9094        }
9095        ///Sets `balances` with the provided value.
9096        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9097            self.balances = field;
9098        }
9099        ///Sets `balances` with the provided value.
9100        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9101            self.set_balances(field);
9102            self
9103        }
9104        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9105        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9106            self.next_page_token.as_ref().map(|field| field as _)
9107        }
9108        ///Sets `next_page_token` with the provided value.
9109        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9110            self.next_page_token = Some(field.into().into());
9111        }
9112        ///Sets `next_page_token` with the provided value.
9113        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9114            mut self,
9115            field: T,
9116        ) -> Self {
9117            self.set_next_page_token(field.into());
9118            self
9119        }
9120    }
9121    impl super::ListDynamicFieldsRequest {
9122        pub const fn const_default() -> Self {
9123            Self {
9124                parent: None,
9125                page_size: None,
9126                page_token: None,
9127                read_mask: None,
9128            }
9129        }
9130        #[doc(hidden)]
9131        pub fn default_instance() -> &'static Self {
9132            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9133            &DEFAULT
9134        }
9135        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9136        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9137            self.parent.as_mut().map(|field| field as _)
9138        }
9139        ///Returns a mutable reference to `parent`.
9140        ///If the field is unset, it is first initialized with the default value.
9141        pub fn parent_mut(&mut self) -> &mut String {
9142            self.parent.get_or_insert_default()
9143        }
9144        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
9145        pub fn parent_opt(&self) -> Option<&str> {
9146            self.parent.as_ref().map(|field| field as _)
9147        }
9148        ///Sets `parent` with the provided value.
9149        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9150            self.parent = Some(field.into().into());
9151        }
9152        ///Sets `parent` with the provided value.
9153        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9154            self.set_parent(field.into());
9155            self
9156        }
9157        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9158        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9159            self.page_size.as_mut().map(|field| field as _)
9160        }
9161        ///Returns a mutable reference to `page_size`.
9162        ///If the field is unset, it is first initialized with the default value.
9163        pub fn page_size_mut(&mut self) -> &mut u32 {
9164            self.page_size.get_or_insert_default()
9165        }
9166        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9167        pub fn page_size_opt(&self) -> Option<u32> {
9168            self.page_size.as_ref().map(|field| *field)
9169        }
9170        ///Sets `page_size` with the provided value.
9171        pub fn set_page_size(&mut self, field: u32) {
9172            self.page_size = Some(field);
9173        }
9174        ///Sets `page_size` with the provided value.
9175        pub fn with_page_size(mut self, field: u32) -> Self {
9176            self.set_page_size(field);
9177            self
9178        }
9179        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9180        pub fn page_token_opt(&self) -> Option<&[u8]> {
9181            self.page_token.as_ref().map(|field| field as _)
9182        }
9183        ///Sets `page_token` with the provided value.
9184        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9185            self.page_token = Some(field.into().into());
9186        }
9187        ///Sets `page_token` with the provided value.
9188        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9189            mut self,
9190            field: T,
9191        ) -> Self {
9192            self.set_page_token(field.into());
9193            self
9194        }
9195        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9196        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9197            self.read_mask.as_mut().map(|field| field as _)
9198        }
9199        ///Returns a mutable reference to `read_mask`.
9200        ///If the field is unset, it is first initialized with the default value.
9201        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9202            self.read_mask.get_or_insert_default()
9203        }
9204        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9205        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9206            self.read_mask.as_ref().map(|field| field as _)
9207        }
9208        ///Sets `read_mask` with the provided value.
9209        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9210            self.read_mask = Some(field.into().into());
9211        }
9212        ///Sets `read_mask` with the provided value.
9213        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9214            mut self,
9215            field: T,
9216        ) -> Self {
9217            self.set_read_mask(field.into());
9218            self
9219        }
9220    }
9221    impl super::ListDynamicFieldsResponse {
9222        pub const fn const_default() -> Self {
9223            Self {
9224                dynamic_fields: Vec::new(),
9225                next_page_token: None,
9226            }
9227        }
9228        #[doc(hidden)]
9229        pub fn default_instance() -> &'static Self {
9230            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9231            &DEFAULT
9232        }
9233        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
9234        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9235            &self.dynamic_fields
9236        }
9237        ///Returns a mutable reference to `dynamic_fields`.
9238        ///If the field is unset, it is first initialized with the default value.
9239        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9240            &mut self.dynamic_fields
9241        }
9242        ///Sets `dynamic_fields` with the provided value.
9243        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9244            self.dynamic_fields = field;
9245        }
9246        ///Sets `dynamic_fields` with the provided value.
9247        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9248            self.set_dynamic_fields(field);
9249            self
9250        }
9251        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9252        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9253            self.next_page_token.as_ref().map(|field| field as _)
9254        }
9255        ///Sets `next_page_token` with the provided value.
9256        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9257            self.next_page_token = Some(field.into().into());
9258        }
9259        ///Sets `next_page_token` with the provided value.
9260        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9261            mut self,
9262            field: T,
9263        ) -> Self {
9264            self.set_next_page_token(field.into());
9265            self
9266        }
9267    }
9268    impl super::ListOwnedObjectsRequest {
9269        pub const fn const_default() -> Self {
9270            Self {
9271                owner: None,
9272                page_size: None,
9273                page_token: None,
9274                read_mask: None,
9275                object_type: None,
9276            }
9277        }
9278        #[doc(hidden)]
9279        pub fn default_instance() -> &'static Self {
9280            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9281            &DEFAULT
9282        }
9283        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9284        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9285            self.owner.as_mut().map(|field| field as _)
9286        }
9287        ///Returns a mutable reference to `owner`.
9288        ///If the field is unset, it is first initialized with the default value.
9289        pub fn owner_mut(&mut self) -> &mut String {
9290            self.owner.get_or_insert_default()
9291        }
9292        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9293        pub fn owner_opt(&self) -> Option<&str> {
9294            self.owner.as_ref().map(|field| field as _)
9295        }
9296        ///Sets `owner` with the provided value.
9297        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9298            self.owner = Some(field.into().into());
9299        }
9300        ///Sets `owner` with the provided value.
9301        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9302            self.set_owner(field.into());
9303            self
9304        }
9305        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9306        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9307            self.page_size.as_mut().map(|field| field as _)
9308        }
9309        ///Returns a mutable reference to `page_size`.
9310        ///If the field is unset, it is first initialized with the default value.
9311        pub fn page_size_mut(&mut self) -> &mut u32 {
9312            self.page_size.get_or_insert_default()
9313        }
9314        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9315        pub fn page_size_opt(&self) -> Option<u32> {
9316            self.page_size.as_ref().map(|field| *field)
9317        }
9318        ///Sets `page_size` with the provided value.
9319        pub fn set_page_size(&mut self, field: u32) {
9320            self.page_size = Some(field);
9321        }
9322        ///Sets `page_size` with the provided value.
9323        pub fn with_page_size(mut self, field: u32) -> Self {
9324            self.set_page_size(field);
9325            self
9326        }
9327        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9328        pub fn page_token_opt(&self) -> Option<&[u8]> {
9329            self.page_token.as_ref().map(|field| field as _)
9330        }
9331        ///Sets `page_token` with the provided value.
9332        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9333            self.page_token = Some(field.into().into());
9334        }
9335        ///Sets `page_token` with the provided value.
9336        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9337            mut self,
9338            field: T,
9339        ) -> Self {
9340            self.set_page_token(field.into());
9341            self
9342        }
9343        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9344        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9345            self.read_mask.as_mut().map(|field| field as _)
9346        }
9347        ///Returns a mutable reference to `read_mask`.
9348        ///If the field is unset, it is first initialized with the default value.
9349        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9350            self.read_mask.get_or_insert_default()
9351        }
9352        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9353        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9354            self.read_mask.as_ref().map(|field| field as _)
9355        }
9356        ///Sets `read_mask` with the provided value.
9357        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9358            self.read_mask = Some(field.into().into());
9359        }
9360        ///Sets `read_mask` with the provided value.
9361        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9362            mut self,
9363            field: T,
9364        ) -> Self {
9365            self.set_read_mask(field.into());
9366            self
9367        }
9368        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9369        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9370            self.object_type.as_mut().map(|field| field as _)
9371        }
9372        ///Returns a mutable reference to `object_type`.
9373        ///If the field is unset, it is first initialized with the default value.
9374        pub fn object_type_mut(&mut self) -> &mut String {
9375            self.object_type.get_or_insert_default()
9376        }
9377        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9378        pub fn object_type_opt(&self) -> Option<&str> {
9379            self.object_type.as_ref().map(|field| field as _)
9380        }
9381        ///Sets `object_type` with the provided value.
9382        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9383            self.object_type = Some(field.into().into());
9384        }
9385        ///Sets `object_type` with the provided value.
9386        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9387            self.set_object_type(field.into());
9388            self
9389        }
9390    }
9391    impl super::ListOwnedObjectsResponse {
9392        pub const fn const_default() -> Self {
9393            Self {
9394                objects: Vec::new(),
9395                next_page_token: None,
9396            }
9397        }
9398        #[doc(hidden)]
9399        pub fn default_instance() -> &'static Self {
9400            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9401            &DEFAULT
9402        }
9403        ///Returns the value of `objects`, or the default value if `objects` is unset.
9404        pub fn objects(&self) -> &[super::Object] {
9405            &self.objects
9406        }
9407        ///Returns a mutable reference to `objects`.
9408        ///If the field is unset, it is first initialized with the default value.
9409        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9410            &mut self.objects
9411        }
9412        ///Sets `objects` with the provided value.
9413        pub fn set_objects(&mut self, field: Vec<super::Object>) {
9414            self.objects = field;
9415        }
9416        ///Sets `objects` with the provided value.
9417        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9418            self.set_objects(field);
9419            self
9420        }
9421        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9422        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9423            self.next_page_token.as_ref().map(|field| field as _)
9424        }
9425        ///Sets `next_page_token` with the provided value.
9426        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9427            self.next_page_token = Some(field.into().into());
9428        }
9429        ///Sets `next_page_token` with the provided value.
9430        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9431            mut self,
9432            field: T,
9433        ) -> Self {
9434            self.set_next_page_token(field.into());
9435            self
9436        }
9437    }
9438    impl super::ListPackageVersionsRequest {
9439        pub const fn const_default() -> Self {
9440            Self {
9441                package_id: None,
9442                page_size: None,
9443                page_token: None,
9444            }
9445        }
9446        #[doc(hidden)]
9447        pub fn default_instance() -> &'static Self {
9448            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9449            &DEFAULT
9450        }
9451        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9452        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9453            self.package_id.as_mut().map(|field| field as _)
9454        }
9455        ///Returns a mutable reference to `package_id`.
9456        ///If the field is unset, it is first initialized with the default value.
9457        pub fn package_id_mut(&mut self) -> &mut String {
9458            self.package_id.get_or_insert_default()
9459        }
9460        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9461        pub fn package_id_opt(&self) -> Option<&str> {
9462            self.package_id.as_ref().map(|field| field as _)
9463        }
9464        ///Sets `package_id` with the provided value.
9465        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9466            self.package_id = Some(field.into().into());
9467        }
9468        ///Sets `package_id` with the provided value.
9469        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9470            self.set_package_id(field.into());
9471            self
9472        }
9473        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9474        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9475            self.page_size.as_mut().map(|field| field as _)
9476        }
9477        ///Returns a mutable reference to `page_size`.
9478        ///If the field is unset, it is first initialized with the default value.
9479        pub fn page_size_mut(&mut self) -> &mut u32 {
9480            self.page_size.get_or_insert_default()
9481        }
9482        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9483        pub fn page_size_opt(&self) -> Option<u32> {
9484            self.page_size.as_ref().map(|field| *field)
9485        }
9486        ///Sets `page_size` with the provided value.
9487        pub fn set_page_size(&mut self, field: u32) {
9488            self.page_size = Some(field);
9489        }
9490        ///Sets `page_size` with the provided value.
9491        pub fn with_page_size(mut self, field: u32) -> Self {
9492            self.set_page_size(field);
9493            self
9494        }
9495        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9496        pub fn page_token_opt(&self) -> Option<&[u8]> {
9497            self.page_token.as_ref().map(|field| field as _)
9498        }
9499        ///Sets `page_token` with the provided value.
9500        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9501            self.page_token = Some(field.into().into());
9502        }
9503        ///Sets `page_token` with the provided value.
9504        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9505            mut self,
9506            field: T,
9507        ) -> Self {
9508            self.set_page_token(field.into());
9509            self
9510        }
9511    }
9512    impl super::ListPackageVersionsResponse {
9513        pub const fn const_default() -> Self {
9514            Self {
9515                versions: Vec::new(),
9516                next_page_token: None,
9517            }
9518        }
9519        #[doc(hidden)]
9520        pub fn default_instance() -> &'static Self {
9521            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9522            &DEFAULT
9523        }
9524        ///Returns the value of `versions`, or the default value if `versions` is unset.
9525        pub fn versions(&self) -> &[super::PackageVersion] {
9526            &self.versions
9527        }
9528        ///Returns a mutable reference to `versions`.
9529        ///If the field is unset, it is first initialized with the default value.
9530        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9531            &mut self.versions
9532        }
9533        ///Sets `versions` with the provided value.
9534        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9535            self.versions = field;
9536        }
9537        ///Sets `versions` with the provided value.
9538        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9539            self.set_versions(field);
9540            self
9541        }
9542        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9543        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9544            self.next_page_token.as_ref().map(|field| field as _)
9545        }
9546        ///Sets `next_page_token` with the provided value.
9547        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9548            self.next_page_token = Some(field.into().into());
9549        }
9550        ///Sets `next_page_token` with the provided value.
9551        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9552            mut self,
9553            field: T,
9554        ) -> Self {
9555            self.set_next_page_token(field.into());
9556            self
9557        }
9558    }
9559    impl super::LookupNameRequest {
9560        pub const fn const_default() -> Self {
9561            Self { name: None }
9562        }
9563        #[doc(hidden)]
9564        pub fn default_instance() -> &'static Self {
9565            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9566            &DEFAULT
9567        }
9568        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9569        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9570            self.name.as_mut().map(|field| field as _)
9571        }
9572        ///Returns a mutable reference to `name`.
9573        ///If the field is unset, it is first initialized with the default value.
9574        pub fn name_mut(&mut self) -> &mut String {
9575            self.name.get_or_insert_default()
9576        }
9577        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9578        pub fn name_opt(&self) -> Option<&str> {
9579            self.name.as_ref().map(|field| field as _)
9580        }
9581        ///Sets `name` with the provided value.
9582        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9583            self.name = Some(field.into().into());
9584        }
9585        ///Sets `name` with the provided value.
9586        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9587            self.set_name(field.into());
9588            self
9589        }
9590    }
9591    impl super::LookupNameResponse {
9592        pub const fn const_default() -> Self {
9593            Self { record: None }
9594        }
9595        #[doc(hidden)]
9596        pub fn default_instance() -> &'static Self {
9597            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9598            &DEFAULT
9599        }
9600        ///Returns the value of `record`, or the default value if `record` is unset.
9601        pub fn record(&self) -> &super::NameRecord {
9602            self.record
9603                .as_ref()
9604                .map(|field| field as _)
9605                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9606        }
9607        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9608        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9609            self.record.as_mut().map(|field| field as _)
9610        }
9611        ///Returns a mutable reference to `record`.
9612        ///If the field is unset, it is first initialized with the default value.
9613        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9614            self.record.get_or_insert_default()
9615        }
9616        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9617        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9618            self.record.as_ref().map(|field| field as _)
9619        }
9620        ///Sets `record` with the provided value.
9621        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9622            self.record = Some(field.into().into());
9623        }
9624        ///Sets `record` with the provided value.
9625        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9626            self.set_record(field.into());
9627            self
9628        }
9629    }
9630    impl super::MakeMoveVector {
9631        pub const fn const_default() -> Self {
9632            Self {
9633                element_type: None,
9634                elements: Vec::new(),
9635            }
9636        }
9637        #[doc(hidden)]
9638        pub fn default_instance() -> &'static Self {
9639            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9640            &DEFAULT
9641        }
9642        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9643        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9644            self.element_type.as_mut().map(|field| field as _)
9645        }
9646        ///Returns a mutable reference to `element_type`.
9647        ///If the field is unset, it is first initialized with the default value.
9648        pub fn element_type_mut(&mut self) -> &mut String {
9649            self.element_type.get_or_insert_default()
9650        }
9651        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9652        pub fn element_type_opt(&self) -> Option<&str> {
9653            self.element_type.as_ref().map(|field| field as _)
9654        }
9655        ///Sets `element_type` with the provided value.
9656        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9657            self.element_type = Some(field.into().into());
9658        }
9659        ///Sets `element_type` with the provided value.
9660        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9661            self.set_element_type(field.into());
9662            self
9663        }
9664        ///Returns the value of `elements`, or the default value if `elements` is unset.
9665        pub fn elements(&self) -> &[super::Argument] {
9666            &self.elements
9667        }
9668        ///Returns a mutable reference to `elements`.
9669        ///If the field is unset, it is first initialized with the default value.
9670        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9671            &mut self.elements
9672        }
9673        ///Sets `elements` with the provided value.
9674        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9675            self.elements = field;
9676        }
9677        ///Sets `elements` with the provided value.
9678        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9679            self.set_elements(field);
9680            self
9681        }
9682    }
9683    impl super::MergeCoins {
9684        pub const fn const_default() -> Self {
9685            Self {
9686                coin: None,
9687                coins_to_merge: Vec::new(),
9688            }
9689        }
9690        #[doc(hidden)]
9691        pub fn default_instance() -> &'static Self {
9692            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9693            &DEFAULT
9694        }
9695        ///Returns the value of `coin`, or the default value if `coin` is unset.
9696        pub fn coin(&self) -> &super::Argument {
9697            self.coin
9698                .as_ref()
9699                .map(|field| field as _)
9700                .unwrap_or_else(|| super::Argument::default_instance() as _)
9701        }
9702        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9703        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9704            self.coin.as_mut().map(|field| field as _)
9705        }
9706        ///Returns a mutable reference to `coin`.
9707        ///If the field is unset, it is first initialized with the default value.
9708        pub fn coin_mut(&mut self) -> &mut super::Argument {
9709            self.coin.get_or_insert_default()
9710        }
9711        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9712        pub fn coin_opt(&self) -> Option<&super::Argument> {
9713            self.coin.as_ref().map(|field| field as _)
9714        }
9715        ///Sets `coin` with the provided value.
9716        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9717            self.coin = Some(field.into().into());
9718        }
9719        ///Sets `coin` with the provided value.
9720        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9721            self.set_coin(field.into());
9722            self
9723        }
9724        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9725        pub fn coins_to_merge(&self) -> &[super::Argument] {
9726            &self.coins_to_merge
9727        }
9728        ///Returns a mutable reference to `coins_to_merge`.
9729        ///If the field is unset, it is first initialized with the default value.
9730        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9731            &mut self.coins_to_merge
9732        }
9733        ///Sets `coins_to_merge` with the provided value.
9734        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9735            self.coins_to_merge = field;
9736        }
9737        ///Sets `coins_to_merge` with the provided value.
9738        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9739            self.set_coins_to_merge(field);
9740            self
9741        }
9742    }
9743    impl super::Module {
9744        pub const fn const_default() -> Self {
9745            Self {
9746                name: None,
9747                contents: None,
9748                datatypes: Vec::new(),
9749                functions: Vec::new(),
9750            }
9751        }
9752        #[doc(hidden)]
9753        pub fn default_instance() -> &'static Self {
9754            static DEFAULT: super::Module = super::Module::const_default();
9755            &DEFAULT
9756        }
9757        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9758        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9759            self.name.as_mut().map(|field| field as _)
9760        }
9761        ///Returns a mutable reference to `name`.
9762        ///If the field is unset, it is first initialized with the default value.
9763        pub fn name_mut(&mut self) -> &mut String {
9764            self.name.get_or_insert_default()
9765        }
9766        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9767        pub fn name_opt(&self) -> Option<&str> {
9768            self.name.as_ref().map(|field| field as _)
9769        }
9770        ///Sets `name` with the provided value.
9771        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9772            self.name = Some(field.into().into());
9773        }
9774        ///Sets `name` with the provided value.
9775        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9776            self.set_name(field.into());
9777            self
9778        }
9779        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9780        pub fn contents_opt(&self) -> Option<&[u8]> {
9781            self.contents.as_ref().map(|field| field as _)
9782        }
9783        ///Sets `contents` with the provided value.
9784        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9785            self.contents = Some(field.into().into());
9786        }
9787        ///Sets `contents` with the provided value.
9788        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9789            mut self,
9790            field: T,
9791        ) -> Self {
9792            self.set_contents(field.into());
9793            self
9794        }
9795        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9796        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9797            &self.datatypes
9798        }
9799        ///Returns a mutable reference to `datatypes`.
9800        ///If the field is unset, it is first initialized with the default value.
9801        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9802            &mut self.datatypes
9803        }
9804        ///Sets `datatypes` with the provided value.
9805        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9806            self.datatypes = field;
9807        }
9808        ///Sets `datatypes` with the provided value.
9809        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9810            self.set_datatypes(field);
9811            self
9812        }
9813        ///Returns the value of `functions`, or the default value if `functions` is unset.
9814        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9815            &self.functions
9816        }
9817        ///Returns a mutable reference to `functions`.
9818        ///If the field is unset, it is first initialized with the default value.
9819        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9820            &mut self.functions
9821        }
9822        ///Sets `functions` with the provided value.
9823        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9824            self.functions = field;
9825        }
9826        ///Sets `functions` with the provided value.
9827        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9828            self.set_functions(field);
9829            self
9830        }
9831    }
9832    impl super::MoveAbort {
9833        pub const fn const_default() -> Self {
9834            Self {
9835                abort_code: None,
9836                location: None,
9837                clever_error: None,
9838            }
9839        }
9840        #[doc(hidden)]
9841        pub fn default_instance() -> &'static Self {
9842            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9843            &DEFAULT
9844        }
9845        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9846        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9847            self.abort_code.as_mut().map(|field| field as _)
9848        }
9849        ///Returns a mutable reference to `abort_code`.
9850        ///If the field is unset, it is first initialized with the default value.
9851        pub fn abort_code_mut(&mut self) -> &mut u64 {
9852            self.abort_code.get_or_insert_default()
9853        }
9854        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9855        pub fn abort_code_opt(&self) -> Option<u64> {
9856            self.abort_code.as_ref().map(|field| *field)
9857        }
9858        ///Sets `abort_code` with the provided value.
9859        pub fn set_abort_code(&mut self, field: u64) {
9860            self.abort_code = Some(field);
9861        }
9862        ///Sets `abort_code` with the provided value.
9863        pub fn with_abort_code(mut self, field: u64) -> Self {
9864            self.set_abort_code(field);
9865            self
9866        }
9867        ///Returns the value of `location`, or the default value if `location` is unset.
9868        pub fn location(&self) -> &super::MoveLocation {
9869            self.location
9870                .as_ref()
9871                .map(|field| field as _)
9872                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9873        }
9874        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9875        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9876            self.location.as_mut().map(|field| field as _)
9877        }
9878        ///Returns a mutable reference to `location`.
9879        ///If the field is unset, it is first initialized with the default value.
9880        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9881            self.location.get_or_insert_default()
9882        }
9883        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9884        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9885            self.location.as_ref().map(|field| field as _)
9886        }
9887        ///Sets `location` with the provided value.
9888        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9889            self.location = Some(field.into().into());
9890        }
9891        ///Sets `location` with the provided value.
9892        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9893            self.set_location(field.into());
9894            self
9895        }
9896        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9897        pub fn clever_error(&self) -> &super::CleverError {
9898            self.clever_error
9899                .as_ref()
9900                .map(|field| field as _)
9901                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9902        }
9903        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9904        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9905            self.clever_error.as_mut().map(|field| field as _)
9906        }
9907        ///Returns a mutable reference to `clever_error`.
9908        ///If the field is unset, it is first initialized with the default value.
9909        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9910            self.clever_error.get_or_insert_default()
9911        }
9912        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9913        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9914            self.clever_error.as_ref().map(|field| field as _)
9915        }
9916        ///Sets `clever_error` with the provided value.
9917        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9918            self.clever_error = Some(field.into().into());
9919        }
9920        ///Sets `clever_error` with the provided value.
9921        pub fn with_clever_error<T: Into<super::CleverError>>(
9922            mut self,
9923            field: T,
9924        ) -> Self {
9925            self.set_clever_error(field.into());
9926            self
9927        }
9928    }
9929    impl super::MoveCall {
9930        pub const fn const_default() -> Self {
9931            Self {
9932                package: None,
9933                module: None,
9934                function: None,
9935                type_arguments: Vec::new(),
9936                arguments: Vec::new(),
9937            }
9938        }
9939        #[doc(hidden)]
9940        pub fn default_instance() -> &'static Self {
9941            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9942            &DEFAULT
9943        }
9944        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9945        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9946            self.package.as_mut().map(|field| field as _)
9947        }
9948        ///Returns a mutable reference to `package`.
9949        ///If the field is unset, it is first initialized with the default value.
9950        pub fn package_mut(&mut self) -> &mut String {
9951            self.package.get_or_insert_default()
9952        }
9953        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9954        pub fn package_opt(&self) -> Option<&str> {
9955            self.package.as_ref().map(|field| field as _)
9956        }
9957        ///Sets `package` with the provided value.
9958        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9959            self.package = Some(field.into().into());
9960        }
9961        ///Sets `package` with the provided value.
9962        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9963            self.set_package(field.into());
9964            self
9965        }
9966        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9967        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9968            self.module.as_mut().map(|field| field as _)
9969        }
9970        ///Returns a mutable reference to `module`.
9971        ///If the field is unset, it is first initialized with the default value.
9972        pub fn module_mut(&mut self) -> &mut String {
9973            self.module.get_or_insert_default()
9974        }
9975        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9976        pub fn module_opt(&self) -> Option<&str> {
9977            self.module.as_ref().map(|field| field as _)
9978        }
9979        ///Sets `module` with the provided value.
9980        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9981            self.module = Some(field.into().into());
9982        }
9983        ///Sets `module` with the provided value.
9984        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9985            self.set_module(field.into());
9986            self
9987        }
9988        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9989        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9990            self.function.as_mut().map(|field| field as _)
9991        }
9992        ///Returns a mutable reference to `function`.
9993        ///If the field is unset, it is first initialized with the default value.
9994        pub fn function_mut(&mut self) -> &mut String {
9995            self.function.get_or_insert_default()
9996        }
9997        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9998        pub fn function_opt(&self) -> Option<&str> {
9999            self.function.as_ref().map(|field| field as _)
10000        }
10001        ///Sets `function` with the provided value.
10002        pub fn set_function<T: Into<String>>(&mut self, field: T) {
10003            self.function = Some(field.into().into());
10004        }
10005        ///Sets `function` with the provided value.
10006        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
10007            self.set_function(field.into());
10008            self
10009        }
10010        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
10011        pub fn type_arguments(&self) -> &[String] {
10012            &self.type_arguments
10013        }
10014        ///Returns a mutable reference to `type_arguments`.
10015        ///If the field is unset, it is first initialized with the default value.
10016        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
10017            &mut self.type_arguments
10018        }
10019        ///Sets `type_arguments` with the provided value.
10020        pub fn set_type_arguments(&mut self, field: Vec<String>) {
10021            self.type_arguments = field;
10022        }
10023        ///Sets `type_arguments` with the provided value.
10024        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
10025            self.set_type_arguments(field);
10026            self
10027        }
10028        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
10029        pub fn arguments(&self) -> &[super::Argument] {
10030            &self.arguments
10031        }
10032        ///Returns a mutable reference to `arguments`.
10033        ///If the field is unset, it is first initialized with the default value.
10034        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
10035            &mut self.arguments
10036        }
10037        ///Sets `arguments` with the provided value.
10038        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
10039            self.arguments = field;
10040        }
10041        ///Sets `arguments` with the provided value.
10042        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
10043            self.set_arguments(field);
10044            self
10045        }
10046    }
10047    impl super::MoveLocation {
10048        pub const fn const_default() -> Self {
10049            Self {
10050                package: None,
10051                module: None,
10052                function: None,
10053                instruction: None,
10054                function_name: None,
10055            }
10056        }
10057        #[doc(hidden)]
10058        pub fn default_instance() -> &'static Self {
10059            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
10060            &DEFAULT
10061        }
10062        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10063        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10064            self.package.as_mut().map(|field| field as _)
10065        }
10066        ///Returns a mutable reference to `package`.
10067        ///If the field is unset, it is first initialized with the default value.
10068        pub fn package_mut(&mut self) -> &mut String {
10069            self.package.get_or_insert_default()
10070        }
10071        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10072        pub fn package_opt(&self) -> Option<&str> {
10073            self.package.as_ref().map(|field| field as _)
10074        }
10075        ///Sets `package` with the provided value.
10076        pub fn set_package<T: Into<String>>(&mut self, field: T) {
10077            self.package = Some(field.into().into());
10078        }
10079        ///Sets `package` with the provided value.
10080        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10081            self.set_package(field.into());
10082            self
10083        }
10084        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10085        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10086            self.module.as_mut().map(|field| field as _)
10087        }
10088        ///Returns a mutable reference to `module`.
10089        ///If the field is unset, it is first initialized with the default value.
10090        pub fn module_mut(&mut self) -> &mut String {
10091            self.module.get_or_insert_default()
10092        }
10093        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
10094        pub fn module_opt(&self) -> Option<&str> {
10095            self.module.as_ref().map(|field| field as _)
10096        }
10097        ///Sets `module` with the provided value.
10098        pub fn set_module<T: Into<String>>(&mut self, field: T) {
10099            self.module = Some(field.into().into());
10100        }
10101        ///Sets `module` with the provided value.
10102        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10103            self.set_module(field.into());
10104            self
10105        }
10106        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10107        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
10108            self.function.as_mut().map(|field| field as _)
10109        }
10110        ///Returns a mutable reference to `function`.
10111        ///If the field is unset, it is first initialized with the default value.
10112        pub fn function_mut(&mut self) -> &mut u32 {
10113            self.function.get_or_insert_default()
10114        }
10115        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
10116        pub fn function_opt(&self) -> Option<u32> {
10117            self.function.as_ref().map(|field| *field)
10118        }
10119        ///Sets `function` with the provided value.
10120        pub fn set_function(&mut self, field: u32) {
10121            self.function = Some(field);
10122        }
10123        ///Sets `function` with the provided value.
10124        pub fn with_function(mut self, field: u32) -> Self {
10125            self.set_function(field);
10126            self
10127        }
10128        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10129        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10130            self.instruction.as_mut().map(|field| field as _)
10131        }
10132        ///Returns a mutable reference to `instruction`.
10133        ///If the field is unset, it is first initialized with the default value.
10134        pub fn instruction_mut(&mut self) -> &mut u32 {
10135            self.instruction.get_or_insert_default()
10136        }
10137        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10138        pub fn instruction_opt(&self) -> Option<u32> {
10139            self.instruction.as_ref().map(|field| *field)
10140        }
10141        ///Sets `instruction` with the provided value.
10142        pub fn set_instruction(&mut self, field: u32) {
10143            self.instruction = Some(field);
10144        }
10145        ///Sets `instruction` with the provided value.
10146        pub fn with_instruction(mut self, field: u32) -> Self {
10147            self.set_instruction(field);
10148            self
10149        }
10150        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10151        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10152            self.function_name.as_mut().map(|field| field as _)
10153        }
10154        ///Returns a mutable reference to `function_name`.
10155        ///If the field is unset, it is first initialized with the default value.
10156        pub fn function_name_mut(&mut self) -> &mut String {
10157            self.function_name.get_or_insert_default()
10158        }
10159        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10160        pub fn function_name_opt(&self) -> Option<&str> {
10161            self.function_name.as_ref().map(|field| field as _)
10162        }
10163        ///Sets `function_name` with the provided value.
10164        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10165            self.function_name = Some(field.into().into());
10166        }
10167        ///Sets `function_name` with the provided value.
10168        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10169            self.set_function_name(field.into());
10170            self
10171        }
10172    }
10173    impl super::MoveTable {
10174        pub const fn const_default() -> Self {
10175            Self { id: None, size: None }
10176        }
10177        #[doc(hidden)]
10178        pub fn default_instance() -> &'static Self {
10179            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10180            &DEFAULT
10181        }
10182        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10183        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10184            self.id.as_mut().map(|field| field as _)
10185        }
10186        ///Returns a mutable reference to `id`.
10187        ///If the field is unset, it is first initialized with the default value.
10188        pub fn id_mut(&mut self) -> &mut String {
10189            self.id.get_or_insert_default()
10190        }
10191        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10192        pub fn id_opt(&self) -> Option<&str> {
10193            self.id.as_ref().map(|field| field as _)
10194        }
10195        ///Sets `id` with the provided value.
10196        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10197            self.id = Some(field.into().into());
10198        }
10199        ///Sets `id` with the provided value.
10200        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10201            self.set_id(field.into());
10202            self
10203        }
10204        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10205        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10206            self.size.as_mut().map(|field| field as _)
10207        }
10208        ///Returns a mutable reference to `size`.
10209        ///If the field is unset, it is first initialized with the default value.
10210        pub fn size_mut(&mut self) -> &mut u64 {
10211            self.size.get_or_insert_default()
10212        }
10213        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10214        pub fn size_opt(&self) -> Option<u64> {
10215            self.size.as_ref().map(|field| *field)
10216        }
10217        ///Sets `size` with the provided value.
10218        pub fn set_size(&mut self, field: u64) {
10219            self.size = Some(field);
10220        }
10221        ///Sets `size` with the provided value.
10222        pub fn with_size(mut self, field: u64) -> Self {
10223            self.set_size(field);
10224            self
10225        }
10226    }
10227    impl super::MultisigAggregatedSignature {
10228        pub const fn const_default() -> Self {
10229            Self {
10230                signatures: Vec::new(),
10231                bitmap: None,
10232                legacy_bitmap: None,
10233                committee: None,
10234            }
10235        }
10236        #[doc(hidden)]
10237        pub fn default_instance() -> &'static Self {
10238            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10239            &DEFAULT
10240        }
10241        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
10242        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10243            &self.signatures
10244        }
10245        ///Returns a mutable reference to `signatures`.
10246        ///If the field is unset, it is first initialized with the default value.
10247        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10248            &mut self.signatures
10249        }
10250        ///Sets `signatures` with the provided value.
10251        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10252            self.signatures = field;
10253        }
10254        ///Sets `signatures` with the provided value.
10255        pub fn with_signatures(
10256            mut self,
10257            field: Vec<super::MultisigMemberSignature>,
10258        ) -> Self {
10259            self.set_signatures(field);
10260            self
10261        }
10262        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10263        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10264            self.bitmap.as_mut().map(|field| field as _)
10265        }
10266        ///Returns a mutable reference to `bitmap`.
10267        ///If the field is unset, it is first initialized with the default value.
10268        pub fn bitmap_mut(&mut self) -> &mut u32 {
10269            self.bitmap.get_or_insert_default()
10270        }
10271        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10272        pub fn bitmap_opt(&self) -> Option<u32> {
10273            self.bitmap.as_ref().map(|field| *field)
10274        }
10275        ///Sets `bitmap` with the provided value.
10276        pub fn set_bitmap(&mut self, field: u32) {
10277            self.bitmap = Some(field);
10278        }
10279        ///Sets `bitmap` with the provided value.
10280        pub fn with_bitmap(mut self, field: u32) -> Self {
10281            self.set_bitmap(field);
10282            self
10283        }
10284        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10285        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10286            self.legacy_bitmap.as_ref().map(|field| field as _)
10287        }
10288        ///Sets `legacy_bitmap` with the provided value.
10289        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10290            self.legacy_bitmap = Some(field.into().into());
10291        }
10292        ///Sets `legacy_bitmap` with the provided value.
10293        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10294            mut self,
10295            field: T,
10296        ) -> Self {
10297            self.set_legacy_bitmap(field.into());
10298            self
10299        }
10300        ///Returns the value of `committee`, or the default value if `committee` is unset.
10301        pub fn committee(&self) -> &super::MultisigCommittee {
10302            self.committee
10303                .as_ref()
10304                .map(|field| field as _)
10305                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10306        }
10307        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10308        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10309            self.committee.as_mut().map(|field| field as _)
10310        }
10311        ///Returns a mutable reference to `committee`.
10312        ///If the field is unset, it is first initialized with the default value.
10313        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10314            self.committee.get_or_insert_default()
10315        }
10316        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
10317        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10318            self.committee.as_ref().map(|field| field as _)
10319        }
10320        ///Sets `committee` with the provided value.
10321        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10322            self.committee = Some(field.into().into());
10323        }
10324        ///Sets `committee` with the provided value.
10325        pub fn with_committee<T: Into<super::MultisigCommittee>>(
10326            mut self,
10327            field: T,
10328        ) -> Self {
10329            self.set_committee(field.into());
10330            self
10331        }
10332    }
10333    impl super::MultisigCommittee {
10334        pub const fn const_default() -> Self {
10335            Self {
10336                members: Vec::new(),
10337                threshold: None,
10338            }
10339        }
10340        #[doc(hidden)]
10341        pub fn default_instance() -> &'static Self {
10342            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10343            &DEFAULT
10344        }
10345        ///Returns the value of `members`, or the default value if `members` is unset.
10346        pub fn members(&self) -> &[super::MultisigMember] {
10347            &self.members
10348        }
10349        ///Returns a mutable reference to `members`.
10350        ///If the field is unset, it is first initialized with the default value.
10351        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10352            &mut self.members
10353        }
10354        ///Sets `members` with the provided value.
10355        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10356            self.members = field;
10357        }
10358        ///Sets `members` with the provided value.
10359        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10360            self.set_members(field);
10361            self
10362        }
10363        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10364        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10365            self.threshold.as_mut().map(|field| field as _)
10366        }
10367        ///Returns a mutable reference to `threshold`.
10368        ///If the field is unset, it is first initialized with the default value.
10369        pub fn threshold_mut(&mut self) -> &mut u32 {
10370            self.threshold.get_or_insert_default()
10371        }
10372        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
10373        pub fn threshold_opt(&self) -> Option<u32> {
10374            self.threshold.as_ref().map(|field| *field)
10375        }
10376        ///Sets `threshold` with the provided value.
10377        pub fn set_threshold(&mut self, field: u32) {
10378            self.threshold = Some(field);
10379        }
10380        ///Sets `threshold` with the provided value.
10381        pub fn with_threshold(mut self, field: u32) -> Self {
10382            self.set_threshold(field);
10383            self
10384        }
10385    }
10386    impl super::MultisigMember {
10387        pub const fn const_default() -> Self {
10388            Self {
10389                public_key: None,
10390                weight: None,
10391            }
10392        }
10393        #[doc(hidden)]
10394        pub fn default_instance() -> &'static Self {
10395            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10396            &DEFAULT
10397        }
10398        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
10399        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10400            self.public_key
10401                .as_ref()
10402                .map(|field| field as _)
10403                .unwrap_or_else(|| {
10404                    super::MultisigMemberPublicKey::default_instance() as _
10405                })
10406        }
10407        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10408        pub fn public_key_opt_mut(
10409            &mut self,
10410        ) -> Option<&mut super::MultisigMemberPublicKey> {
10411            self.public_key.as_mut().map(|field| field as _)
10412        }
10413        ///Returns a mutable reference to `public_key`.
10414        ///If the field is unset, it is first initialized with the default value.
10415        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10416            self.public_key.get_or_insert_default()
10417        }
10418        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10419        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10420            self.public_key.as_ref().map(|field| field as _)
10421        }
10422        ///Sets `public_key` with the provided value.
10423        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10424            &mut self,
10425            field: T,
10426        ) {
10427            self.public_key = Some(field.into().into());
10428        }
10429        ///Sets `public_key` with the provided value.
10430        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10431            mut self,
10432            field: T,
10433        ) -> Self {
10434            self.set_public_key(field.into());
10435            self
10436        }
10437        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10438        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10439            self.weight.as_mut().map(|field| field as _)
10440        }
10441        ///Returns a mutable reference to `weight`.
10442        ///If the field is unset, it is first initialized with the default value.
10443        pub fn weight_mut(&mut self) -> &mut u32 {
10444            self.weight.get_or_insert_default()
10445        }
10446        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
10447        pub fn weight_opt(&self) -> Option<u32> {
10448            self.weight.as_ref().map(|field| *field)
10449        }
10450        ///Sets `weight` with the provided value.
10451        pub fn set_weight(&mut self, field: u32) {
10452            self.weight = Some(field);
10453        }
10454        ///Sets `weight` with the provided value.
10455        pub fn with_weight(mut self, field: u32) -> Self {
10456            self.set_weight(field);
10457            self
10458        }
10459    }
10460    impl super::MultisigMemberPublicKey {
10461        pub const fn const_default() -> Self {
10462            Self {
10463                scheme: None,
10464                public_key: None,
10465                zklogin: None,
10466            }
10467        }
10468        #[doc(hidden)]
10469        pub fn default_instance() -> &'static Self {
10470            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10471            &DEFAULT
10472        }
10473        ///Sets `scheme` with the provided value.
10474        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10475            self.set_scheme(field.into());
10476            self
10477        }
10478        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10479        pub fn public_key_opt(&self) -> Option<&[u8]> {
10480            self.public_key.as_ref().map(|field| field as _)
10481        }
10482        ///Sets `public_key` with the provided value.
10483        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10484            self.public_key = Some(field.into().into());
10485        }
10486        ///Sets `public_key` with the provided value.
10487        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10488            mut self,
10489            field: T,
10490        ) -> Self {
10491            self.set_public_key(field.into());
10492            self
10493        }
10494        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10495        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10496            self.zklogin
10497                .as_ref()
10498                .map(|field| field as _)
10499                .unwrap_or_else(|| {
10500                    super::ZkLoginPublicIdentifier::default_instance() as _
10501                })
10502        }
10503        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10504        pub fn zklogin_opt_mut(
10505            &mut self,
10506        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10507            self.zklogin.as_mut().map(|field| field as _)
10508        }
10509        ///Returns a mutable reference to `zklogin`.
10510        ///If the field is unset, it is first initialized with the default value.
10511        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10512            self.zklogin.get_or_insert_default()
10513        }
10514        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10515        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10516            self.zklogin.as_ref().map(|field| field as _)
10517        }
10518        ///Sets `zklogin` with the provided value.
10519        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10520            &mut self,
10521            field: T,
10522        ) {
10523            self.zklogin = Some(field.into().into());
10524        }
10525        ///Sets `zklogin` with the provided value.
10526        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10527            mut self,
10528            field: T,
10529        ) -> Self {
10530            self.set_zklogin(field.into());
10531            self
10532        }
10533    }
10534    impl super::MultisigMemberSignature {
10535        pub const fn const_default() -> Self {
10536            Self {
10537                scheme: None,
10538                signature: None,
10539                zklogin: None,
10540                passkey: None,
10541            }
10542        }
10543        #[doc(hidden)]
10544        pub fn default_instance() -> &'static Self {
10545            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10546            &DEFAULT
10547        }
10548        ///Sets `scheme` with the provided value.
10549        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10550            self.set_scheme(field.into());
10551            self
10552        }
10553        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10554        pub fn signature_opt(&self) -> Option<&[u8]> {
10555            self.signature.as_ref().map(|field| field as _)
10556        }
10557        ///Sets `signature` with the provided value.
10558        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10559            self.signature = Some(field.into().into());
10560        }
10561        ///Sets `signature` with the provided value.
10562        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10563            mut self,
10564            field: T,
10565        ) -> Self {
10566            self.set_signature(field.into());
10567            self
10568        }
10569        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10570        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10571            self.zklogin
10572                .as_ref()
10573                .map(|field| field as _)
10574                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10575        }
10576        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10577        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10578            self.zklogin.as_mut().map(|field| field as _)
10579        }
10580        ///Returns a mutable reference to `zklogin`.
10581        ///If the field is unset, it is first initialized with the default value.
10582        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10583            self.zklogin.get_or_insert_default()
10584        }
10585        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10586        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10587            self.zklogin.as_ref().map(|field| field as _)
10588        }
10589        ///Sets `zklogin` with the provided value.
10590        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10591            self.zklogin = Some(field.into().into());
10592        }
10593        ///Sets `zklogin` with the provided value.
10594        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10595            mut self,
10596            field: T,
10597        ) -> Self {
10598            self.set_zklogin(field.into());
10599            self
10600        }
10601        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10602        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10603            self.passkey
10604                .as_ref()
10605                .map(|field| field as _)
10606                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10607        }
10608        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10609        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10610            self.passkey.as_mut().map(|field| field as _)
10611        }
10612        ///Returns a mutable reference to `passkey`.
10613        ///If the field is unset, it is first initialized with the default value.
10614        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10615            self.passkey.get_or_insert_default()
10616        }
10617        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10618        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10619            self.passkey.as_ref().map(|field| field as _)
10620        }
10621        ///Sets `passkey` with the provided value.
10622        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10623            self.passkey = Some(field.into().into());
10624        }
10625        ///Sets `passkey` with the provided value.
10626        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10627            mut self,
10628            field: T,
10629        ) -> Self {
10630            self.set_passkey(field.into());
10631            self
10632        }
10633    }
10634    impl super::NameRecord {
10635        pub const fn const_default() -> Self {
10636            Self {
10637                id: None,
10638                name: None,
10639                registration_nft_id: None,
10640                expiration_timestamp: None,
10641                target_address: None,
10642                data: std::collections::BTreeMap::new(),
10643            }
10644        }
10645        #[doc(hidden)]
10646        pub fn default_instance() -> &'static Self {
10647            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10648            &DEFAULT
10649        }
10650        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10651        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10652            self.id.as_mut().map(|field| field as _)
10653        }
10654        ///Returns a mutable reference to `id`.
10655        ///If the field is unset, it is first initialized with the default value.
10656        pub fn id_mut(&mut self) -> &mut String {
10657            self.id.get_or_insert_default()
10658        }
10659        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10660        pub fn id_opt(&self) -> Option<&str> {
10661            self.id.as_ref().map(|field| field as _)
10662        }
10663        ///Sets `id` with the provided value.
10664        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10665            self.id = Some(field.into().into());
10666        }
10667        ///Sets `id` with the provided value.
10668        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10669            self.set_id(field.into());
10670            self
10671        }
10672        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10673        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10674            self.name.as_mut().map(|field| field as _)
10675        }
10676        ///Returns a mutable reference to `name`.
10677        ///If the field is unset, it is first initialized with the default value.
10678        pub fn name_mut(&mut self) -> &mut String {
10679            self.name.get_or_insert_default()
10680        }
10681        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10682        pub fn name_opt(&self) -> Option<&str> {
10683            self.name.as_ref().map(|field| field as _)
10684        }
10685        ///Sets `name` with the provided value.
10686        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10687            self.name = Some(field.into().into());
10688        }
10689        ///Sets `name` with the provided value.
10690        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10691            self.set_name(field.into());
10692            self
10693        }
10694        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10695        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10696            self.registration_nft_id.as_mut().map(|field| field as _)
10697        }
10698        ///Returns a mutable reference to `registration_nft_id`.
10699        ///If the field is unset, it is first initialized with the default value.
10700        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10701            self.registration_nft_id.get_or_insert_default()
10702        }
10703        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10704        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10705            self.registration_nft_id.as_ref().map(|field| field as _)
10706        }
10707        ///Sets `registration_nft_id` with the provided value.
10708        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10709            self.registration_nft_id = Some(field.into().into());
10710        }
10711        ///Sets `registration_nft_id` with the provided value.
10712        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10713            self.set_registration_nft_id(field.into());
10714            self
10715        }
10716        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10717        pub fn expiration_timestamp_opt_mut(
10718            &mut self,
10719        ) -> Option<&mut ::prost_types::Timestamp> {
10720            self.expiration_timestamp.as_mut().map(|field| field as _)
10721        }
10722        ///Returns a mutable reference to `expiration_timestamp`.
10723        ///If the field is unset, it is first initialized with the default value.
10724        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10725            self.expiration_timestamp.get_or_insert_default()
10726        }
10727        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10728        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10729            self.expiration_timestamp.as_ref().map(|field| field as _)
10730        }
10731        ///Sets `expiration_timestamp` with the provided value.
10732        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10733            &mut self,
10734            field: T,
10735        ) {
10736            self.expiration_timestamp = Some(field.into().into());
10737        }
10738        ///Sets `expiration_timestamp` with the provided value.
10739        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10740            mut self,
10741            field: T,
10742        ) -> Self {
10743            self.set_expiration_timestamp(field.into());
10744            self
10745        }
10746        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10747        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10748            self.target_address.as_mut().map(|field| field as _)
10749        }
10750        ///Returns a mutable reference to `target_address`.
10751        ///If the field is unset, it is first initialized with the default value.
10752        pub fn target_address_mut(&mut self) -> &mut String {
10753            self.target_address.get_or_insert_default()
10754        }
10755        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10756        pub fn target_address_opt(&self) -> Option<&str> {
10757            self.target_address.as_ref().map(|field| field as _)
10758        }
10759        ///Sets `target_address` with the provided value.
10760        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10761            self.target_address = Some(field.into().into());
10762        }
10763        ///Sets `target_address` with the provided value.
10764        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10765            self.set_target_address(field.into());
10766            self
10767        }
10768        ///Returns the value of `data`, or the default value if `data` is unset.
10769        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10770            &self.data
10771        }
10772        ///Returns a mutable reference to `data`.
10773        ///If the field is unset, it is first initialized with the default value.
10774        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10775            &mut self.data
10776        }
10777        ///Sets `data` with the provided value.
10778        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10779            self.data = field;
10780        }
10781        ///Sets `data` with the provided value.
10782        pub fn with_data(
10783            mut self,
10784            field: ::std::collections::BTreeMap<String, String>,
10785        ) -> Self {
10786            self.set_data(field);
10787            self
10788        }
10789    }
10790    impl super::Object {
10791        pub const fn const_default() -> Self {
10792            Self {
10793                bcs: None,
10794                object_id: None,
10795                version: None,
10796                digest: None,
10797                owner: None,
10798                object_type: None,
10799                has_public_transfer: None,
10800                contents: None,
10801                package: None,
10802                previous_transaction: None,
10803                storage_rebate: None,
10804                json: None,
10805                balance: None,
10806                display: None,
10807            }
10808        }
10809        #[doc(hidden)]
10810        pub fn default_instance() -> &'static Self {
10811            static DEFAULT: super::Object = super::Object::const_default();
10812            &DEFAULT
10813        }
10814        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10815        pub fn bcs(&self) -> &super::Bcs {
10816            self.bcs
10817                .as_ref()
10818                .map(|field| field as _)
10819                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10820        }
10821        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10822        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10823            self.bcs.as_mut().map(|field| field as _)
10824        }
10825        ///Returns a mutable reference to `bcs`.
10826        ///If the field is unset, it is first initialized with the default value.
10827        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10828            self.bcs.get_or_insert_default()
10829        }
10830        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10831        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10832            self.bcs.as_ref().map(|field| field as _)
10833        }
10834        ///Sets `bcs` with the provided value.
10835        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10836            self.bcs = Some(field.into().into());
10837        }
10838        ///Sets `bcs` with the provided value.
10839        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10840            self.set_bcs(field.into());
10841            self
10842        }
10843        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10844        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10845            self.object_id.as_mut().map(|field| field as _)
10846        }
10847        ///Returns a mutable reference to `object_id`.
10848        ///If the field is unset, it is first initialized with the default value.
10849        pub fn object_id_mut(&mut self) -> &mut String {
10850            self.object_id.get_or_insert_default()
10851        }
10852        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10853        pub fn object_id_opt(&self) -> Option<&str> {
10854            self.object_id.as_ref().map(|field| field as _)
10855        }
10856        ///Sets `object_id` with the provided value.
10857        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10858            self.object_id = Some(field.into().into());
10859        }
10860        ///Sets `object_id` with the provided value.
10861        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10862            self.set_object_id(field.into());
10863            self
10864        }
10865        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10866        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10867            self.version.as_mut().map(|field| field as _)
10868        }
10869        ///Returns a mutable reference to `version`.
10870        ///If the field is unset, it is first initialized with the default value.
10871        pub fn version_mut(&mut self) -> &mut u64 {
10872            self.version.get_or_insert_default()
10873        }
10874        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10875        pub fn version_opt(&self) -> Option<u64> {
10876            self.version.as_ref().map(|field| *field)
10877        }
10878        ///Sets `version` with the provided value.
10879        pub fn set_version(&mut self, field: u64) {
10880            self.version = Some(field);
10881        }
10882        ///Sets `version` with the provided value.
10883        pub fn with_version(mut self, field: u64) -> Self {
10884            self.set_version(field);
10885            self
10886        }
10887        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10888        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10889            self.digest.as_mut().map(|field| field as _)
10890        }
10891        ///Returns a mutable reference to `digest`.
10892        ///If the field is unset, it is first initialized with the default value.
10893        pub fn digest_mut(&mut self) -> &mut String {
10894            self.digest.get_or_insert_default()
10895        }
10896        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10897        pub fn digest_opt(&self) -> Option<&str> {
10898            self.digest.as_ref().map(|field| field as _)
10899        }
10900        ///Sets `digest` with the provided value.
10901        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10902            self.digest = Some(field.into().into());
10903        }
10904        ///Sets `digest` with the provided value.
10905        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10906            self.set_digest(field.into());
10907            self
10908        }
10909        ///Returns the value of `owner`, or the default value if `owner` is unset.
10910        pub fn owner(&self) -> &super::Owner {
10911            self.owner
10912                .as_ref()
10913                .map(|field| field as _)
10914                .unwrap_or_else(|| super::Owner::default_instance() as _)
10915        }
10916        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10917        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10918            self.owner.as_mut().map(|field| field as _)
10919        }
10920        ///Returns a mutable reference to `owner`.
10921        ///If the field is unset, it is first initialized with the default value.
10922        pub fn owner_mut(&mut self) -> &mut super::Owner {
10923            self.owner.get_or_insert_default()
10924        }
10925        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10926        pub fn owner_opt(&self) -> Option<&super::Owner> {
10927            self.owner.as_ref().map(|field| field as _)
10928        }
10929        ///Sets `owner` with the provided value.
10930        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10931            self.owner = Some(field.into().into());
10932        }
10933        ///Sets `owner` with the provided value.
10934        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10935            self.set_owner(field.into());
10936            self
10937        }
10938        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10939        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10940            self.object_type.as_mut().map(|field| field as _)
10941        }
10942        ///Returns a mutable reference to `object_type`.
10943        ///If the field is unset, it is first initialized with the default value.
10944        pub fn object_type_mut(&mut self) -> &mut String {
10945            self.object_type.get_or_insert_default()
10946        }
10947        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10948        pub fn object_type_opt(&self) -> Option<&str> {
10949            self.object_type.as_ref().map(|field| field as _)
10950        }
10951        ///Sets `object_type` with the provided value.
10952        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10953            self.object_type = Some(field.into().into());
10954        }
10955        ///Sets `object_type` with the provided value.
10956        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10957            self.set_object_type(field.into());
10958            self
10959        }
10960        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10961        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10962            self.has_public_transfer.as_mut().map(|field| field as _)
10963        }
10964        ///Returns a mutable reference to `has_public_transfer`.
10965        ///If the field is unset, it is first initialized with the default value.
10966        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10967            self.has_public_transfer.get_or_insert_default()
10968        }
10969        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10970        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10971            self.has_public_transfer.as_ref().map(|field| *field)
10972        }
10973        ///Sets `has_public_transfer` with the provided value.
10974        pub fn set_has_public_transfer(&mut self, field: bool) {
10975            self.has_public_transfer = Some(field);
10976        }
10977        ///Sets `has_public_transfer` with the provided value.
10978        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10979            self.set_has_public_transfer(field);
10980            self
10981        }
10982        ///Returns the value of `contents`, or the default value if `contents` is unset.
10983        pub fn contents(&self) -> &super::Bcs {
10984            self.contents
10985                .as_ref()
10986                .map(|field| field as _)
10987                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10988        }
10989        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10990        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10991            self.contents.as_mut().map(|field| field as _)
10992        }
10993        ///Returns a mutable reference to `contents`.
10994        ///If the field is unset, it is first initialized with the default value.
10995        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10996            self.contents.get_or_insert_default()
10997        }
10998        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10999        pub fn contents_opt(&self) -> Option<&super::Bcs> {
11000            self.contents.as_ref().map(|field| field as _)
11001        }
11002        ///Sets `contents` with the provided value.
11003        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
11004            self.contents = Some(field.into().into());
11005        }
11006        ///Sets `contents` with the provided value.
11007        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
11008            self.set_contents(field.into());
11009            self
11010        }
11011        ///Returns the value of `package`, or the default value if `package` is unset.
11012        pub fn package(&self) -> &super::Package {
11013            self.package
11014                .as_ref()
11015                .map(|field| field as _)
11016                .unwrap_or_else(|| super::Package::default_instance() as _)
11017        }
11018        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11019        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
11020            self.package.as_mut().map(|field| field as _)
11021        }
11022        ///Returns a mutable reference to `package`.
11023        ///If the field is unset, it is first initialized with the default value.
11024        pub fn package_mut(&mut self) -> &mut super::Package {
11025            self.package.get_or_insert_default()
11026        }
11027        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11028        pub fn package_opt(&self) -> Option<&super::Package> {
11029            self.package.as_ref().map(|field| field as _)
11030        }
11031        ///Sets `package` with the provided value.
11032        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
11033            self.package = Some(field.into().into());
11034        }
11035        ///Sets `package` with the provided value.
11036        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
11037            self.set_package(field.into());
11038            self
11039        }
11040        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11041        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
11042            self.previous_transaction.as_mut().map(|field| field as _)
11043        }
11044        ///Returns a mutable reference to `previous_transaction`.
11045        ///If the field is unset, it is first initialized with the default value.
11046        pub fn previous_transaction_mut(&mut self) -> &mut String {
11047            self.previous_transaction.get_or_insert_default()
11048        }
11049        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11050        pub fn previous_transaction_opt(&self) -> Option<&str> {
11051            self.previous_transaction.as_ref().map(|field| field as _)
11052        }
11053        ///Sets `previous_transaction` with the provided value.
11054        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
11055            self.previous_transaction = Some(field.into().into());
11056        }
11057        ///Sets `previous_transaction` with the provided value.
11058        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
11059            self.set_previous_transaction(field.into());
11060            self
11061        }
11062        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11063        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
11064            self.storage_rebate.as_mut().map(|field| field as _)
11065        }
11066        ///Returns a mutable reference to `storage_rebate`.
11067        ///If the field is unset, it is first initialized with the default value.
11068        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
11069            self.storage_rebate.get_or_insert_default()
11070        }
11071        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
11072        pub fn storage_rebate_opt(&self) -> Option<u64> {
11073            self.storage_rebate.as_ref().map(|field| *field)
11074        }
11075        ///Sets `storage_rebate` with the provided value.
11076        pub fn set_storage_rebate(&mut self, field: u64) {
11077            self.storage_rebate = Some(field);
11078        }
11079        ///Sets `storage_rebate` with the provided value.
11080        pub fn with_storage_rebate(mut self, field: u64) -> Self {
11081            self.set_storage_rebate(field);
11082            self
11083        }
11084        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11085        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
11086            self.json.as_mut().map(|field| field as _)
11087        }
11088        ///Returns a mutable reference to `json`.
11089        ///If the field is unset, it is first initialized with the default value.
11090        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
11091            self.json.get_or_insert_default()
11092        }
11093        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11094        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
11095            self.json.as_ref().map(|field| field as _)
11096        }
11097        ///Sets `json` with the provided value.
11098        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
11099            self.json = Some(field.into().into());
11100        }
11101        ///Sets `json` with the provided value.
11102        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
11103            self.set_json(field.into());
11104            self
11105        }
11106        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11107        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
11108            self.balance.as_mut().map(|field| field as _)
11109        }
11110        ///Returns a mutable reference to `balance`.
11111        ///If the field is unset, it is first initialized with the default value.
11112        pub fn balance_mut(&mut self) -> &mut u64 {
11113            self.balance.get_or_insert_default()
11114        }
11115        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
11116        pub fn balance_opt(&self) -> Option<u64> {
11117            self.balance.as_ref().map(|field| *field)
11118        }
11119        ///Sets `balance` with the provided value.
11120        pub fn set_balance(&mut self, field: u64) {
11121            self.balance = Some(field);
11122        }
11123        ///Sets `balance` with the provided value.
11124        pub fn with_balance(mut self, field: u64) -> Self {
11125            self.set_balance(field);
11126            self
11127        }
11128        ///Returns the value of `display`, or the default value if `display` is unset.
11129        pub fn display(&self) -> &super::Display {
11130            self.display
11131                .as_ref()
11132                .map(|field| field as _)
11133                .unwrap_or_else(|| super::Display::default_instance() as _)
11134        }
11135        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11136        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
11137            self.display.as_mut().map(|field| field as _)
11138        }
11139        ///Returns a mutable reference to `display`.
11140        ///If the field is unset, it is first initialized with the default value.
11141        pub fn display_mut(&mut self) -> &mut super::Display {
11142            self.display.get_or_insert_default()
11143        }
11144        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
11145        pub fn display_opt(&self) -> Option<&super::Display> {
11146            self.display.as_ref().map(|field| field as _)
11147        }
11148        ///Sets `display` with the provided value.
11149        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
11150            self.display = Some(field.into().into());
11151        }
11152        ///Sets `display` with the provided value.
11153        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
11154            self.set_display(field.into());
11155            self
11156        }
11157    }
11158    impl super::ObjectReference {
11159        pub const fn const_default() -> Self {
11160            Self {
11161                object_id: None,
11162                version: None,
11163                digest: None,
11164            }
11165        }
11166        #[doc(hidden)]
11167        pub fn default_instance() -> &'static Self {
11168            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11169            &DEFAULT
11170        }
11171        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11172        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11173            self.object_id.as_mut().map(|field| field as _)
11174        }
11175        ///Returns a mutable reference to `object_id`.
11176        ///If the field is unset, it is first initialized with the default value.
11177        pub fn object_id_mut(&mut self) -> &mut String {
11178            self.object_id.get_or_insert_default()
11179        }
11180        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11181        pub fn object_id_opt(&self) -> Option<&str> {
11182            self.object_id.as_ref().map(|field| field as _)
11183        }
11184        ///Sets `object_id` with the provided value.
11185        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11186            self.object_id = Some(field.into().into());
11187        }
11188        ///Sets `object_id` with the provided value.
11189        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11190            self.set_object_id(field.into());
11191            self
11192        }
11193        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11194        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11195            self.version.as_mut().map(|field| field as _)
11196        }
11197        ///Returns a mutable reference to `version`.
11198        ///If the field is unset, it is first initialized with the default value.
11199        pub fn version_mut(&mut self) -> &mut u64 {
11200            self.version.get_or_insert_default()
11201        }
11202        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11203        pub fn version_opt(&self) -> Option<u64> {
11204            self.version.as_ref().map(|field| *field)
11205        }
11206        ///Sets `version` with the provided value.
11207        pub fn set_version(&mut self, field: u64) {
11208            self.version = Some(field);
11209        }
11210        ///Sets `version` with the provided value.
11211        pub fn with_version(mut self, field: u64) -> Self {
11212            self.set_version(field);
11213            self
11214        }
11215        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11216        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11217            self.digest.as_mut().map(|field| field as _)
11218        }
11219        ///Returns a mutable reference to `digest`.
11220        ///If the field is unset, it is first initialized with the default value.
11221        pub fn digest_mut(&mut self) -> &mut String {
11222            self.digest.get_or_insert_default()
11223        }
11224        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11225        pub fn digest_opt(&self) -> Option<&str> {
11226            self.digest.as_ref().map(|field| field as _)
11227        }
11228        ///Sets `digest` with the provided value.
11229        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11230            self.digest = Some(field.into().into());
11231        }
11232        ///Sets `digest` with the provided value.
11233        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11234            self.set_digest(field.into());
11235            self
11236        }
11237    }
11238    impl super::ObjectSet {
11239        pub const fn const_default() -> Self {
11240            Self { objects: Vec::new() }
11241        }
11242        #[doc(hidden)]
11243        pub fn default_instance() -> &'static Self {
11244            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11245            &DEFAULT
11246        }
11247        ///Returns the value of `objects`, or the default value if `objects` is unset.
11248        pub fn objects(&self) -> &[super::Object] {
11249            &self.objects
11250        }
11251        ///Returns a mutable reference to `objects`.
11252        ///If the field is unset, it is first initialized with the default value.
11253        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11254            &mut self.objects
11255        }
11256        ///Sets `objects` with the provided value.
11257        pub fn set_objects(&mut self, field: Vec<super::Object>) {
11258            self.objects = field;
11259        }
11260        ///Sets `objects` with the provided value.
11261        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11262            self.set_objects(field);
11263            self
11264        }
11265    }
11266    impl super::OpenSignature {
11267        pub const fn const_default() -> Self {
11268            Self {
11269                reference: None,
11270                body: None,
11271            }
11272        }
11273        #[doc(hidden)]
11274        pub fn default_instance() -> &'static Self {
11275            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11276            &DEFAULT
11277        }
11278        ///Sets `reference` with the provided value.
11279        pub fn with_reference<T: Into<super::open_signature::Reference>>(
11280            mut self,
11281            field: T,
11282        ) -> Self {
11283            self.set_reference(field.into());
11284            self
11285        }
11286        ///Returns the value of `body`, or the default value if `body` is unset.
11287        pub fn body(&self) -> &super::OpenSignatureBody {
11288            self.body
11289                .as_ref()
11290                .map(|field| field as _)
11291                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11292        }
11293        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11294        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11295            self.body.as_mut().map(|field| field as _)
11296        }
11297        ///Returns a mutable reference to `body`.
11298        ///If the field is unset, it is first initialized with the default value.
11299        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11300            self.body.get_or_insert_default()
11301        }
11302        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
11303        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11304            self.body.as_ref().map(|field| field as _)
11305        }
11306        ///Sets `body` with the provided value.
11307        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11308            self.body = Some(field.into().into());
11309        }
11310        ///Sets `body` with the provided value.
11311        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11312            self.set_body(field.into());
11313            self
11314        }
11315    }
11316    impl super::OpenSignatureBody {
11317        pub const fn const_default() -> Self {
11318            Self {
11319                r#type: None,
11320                type_name: None,
11321                type_parameter_instantiation: Vec::new(),
11322                type_parameter: None,
11323            }
11324        }
11325        #[doc(hidden)]
11326        pub fn default_instance() -> &'static Self {
11327            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11328            &DEFAULT
11329        }
11330        ///Sets `r#type` with the provided value.
11331        pub fn with_type<T: Into<super::open_signature_body::Type>>(
11332            mut self,
11333            field: T,
11334        ) -> Self {
11335            self.set_type(field.into());
11336            self
11337        }
11338        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11339        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11340            self.type_name.as_mut().map(|field| field as _)
11341        }
11342        ///Returns a mutable reference to `type_name`.
11343        ///If the field is unset, it is first initialized with the default value.
11344        pub fn type_name_mut(&mut self) -> &mut String {
11345            self.type_name.get_or_insert_default()
11346        }
11347        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11348        pub fn type_name_opt(&self) -> Option<&str> {
11349            self.type_name.as_ref().map(|field| field as _)
11350        }
11351        ///Sets `type_name` with the provided value.
11352        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11353            self.type_name = Some(field.into().into());
11354        }
11355        ///Sets `type_name` with the provided value.
11356        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11357            self.set_type_name(field.into());
11358            self
11359        }
11360        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
11361        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11362            &self.type_parameter_instantiation
11363        }
11364        ///Returns a mutable reference to `type_parameter_instantiation`.
11365        ///If the field is unset, it is first initialized with the default value.
11366        pub fn type_parameter_instantiation_mut(
11367            &mut self,
11368        ) -> &mut Vec<super::OpenSignatureBody> {
11369            &mut self.type_parameter_instantiation
11370        }
11371        ///Sets `type_parameter_instantiation` with the provided value.
11372        pub fn set_type_parameter_instantiation(
11373            &mut self,
11374            field: Vec<super::OpenSignatureBody>,
11375        ) {
11376            self.type_parameter_instantiation = field;
11377        }
11378        ///Sets `type_parameter_instantiation` with the provided value.
11379        pub fn with_type_parameter_instantiation(
11380            mut self,
11381            field: Vec<super::OpenSignatureBody>,
11382        ) -> Self {
11383            self.set_type_parameter_instantiation(field);
11384            self
11385        }
11386        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11387        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11388            self.type_parameter.as_mut().map(|field| field as _)
11389        }
11390        ///Returns a mutable reference to `type_parameter`.
11391        ///If the field is unset, it is first initialized with the default value.
11392        pub fn type_parameter_mut(&mut self) -> &mut u32 {
11393            self.type_parameter.get_or_insert_default()
11394        }
11395        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
11396        pub fn type_parameter_opt(&self) -> Option<u32> {
11397            self.type_parameter.as_ref().map(|field| *field)
11398        }
11399        ///Sets `type_parameter` with the provided value.
11400        pub fn set_type_parameter(&mut self, field: u32) {
11401            self.type_parameter = Some(field);
11402        }
11403        ///Sets `type_parameter` with the provided value.
11404        pub fn with_type_parameter(mut self, field: u32) -> Self {
11405            self.set_type_parameter(field);
11406            self
11407        }
11408    }
11409    impl super::Owner {
11410        pub const fn const_default() -> Self {
11411            Self {
11412                kind: None,
11413                address: None,
11414                version: None,
11415            }
11416        }
11417        #[doc(hidden)]
11418        pub fn default_instance() -> &'static Self {
11419            static DEFAULT: super::Owner = super::Owner::const_default();
11420            &DEFAULT
11421        }
11422        ///Sets `kind` with the provided value.
11423        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11424            self.set_kind(field.into());
11425            self
11426        }
11427        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11428        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11429            self.address.as_mut().map(|field| field as _)
11430        }
11431        ///Returns a mutable reference to `address`.
11432        ///If the field is unset, it is first initialized with the default value.
11433        pub fn address_mut(&mut self) -> &mut String {
11434            self.address.get_or_insert_default()
11435        }
11436        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11437        pub fn address_opt(&self) -> Option<&str> {
11438            self.address.as_ref().map(|field| field as _)
11439        }
11440        ///Sets `address` with the provided value.
11441        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11442            self.address = Some(field.into().into());
11443        }
11444        ///Sets `address` with the provided value.
11445        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11446            self.set_address(field.into());
11447            self
11448        }
11449        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11450        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11451            self.version.as_mut().map(|field| field as _)
11452        }
11453        ///Returns a mutable reference to `version`.
11454        ///If the field is unset, it is first initialized with the default value.
11455        pub fn version_mut(&mut self) -> &mut u64 {
11456            self.version.get_or_insert_default()
11457        }
11458        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11459        pub fn version_opt(&self) -> Option<u64> {
11460            self.version.as_ref().map(|field| *field)
11461        }
11462        ///Sets `version` with the provided value.
11463        pub fn set_version(&mut self, field: u64) {
11464            self.version = Some(field);
11465        }
11466        ///Sets `version` with the provided value.
11467        pub fn with_version(mut self, field: u64) -> Self {
11468            self.set_version(field);
11469            self
11470        }
11471    }
11472    impl super::Package {
11473        pub const fn const_default() -> Self {
11474            Self {
11475                storage_id: None,
11476                original_id: None,
11477                version: None,
11478                modules: Vec::new(),
11479                type_origins: Vec::new(),
11480                linkage: Vec::new(),
11481            }
11482        }
11483        #[doc(hidden)]
11484        pub fn default_instance() -> &'static Self {
11485            static DEFAULT: super::Package = super::Package::const_default();
11486            &DEFAULT
11487        }
11488        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11489        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11490            self.storage_id.as_mut().map(|field| field as _)
11491        }
11492        ///Returns a mutable reference to `storage_id`.
11493        ///If the field is unset, it is first initialized with the default value.
11494        pub fn storage_id_mut(&mut self) -> &mut String {
11495            self.storage_id.get_or_insert_default()
11496        }
11497        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11498        pub fn storage_id_opt(&self) -> Option<&str> {
11499            self.storage_id.as_ref().map(|field| field as _)
11500        }
11501        ///Sets `storage_id` with the provided value.
11502        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11503            self.storage_id = Some(field.into().into());
11504        }
11505        ///Sets `storage_id` with the provided value.
11506        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11507            self.set_storage_id(field.into());
11508            self
11509        }
11510        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11511        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11512            self.original_id.as_mut().map(|field| field as _)
11513        }
11514        ///Returns a mutable reference to `original_id`.
11515        ///If the field is unset, it is first initialized with the default value.
11516        pub fn original_id_mut(&mut self) -> &mut String {
11517            self.original_id.get_or_insert_default()
11518        }
11519        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11520        pub fn original_id_opt(&self) -> Option<&str> {
11521            self.original_id.as_ref().map(|field| field as _)
11522        }
11523        ///Sets `original_id` with the provided value.
11524        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11525            self.original_id = Some(field.into().into());
11526        }
11527        ///Sets `original_id` with the provided value.
11528        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11529            self.set_original_id(field.into());
11530            self
11531        }
11532        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11533        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11534            self.version.as_mut().map(|field| field as _)
11535        }
11536        ///Returns a mutable reference to `version`.
11537        ///If the field is unset, it is first initialized with the default value.
11538        pub fn version_mut(&mut self) -> &mut u64 {
11539            self.version.get_or_insert_default()
11540        }
11541        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11542        pub fn version_opt(&self) -> Option<u64> {
11543            self.version.as_ref().map(|field| *field)
11544        }
11545        ///Sets `version` with the provided value.
11546        pub fn set_version(&mut self, field: u64) {
11547            self.version = Some(field);
11548        }
11549        ///Sets `version` with the provided value.
11550        pub fn with_version(mut self, field: u64) -> Self {
11551            self.set_version(field);
11552            self
11553        }
11554        ///Returns the value of `modules`, or the default value if `modules` is unset.
11555        pub fn modules(&self) -> &[super::Module] {
11556            &self.modules
11557        }
11558        ///Returns a mutable reference to `modules`.
11559        ///If the field is unset, it is first initialized with the default value.
11560        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11561            &mut self.modules
11562        }
11563        ///Sets `modules` with the provided value.
11564        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11565            self.modules = field;
11566        }
11567        ///Sets `modules` with the provided value.
11568        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11569            self.set_modules(field);
11570            self
11571        }
11572        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11573        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11574            &self.type_origins
11575        }
11576        ///Returns a mutable reference to `type_origins`.
11577        ///If the field is unset, it is first initialized with the default value.
11578        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11579            &mut self.type_origins
11580        }
11581        ///Sets `type_origins` with the provided value.
11582        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11583            self.type_origins = field;
11584        }
11585        ///Sets `type_origins` with the provided value.
11586        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11587            self.set_type_origins(field);
11588            self
11589        }
11590        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11591        pub fn linkage(&self) -> &[super::Linkage] {
11592            &self.linkage
11593        }
11594        ///Returns a mutable reference to `linkage`.
11595        ///If the field is unset, it is first initialized with the default value.
11596        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11597            &mut self.linkage
11598        }
11599        ///Sets `linkage` with the provided value.
11600        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11601            self.linkage = field;
11602        }
11603        ///Sets `linkage` with the provided value.
11604        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11605            self.set_linkage(field);
11606            self
11607        }
11608    }
11609    impl super::PackageUpgradeError {
11610        pub const fn const_default() -> Self {
11611            Self {
11612                kind: None,
11613                package_id: None,
11614                digest: None,
11615                policy: None,
11616                ticket_id: None,
11617            }
11618        }
11619        #[doc(hidden)]
11620        pub fn default_instance() -> &'static Self {
11621            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11622            &DEFAULT
11623        }
11624        ///Sets `kind` with the provided value.
11625        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11626            mut self,
11627            field: T,
11628        ) -> Self {
11629            self.set_kind(field.into());
11630            self
11631        }
11632        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11633        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11634            self.package_id.as_mut().map(|field| field as _)
11635        }
11636        ///Returns a mutable reference to `package_id`.
11637        ///If the field is unset, it is first initialized with the default value.
11638        pub fn package_id_mut(&mut self) -> &mut String {
11639            self.package_id.get_or_insert_default()
11640        }
11641        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11642        pub fn package_id_opt(&self) -> Option<&str> {
11643            self.package_id.as_ref().map(|field| field as _)
11644        }
11645        ///Sets `package_id` with the provided value.
11646        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11647            self.package_id = Some(field.into().into());
11648        }
11649        ///Sets `package_id` with the provided value.
11650        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11651            self.set_package_id(field.into());
11652            self
11653        }
11654        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11655        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11656            self.digest.as_mut().map(|field| field as _)
11657        }
11658        ///Returns a mutable reference to `digest`.
11659        ///If the field is unset, it is first initialized with the default value.
11660        pub fn digest_mut(&mut self) -> &mut String {
11661            self.digest.get_or_insert_default()
11662        }
11663        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11664        pub fn digest_opt(&self) -> Option<&str> {
11665            self.digest.as_ref().map(|field| field as _)
11666        }
11667        ///Sets `digest` with the provided value.
11668        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11669            self.digest = Some(field.into().into());
11670        }
11671        ///Sets `digest` with the provided value.
11672        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11673            self.set_digest(field.into());
11674            self
11675        }
11676        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11677        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11678            self.policy.as_mut().map(|field| field as _)
11679        }
11680        ///Returns a mutable reference to `policy`.
11681        ///If the field is unset, it is first initialized with the default value.
11682        pub fn policy_mut(&mut self) -> &mut u32 {
11683            self.policy.get_or_insert_default()
11684        }
11685        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11686        pub fn policy_opt(&self) -> Option<u32> {
11687            self.policy.as_ref().map(|field| *field)
11688        }
11689        ///Sets `policy` with the provided value.
11690        pub fn set_policy(&mut self, field: u32) {
11691            self.policy = Some(field);
11692        }
11693        ///Sets `policy` with the provided value.
11694        pub fn with_policy(mut self, field: u32) -> Self {
11695            self.set_policy(field);
11696            self
11697        }
11698        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11699        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11700            self.ticket_id.as_mut().map(|field| field as _)
11701        }
11702        ///Returns a mutable reference to `ticket_id`.
11703        ///If the field is unset, it is first initialized with the default value.
11704        pub fn ticket_id_mut(&mut self) -> &mut String {
11705            self.ticket_id.get_or_insert_default()
11706        }
11707        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11708        pub fn ticket_id_opt(&self) -> Option<&str> {
11709            self.ticket_id.as_ref().map(|field| field as _)
11710        }
11711        ///Sets `ticket_id` with the provided value.
11712        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11713            self.ticket_id = Some(field.into().into());
11714        }
11715        ///Sets `ticket_id` with the provided value.
11716        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11717            self.set_ticket_id(field.into());
11718            self
11719        }
11720    }
11721    impl super::PackageVersion {
11722        pub const fn const_default() -> Self {
11723            Self {
11724                package_id: None,
11725                version: None,
11726            }
11727        }
11728        #[doc(hidden)]
11729        pub fn default_instance() -> &'static Self {
11730            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11731            &DEFAULT
11732        }
11733        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11734        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11735            self.package_id.as_mut().map(|field| field as _)
11736        }
11737        ///Returns a mutable reference to `package_id`.
11738        ///If the field is unset, it is first initialized with the default value.
11739        pub fn package_id_mut(&mut self) -> &mut String {
11740            self.package_id.get_or_insert_default()
11741        }
11742        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11743        pub fn package_id_opt(&self) -> Option<&str> {
11744            self.package_id.as_ref().map(|field| field as _)
11745        }
11746        ///Sets `package_id` with the provided value.
11747        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11748            self.package_id = Some(field.into().into());
11749        }
11750        ///Sets `package_id` with the provided value.
11751        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11752            self.set_package_id(field.into());
11753            self
11754        }
11755        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11756        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11757            self.version.as_mut().map(|field| field as _)
11758        }
11759        ///Returns a mutable reference to `version`.
11760        ///If the field is unset, it is first initialized with the default value.
11761        pub fn version_mut(&mut self) -> &mut u64 {
11762            self.version.get_or_insert_default()
11763        }
11764        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11765        pub fn version_opt(&self) -> Option<u64> {
11766            self.version.as_ref().map(|field| *field)
11767        }
11768        ///Sets `version` with the provided value.
11769        pub fn set_version(&mut self, field: u64) {
11770            self.version = Some(field);
11771        }
11772        ///Sets `version` with the provided value.
11773        pub fn with_version(mut self, field: u64) -> Self {
11774            self.set_version(field);
11775            self
11776        }
11777    }
11778    impl super::PasskeyAuthenticator {
11779        pub const fn const_default() -> Self {
11780            Self {
11781                authenticator_data: None,
11782                client_data_json: None,
11783                signature: None,
11784            }
11785        }
11786        #[doc(hidden)]
11787        pub fn default_instance() -> &'static Self {
11788            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11789            &DEFAULT
11790        }
11791        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11792        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11793            self.authenticator_data.as_ref().map(|field| field as _)
11794        }
11795        ///Sets `authenticator_data` with the provided value.
11796        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11797            &mut self,
11798            field: T,
11799        ) {
11800            self.authenticator_data = Some(field.into().into());
11801        }
11802        ///Sets `authenticator_data` with the provided value.
11803        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11804            mut self,
11805            field: T,
11806        ) -> Self {
11807            self.set_authenticator_data(field.into());
11808            self
11809        }
11810        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11811        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11812            self.client_data_json.as_mut().map(|field| field as _)
11813        }
11814        ///Returns a mutable reference to `client_data_json`.
11815        ///If the field is unset, it is first initialized with the default value.
11816        pub fn client_data_json_mut(&mut self) -> &mut String {
11817            self.client_data_json.get_or_insert_default()
11818        }
11819        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11820        pub fn client_data_json_opt(&self) -> Option<&str> {
11821            self.client_data_json.as_ref().map(|field| field as _)
11822        }
11823        ///Sets `client_data_json` with the provided value.
11824        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11825            self.client_data_json = Some(field.into().into());
11826        }
11827        ///Sets `client_data_json` with the provided value.
11828        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11829            self.set_client_data_json(field.into());
11830            self
11831        }
11832        ///Returns the value of `signature`, or the default value if `signature` is unset.
11833        pub fn signature(&self) -> &super::SimpleSignature {
11834            self.signature
11835                .as_ref()
11836                .map(|field| field as _)
11837                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11838        }
11839        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11840        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11841            self.signature.as_mut().map(|field| field as _)
11842        }
11843        ///Returns a mutable reference to `signature`.
11844        ///If the field is unset, it is first initialized with the default value.
11845        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11846            self.signature.get_or_insert_default()
11847        }
11848        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11849        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11850            self.signature.as_ref().map(|field| field as _)
11851        }
11852        ///Sets `signature` with the provided value.
11853        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11854            self.signature = Some(field.into().into());
11855        }
11856        ///Sets `signature` with the provided value.
11857        pub fn with_signature<T: Into<super::SimpleSignature>>(
11858            mut self,
11859            field: T,
11860        ) -> Self {
11861            self.set_signature(field.into());
11862            self
11863        }
11864    }
11865    impl super::ProgrammableTransaction {
11866        pub const fn const_default() -> Self {
11867            Self {
11868                inputs: Vec::new(),
11869                commands: Vec::new(),
11870            }
11871        }
11872        #[doc(hidden)]
11873        pub fn default_instance() -> &'static Self {
11874            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11875            &DEFAULT
11876        }
11877        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11878        pub fn inputs(&self) -> &[super::Input] {
11879            &self.inputs
11880        }
11881        ///Returns a mutable reference to `inputs`.
11882        ///If the field is unset, it is first initialized with the default value.
11883        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11884            &mut self.inputs
11885        }
11886        ///Sets `inputs` with the provided value.
11887        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11888            self.inputs = field;
11889        }
11890        ///Sets `inputs` with the provided value.
11891        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11892            self.set_inputs(field);
11893            self
11894        }
11895        ///Returns the value of `commands`, or the default value if `commands` is unset.
11896        pub fn commands(&self) -> &[super::Command] {
11897            &self.commands
11898        }
11899        ///Returns a mutable reference to `commands`.
11900        ///If the field is unset, it is first initialized with the default value.
11901        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11902            &mut self.commands
11903        }
11904        ///Sets `commands` with the provided value.
11905        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11906            self.commands = field;
11907        }
11908        ///Sets `commands` with the provided value.
11909        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11910            self.set_commands(field);
11911            self
11912        }
11913    }
11914    impl super::ProtocolConfig {
11915        pub const fn const_default() -> Self {
11916            Self {
11917                protocol_version: None,
11918                feature_flags: std::collections::BTreeMap::new(),
11919                attributes: std::collections::BTreeMap::new(),
11920            }
11921        }
11922        #[doc(hidden)]
11923        pub fn default_instance() -> &'static Self {
11924            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11925            &DEFAULT
11926        }
11927        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11928        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11929            self.protocol_version.as_mut().map(|field| field as _)
11930        }
11931        ///Returns a mutable reference to `protocol_version`.
11932        ///If the field is unset, it is first initialized with the default value.
11933        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11934            self.protocol_version.get_or_insert_default()
11935        }
11936        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11937        pub fn protocol_version_opt(&self) -> Option<u64> {
11938            self.protocol_version.as_ref().map(|field| *field)
11939        }
11940        ///Sets `protocol_version` with the provided value.
11941        pub fn set_protocol_version(&mut self, field: u64) {
11942            self.protocol_version = Some(field);
11943        }
11944        ///Sets `protocol_version` with the provided value.
11945        pub fn with_protocol_version(mut self, field: u64) -> Self {
11946            self.set_protocol_version(field);
11947            self
11948        }
11949        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11950        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11951            &self.feature_flags
11952        }
11953        ///Returns a mutable reference to `feature_flags`.
11954        ///If the field is unset, it is first initialized with the default value.
11955        pub fn feature_flags_mut(
11956            &mut self,
11957        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11958            &mut self.feature_flags
11959        }
11960        ///Sets `feature_flags` with the provided value.
11961        pub fn set_feature_flags(
11962            &mut self,
11963            field: ::std::collections::BTreeMap<String, bool>,
11964        ) {
11965            self.feature_flags = field;
11966        }
11967        ///Sets `feature_flags` with the provided value.
11968        pub fn with_feature_flags(
11969            mut self,
11970            field: ::std::collections::BTreeMap<String, bool>,
11971        ) -> Self {
11972            self.set_feature_flags(field);
11973            self
11974        }
11975        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11976        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11977            &self.attributes
11978        }
11979        ///Returns a mutable reference to `attributes`.
11980        ///If the field is unset, it is first initialized with the default value.
11981        pub fn attributes_mut(
11982            &mut self,
11983        ) -> &mut ::std::collections::BTreeMap<String, String> {
11984            &mut self.attributes
11985        }
11986        ///Sets `attributes` with the provided value.
11987        pub fn set_attributes(
11988            &mut self,
11989            field: ::std::collections::BTreeMap<String, String>,
11990        ) {
11991            self.attributes = field;
11992        }
11993        ///Sets `attributes` with the provided value.
11994        pub fn with_attributes(
11995            mut self,
11996            field: ::std::collections::BTreeMap<String, String>,
11997        ) -> Self {
11998            self.set_attributes(field);
11999            self
12000        }
12001    }
12002    impl super::Publish {
12003        pub const fn const_default() -> Self {
12004            Self {
12005                modules: Vec::new(),
12006                dependencies: Vec::new(),
12007            }
12008        }
12009        #[doc(hidden)]
12010        pub fn default_instance() -> &'static Self {
12011            static DEFAULT: super::Publish = super::Publish::const_default();
12012            &DEFAULT
12013        }
12014        ///Returns the value of `modules`, or the default value if `modules` is unset.
12015        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12016            &self.modules
12017        }
12018        ///Returns a mutable reference to `modules`.
12019        ///If the field is unset, it is first initialized with the default value.
12020        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12021            &mut self.modules
12022        }
12023        ///Sets `modules` with the provided value.
12024        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12025            self.modules = field;
12026        }
12027        ///Sets `modules` with the provided value.
12028        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12029            self.set_modules(field);
12030            self
12031        }
12032        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
12033        pub fn dependencies(&self) -> &[String] {
12034            &self.dependencies
12035        }
12036        ///Returns a mutable reference to `dependencies`.
12037        ///If the field is unset, it is first initialized with the default value.
12038        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12039            &mut self.dependencies
12040        }
12041        ///Sets `dependencies` with the provided value.
12042        pub fn set_dependencies(&mut self, field: Vec<String>) {
12043            self.dependencies = field;
12044        }
12045        ///Sets `dependencies` with the provided value.
12046        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12047            self.set_dependencies(field);
12048            self
12049        }
12050    }
12051    impl super::RandomnessStateUpdate {
12052        pub const fn const_default() -> Self {
12053            Self {
12054                epoch: None,
12055                randomness_round: None,
12056                random_bytes: None,
12057                randomness_object_initial_shared_version: None,
12058            }
12059        }
12060        #[doc(hidden)]
12061        pub fn default_instance() -> &'static Self {
12062            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
12063            &DEFAULT
12064        }
12065        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12066        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
12067            self.epoch.as_mut().map(|field| field as _)
12068        }
12069        ///Returns a mutable reference to `epoch`.
12070        ///If the field is unset, it is first initialized with the default value.
12071        pub fn epoch_mut(&mut self) -> &mut u64 {
12072            self.epoch.get_or_insert_default()
12073        }
12074        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12075        pub fn epoch_opt(&self) -> Option<u64> {
12076            self.epoch.as_ref().map(|field| *field)
12077        }
12078        ///Sets `epoch` with the provided value.
12079        pub fn set_epoch(&mut self, field: u64) {
12080            self.epoch = Some(field);
12081        }
12082        ///Sets `epoch` with the provided value.
12083        pub fn with_epoch(mut self, field: u64) -> Self {
12084            self.set_epoch(field);
12085            self
12086        }
12087        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12088        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12089            self.randomness_round.as_mut().map(|field| field as _)
12090        }
12091        ///Returns a mutable reference to `randomness_round`.
12092        ///If the field is unset, it is first initialized with the default value.
12093        pub fn randomness_round_mut(&mut self) -> &mut u64 {
12094            self.randomness_round.get_or_insert_default()
12095        }
12096        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
12097        pub fn randomness_round_opt(&self) -> Option<u64> {
12098            self.randomness_round.as_ref().map(|field| *field)
12099        }
12100        ///Sets `randomness_round` with the provided value.
12101        pub fn set_randomness_round(&mut self, field: u64) {
12102            self.randomness_round = Some(field);
12103        }
12104        ///Sets `randomness_round` with the provided value.
12105        pub fn with_randomness_round(mut self, field: u64) -> Self {
12106            self.set_randomness_round(field);
12107            self
12108        }
12109        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
12110        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12111            self.random_bytes.as_ref().map(|field| field as _)
12112        }
12113        ///Sets `random_bytes` with the provided value.
12114        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12115            self.random_bytes = Some(field.into().into());
12116        }
12117        ///Sets `random_bytes` with the provided value.
12118        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12119            mut self,
12120            field: T,
12121        ) -> Self {
12122            self.set_random_bytes(field.into());
12123            self
12124        }
12125        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12126        pub fn randomness_object_initial_shared_version_opt_mut(
12127            &mut self,
12128        ) -> Option<&mut u64> {
12129            self.randomness_object_initial_shared_version
12130                .as_mut()
12131                .map(|field| field as _)
12132        }
12133        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
12134        ///If the field is unset, it is first initialized with the default value.
12135        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12136            self.randomness_object_initial_shared_version.get_or_insert_default()
12137        }
12138        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12139        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12140            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12141        }
12142        ///Sets `randomness_object_initial_shared_version` with the provided value.
12143        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12144            self.randomness_object_initial_shared_version = Some(field);
12145        }
12146        ///Sets `randomness_object_initial_shared_version` with the provided value.
12147        pub fn with_randomness_object_initial_shared_version(
12148            mut self,
12149            field: u64,
12150        ) -> Self {
12151            self.set_randomness_object_initial_shared_version(field);
12152            self
12153        }
12154    }
12155    impl super::RegulatedCoinMetadata {
12156        pub const fn const_default() -> Self {
12157            Self {
12158                id: None,
12159                coin_metadata_object: None,
12160                deny_cap_object: None,
12161                allow_global_pause: None,
12162                variant: None,
12163                coin_regulated_state: None,
12164            }
12165        }
12166        #[doc(hidden)]
12167        pub fn default_instance() -> &'static Self {
12168            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12169            &DEFAULT
12170        }
12171        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12172        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12173            self.id.as_mut().map(|field| field as _)
12174        }
12175        ///Returns a mutable reference to `id`.
12176        ///If the field is unset, it is first initialized with the default value.
12177        pub fn id_mut(&mut self) -> &mut String {
12178            self.id.get_or_insert_default()
12179        }
12180        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12181        pub fn id_opt(&self) -> Option<&str> {
12182            self.id.as_ref().map(|field| field as _)
12183        }
12184        ///Sets `id` with the provided value.
12185        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12186            self.id = Some(field.into().into());
12187        }
12188        ///Sets `id` with the provided value.
12189        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12190            self.set_id(field.into());
12191            self
12192        }
12193        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12194        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12195            self.coin_metadata_object.as_mut().map(|field| field as _)
12196        }
12197        ///Returns a mutable reference to `coin_metadata_object`.
12198        ///If the field is unset, it is first initialized with the default value.
12199        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12200            self.coin_metadata_object.get_or_insert_default()
12201        }
12202        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12203        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12204            self.coin_metadata_object.as_ref().map(|field| field as _)
12205        }
12206        ///Sets `coin_metadata_object` with the provided value.
12207        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12208            self.coin_metadata_object = Some(field.into().into());
12209        }
12210        ///Sets `coin_metadata_object` with the provided value.
12211        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12212            self.set_coin_metadata_object(field.into());
12213            self
12214        }
12215        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12216        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12217            self.deny_cap_object.as_mut().map(|field| field as _)
12218        }
12219        ///Returns a mutable reference to `deny_cap_object`.
12220        ///If the field is unset, it is first initialized with the default value.
12221        pub fn deny_cap_object_mut(&mut self) -> &mut String {
12222            self.deny_cap_object.get_or_insert_default()
12223        }
12224        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12225        pub fn deny_cap_object_opt(&self) -> Option<&str> {
12226            self.deny_cap_object.as_ref().map(|field| field as _)
12227        }
12228        ///Sets `deny_cap_object` with the provided value.
12229        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12230            self.deny_cap_object = Some(field.into().into());
12231        }
12232        ///Sets `deny_cap_object` with the provided value.
12233        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12234            self.set_deny_cap_object(field.into());
12235            self
12236        }
12237        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12238        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12239            self.allow_global_pause.as_mut().map(|field| field as _)
12240        }
12241        ///Returns a mutable reference to `allow_global_pause`.
12242        ///If the field is unset, it is first initialized with the default value.
12243        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12244            self.allow_global_pause.get_or_insert_default()
12245        }
12246        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
12247        pub fn allow_global_pause_opt(&self) -> Option<bool> {
12248            self.allow_global_pause.as_ref().map(|field| *field)
12249        }
12250        ///Sets `allow_global_pause` with the provided value.
12251        pub fn set_allow_global_pause(&mut self, field: bool) {
12252            self.allow_global_pause = Some(field);
12253        }
12254        ///Sets `allow_global_pause` with the provided value.
12255        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12256            self.set_allow_global_pause(field);
12257            self
12258        }
12259        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12260        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12261            self.variant.as_mut().map(|field| field as _)
12262        }
12263        ///Returns a mutable reference to `variant`.
12264        ///If the field is unset, it is first initialized with the default value.
12265        pub fn variant_mut(&mut self) -> &mut u32 {
12266            self.variant.get_or_insert_default()
12267        }
12268        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
12269        pub fn variant_opt(&self) -> Option<u32> {
12270            self.variant.as_ref().map(|field| *field)
12271        }
12272        ///Sets `variant` with the provided value.
12273        pub fn set_variant(&mut self, field: u32) {
12274            self.variant = Some(field);
12275        }
12276        ///Sets `variant` with the provided value.
12277        pub fn with_variant(mut self, field: u32) -> Self {
12278            self.set_variant(field);
12279            self
12280        }
12281        ///Sets `coin_regulated_state` with the provided value.
12282        pub fn with_coin_regulated_state<
12283            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12284        >(mut self, field: T) -> Self {
12285            self.set_coin_regulated_state(field.into());
12286            self
12287        }
12288    }
12289    impl super::ReverseLookupNameRequest {
12290        pub const fn const_default() -> Self {
12291            Self { address: None }
12292        }
12293        #[doc(hidden)]
12294        pub fn default_instance() -> &'static Self {
12295            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12296            &DEFAULT
12297        }
12298        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12299        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12300            self.address.as_mut().map(|field| field as _)
12301        }
12302        ///Returns a mutable reference to `address`.
12303        ///If the field is unset, it is first initialized with the default value.
12304        pub fn address_mut(&mut self) -> &mut String {
12305            self.address.get_or_insert_default()
12306        }
12307        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12308        pub fn address_opt(&self) -> Option<&str> {
12309            self.address.as_ref().map(|field| field as _)
12310        }
12311        ///Sets `address` with the provided value.
12312        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12313            self.address = Some(field.into().into());
12314        }
12315        ///Sets `address` with the provided value.
12316        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12317            self.set_address(field.into());
12318            self
12319        }
12320    }
12321    impl super::ReverseLookupNameResponse {
12322        pub const fn const_default() -> Self {
12323            Self { record: None }
12324        }
12325        #[doc(hidden)]
12326        pub fn default_instance() -> &'static Self {
12327            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12328            &DEFAULT
12329        }
12330        ///Returns the value of `record`, or the default value if `record` is unset.
12331        pub fn record(&self) -> &super::NameRecord {
12332            self.record
12333                .as_ref()
12334                .map(|field| field as _)
12335                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12336        }
12337        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12338        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12339            self.record.as_mut().map(|field| field as _)
12340        }
12341        ///Returns a mutable reference to `record`.
12342        ///If the field is unset, it is first initialized with the default value.
12343        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12344            self.record.get_or_insert_default()
12345        }
12346        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12347        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12348            self.record.as_ref().map(|field| field as _)
12349        }
12350        ///Sets `record` with the provided value.
12351        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12352            self.record = Some(field.into().into());
12353        }
12354        ///Sets `record` with the provided value.
12355        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12356            self.set_record(field.into());
12357            self
12358        }
12359    }
12360    impl super::SimpleSignature {
12361        pub const fn const_default() -> Self {
12362            Self {
12363                scheme: None,
12364                signature: None,
12365                public_key: None,
12366            }
12367        }
12368        #[doc(hidden)]
12369        pub fn default_instance() -> &'static Self {
12370            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12371            &DEFAULT
12372        }
12373        ///Sets `scheme` with the provided value.
12374        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12375            self.set_scheme(field.into());
12376            self
12377        }
12378        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12379        pub fn signature_opt(&self) -> Option<&[u8]> {
12380            self.signature.as_ref().map(|field| field as _)
12381        }
12382        ///Sets `signature` with the provided value.
12383        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12384            self.signature = Some(field.into().into());
12385        }
12386        ///Sets `signature` with the provided value.
12387        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12388            mut self,
12389            field: T,
12390        ) -> Self {
12391            self.set_signature(field.into());
12392            self
12393        }
12394        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12395        pub fn public_key_opt(&self) -> Option<&[u8]> {
12396            self.public_key.as_ref().map(|field| field as _)
12397        }
12398        ///Sets `public_key` with the provided value.
12399        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12400            self.public_key = Some(field.into().into());
12401        }
12402        ///Sets `public_key` with the provided value.
12403        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12404            mut self,
12405            field: T,
12406        ) -> Self {
12407            self.set_public_key(field.into());
12408            self
12409        }
12410    }
12411    impl super::SimulateTransactionRequest {
12412        pub const fn const_default() -> Self {
12413            Self {
12414                transaction: None,
12415                read_mask: None,
12416                checks: None,
12417                do_gas_selection: None,
12418            }
12419        }
12420        #[doc(hidden)]
12421        pub fn default_instance() -> &'static Self {
12422            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12423            &DEFAULT
12424        }
12425        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12426        pub fn transaction(&self) -> &super::Transaction {
12427            self.transaction
12428                .as_ref()
12429                .map(|field| field as _)
12430                .unwrap_or_else(|| super::Transaction::default_instance() as _)
12431        }
12432        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12433        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12434            self.transaction.as_mut().map(|field| field as _)
12435        }
12436        ///Returns a mutable reference to `transaction`.
12437        ///If the field is unset, it is first initialized with the default value.
12438        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12439            self.transaction.get_or_insert_default()
12440        }
12441        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12442        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12443            self.transaction.as_ref().map(|field| field as _)
12444        }
12445        ///Sets `transaction` with the provided value.
12446        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12447            self.transaction = Some(field.into().into());
12448        }
12449        ///Sets `transaction` with the provided value.
12450        pub fn with_transaction<T: Into<super::Transaction>>(
12451            mut self,
12452            field: T,
12453        ) -> Self {
12454            self.set_transaction(field.into());
12455            self
12456        }
12457        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12458        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12459            self.read_mask.as_mut().map(|field| field as _)
12460        }
12461        ///Returns a mutable reference to `read_mask`.
12462        ///If the field is unset, it is first initialized with the default value.
12463        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12464            self.read_mask.get_or_insert_default()
12465        }
12466        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12467        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12468            self.read_mask.as_ref().map(|field| field as _)
12469        }
12470        ///Sets `read_mask` with the provided value.
12471        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12472            self.read_mask = Some(field.into().into());
12473        }
12474        ///Sets `read_mask` with the provided value.
12475        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12476            mut self,
12477            field: T,
12478        ) -> Self {
12479            self.set_read_mask(field.into());
12480            self
12481        }
12482        ///Sets `checks` with the provided value.
12483        pub fn with_checks<
12484            T: Into<super::simulate_transaction_request::TransactionChecks>,
12485        >(mut self, field: T) -> Self {
12486            self.set_checks(field.into());
12487            self
12488        }
12489        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12490        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12491            self.do_gas_selection.as_mut().map(|field| field as _)
12492        }
12493        ///Returns a mutable reference to `do_gas_selection`.
12494        ///If the field is unset, it is first initialized with the default value.
12495        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12496            self.do_gas_selection.get_or_insert_default()
12497        }
12498        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12499        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12500            self.do_gas_selection.as_ref().map(|field| *field)
12501        }
12502        ///Sets `do_gas_selection` with the provided value.
12503        pub fn set_do_gas_selection(&mut self, field: bool) {
12504            self.do_gas_selection = Some(field);
12505        }
12506        ///Sets `do_gas_selection` with the provided value.
12507        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12508            self.set_do_gas_selection(field);
12509            self
12510        }
12511    }
12512    impl super::SimulateTransactionResponse {
12513        pub const fn const_default() -> Self {
12514            Self {
12515                transaction: None,
12516                command_outputs: Vec::new(),
12517                suggested_gas_price: None,
12518            }
12519        }
12520        #[doc(hidden)]
12521        pub fn default_instance() -> &'static Self {
12522            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12523            &DEFAULT
12524        }
12525        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12526        pub fn transaction(&self) -> &super::ExecutedTransaction {
12527            self.transaction
12528                .as_ref()
12529                .map(|field| field as _)
12530                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12531        }
12532        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12533        pub fn transaction_opt_mut(
12534            &mut self,
12535        ) -> Option<&mut super::ExecutedTransaction> {
12536            self.transaction.as_mut().map(|field| field as _)
12537        }
12538        ///Returns a mutable reference to `transaction`.
12539        ///If the field is unset, it is first initialized with the default value.
12540        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12541            self.transaction.get_or_insert_default()
12542        }
12543        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12544        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12545            self.transaction.as_ref().map(|field| field as _)
12546        }
12547        ///Sets `transaction` with the provided value.
12548        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12549            &mut self,
12550            field: T,
12551        ) {
12552            self.transaction = Some(field.into().into());
12553        }
12554        ///Sets `transaction` with the provided value.
12555        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12556            mut self,
12557            field: T,
12558        ) -> Self {
12559            self.set_transaction(field.into());
12560            self
12561        }
12562        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12563        pub fn command_outputs(&self) -> &[super::CommandResult] {
12564            &self.command_outputs
12565        }
12566        ///Returns a mutable reference to `command_outputs`.
12567        ///If the field is unset, it is first initialized with the default value.
12568        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12569            &mut self.command_outputs
12570        }
12571        ///Sets `command_outputs` with the provided value.
12572        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12573            self.command_outputs = field;
12574        }
12575        ///Sets `command_outputs` with the provided value.
12576        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12577            self.set_command_outputs(field);
12578            self
12579        }
12580        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12581        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
12582            self.suggested_gas_price.as_mut().map(|field| field as _)
12583        }
12584        ///Returns a mutable reference to `suggested_gas_price`.
12585        ///If the field is unset, it is first initialized with the default value.
12586        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
12587            self.suggested_gas_price.get_or_insert_default()
12588        }
12589        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
12590        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
12591            self.suggested_gas_price.as_ref().map(|field| *field)
12592        }
12593        ///Sets `suggested_gas_price` with the provided value.
12594        pub fn set_suggested_gas_price(&mut self, field: u64) {
12595            self.suggested_gas_price = Some(field);
12596        }
12597        ///Sets `suggested_gas_price` with the provided value.
12598        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
12599            self.set_suggested_gas_price(field);
12600            self
12601        }
12602    }
12603    impl super::SizeError {
12604        pub const fn const_default() -> Self {
12605            Self { size: None, max_size: None }
12606        }
12607        #[doc(hidden)]
12608        pub fn default_instance() -> &'static Self {
12609            static DEFAULT: super::SizeError = super::SizeError::const_default();
12610            &DEFAULT
12611        }
12612        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12613        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12614            self.size.as_mut().map(|field| field as _)
12615        }
12616        ///Returns a mutable reference to `size`.
12617        ///If the field is unset, it is first initialized with the default value.
12618        pub fn size_mut(&mut self) -> &mut u64 {
12619            self.size.get_or_insert_default()
12620        }
12621        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12622        pub fn size_opt(&self) -> Option<u64> {
12623            self.size.as_ref().map(|field| *field)
12624        }
12625        ///Sets `size` with the provided value.
12626        pub fn set_size(&mut self, field: u64) {
12627            self.size = Some(field);
12628        }
12629        ///Sets `size` with the provided value.
12630        pub fn with_size(mut self, field: u64) -> Self {
12631            self.set_size(field);
12632            self
12633        }
12634        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12635        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12636            self.max_size.as_mut().map(|field| field as _)
12637        }
12638        ///Returns a mutable reference to `max_size`.
12639        ///If the field is unset, it is first initialized with the default value.
12640        pub fn max_size_mut(&mut self) -> &mut u64 {
12641            self.max_size.get_or_insert_default()
12642        }
12643        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12644        pub fn max_size_opt(&self) -> Option<u64> {
12645            self.max_size.as_ref().map(|field| *field)
12646        }
12647        ///Sets `max_size` with the provided value.
12648        pub fn set_max_size(&mut self, field: u64) {
12649            self.max_size = Some(field);
12650        }
12651        ///Sets `max_size` with the provided value.
12652        pub fn with_max_size(mut self, field: u64) -> Self {
12653            self.set_max_size(field);
12654            self
12655        }
12656    }
12657    impl super::SplitCoins {
12658        pub const fn const_default() -> Self {
12659            Self {
12660                coin: None,
12661                amounts: Vec::new(),
12662            }
12663        }
12664        #[doc(hidden)]
12665        pub fn default_instance() -> &'static Self {
12666            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12667            &DEFAULT
12668        }
12669        ///Returns the value of `coin`, or the default value if `coin` is unset.
12670        pub fn coin(&self) -> &super::Argument {
12671            self.coin
12672                .as_ref()
12673                .map(|field| field as _)
12674                .unwrap_or_else(|| super::Argument::default_instance() as _)
12675        }
12676        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12677        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12678            self.coin.as_mut().map(|field| field as _)
12679        }
12680        ///Returns a mutable reference to `coin`.
12681        ///If the field is unset, it is first initialized with the default value.
12682        pub fn coin_mut(&mut self) -> &mut super::Argument {
12683            self.coin.get_or_insert_default()
12684        }
12685        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12686        pub fn coin_opt(&self) -> Option<&super::Argument> {
12687            self.coin.as_ref().map(|field| field as _)
12688        }
12689        ///Sets `coin` with the provided value.
12690        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12691            self.coin = Some(field.into().into());
12692        }
12693        ///Sets `coin` with the provided value.
12694        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12695            self.set_coin(field.into());
12696            self
12697        }
12698        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12699        pub fn amounts(&self) -> &[super::Argument] {
12700            &self.amounts
12701        }
12702        ///Returns a mutable reference to `amounts`.
12703        ///If the field is unset, it is first initialized with the default value.
12704        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12705            &mut self.amounts
12706        }
12707        ///Sets `amounts` with the provided value.
12708        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12709            self.amounts = field;
12710        }
12711        ///Sets `amounts` with the provided value.
12712        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12713            self.set_amounts(field);
12714            self
12715        }
12716    }
12717    impl super::StakeSubsidy {
12718        pub const fn const_default() -> Self {
12719            Self {
12720                balance: None,
12721                distribution_counter: None,
12722                current_distribution_amount: None,
12723                stake_subsidy_period_length: None,
12724                stake_subsidy_decrease_rate: None,
12725                extra_fields: None,
12726            }
12727        }
12728        #[doc(hidden)]
12729        pub fn default_instance() -> &'static Self {
12730            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12731            &DEFAULT
12732        }
12733        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12734        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12735            self.balance.as_mut().map(|field| field as _)
12736        }
12737        ///Returns a mutable reference to `balance`.
12738        ///If the field is unset, it is first initialized with the default value.
12739        pub fn balance_mut(&mut self) -> &mut u64 {
12740            self.balance.get_or_insert_default()
12741        }
12742        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12743        pub fn balance_opt(&self) -> Option<u64> {
12744            self.balance.as_ref().map(|field| *field)
12745        }
12746        ///Sets `balance` with the provided value.
12747        pub fn set_balance(&mut self, field: u64) {
12748            self.balance = Some(field);
12749        }
12750        ///Sets `balance` with the provided value.
12751        pub fn with_balance(mut self, field: u64) -> Self {
12752            self.set_balance(field);
12753            self
12754        }
12755        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12756        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12757            self.distribution_counter.as_mut().map(|field| field as _)
12758        }
12759        ///Returns a mutable reference to `distribution_counter`.
12760        ///If the field is unset, it is first initialized with the default value.
12761        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12762            self.distribution_counter.get_or_insert_default()
12763        }
12764        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12765        pub fn distribution_counter_opt(&self) -> Option<u64> {
12766            self.distribution_counter.as_ref().map(|field| *field)
12767        }
12768        ///Sets `distribution_counter` with the provided value.
12769        pub fn set_distribution_counter(&mut self, field: u64) {
12770            self.distribution_counter = Some(field);
12771        }
12772        ///Sets `distribution_counter` with the provided value.
12773        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12774            self.set_distribution_counter(field);
12775            self
12776        }
12777        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12778        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12779            self.current_distribution_amount.as_mut().map(|field| field as _)
12780        }
12781        ///Returns a mutable reference to `current_distribution_amount`.
12782        ///If the field is unset, it is first initialized with the default value.
12783        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12784            self.current_distribution_amount.get_or_insert_default()
12785        }
12786        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12787        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12788            self.current_distribution_amount.as_ref().map(|field| *field)
12789        }
12790        ///Sets `current_distribution_amount` with the provided value.
12791        pub fn set_current_distribution_amount(&mut self, field: u64) {
12792            self.current_distribution_amount = Some(field);
12793        }
12794        ///Sets `current_distribution_amount` with the provided value.
12795        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12796            self.set_current_distribution_amount(field);
12797            self
12798        }
12799        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12800        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12801            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12802        }
12803        ///Returns a mutable reference to `stake_subsidy_period_length`.
12804        ///If the field is unset, it is first initialized with the default value.
12805        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12806            self.stake_subsidy_period_length.get_or_insert_default()
12807        }
12808        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12809        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12810            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12811        }
12812        ///Sets `stake_subsidy_period_length` with the provided value.
12813        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12814            self.stake_subsidy_period_length = Some(field);
12815        }
12816        ///Sets `stake_subsidy_period_length` with the provided value.
12817        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12818            self.set_stake_subsidy_period_length(field);
12819            self
12820        }
12821        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12822        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12823            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12824        }
12825        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12826        ///If the field is unset, it is first initialized with the default value.
12827        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12828            self.stake_subsidy_decrease_rate.get_or_insert_default()
12829        }
12830        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12831        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12832            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12833        }
12834        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12835        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12836            self.stake_subsidy_decrease_rate = Some(field);
12837        }
12838        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12839        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12840            self.set_stake_subsidy_decrease_rate(field);
12841            self
12842        }
12843        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12844        pub fn extra_fields(&self) -> &super::MoveTable {
12845            self.extra_fields
12846                .as_ref()
12847                .map(|field| field as _)
12848                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12849        }
12850        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12851        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12852            self.extra_fields.as_mut().map(|field| field as _)
12853        }
12854        ///Returns a mutable reference to `extra_fields`.
12855        ///If the field is unset, it is first initialized with the default value.
12856        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12857            self.extra_fields.get_or_insert_default()
12858        }
12859        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12860        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12861            self.extra_fields.as_ref().map(|field| field as _)
12862        }
12863        ///Sets `extra_fields` with the provided value.
12864        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12865            self.extra_fields = Some(field.into().into());
12866        }
12867        ///Sets `extra_fields` with the provided value.
12868        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12869            self.set_extra_fields(field.into());
12870            self
12871        }
12872    }
12873    impl super::StakingPool {
12874        pub const fn const_default() -> Self {
12875            Self {
12876                id: None,
12877                activation_epoch: None,
12878                deactivation_epoch: None,
12879                sui_balance: None,
12880                rewards_pool: None,
12881                pool_token_balance: None,
12882                exchange_rates: None,
12883                pending_stake: None,
12884                pending_total_sui_withdraw: None,
12885                pending_pool_token_withdraw: None,
12886                extra_fields: None,
12887            }
12888        }
12889        #[doc(hidden)]
12890        pub fn default_instance() -> &'static Self {
12891            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12892            &DEFAULT
12893        }
12894        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12895        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12896            self.id.as_mut().map(|field| field as _)
12897        }
12898        ///Returns a mutable reference to `id`.
12899        ///If the field is unset, it is first initialized with the default value.
12900        pub fn id_mut(&mut self) -> &mut String {
12901            self.id.get_or_insert_default()
12902        }
12903        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12904        pub fn id_opt(&self) -> Option<&str> {
12905            self.id.as_ref().map(|field| field as _)
12906        }
12907        ///Sets `id` with the provided value.
12908        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12909            self.id = Some(field.into().into());
12910        }
12911        ///Sets `id` with the provided value.
12912        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12913            self.set_id(field.into());
12914            self
12915        }
12916        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12917        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12918            self.activation_epoch.as_mut().map(|field| field as _)
12919        }
12920        ///Returns a mutable reference to `activation_epoch`.
12921        ///If the field is unset, it is first initialized with the default value.
12922        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12923            self.activation_epoch.get_or_insert_default()
12924        }
12925        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12926        pub fn activation_epoch_opt(&self) -> Option<u64> {
12927            self.activation_epoch.as_ref().map(|field| *field)
12928        }
12929        ///Sets `activation_epoch` with the provided value.
12930        pub fn set_activation_epoch(&mut self, field: u64) {
12931            self.activation_epoch = Some(field);
12932        }
12933        ///Sets `activation_epoch` with the provided value.
12934        pub fn with_activation_epoch(mut self, field: u64) -> Self {
12935            self.set_activation_epoch(field);
12936            self
12937        }
12938        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12939        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12940            self.deactivation_epoch.as_mut().map(|field| field as _)
12941        }
12942        ///Returns a mutable reference to `deactivation_epoch`.
12943        ///If the field is unset, it is first initialized with the default value.
12944        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12945            self.deactivation_epoch.get_or_insert_default()
12946        }
12947        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12948        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12949            self.deactivation_epoch.as_ref().map(|field| *field)
12950        }
12951        ///Sets `deactivation_epoch` with the provided value.
12952        pub fn set_deactivation_epoch(&mut self, field: u64) {
12953            self.deactivation_epoch = Some(field);
12954        }
12955        ///Sets `deactivation_epoch` with the provided value.
12956        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12957            self.set_deactivation_epoch(field);
12958            self
12959        }
12960        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12961        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12962            self.sui_balance.as_mut().map(|field| field as _)
12963        }
12964        ///Returns a mutable reference to `sui_balance`.
12965        ///If the field is unset, it is first initialized with the default value.
12966        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12967            self.sui_balance.get_or_insert_default()
12968        }
12969        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12970        pub fn sui_balance_opt(&self) -> Option<u64> {
12971            self.sui_balance.as_ref().map(|field| *field)
12972        }
12973        ///Sets `sui_balance` with the provided value.
12974        pub fn set_sui_balance(&mut self, field: u64) {
12975            self.sui_balance = Some(field);
12976        }
12977        ///Sets `sui_balance` with the provided value.
12978        pub fn with_sui_balance(mut self, field: u64) -> Self {
12979            self.set_sui_balance(field);
12980            self
12981        }
12982        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12983        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12984            self.rewards_pool.as_mut().map(|field| field as _)
12985        }
12986        ///Returns a mutable reference to `rewards_pool`.
12987        ///If the field is unset, it is first initialized with the default value.
12988        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12989            self.rewards_pool.get_or_insert_default()
12990        }
12991        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12992        pub fn rewards_pool_opt(&self) -> Option<u64> {
12993            self.rewards_pool.as_ref().map(|field| *field)
12994        }
12995        ///Sets `rewards_pool` with the provided value.
12996        pub fn set_rewards_pool(&mut self, field: u64) {
12997            self.rewards_pool = Some(field);
12998        }
12999        ///Sets `rewards_pool` with the provided value.
13000        pub fn with_rewards_pool(mut self, field: u64) -> Self {
13001            self.set_rewards_pool(field);
13002            self
13003        }
13004        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13005        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
13006            self.pool_token_balance.as_mut().map(|field| field as _)
13007        }
13008        ///Returns a mutable reference to `pool_token_balance`.
13009        ///If the field is unset, it is first initialized with the default value.
13010        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
13011            self.pool_token_balance.get_or_insert_default()
13012        }
13013        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13014        pub fn pool_token_balance_opt(&self) -> Option<u64> {
13015            self.pool_token_balance.as_ref().map(|field| *field)
13016        }
13017        ///Sets `pool_token_balance` with the provided value.
13018        pub fn set_pool_token_balance(&mut self, field: u64) {
13019            self.pool_token_balance = Some(field);
13020        }
13021        ///Sets `pool_token_balance` with the provided value.
13022        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
13023            self.set_pool_token_balance(field);
13024            self
13025        }
13026        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
13027        pub fn exchange_rates(&self) -> &super::MoveTable {
13028            self.exchange_rates
13029                .as_ref()
13030                .map(|field| field as _)
13031                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13032        }
13033        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13034        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13035            self.exchange_rates.as_mut().map(|field| field as _)
13036        }
13037        ///Returns a mutable reference to `exchange_rates`.
13038        ///If the field is unset, it is first initialized with the default value.
13039        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
13040            self.exchange_rates.get_or_insert_default()
13041        }
13042        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13043        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
13044            self.exchange_rates.as_ref().map(|field| field as _)
13045        }
13046        ///Sets `exchange_rates` with the provided value.
13047        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
13048            self.exchange_rates = Some(field.into().into());
13049        }
13050        ///Sets `exchange_rates` with the provided value.
13051        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
13052            mut self,
13053            field: T,
13054        ) -> Self {
13055            self.set_exchange_rates(field.into());
13056            self
13057        }
13058        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13059        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
13060            self.pending_stake.as_mut().map(|field| field as _)
13061        }
13062        ///Returns a mutable reference to `pending_stake`.
13063        ///If the field is unset, it is first initialized with the default value.
13064        pub fn pending_stake_mut(&mut self) -> &mut u64 {
13065            self.pending_stake.get_or_insert_default()
13066        }
13067        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13068        pub fn pending_stake_opt(&self) -> Option<u64> {
13069            self.pending_stake.as_ref().map(|field| *field)
13070        }
13071        ///Sets `pending_stake` with the provided value.
13072        pub fn set_pending_stake(&mut self, field: u64) {
13073            self.pending_stake = Some(field);
13074        }
13075        ///Sets `pending_stake` with the provided value.
13076        pub fn with_pending_stake(mut self, field: u64) -> Self {
13077            self.set_pending_stake(field);
13078            self
13079        }
13080        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13081        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13082            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
13083        }
13084        ///Returns a mutable reference to `pending_total_sui_withdraw`.
13085        ///If the field is unset, it is first initialized with the default value.
13086        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
13087            self.pending_total_sui_withdraw.get_or_insert_default()
13088        }
13089        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13090        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
13091            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
13092        }
13093        ///Sets `pending_total_sui_withdraw` with the provided value.
13094        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
13095            self.pending_total_sui_withdraw = Some(field);
13096        }
13097        ///Sets `pending_total_sui_withdraw` with the provided value.
13098        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
13099            self.set_pending_total_sui_withdraw(field);
13100            self
13101        }
13102        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13103        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13104            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
13105        }
13106        ///Returns a mutable reference to `pending_pool_token_withdraw`.
13107        ///If the field is unset, it is first initialized with the default value.
13108        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13109            self.pending_pool_token_withdraw.get_or_insert_default()
13110        }
13111        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13112        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13113            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13114        }
13115        ///Sets `pending_pool_token_withdraw` with the provided value.
13116        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13117            self.pending_pool_token_withdraw = Some(field);
13118        }
13119        ///Sets `pending_pool_token_withdraw` with the provided value.
13120        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13121            self.set_pending_pool_token_withdraw(field);
13122            self
13123        }
13124        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13125        pub fn extra_fields(&self) -> &super::MoveTable {
13126            self.extra_fields
13127                .as_ref()
13128                .map(|field| field as _)
13129                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13130        }
13131        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13132        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13133            self.extra_fields.as_mut().map(|field| field as _)
13134        }
13135        ///Returns a mutable reference to `extra_fields`.
13136        ///If the field is unset, it is first initialized with the default value.
13137        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13138            self.extra_fields.get_or_insert_default()
13139        }
13140        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13141        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13142            self.extra_fields.as_ref().map(|field| field as _)
13143        }
13144        ///Sets `extra_fields` with the provided value.
13145        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13146            self.extra_fields = Some(field.into().into());
13147        }
13148        ///Sets `extra_fields` with the provided value.
13149        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13150            self.set_extra_fields(field.into());
13151            self
13152        }
13153    }
13154    impl super::StorageFund {
13155        pub const fn const_default() -> Self {
13156            Self {
13157                total_object_storage_rebates: None,
13158                non_refundable_balance: None,
13159            }
13160        }
13161        #[doc(hidden)]
13162        pub fn default_instance() -> &'static Self {
13163            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13164            &DEFAULT
13165        }
13166        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13167        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13168            self.total_object_storage_rebates.as_mut().map(|field| field as _)
13169        }
13170        ///Returns a mutable reference to `total_object_storage_rebates`.
13171        ///If the field is unset, it is first initialized with the default value.
13172        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13173            self.total_object_storage_rebates.get_or_insert_default()
13174        }
13175        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13176        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13177            self.total_object_storage_rebates.as_ref().map(|field| *field)
13178        }
13179        ///Sets `total_object_storage_rebates` with the provided value.
13180        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13181            self.total_object_storage_rebates = Some(field);
13182        }
13183        ///Sets `total_object_storage_rebates` with the provided value.
13184        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13185            self.set_total_object_storage_rebates(field);
13186            self
13187        }
13188        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13189        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13190            self.non_refundable_balance.as_mut().map(|field| field as _)
13191        }
13192        ///Returns a mutable reference to `non_refundable_balance`.
13193        ///If the field is unset, it is first initialized with the default value.
13194        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13195            self.non_refundable_balance.get_or_insert_default()
13196        }
13197        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13198        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13199            self.non_refundable_balance.as_ref().map(|field| *field)
13200        }
13201        ///Sets `non_refundable_balance` with the provided value.
13202        pub fn set_non_refundable_balance(&mut self, field: u64) {
13203            self.non_refundable_balance = Some(field);
13204        }
13205        ///Sets `non_refundable_balance` with the provided value.
13206        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13207            self.set_non_refundable_balance(field);
13208            self
13209        }
13210    }
13211    impl super::SubscribeCheckpointsRequest {
13212        pub const fn const_default() -> Self {
13213            Self { read_mask: None }
13214        }
13215        #[doc(hidden)]
13216        pub fn default_instance() -> &'static Self {
13217            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13218            &DEFAULT
13219        }
13220        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13221        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13222            self.read_mask.as_mut().map(|field| field as _)
13223        }
13224        ///Returns a mutable reference to `read_mask`.
13225        ///If the field is unset, it is first initialized with the default value.
13226        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13227            self.read_mask.get_or_insert_default()
13228        }
13229        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
13230        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13231            self.read_mask.as_ref().map(|field| field as _)
13232        }
13233        ///Sets `read_mask` with the provided value.
13234        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13235            self.read_mask = Some(field.into().into());
13236        }
13237        ///Sets `read_mask` with the provided value.
13238        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13239            mut self,
13240            field: T,
13241        ) -> Self {
13242            self.set_read_mask(field.into());
13243            self
13244        }
13245    }
13246    impl super::SubscribeCheckpointsResponse {
13247        pub const fn const_default() -> Self {
13248            Self {
13249                cursor: None,
13250                checkpoint: None,
13251            }
13252        }
13253        #[doc(hidden)]
13254        pub fn default_instance() -> &'static Self {
13255            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13256            &DEFAULT
13257        }
13258        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13259        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13260            self.cursor.as_mut().map(|field| field as _)
13261        }
13262        ///Returns a mutable reference to `cursor`.
13263        ///If the field is unset, it is first initialized with the default value.
13264        pub fn cursor_mut(&mut self) -> &mut u64 {
13265            self.cursor.get_or_insert_default()
13266        }
13267        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
13268        pub fn cursor_opt(&self) -> Option<u64> {
13269            self.cursor.as_ref().map(|field| *field)
13270        }
13271        ///Sets `cursor` with the provided value.
13272        pub fn set_cursor(&mut self, field: u64) {
13273            self.cursor = Some(field);
13274        }
13275        ///Sets `cursor` with the provided value.
13276        pub fn with_cursor(mut self, field: u64) -> Self {
13277            self.set_cursor(field);
13278            self
13279        }
13280        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
13281        pub fn checkpoint(&self) -> &super::Checkpoint {
13282            self.checkpoint
13283                .as_ref()
13284                .map(|field| field as _)
13285                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13286        }
13287        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13288        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13289            self.checkpoint.as_mut().map(|field| field as _)
13290        }
13291        ///Returns a mutable reference to `checkpoint`.
13292        ///If the field is unset, it is first initialized with the default value.
13293        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13294            self.checkpoint.get_or_insert_default()
13295        }
13296        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
13297        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13298            self.checkpoint.as_ref().map(|field| field as _)
13299        }
13300        ///Sets `checkpoint` with the provided value.
13301        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13302            self.checkpoint = Some(field.into().into());
13303        }
13304        ///Sets `checkpoint` with the provided value.
13305        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13306            self.set_checkpoint(field.into());
13307            self
13308        }
13309    }
13310    impl super::SystemPackage {
13311        pub const fn const_default() -> Self {
13312            Self {
13313                version: None,
13314                modules: Vec::new(),
13315                dependencies: Vec::new(),
13316            }
13317        }
13318        #[doc(hidden)]
13319        pub fn default_instance() -> &'static Self {
13320            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13321            &DEFAULT
13322        }
13323        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13324        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13325            self.version.as_mut().map(|field| field as _)
13326        }
13327        ///Returns a mutable reference to `version`.
13328        ///If the field is unset, it is first initialized with the default value.
13329        pub fn version_mut(&mut self) -> &mut u64 {
13330            self.version.get_or_insert_default()
13331        }
13332        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13333        pub fn version_opt(&self) -> Option<u64> {
13334            self.version.as_ref().map(|field| *field)
13335        }
13336        ///Sets `version` with the provided value.
13337        pub fn set_version(&mut self, field: u64) {
13338            self.version = Some(field);
13339        }
13340        ///Sets `version` with the provided value.
13341        pub fn with_version(mut self, field: u64) -> Self {
13342            self.set_version(field);
13343            self
13344        }
13345        ///Returns the value of `modules`, or the default value if `modules` is unset.
13346        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13347            &self.modules
13348        }
13349        ///Returns a mutable reference to `modules`.
13350        ///If the field is unset, it is first initialized with the default value.
13351        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13352            &mut self.modules
13353        }
13354        ///Sets `modules` with the provided value.
13355        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13356            self.modules = field;
13357        }
13358        ///Sets `modules` with the provided value.
13359        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13360            self.set_modules(field);
13361            self
13362        }
13363        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13364        pub fn dependencies(&self) -> &[String] {
13365            &self.dependencies
13366        }
13367        ///Returns a mutable reference to `dependencies`.
13368        ///If the field is unset, it is first initialized with the default value.
13369        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13370            &mut self.dependencies
13371        }
13372        ///Sets `dependencies` with the provided value.
13373        pub fn set_dependencies(&mut self, field: Vec<String>) {
13374            self.dependencies = field;
13375        }
13376        ///Sets `dependencies` with the provided value.
13377        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13378            self.set_dependencies(field);
13379            self
13380        }
13381    }
13382    impl super::SystemParameters {
13383        pub const fn const_default() -> Self {
13384            Self {
13385                epoch_duration_ms: None,
13386                stake_subsidy_start_epoch: None,
13387                min_validator_count: None,
13388                max_validator_count: None,
13389                min_validator_joining_stake: None,
13390                validator_low_stake_threshold: None,
13391                validator_very_low_stake_threshold: None,
13392                validator_low_stake_grace_period: None,
13393                extra_fields: None,
13394            }
13395        }
13396        #[doc(hidden)]
13397        pub fn default_instance() -> &'static Self {
13398            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13399            &DEFAULT
13400        }
13401        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13402        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13403            self.epoch_duration_ms.as_mut().map(|field| field as _)
13404        }
13405        ///Returns a mutable reference to `epoch_duration_ms`.
13406        ///If the field is unset, it is first initialized with the default value.
13407        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13408            self.epoch_duration_ms.get_or_insert_default()
13409        }
13410        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13411        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13412            self.epoch_duration_ms.as_ref().map(|field| *field)
13413        }
13414        ///Sets `epoch_duration_ms` with the provided value.
13415        pub fn set_epoch_duration_ms(&mut self, field: u64) {
13416            self.epoch_duration_ms = Some(field);
13417        }
13418        ///Sets `epoch_duration_ms` with the provided value.
13419        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13420            self.set_epoch_duration_ms(field);
13421            self
13422        }
13423        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13424        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13425            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13426        }
13427        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
13428        ///If the field is unset, it is first initialized with the default value.
13429        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13430            self.stake_subsidy_start_epoch.get_or_insert_default()
13431        }
13432        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13433        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13434            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13435        }
13436        ///Sets `stake_subsidy_start_epoch` with the provided value.
13437        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13438            self.stake_subsidy_start_epoch = Some(field);
13439        }
13440        ///Sets `stake_subsidy_start_epoch` with the provided value.
13441        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13442            self.set_stake_subsidy_start_epoch(field);
13443            self
13444        }
13445        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13446        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13447            self.min_validator_count.as_mut().map(|field| field as _)
13448        }
13449        ///Returns a mutable reference to `min_validator_count`.
13450        ///If the field is unset, it is first initialized with the default value.
13451        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13452            self.min_validator_count.get_or_insert_default()
13453        }
13454        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13455        pub fn min_validator_count_opt(&self) -> Option<u64> {
13456            self.min_validator_count.as_ref().map(|field| *field)
13457        }
13458        ///Sets `min_validator_count` with the provided value.
13459        pub fn set_min_validator_count(&mut self, field: u64) {
13460            self.min_validator_count = Some(field);
13461        }
13462        ///Sets `min_validator_count` with the provided value.
13463        pub fn with_min_validator_count(mut self, field: u64) -> Self {
13464            self.set_min_validator_count(field);
13465            self
13466        }
13467        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13468        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13469            self.max_validator_count.as_mut().map(|field| field as _)
13470        }
13471        ///Returns a mutable reference to `max_validator_count`.
13472        ///If the field is unset, it is first initialized with the default value.
13473        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13474            self.max_validator_count.get_or_insert_default()
13475        }
13476        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13477        pub fn max_validator_count_opt(&self) -> Option<u64> {
13478            self.max_validator_count.as_ref().map(|field| *field)
13479        }
13480        ///Sets `max_validator_count` with the provided value.
13481        pub fn set_max_validator_count(&mut self, field: u64) {
13482            self.max_validator_count = Some(field);
13483        }
13484        ///Sets `max_validator_count` with the provided value.
13485        pub fn with_max_validator_count(mut self, field: u64) -> Self {
13486            self.set_max_validator_count(field);
13487            self
13488        }
13489        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13490        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13491            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13492        }
13493        ///Returns a mutable reference to `min_validator_joining_stake`.
13494        ///If the field is unset, it is first initialized with the default value.
13495        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13496            self.min_validator_joining_stake.get_or_insert_default()
13497        }
13498        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13499        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13500            self.min_validator_joining_stake.as_ref().map(|field| *field)
13501        }
13502        ///Sets `min_validator_joining_stake` with the provided value.
13503        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13504            self.min_validator_joining_stake = Some(field);
13505        }
13506        ///Sets `min_validator_joining_stake` with the provided value.
13507        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13508            self.set_min_validator_joining_stake(field);
13509            self
13510        }
13511        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13512        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13513            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13514        }
13515        ///Returns a mutable reference to `validator_low_stake_threshold`.
13516        ///If the field is unset, it is first initialized with the default value.
13517        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13518            self.validator_low_stake_threshold.get_or_insert_default()
13519        }
13520        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13521        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13522            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13523        }
13524        ///Sets `validator_low_stake_threshold` with the provided value.
13525        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13526            self.validator_low_stake_threshold = Some(field);
13527        }
13528        ///Sets `validator_low_stake_threshold` with the provided value.
13529        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13530            self.set_validator_low_stake_threshold(field);
13531            self
13532        }
13533        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13534        pub fn validator_very_low_stake_threshold_opt_mut(
13535            &mut self,
13536        ) -> Option<&mut u64> {
13537            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13538        }
13539        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13540        ///If the field is unset, it is first initialized with the default value.
13541        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13542            self.validator_very_low_stake_threshold.get_or_insert_default()
13543        }
13544        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13545        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13546            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13547        }
13548        ///Sets `validator_very_low_stake_threshold` with the provided value.
13549        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13550            self.validator_very_low_stake_threshold = Some(field);
13551        }
13552        ///Sets `validator_very_low_stake_threshold` with the provided value.
13553        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13554            self.set_validator_very_low_stake_threshold(field);
13555            self
13556        }
13557        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13558        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13559            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13560        }
13561        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13562        ///If the field is unset, it is first initialized with the default value.
13563        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13564            self.validator_low_stake_grace_period.get_or_insert_default()
13565        }
13566        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13567        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13568            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13569        }
13570        ///Sets `validator_low_stake_grace_period` with the provided value.
13571        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13572            self.validator_low_stake_grace_period = Some(field);
13573        }
13574        ///Sets `validator_low_stake_grace_period` with the provided value.
13575        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13576            self.set_validator_low_stake_grace_period(field);
13577            self
13578        }
13579        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13580        pub fn extra_fields(&self) -> &super::MoveTable {
13581            self.extra_fields
13582                .as_ref()
13583                .map(|field| field as _)
13584                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13585        }
13586        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13587        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13588            self.extra_fields.as_mut().map(|field| field as _)
13589        }
13590        ///Returns a mutable reference to `extra_fields`.
13591        ///If the field is unset, it is first initialized with the default value.
13592        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13593            self.extra_fields.get_or_insert_default()
13594        }
13595        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13596        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13597            self.extra_fields.as_ref().map(|field| field as _)
13598        }
13599        ///Sets `extra_fields` with the provided value.
13600        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13601            self.extra_fields = Some(field.into().into());
13602        }
13603        ///Sets `extra_fields` with the provided value.
13604        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13605            self.set_extra_fields(field.into());
13606            self
13607        }
13608    }
13609    impl super::SystemState {
13610        pub const fn const_default() -> Self {
13611            Self {
13612                version: None,
13613                epoch: None,
13614                protocol_version: None,
13615                validators: None,
13616                storage_fund: None,
13617                parameters: None,
13618                reference_gas_price: None,
13619                validator_report_records: Vec::new(),
13620                stake_subsidy: None,
13621                safe_mode: None,
13622                safe_mode_storage_rewards: None,
13623                safe_mode_computation_rewards: None,
13624                safe_mode_storage_rebates: None,
13625                safe_mode_non_refundable_storage_fee: None,
13626                epoch_start_timestamp_ms: None,
13627                extra_fields: None,
13628            }
13629        }
13630        #[doc(hidden)]
13631        pub fn default_instance() -> &'static Self {
13632            static DEFAULT: super::SystemState = super::SystemState::const_default();
13633            &DEFAULT
13634        }
13635        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13636        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13637            self.version.as_mut().map(|field| field as _)
13638        }
13639        ///Returns a mutable reference to `version`.
13640        ///If the field is unset, it is first initialized with the default value.
13641        pub fn version_mut(&mut self) -> &mut u64 {
13642            self.version.get_or_insert_default()
13643        }
13644        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13645        pub fn version_opt(&self) -> Option<u64> {
13646            self.version.as_ref().map(|field| *field)
13647        }
13648        ///Sets `version` with the provided value.
13649        pub fn set_version(&mut self, field: u64) {
13650            self.version = Some(field);
13651        }
13652        ///Sets `version` with the provided value.
13653        pub fn with_version(mut self, field: u64) -> Self {
13654            self.set_version(field);
13655            self
13656        }
13657        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13658        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13659            self.epoch.as_mut().map(|field| field as _)
13660        }
13661        ///Returns a mutable reference to `epoch`.
13662        ///If the field is unset, it is first initialized with the default value.
13663        pub fn epoch_mut(&mut self) -> &mut u64 {
13664            self.epoch.get_or_insert_default()
13665        }
13666        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13667        pub fn epoch_opt(&self) -> Option<u64> {
13668            self.epoch.as_ref().map(|field| *field)
13669        }
13670        ///Sets `epoch` with the provided value.
13671        pub fn set_epoch(&mut self, field: u64) {
13672            self.epoch = Some(field);
13673        }
13674        ///Sets `epoch` with the provided value.
13675        pub fn with_epoch(mut self, field: u64) -> Self {
13676            self.set_epoch(field);
13677            self
13678        }
13679        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13680        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13681            self.protocol_version.as_mut().map(|field| field as _)
13682        }
13683        ///Returns a mutable reference to `protocol_version`.
13684        ///If the field is unset, it is first initialized with the default value.
13685        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13686            self.protocol_version.get_or_insert_default()
13687        }
13688        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13689        pub fn protocol_version_opt(&self) -> Option<u64> {
13690            self.protocol_version.as_ref().map(|field| *field)
13691        }
13692        ///Sets `protocol_version` with the provided value.
13693        pub fn set_protocol_version(&mut self, field: u64) {
13694            self.protocol_version = Some(field);
13695        }
13696        ///Sets `protocol_version` with the provided value.
13697        pub fn with_protocol_version(mut self, field: u64) -> Self {
13698            self.set_protocol_version(field);
13699            self
13700        }
13701        ///Returns the value of `validators`, or the default value if `validators` is unset.
13702        pub fn validators(&self) -> &super::ValidatorSet {
13703            self.validators
13704                .as_ref()
13705                .map(|field| field as _)
13706                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13707        }
13708        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13709        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13710            self.validators.as_mut().map(|field| field as _)
13711        }
13712        ///Returns a mutable reference to `validators`.
13713        ///If the field is unset, it is first initialized with the default value.
13714        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13715            self.validators.get_or_insert_default()
13716        }
13717        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13718        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13719            self.validators.as_ref().map(|field| field as _)
13720        }
13721        ///Sets `validators` with the provided value.
13722        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13723            self.validators = Some(field.into().into());
13724        }
13725        ///Sets `validators` with the provided value.
13726        pub fn with_validators<T: Into<super::ValidatorSet>>(
13727            mut self,
13728            field: T,
13729        ) -> Self {
13730            self.set_validators(field.into());
13731            self
13732        }
13733        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13734        pub fn storage_fund(&self) -> &super::StorageFund {
13735            self.storage_fund
13736                .as_ref()
13737                .map(|field| field as _)
13738                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13739        }
13740        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13741        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13742            self.storage_fund.as_mut().map(|field| field as _)
13743        }
13744        ///Returns a mutable reference to `storage_fund`.
13745        ///If the field is unset, it is first initialized with the default value.
13746        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13747            self.storage_fund.get_or_insert_default()
13748        }
13749        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13750        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13751            self.storage_fund.as_ref().map(|field| field as _)
13752        }
13753        ///Sets `storage_fund` with the provided value.
13754        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13755            self.storage_fund = Some(field.into().into());
13756        }
13757        ///Sets `storage_fund` with the provided value.
13758        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13759            mut self,
13760            field: T,
13761        ) -> Self {
13762            self.set_storage_fund(field.into());
13763            self
13764        }
13765        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13766        pub fn parameters(&self) -> &super::SystemParameters {
13767            self.parameters
13768                .as_ref()
13769                .map(|field| field as _)
13770                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13771        }
13772        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13773        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13774            self.parameters.as_mut().map(|field| field as _)
13775        }
13776        ///Returns a mutable reference to `parameters`.
13777        ///If the field is unset, it is first initialized with the default value.
13778        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13779            self.parameters.get_or_insert_default()
13780        }
13781        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13782        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13783            self.parameters.as_ref().map(|field| field as _)
13784        }
13785        ///Sets `parameters` with the provided value.
13786        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13787            self.parameters = Some(field.into().into());
13788        }
13789        ///Sets `parameters` with the provided value.
13790        pub fn with_parameters<T: Into<super::SystemParameters>>(
13791            mut self,
13792            field: T,
13793        ) -> Self {
13794            self.set_parameters(field.into());
13795            self
13796        }
13797        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13798        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13799            self.reference_gas_price.as_mut().map(|field| field as _)
13800        }
13801        ///Returns a mutable reference to `reference_gas_price`.
13802        ///If the field is unset, it is first initialized with the default value.
13803        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13804            self.reference_gas_price.get_or_insert_default()
13805        }
13806        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13807        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13808            self.reference_gas_price.as_ref().map(|field| *field)
13809        }
13810        ///Sets `reference_gas_price` with the provided value.
13811        pub fn set_reference_gas_price(&mut self, field: u64) {
13812            self.reference_gas_price = Some(field);
13813        }
13814        ///Sets `reference_gas_price` with the provided value.
13815        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13816            self.set_reference_gas_price(field);
13817            self
13818        }
13819        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13820        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13821            &self.validator_report_records
13822        }
13823        ///Returns a mutable reference to `validator_report_records`.
13824        ///If the field is unset, it is first initialized with the default value.
13825        pub fn validator_report_records_mut(
13826            &mut self,
13827        ) -> &mut Vec<super::ValidatorReportRecord> {
13828            &mut self.validator_report_records
13829        }
13830        ///Sets `validator_report_records` with the provided value.
13831        pub fn set_validator_report_records(
13832            &mut self,
13833            field: Vec<super::ValidatorReportRecord>,
13834        ) {
13835            self.validator_report_records = field;
13836        }
13837        ///Sets `validator_report_records` with the provided value.
13838        pub fn with_validator_report_records(
13839            mut self,
13840            field: Vec<super::ValidatorReportRecord>,
13841        ) -> Self {
13842            self.set_validator_report_records(field);
13843            self
13844        }
13845        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13846        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13847            self.stake_subsidy
13848                .as_ref()
13849                .map(|field| field as _)
13850                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13851        }
13852        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13853        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13854            self.stake_subsidy.as_mut().map(|field| field as _)
13855        }
13856        ///Returns a mutable reference to `stake_subsidy`.
13857        ///If the field is unset, it is first initialized with the default value.
13858        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13859            self.stake_subsidy.get_or_insert_default()
13860        }
13861        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13862        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13863            self.stake_subsidy.as_ref().map(|field| field as _)
13864        }
13865        ///Sets `stake_subsidy` with the provided value.
13866        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13867            self.stake_subsidy = Some(field.into().into());
13868        }
13869        ///Sets `stake_subsidy` with the provided value.
13870        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13871            mut self,
13872            field: T,
13873        ) -> Self {
13874            self.set_stake_subsidy(field.into());
13875            self
13876        }
13877        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13878        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13879            self.safe_mode.as_mut().map(|field| field as _)
13880        }
13881        ///Returns a mutable reference to `safe_mode`.
13882        ///If the field is unset, it is first initialized with the default value.
13883        pub fn safe_mode_mut(&mut self) -> &mut bool {
13884            self.safe_mode.get_or_insert_default()
13885        }
13886        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13887        pub fn safe_mode_opt(&self) -> Option<bool> {
13888            self.safe_mode.as_ref().map(|field| *field)
13889        }
13890        ///Sets `safe_mode` with the provided value.
13891        pub fn set_safe_mode(&mut self, field: bool) {
13892            self.safe_mode = Some(field);
13893        }
13894        ///Sets `safe_mode` with the provided value.
13895        pub fn with_safe_mode(mut self, field: bool) -> Self {
13896            self.set_safe_mode(field);
13897            self
13898        }
13899        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13900        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13901            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13902        }
13903        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13904        ///If the field is unset, it is first initialized with the default value.
13905        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13906            self.safe_mode_storage_rewards.get_or_insert_default()
13907        }
13908        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13909        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13910            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13911        }
13912        ///Sets `safe_mode_storage_rewards` with the provided value.
13913        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13914            self.safe_mode_storage_rewards = Some(field);
13915        }
13916        ///Sets `safe_mode_storage_rewards` with the provided value.
13917        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13918            self.set_safe_mode_storage_rewards(field);
13919            self
13920        }
13921        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13922        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13923            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13924        }
13925        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13926        ///If the field is unset, it is first initialized with the default value.
13927        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13928            self.safe_mode_computation_rewards.get_or_insert_default()
13929        }
13930        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13931        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13932            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13933        }
13934        ///Sets `safe_mode_computation_rewards` with the provided value.
13935        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13936            self.safe_mode_computation_rewards = Some(field);
13937        }
13938        ///Sets `safe_mode_computation_rewards` with the provided value.
13939        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13940            self.set_safe_mode_computation_rewards(field);
13941            self
13942        }
13943        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13944        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13945            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13946        }
13947        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13948        ///If the field is unset, it is first initialized with the default value.
13949        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13950            self.safe_mode_storage_rebates.get_or_insert_default()
13951        }
13952        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13953        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13954            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13955        }
13956        ///Sets `safe_mode_storage_rebates` with the provided value.
13957        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13958            self.safe_mode_storage_rebates = Some(field);
13959        }
13960        ///Sets `safe_mode_storage_rebates` with the provided value.
13961        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13962            self.set_safe_mode_storage_rebates(field);
13963            self
13964        }
13965        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13966        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13967            &mut self,
13968        ) -> Option<&mut u64> {
13969            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13970        }
13971        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13972        ///If the field is unset, it is first initialized with the default value.
13973        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13974            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13975        }
13976        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13977        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13978            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13979        }
13980        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13981        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13982            self.safe_mode_non_refundable_storage_fee = Some(field);
13983        }
13984        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13985        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13986            self.set_safe_mode_non_refundable_storage_fee(field);
13987            self
13988        }
13989        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13990        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13991            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13992        }
13993        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13994        ///If the field is unset, it is first initialized with the default value.
13995        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13996            self.epoch_start_timestamp_ms.get_or_insert_default()
13997        }
13998        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13999        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
14000            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
14001        }
14002        ///Sets `epoch_start_timestamp_ms` with the provided value.
14003        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
14004            self.epoch_start_timestamp_ms = Some(field);
14005        }
14006        ///Sets `epoch_start_timestamp_ms` with the provided value.
14007        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
14008            self.set_epoch_start_timestamp_ms(field);
14009            self
14010        }
14011        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14012        pub fn extra_fields(&self) -> &super::MoveTable {
14013            self.extra_fields
14014                .as_ref()
14015                .map(|field| field as _)
14016                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14017        }
14018        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14019        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14020            self.extra_fields.as_mut().map(|field| field as _)
14021        }
14022        ///Returns a mutable reference to `extra_fields`.
14023        ///If the field is unset, it is first initialized with the default value.
14024        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14025            self.extra_fields.get_or_insert_default()
14026        }
14027        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14028        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14029            self.extra_fields.as_ref().map(|field| field as _)
14030        }
14031        ///Sets `extra_fields` with the provided value.
14032        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14033            self.extra_fields = Some(field.into().into());
14034        }
14035        ///Sets `extra_fields` with the provided value.
14036        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14037            self.set_extra_fields(field.into());
14038            self
14039        }
14040    }
14041    impl super::Transaction {
14042        pub const fn const_default() -> Self {
14043            Self {
14044                bcs: None,
14045                digest: None,
14046                version: None,
14047                kind: None,
14048                sender: None,
14049                gas_payment: None,
14050                expiration: None,
14051            }
14052        }
14053        #[doc(hidden)]
14054        pub fn default_instance() -> &'static Self {
14055            static DEFAULT: super::Transaction = super::Transaction::const_default();
14056            &DEFAULT
14057        }
14058        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14059        pub fn bcs(&self) -> &super::Bcs {
14060            self.bcs
14061                .as_ref()
14062                .map(|field| field as _)
14063                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14064        }
14065        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14066        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14067            self.bcs.as_mut().map(|field| field as _)
14068        }
14069        ///Returns a mutable reference to `bcs`.
14070        ///If the field is unset, it is first initialized with the default value.
14071        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14072            self.bcs.get_or_insert_default()
14073        }
14074        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14075        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14076            self.bcs.as_ref().map(|field| field as _)
14077        }
14078        ///Sets `bcs` with the provided value.
14079        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14080            self.bcs = Some(field.into().into());
14081        }
14082        ///Sets `bcs` with the provided value.
14083        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14084            self.set_bcs(field.into());
14085            self
14086        }
14087        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14088        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14089            self.digest.as_mut().map(|field| field as _)
14090        }
14091        ///Returns a mutable reference to `digest`.
14092        ///If the field is unset, it is first initialized with the default value.
14093        pub fn digest_mut(&mut self) -> &mut String {
14094            self.digest.get_or_insert_default()
14095        }
14096        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14097        pub fn digest_opt(&self) -> Option<&str> {
14098            self.digest.as_ref().map(|field| field as _)
14099        }
14100        ///Sets `digest` with the provided value.
14101        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14102            self.digest = Some(field.into().into());
14103        }
14104        ///Sets `digest` with the provided value.
14105        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14106            self.set_digest(field.into());
14107            self
14108        }
14109        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14110        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14111            self.version.as_mut().map(|field| field as _)
14112        }
14113        ///Returns a mutable reference to `version`.
14114        ///If the field is unset, it is first initialized with the default value.
14115        pub fn version_mut(&mut self) -> &mut i32 {
14116            self.version.get_or_insert_default()
14117        }
14118        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14119        pub fn version_opt(&self) -> Option<i32> {
14120            self.version.as_ref().map(|field| *field)
14121        }
14122        ///Sets `version` with the provided value.
14123        pub fn set_version(&mut self, field: i32) {
14124            self.version = Some(field);
14125        }
14126        ///Sets `version` with the provided value.
14127        pub fn with_version(mut self, field: i32) -> Self {
14128            self.set_version(field);
14129            self
14130        }
14131        ///Returns the value of `kind`, or the default value if `kind` is unset.
14132        pub fn kind(&self) -> &super::TransactionKind {
14133            self.kind
14134                .as_ref()
14135                .map(|field| field as _)
14136                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14137        }
14138        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14139        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14140            self.kind.as_mut().map(|field| field as _)
14141        }
14142        ///Returns a mutable reference to `kind`.
14143        ///If the field is unset, it is first initialized with the default value.
14144        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14145            self.kind.get_or_insert_default()
14146        }
14147        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
14148        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14149            self.kind.as_ref().map(|field| field as _)
14150        }
14151        ///Sets `kind` with the provided value.
14152        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14153            self.kind = Some(field.into().into());
14154        }
14155        ///Sets `kind` with the provided value.
14156        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14157            self.set_kind(field.into());
14158            self
14159        }
14160        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14161        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14162            self.sender.as_mut().map(|field| field as _)
14163        }
14164        ///Returns a mutable reference to `sender`.
14165        ///If the field is unset, it is first initialized with the default value.
14166        pub fn sender_mut(&mut self) -> &mut String {
14167            self.sender.get_or_insert_default()
14168        }
14169        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
14170        pub fn sender_opt(&self) -> Option<&str> {
14171            self.sender.as_ref().map(|field| field as _)
14172        }
14173        ///Sets `sender` with the provided value.
14174        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14175            self.sender = Some(field.into().into());
14176        }
14177        ///Sets `sender` with the provided value.
14178        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14179            self.set_sender(field.into());
14180            self
14181        }
14182        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
14183        pub fn gas_payment(&self) -> &super::GasPayment {
14184            self.gas_payment
14185                .as_ref()
14186                .map(|field| field as _)
14187                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14188        }
14189        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14190        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14191            self.gas_payment.as_mut().map(|field| field as _)
14192        }
14193        ///Returns a mutable reference to `gas_payment`.
14194        ///If the field is unset, it is first initialized with the default value.
14195        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14196            self.gas_payment.get_or_insert_default()
14197        }
14198        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
14199        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14200            self.gas_payment.as_ref().map(|field| field as _)
14201        }
14202        ///Sets `gas_payment` with the provided value.
14203        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14204            self.gas_payment = Some(field.into().into());
14205        }
14206        ///Sets `gas_payment` with the provided value.
14207        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14208            self.set_gas_payment(field.into());
14209            self
14210        }
14211        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
14212        pub fn expiration(&self) -> &super::TransactionExpiration {
14213            self.expiration
14214                .as_ref()
14215                .map(|field| field as _)
14216                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14217        }
14218        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14219        pub fn expiration_opt_mut(
14220            &mut self,
14221        ) -> Option<&mut super::TransactionExpiration> {
14222            self.expiration.as_mut().map(|field| field as _)
14223        }
14224        ///Returns a mutable reference to `expiration`.
14225        ///If the field is unset, it is first initialized with the default value.
14226        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14227            self.expiration.get_or_insert_default()
14228        }
14229        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
14230        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14231            self.expiration.as_ref().map(|field| field as _)
14232        }
14233        ///Sets `expiration` with the provided value.
14234        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14235            &mut self,
14236            field: T,
14237        ) {
14238            self.expiration = Some(field.into().into());
14239        }
14240        ///Sets `expiration` with the provided value.
14241        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14242            mut self,
14243            field: T,
14244        ) -> Self {
14245            self.set_expiration(field.into());
14246            self
14247        }
14248    }
14249    impl super::TransactionEffects {
14250        pub const fn const_default() -> Self {
14251            Self {
14252                bcs: None,
14253                digest: None,
14254                version: None,
14255                status: None,
14256                epoch: None,
14257                gas_used: None,
14258                transaction_digest: None,
14259                gas_object: None,
14260                events_digest: None,
14261                dependencies: Vec::new(),
14262                lamport_version: None,
14263                changed_objects: Vec::new(),
14264                unchanged_consensus_objects: Vec::new(),
14265                auxiliary_data_digest: None,
14266                unchanged_loaded_runtime_objects: Vec::new(),
14267            }
14268        }
14269        #[doc(hidden)]
14270        pub fn default_instance() -> &'static Self {
14271            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14272            &DEFAULT
14273        }
14274        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14275        pub fn bcs(&self) -> &super::Bcs {
14276            self.bcs
14277                .as_ref()
14278                .map(|field| field as _)
14279                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14280        }
14281        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14282        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14283            self.bcs.as_mut().map(|field| field as _)
14284        }
14285        ///Returns a mutable reference to `bcs`.
14286        ///If the field is unset, it is first initialized with the default value.
14287        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14288            self.bcs.get_or_insert_default()
14289        }
14290        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14291        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14292            self.bcs.as_ref().map(|field| field as _)
14293        }
14294        ///Sets `bcs` with the provided value.
14295        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14296            self.bcs = Some(field.into().into());
14297        }
14298        ///Sets `bcs` with the provided value.
14299        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14300            self.set_bcs(field.into());
14301            self
14302        }
14303        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14304        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14305            self.digest.as_mut().map(|field| field as _)
14306        }
14307        ///Returns a mutable reference to `digest`.
14308        ///If the field is unset, it is first initialized with the default value.
14309        pub fn digest_mut(&mut self) -> &mut String {
14310            self.digest.get_or_insert_default()
14311        }
14312        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14313        pub fn digest_opt(&self) -> Option<&str> {
14314            self.digest.as_ref().map(|field| field as _)
14315        }
14316        ///Sets `digest` with the provided value.
14317        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14318            self.digest = Some(field.into().into());
14319        }
14320        ///Sets `digest` with the provided value.
14321        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14322            self.set_digest(field.into());
14323            self
14324        }
14325        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14326        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14327            self.version.as_mut().map(|field| field as _)
14328        }
14329        ///Returns a mutable reference to `version`.
14330        ///If the field is unset, it is first initialized with the default value.
14331        pub fn version_mut(&mut self) -> &mut i32 {
14332            self.version.get_or_insert_default()
14333        }
14334        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14335        pub fn version_opt(&self) -> Option<i32> {
14336            self.version.as_ref().map(|field| *field)
14337        }
14338        ///Sets `version` with the provided value.
14339        pub fn set_version(&mut self, field: i32) {
14340            self.version = Some(field);
14341        }
14342        ///Sets `version` with the provided value.
14343        pub fn with_version(mut self, field: i32) -> Self {
14344            self.set_version(field);
14345            self
14346        }
14347        ///Returns the value of `status`, or the default value if `status` is unset.
14348        pub fn status(&self) -> &super::ExecutionStatus {
14349            self.status
14350                .as_ref()
14351                .map(|field| field as _)
14352                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14353        }
14354        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14355        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14356            self.status.as_mut().map(|field| field as _)
14357        }
14358        ///Returns a mutable reference to `status`.
14359        ///If the field is unset, it is first initialized with the default value.
14360        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14361            self.status.get_or_insert_default()
14362        }
14363        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
14364        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14365            self.status.as_ref().map(|field| field as _)
14366        }
14367        ///Sets `status` with the provided value.
14368        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14369            self.status = Some(field.into().into());
14370        }
14371        ///Sets `status` with the provided value.
14372        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14373            self.set_status(field.into());
14374            self
14375        }
14376        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14377        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14378            self.epoch.as_mut().map(|field| field as _)
14379        }
14380        ///Returns a mutable reference to `epoch`.
14381        ///If the field is unset, it is first initialized with the default value.
14382        pub fn epoch_mut(&mut self) -> &mut u64 {
14383            self.epoch.get_or_insert_default()
14384        }
14385        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14386        pub fn epoch_opt(&self) -> Option<u64> {
14387            self.epoch.as_ref().map(|field| *field)
14388        }
14389        ///Sets `epoch` with the provided value.
14390        pub fn set_epoch(&mut self, field: u64) {
14391            self.epoch = Some(field);
14392        }
14393        ///Sets `epoch` with the provided value.
14394        pub fn with_epoch(mut self, field: u64) -> Self {
14395            self.set_epoch(field);
14396            self
14397        }
14398        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
14399        pub fn gas_used(&self) -> &super::GasCostSummary {
14400            self.gas_used
14401                .as_ref()
14402                .map(|field| field as _)
14403                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14404        }
14405        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14406        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14407            self.gas_used.as_mut().map(|field| field as _)
14408        }
14409        ///Returns a mutable reference to `gas_used`.
14410        ///If the field is unset, it is first initialized with the default value.
14411        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14412            self.gas_used.get_or_insert_default()
14413        }
14414        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
14415        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14416            self.gas_used.as_ref().map(|field| field as _)
14417        }
14418        ///Sets `gas_used` with the provided value.
14419        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14420            self.gas_used = Some(field.into().into());
14421        }
14422        ///Sets `gas_used` with the provided value.
14423        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14424            mut self,
14425            field: T,
14426        ) -> Self {
14427            self.set_gas_used(field.into());
14428            self
14429        }
14430        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14431        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14432            self.transaction_digest.as_mut().map(|field| field as _)
14433        }
14434        ///Returns a mutable reference to `transaction_digest`.
14435        ///If the field is unset, it is first initialized with the default value.
14436        pub fn transaction_digest_mut(&mut self) -> &mut String {
14437            self.transaction_digest.get_or_insert_default()
14438        }
14439        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14440        pub fn transaction_digest_opt(&self) -> Option<&str> {
14441            self.transaction_digest.as_ref().map(|field| field as _)
14442        }
14443        ///Sets `transaction_digest` with the provided value.
14444        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14445            self.transaction_digest = Some(field.into().into());
14446        }
14447        ///Sets `transaction_digest` with the provided value.
14448        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14449            self.set_transaction_digest(field.into());
14450            self
14451        }
14452        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14453        pub fn gas_object(&self) -> &super::ChangedObject {
14454            self.gas_object
14455                .as_ref()
14456                .map(|field| field as _)
14457                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14458        }
14459        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14460        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14461            self.gas_object.as_mut().map(|field| field as _)
14462        }
14463        ///Returns a mutable reference to `gas_object`.
14464        ///If the field is unset, it is first initialized with the default value.
14465        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14466            self.gas_object.get_or_insert_default()
14467        }
14468        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14469        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14470            self.gas_object.as_ref().map(|field| field as _)
14471        }
14472        ///Sets `gas_object` with the provided value.
14473        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14474            self.gas_object = Some(field.into().into());
14475        }
14476        ///Sets `gas_object` with the provided value.
14477        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14478            mut self,
14479            field: T,
14480        ) -> Self {
14481            self.set_gas_object(field.into());
14482            self
14483        }
14484        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14485        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14486            self.events_digest.as_mut().map(|field| field as _)
14487        }
14488        ///Returns a mutable reference to `events_digest`.
14489        ///If the field is unset, it is first initialized with the default value.
14490        pub fn events_digest_mut(&mut self) -> &mut String {
14491            self.events_digest.get_or_insert_default()
14492        }
14493        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14494        pub fn events_digest_opt(&self) -> Option<&str> {
14495            self.events_digest.as_ref().map(|field| field as _)
14496        }
14497        ///Sets `events_digest` with the provided value.
14498        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14499            self.events_digest = Some(field.into().into());
14500        }
14501        ///Sets `events_digest` with the provided value.
14502        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14503            self.set_events_digest(field.into());
14504            self
14505        }
14506        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14507        pub fn dependencies(&self) -> &[String] {
14508            &self.dependencies
14509        }
14510        ///Returns a mutable reference to `dependencies`.
14511        ///If the field is unset, it is first initialized with the default value.
14512        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14513            &mut self.dependencies
14514        }
14515        ///Sets `dependencies` with the provided value.
14516        pub fn set_dependencies(&mut self, field: Vec<String>) {
14517            self.dependencies = field;
14518        }
14519        ///Sets `dependencies` with the provided value.
14520        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14521            self.set_dependencies(field);
14522            self
14523        }
14524        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14525        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14526            self.lamport_version.as_mut().map(|field| field as _)
14527        }
14528        ///Returns a mutable reference to `lamport_version`.
14529        ///If the field is unset, it is first initialized with the default value.
14530        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14531            self.lamport_version.get_or_insert_default()
14532        }
14533        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14534        pub fn lamport_version_opt(&self) -> Option<u64> {
14535            self.lamport_version.as_ref().map(|field| *field)
14536        }
14537        ///Sets `lamport_version` with the provided value.
14538        pub fn set_lamport_version(&mut self, field: u64) {
14539            self.lamport_version = Some(field);
14540        }
14541        ///Sets `lamport_version` with the provided value.
14542        pub fn with_lamport_version(mut self, field: u64) -> Self {
14543            self.set_lamport_version(field);
14544            self
14545        }
14546        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14547        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14548            &self.changed_objects
14549        }
14550        ///Returns a mutable reference to `changed_objects`.
14551        ///If the field is unset, it is first initialized with the default value.
14552        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14553            &mut self.changed_objects
14554        }
14555        ///Sets `changed_objects` with the provided value.
14556        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14557            self.changed_objects = field;
14558        }
14559        ///Sets `changed_objects` with the provided value.
14560        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14561            self.set_changed_objects(field);
14562            self
14563        }
14564        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14565        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14566            &self.unchanged_consensus_objects
14567        }
14568        ///Returns a mutable reference to `unchanged_consensus_objects`.
14569        ///If the field is unset, it is first initialized with the default value.
14570        pub fn unchanged_consensus_objects_mut(
14571            &mut self,
14572        ) -> &mut Vec<super::UnchangedConsensusObject> {
14573            &mut self.unchanged_consensus_objects
14574        }
14575        ///Sets `unchanged_consensus_objects` with the provided value.
14576        pub fn set_unchanged_consensus_objects(
14577            &mut self,
14578            field: Vec<super::UnchangedConsensusObject>,
14579        ) {
14580            self.unchanged_consensus_objects = field;
14581        }
14582        ///Sets `unchanged_consensus_objects` with the provided value.
14583        pub fn with_unchanged_consensus_objects(
14584            mut self,
14585            field: Vec<super::UnchangedConsensusObject>,
14586        ) -> Self {
14587            self.set_unchanged_consensus_objects(field);
14588            self
14589        }
14590        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14591        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14592            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14593        }
14594        ///Returns a mutable reference to `auxiliary_data_digest`.
14595        ///If the field is unset, it is first initialized with the default value.
14596        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14597            self.auxiliary_data_digest.get_or_insert_default()
14598        }
14599        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14600        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14601            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14602        }
14603        ///Sets `auxiliary_data_digest` with the provided value.
14604        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14605            self.auxiliary_data_digest = Some(field.into().into());
14606        }
14607        ///Sets `auxiliary_data_digest` with the provided value.
14608        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14609            self.set_auxiliary_data_digest(field.into());
14610            self
14611        }
14612        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14613        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14614            &self.unchanged_loaded_runtime_objects
14615        }
14616        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14617        ///If the field is unset, it is first initialized with the default value.
14618        pub fn unchanged_loaded_runtime_objects_mut(
14619            &mut self,
14620        ) -> &mut Vec<super::ObjectReference> {
14621            &mut self.unchanged_loaded_runtime_objects
14622        }
14623        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14624        pub fn set_unchanged_loaded_runtime_objects(
14625            &mut self,
14626            field: Vec<super::ObjectReference>,
14627        ) {
14628            self.unchanged_loaded_runtime_objects = field;
14629        }
14630        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14631        pub fn with_unchanged_loaded_runtime_objects(
14632            mut self,
14633            field: Vec<super::ObjectReference>,
14634        ) -> Self {
14635            self.set_unchanged_loaded_runtime_objects(field);
14636            self
14637        }
14638    }
14639    impl super::TransactionEvents {
14640        pub const fn const_default() -> Self {
14641            Self {
14642                bcs: None,
14643                digest: None,
14644                events: Vec::new(),
14645            }
14646        }
14647        #[doc(hidden)]
14648        pub fn default_instance() -> &'static Self {
14649            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14650            &DEFAULT
14651        }
14652        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14653        pub fn bcs(&self) -> &super::Bcs {
14654            self.bcs
14655                .as_ref()
14656                .map(|field| field as _)
14657                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14658        }
14659        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14660        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14661            self.bcs.as_mut().map(|field| field as _)
14662        }
14663        ///Returns a mutable reference to `bcs`.
14664        ///If the field is unset, it is first initialized with the default value.
14665        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14666            self.bcs.get_or_insert_default()
14667        }
14668        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14669        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14670            self.bcs.as_ref().map(|field| field as _)
14671        }
14672        ///Sets `bcs` with the provided value.
14673        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14674            self.bcs = Some(field.into().into());
14675        }
14676        ///Sets `bcs` with the provided value.
14677        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14678            self.set_bcs(field.into());
14679            self
14680        }
14681        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14682        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14683            self.digest.as_mut().map(|field| field as _)
14684        }
14685        ///Returns a mutable reference to `digest`.
14686        ///If the field is unset, it is first initialized with the default value.
14687        pub fn digest_mut(&mut self) -> &mut String {
14688            self.digest.get_or_insert_default()
14689        }
14690        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14691        pub fn digest_opt(&self) -> Option<&str> {
14692            self.digest.as_ref().map(|field| field as _)
14693        }
14694        ///Sets `digest` with the provided value.
14695        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14696            self.digest = Some(field.into().into());
14697        }
14698        ///Sets `digest` with the provided value.
14699        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14700            self.set_digest(field.into());
14701            self
14702        }
14703        ///Returns the value of `events`, or the default value if `events` is unset.
14704        pub fn events(&self) -> &[super::Event] {
14705            &self.events
14706        }
14707        ///Returns a mutable reference to `events`.
14708        ///If the field is unset, it is first initialized with the default value.
14709        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14710            &mut self.events
14711        }
14712        ///Sets `events` with the provided value.
14713        pub fn set_events(&mut self, field: Vec<super::Event>) {
14714            self.events = field;
14715        }
14716        ///Sets `events` with the provided value.
14717        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14718            self.set_events(field);
14719            self
14720        }
14721    }
14722    impl super::TransactionExpiration {
14723        pub const fn const_default() -> Self {
14724            Self {
14725                kind: None,
14726                epoch: None,
14727                min_epoch: None,
14728                min_timestamp: None,
14729                max_timestamp: None,
14730                chain: None,
14731                nonce: None,
14732            }
14733        }
14734        #[doc(hidden)]
14735        pub fn default_instance() -> &'static Self {
14736            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14737            &DEFAULT
14738        }
14739        ///Sets `kind` with the provided value.
14740        pub fn with_kind<
14741            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14742        >(mut self, field: T) -> Self {
14743            self.set_kind(field.into());
14744            self
14745        }
14746        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14747        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14748            self.epoch.as_mut().map(|field| field as _)
14749        }
14750        ///Returns a mutable reference to `epoch`.
14751        ///If the field is unset, it is first initialized with the default value.
14752        pub fn epoch_mut(&mut self) -> &mut u64 {
14753            self.epoch.get_or_insert_default()
14754        }
14755        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14756        pub fn epoch_opt(&self) -> Option<u64> {
14757            self.epoch.as_ref().map(|field| *field)
14758        }
14759        ///Sets `epoch` with the provided value.
14760        pub fn set_epoch(&mut self, field: u64) {
14761            self.epoch = Some(field);
14762        }
14763        ///Sets `epoch` with the provided value.
14764        pub fn with_epoch(mut self, field: u64) -> Self {
14765            self.set_epoch(field);
14766            self
14767        }
14768        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14769        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14770            self.min_epoch.as_mut().map(|field| field as _)
14771        }
14772        ///Returns a mutable reference to `min_epoch`.
14773        ///If the field is unset, it is first initialized with the default value.
14774        pub fn min_epoch_mut(&mut self) -> &mut u64 {
14775            self.min_epoch.get_or_insert_default()
14776        }
14777        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14778        pub fn min_epoch_opt(&self) -> Option<u64> {
14779            self.min_epoch.as_ref().map(|field| *field)
14780        }
14781        ///Sets `min_epoch` with the provided value.
14782        pub fn set_min_epoch(&mut self, field: u64) {
14783            self.min_epoch = Some(field);
14784        }
14785        ///Sets `min_epoch` with the provided value.
14786        pub fn with_min_epoch(mut self, field: u64) -> Self {
14787            self.set_min_epoch(field);
14788            self
14789        }
14790        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14791        pub fn min_timestamp_opt_mut(
14792            &mut self,
14793        ) -> Option<&mut ::prost_types::Timestamp> {
14794            self.min_timestamp.as_mut().map(|field| field as _)
14795        }
14796        ///Returns a mutable reference to `min_timestamp`.
14797        ///If the field is unset, it is first initialized with the default value.
14798        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14799            self.min_timestamp.get_or_insert_default()
14800        }
14801        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14802        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14803            self.min_timestamp.as_ref().map(|field| field as _)
14804        }
14805        ///Sets `min_timestamp` with the provided value.
14806        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14807            &mut self,
14808            field: T,
14809        ) {
14810            self.min_timestamp = Some(field.into().into());
14811        }
14812        ///Sets `min_timestamp` with the provided value.
14813        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14814            mut self,
14815            field: T,
14816        ) -> Self {
14817            self.set_min_timestamp(field.into());
14818            self
14819        }
14820        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14821        pub fn max_timestamp_opt_mut(
14822            &mut self,
14823        ) -> Option<&mut ::prost_types::Timestamp> {
14824            self.max_timestamp.as_mut().map(|field| field as _)
14825        }
14826        ///Returns a mutable reference to `max_timestamp`.
14827        ///If the field is unset, it is first initialized with the default value.
14828        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14829            self.max_timestamp.get_or_insert_default()
14830        }
14831        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14832        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14833            self.max_timestamp.as_ref().map(|field| field as _)
14834        }
14835        ///Sets `max_timestamp` with the provided value.
14836        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14837            &mut self,
14838            field: T,
14839        ) {
14840            self.max_timestamp = Some(field.into().into());
14841        }
14842        ///Sets `max_timestamp` with the provided value.
14843        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14844            mut self,
14845            field: T,
14846        ) -> Self {
14847            self.set_max_timestamp(field.into());
14848            self
14849        }
14850        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14851        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14852            self.chain.as_mut().map(|field| field as _)
14853        }
14854        ///Returns a mutable reference to `chain`.
14855        ///If the field is unset, it is first initialized with the default value.
14856        pub fn chain_mut(&mut self) -> &mut String {
14857            self.chain.get_or_insert_default()
14858        }
14859        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
14860        pub fn chain_opt(&self) -> Option<&str> {
14861            self.chain.as_ref().map(|field| field as _)
14862        }
14863        ///Sets `chain` with the provided value.
14864        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14865            self.chain = Some(field.into().into());
14866        }
14867        ///Sets `chain` with the provided value.
14868        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14869            self.set_chain(field.into());
14870            self
14871        }
14872        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14873        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14874            self.nonce.as_mut().map(|field| field as _)
14875        }
14876        ///Returns a mutable reference to `nonce`.
14877        ///If the field is unset, it is first initialized with the default value.
14878        pub fn nonce_mut(&mut self) -> &mut u32 {
14879            self.nonce.get_or_insert_default()
14880        }
14881        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
14882        pub fn nonce_opt(&self) -> Option<u32> {
14883            self.nonce.as_ref().map(|field| *field)
14884        }
14885        ///Sets `nonce` with the provided value.
14886        pub fn set_nonce(&mut self, field: u32) {
14887            self.nonce = Some(field);
14888        }
14889        ///Sets `nonce` with the provided value.
14890        pub fn with_nonce(mut self, field: u32) -> Self {
14891            self.set_nonce(field);
14892            self
14893        }
14894    }
14895    impl super::TransactionKind {
14896        pub const fn const_default() -> Self {
14897            Self { kind: None, data: None }
14898        }
14899        #[doc(hidden)]
14900        pub fn default_instance() -> &'static Self {
14901            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14902            &DEFAULT
14903        }
14904        ///Sets `kind` with the provided value.
14905        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14906            mut self,
14907            field: T,
14908        ) -> Self {
14909            self.set_kind(field.into());
14910            self
14911        }
14912        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14913        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14914            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14915                .data
14916            {
14917                field as _
14918            } else {
14919                super::ProgrammableTransaction::default_instance() as _
14920            }
14921        }
14922        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14923        pub fn programmable_transaction_opt(
14924            &self,
14925        ) -> Option<&super::ProgrammableTransaction> {
14926            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14927                .data
14928            {
14929                Some(field as _)
14930            } else {
14931                None
14932            }
14933        }
14934        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14935        pub fn programmable_transaction_opt_mut(
14936            &mut self,
14937        ) -> Option<&mut super::ProgrammableTransaction> {
14938            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14939                .data
14940            {
14941                Some(field as _)
14942            } else {
14943                None
14944            }
14945        }
14946        ///Returns a mutable reference to `programmable_transaction`.
14947        ///If the field is unset, it is first initialized with the default value.
14948        ///If any other oneof field in the same oneof is set, it will be cleared.
14949        pub fn programmable_transaction_mut(
14950            &mut self,
14951        ) -> &mut super::ProgrammableTransaction {
14952            if self.programmable_transaction_opt_mut().is_none() {
14953                self.data = Some(
14954                    super::transaction_kind::Data::ProgrammableTransaction(
14955                        super::ProgrammableTransaction::default(),
14956                    ),
14957                );
14958            }
14959            self.programmable_transaction_opt_mut().unwrap()
14960        }
14961        ///Sets `programmable_transaction` with the provided value.
14962        ///If any other oneof field in the same oneof is set, it will be cleared.
14963        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14964            &mut self,
14965            field: T,
14966        ) {
14967            self.data = Some(
14968                super::transaction_kind::Data::ProgrammableTransaction(
14969                    field.into().into(),
14970                ),
14971            );
14972        }
14973        ///Sets `programmable_transaction` with the provided value.
14974        ///If any other oneof field in the same oneof is set, it will be cleared.
14975        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14976            mut self,
14977            field: T,
14978        ) -> Self {
14979            self.set_programmable_transaction(field.into());
14980            self
14981        }
14982        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14983        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14984            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14985                field as _
14986            } else {
14987                super::ChangeEpoch::default_instance() as _
14988            }
14989        }
14990        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14991        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14992            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14993                Some(field as _)
14994            } else {
14995                None
14996            }
14997        }
14998        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14999        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
15000            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
15001                .data
15002            {
15003                Some(field as _)
15004            } else {
15005                None
15006            }
15007        }
15008        ///Returns a mutable reference to `change_epoch`.
15009        ///If the field is unset, it is first initialized with the default value.
15010        ///If any other oneof field in the same oneof is set, it will be cleared.
15011        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
15012            if self.change_epoch_opt_mut().is_none() {
15013                self.data = Some(
15014                    super::transaction_kind::Data::ChangeEpoch(
15015                        super::ChangeEpoch::default(),
15016                    ),
15017                );
15018            }
15019            self.change_epoch_opt_mut().unwrap()
15020        }
15021        ///Sets `change_epoch` with the provided value.
15022        ///If any other oneof field in the same oneof is set, it will be cleared.
15023        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
15024            self.data = Some(
15025                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
15026            );
15027        }
15028        ///Sets `change_epoch` with the provided value.
15029        ///If any other oneof field in the same oneof is set, it will be cleared.
15030        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
15031            mut self,
15032            field: T,
15033        ) -> Self {
15034            self.set_change_epoch(field.into());
15035            self
15036        }
15037        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
15038        pub fn genesis(&self) -> &super::GenesisTransaction {
15039            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15040                field as _
15041            } else {
15042                super::GenesisTransaction::default_instance() as _
15043            }
15044        }
15045        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
15046        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
15047            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15048                Some(field as _)
15049            } else {
15050                None
15051            }
15052        }
15053        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15054        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
15055            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
15056                Some(field as _)
15057            } else {
15058                None
15059            }
15060        }
15061        ///Returns a mutable reference to `genesis`.
15062        ///If the field is unset, it is first initialized with the default value.
15063        ///If any other oneof field in the same oneof is set, it will be cleared.
15064        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
15065            if self.genesis_opt_mut().is_none() {
15066                self.data = Some(
15067                    super::transaction_kind::Data::Genesis(
15068                        super::GenesisTransaction::default(),
15069                    ),
15070                );
15071            }
15072            self.genesis_opt_mut().unwrap()
15073        }
15074        ///Sets `genesis` with the provided value.
15075        ///If any other oneof field in the same oneof is set, it will be cleared.
15076        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
15077            self.data = Some(
15078                super::transaction_kind::Data::Genesis(field.into().into()),
15079            );
15080        }
15081        ///Sets `genesis` with the provided value.
15082        ///If any other oneof field in the same oneof is set, it will be cleared.
15083        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
15084            mut self,
15085            field: T,
15086        ) -> Self {
15087            self.set_genesis(field.into());
15088            self
15089        }
15090        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
15091        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
15092            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15093                .data
15094            {
15095                field as _
15096            } else {
15097                super::ConsensusCommitPrologue::default_instance() as _
15098            }
15099        }
15100        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
15101        pub fn consensus_commit_prologue_opt(
15102            &self,
15103        ) -> Option<&super::ConsensusCommitPrologue> {
15104            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15105                .data
15106            {
15107                Some(field as _)
15108            } else {
15109                None
15110            }
15111        }
15112        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15113        pub fn consensus_commit_prologue_opt_mut(
15114            &mut self,
15115        ) -> Option<&mut super::ConsensusCommitPrologue> {
15116            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15117                .data
15118            {
15119                Some(field as _)
15120            } else {
15121                None
15122            }
15123        }
15124        ///Returns a mutable reference to `consensus_commit_prologue`.
15125        ///If the field is unset, it is first initialized with the default value.
15126        ///If any other oneof field in the same oneof is set, it will be cleared.
15127        pub fn consensus_commit_prologue_mut(
15128            &mut self,
15129        ) -> &mut super::ConsensusCommitPrologue {
15130            if self.consensus_commit_prologue_opt_mut().is_none() {
15131                self.data = Some(
15132                    super::transaction_kind::Data::ConsensusCommitPrologue(
15133                        super::ConsensusCommitPrologue::default(),
15134                    ),
15135                );
15136            }
15137            self.consensus_commit_prologue_opt_mut().unwrap()
15138        }
15139        ///Sets `consensus_commit_prologue` with the provided value.
15140        ///If any other oneof field in the same oneof is set, it will be cleared.
15141        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15142            &mut self,
15143            field: T,
15144        ) {
15145            self.data = Some(
15146                super::transaction_kind::Data::ConsensusCommitPrologue(
15147                    field.into().into(),
15148                ),
15149            );
15150        }
15151        ///Sets `consensus_commit_prologue` with the provided value.
15152        ///If any other oneof field in the same oneof is set, it will be cleared.
15153        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15154            mut self,
15155            field: T,
15156        ) -> Self {
15157            self.set_consensus_commit_prologue(field.into());
15158            self
15159        }
15160        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
15161        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15162            if let Some(
15163                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15164            ) = &self.data
15165            {
15166                field as _
15167            } else {
15168                super::AuthenticatorStateUpdate::default_instance() as _
15169            }
15170        }
15171        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15172        pub fn authenticator_state_update_opt(
15173            &self,
15174        ) -> Option<&super::AuthenticatorStateUpdate> {
15175            if let Some(
15176                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15177            ) = &self.data
15178            {
15179                Some(field as _)
15180            } else {
15181                None
15182            }
15183        }
15184        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15185        pub fn authenticator_state_update_opt_mut(
15186            &mut self,
15187        ) -> Option<&mut super::AuthenticatorStateUpdate> {
15188            if let Some(
15189                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15190            ) = &mut self.data
15191            {
15192                Some(field as _)
15193            } else {
15194                None
15195            }
15196        }
15197        ///Returns a mutable reference to `authenticator_state_update`.
15198        ///If the field is unset, it is first initialized with the default value.
15199        ///If any other oneof field in the same oneof is set, it will be cleared.
15200        pub fn authenticator_state_update_mut(
15201            &mut self,
15202        ) -> &mut super::AuthenticatorStateUpdate {
15203            if self.authenticator_state_update_opt_mut().is_none() {
15204                self.data = Some(
15205                    super::transaction_kind::Data::AuthenticatorStateUpdate(
15206                        super::AuthenticatorStateUpdate::default(),
15207                    ),
15208                );
15209            }
15210            self.authenticator_state_update_opt_mut().unwrap()
15211        }
15212        ///Sets `authenticator_state_update` with the provided value.
15213        ///If any other oneof field in the same oneof is set, it will be cleared.
15214        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15215            &mut self,
15216            field: T,
15217        ) {
15218            self.data = Some(
15219                super::transaction_kind::Data::AuthenticatorStateUpdate(
15220                    field.into().into(),
15221                ),
15222            );
15223        }
15224        ///Sets `authenticator_state_update` with the provided value.
15225        ///If any other oneof field in the same oneof is set, it will be cleared.
15226        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15227            mut self,
15228            field: T,
15229        ) -> Self {
15230            self.set_authenticator_state_update(field.into());
15231            self
15232        }
15233        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
15234        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15235            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15236                field as _
15237            } else {
15238                super::EndOfEpochTransaction::default_instance() as _
15239            }
15240        }
15241        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15242        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15243            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15244                Some(field as _)
15245            } else {
15246                None
15247            }
15248        }
15249        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15250        pub fn end_of_epoch_opt_mut(
15251            &mut self,
15252        ) -> Option<&mut super::EndOfEpochTransaction> {
15253            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15254                .data
15255            {
15256                Some(field as _)
15257            } else {
15258                None
15259            }
15260        }
15261        ///Returns a mutable reference to `end_of_epoch`.
15262        ///If the field is unset, it is first initialized with the default value.
15263        ///If any other oneof field in the same oneof is set, it will be cleared.
15264        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15265            if self.end_of_epoch_opt_mut().is_none() {
15266                self.data = Some(
15267                    super::transaction_kind::Data::EndOfEpoch(
15268                        super::EndOfEpochTransaction::default(),
15269                    ),
15270                );
15271            }
15272            self.end_of_epoch_opt_mut().unwrap()
15273        }
15274        ///Sets `end_of_epoch` with the provided value.
15275        ///If any other oneof field in the same oneof is set, it will be cleared.
15276        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15277            &mut self,
15278            field: T,
15279        ) {
15280            self.data = Some(
15281                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15282            );
15283        }
15284        ///Sets `end_of_epoch` with the provided value.
15285        ///If any other oneof field in the same oneof is set, it will be cleared.
15286        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15287            mut self,
15288            field: T,
15289        ) -> Self {
15290            self.set_end_of_epoch(field.into());
15291            self
15292        }
15293        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
15294        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15295            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15296                .data
15297            {
15298                field as _
15299            } else {
15300                super::RandomnessStateUpdate::default_instance() as _
15301            }
15302        }
15303        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15304        pub fn randomness_state_update_opt(
15305            &self,
15306        ) -> Option<&super::RandomnessStateUpdate> {
15307            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15308                .data
15309            {
15310                Some(field as _)
15311            } else {
15312                None
15313            }
15314        }
15315        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15316        pub fn randomness_state_update_opt_mut(
15317            &mut self,
15318        ) -> Option<&mut super::RandomnessStateUpdate> {
15319            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15320                .data
15321            {
15322                Some(field as _)
15323            } else {
15324                None
15325            }
15326        }
15327        ///Returns a mutable reference to `randomness_state_update`.
15328        ///If the field is unset, it is first initialized with the default value.
15329        ///If any other oneof field in the same oneof is set, it will be cleared.
15330        pub fn randomness_state_update_mut(
15331            &mut self,
15332        ) -> &mut super::RandomnessStateUpdate {
15333            if self.randomness_state_update_opt_mut().is_none() {
15334                self.data = Some(
15335                    super::transaction_kind::Data::RandomnessStateUpdate(
15336                        super::RandomnessStateUpdate::default(),
15337                    ),
15338                );
15339            }
15340            self.randomness_state_update_opt_mut().unwrap()
15341        }
15342        ///Sets `randomness_state_update` with the provided value.
15343        ///If any other oneof field in the same oneof is set, it will be cleared.
15344        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15345            &mut self,
15346            field: T,
15347        ) {
15348            self.data = Some(
15349                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15350            );
15351        }
15352        ///Sets `randomness_state_update` with the provided value.
15353        ///If any other oneof field in the same oneof is set, it will be cleared.
15354        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15355            mut self,
15356            field: T,
15357        ) -> Self {
15358            self.set_randomness_state_update(field.into());
15359            self
15360        }
15361    }
15362    impl super::TransferObjects {
15363        pub const fn const_default() -> Self {
15364            Self {
15365                objects: Vec::new(),
15366                address: None,
15367            }
15368        }
15369        #[doc(hidden)]
15370        pub fn default_instance() -> &'static Self {
15371            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15372            &DEFAULT
15373        }
15374        ///Returns the value of `objects`, or the default value if `objects` is unset.
15375        pub fn objects(&self) -> &[super::Argument] {
15376            &self.objects
15377        }
15378        ///Returns a mutable reference to `objects`.
15379        ///If the field is unset, it is first initialized with the default value.
15380        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15381            &mut self.objects
15382        }
15383        ///Sets `objects` with the provided value.
15384        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15385            self.objects = field;
15386        }
15387        ///Sets `objects` with the provided value.
15388        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15389            self.set_objects(field);
15390            self
15391        }
15392        ///Returns the value of `address`, or the default value if `address` is unset.
15393        pub fn address(&self) -> &super::Argument {
15394            self.address
15395                .as_ref()
15396                .map(|field| field as _)
15397                .unwrap_or_else(|| super::Argument::default_instance() as _)
15398        }
15399        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15400        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15401            self.address.as_mut().map(|field| field as _)
15402        }
15403        ///Returns a mutable reference to `address`.
15404        ///If the field is unset, it is first initialized with the default value.
15405        pub fn address_mut(&mut self) -> &mut super::Argument {
15406            self.address.get_or_insert_default()
15407        }
15408        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15409        pub fn address_opt(&self) -> Option<&super::Argument> {
15410            self.address.as_ref().map(|field| field as _)
15411        }
15412        ///Sets `address` with the provided value.
15413        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15414            self.address = Some(field.into().into());
15415        }
15416        ///Sets `address` with the provided value.
15417        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15418            self.set_address(field.into());
15419            self
15420        }
15421    }
15422    impl super::TypeArgumentError {
15423        pub const fn const_default() -> Self {
15424            Self {
15425                type_argument: None,
15426                kind: None,
15427            }
15428        }
15429        #[doc(hidden)]
15430        pub fn default_instance() -> &'static Self {
15431            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15432            &DEFAULT
15433        }
15434        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15435        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15436            self.type_argument.as_mut().map(|field| field as _)
15437        }
15438        ///Returns a mutable reference to `type_argument`.
15439        ///If the field is unset, it is first initialized with the default value.
15440        pub fn type_argument_mut(&mut self) -> &mut u32 {
15441            self.type_argument.get_or_insert_default()
15442        }
15443        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15444        pub fn type_argument_opt(&self) -> Option<u32> {
15445            self.type_argument.as_ref().map(|field| *field)
15446        }
15447        ///Sets `type_argument` with the provided value.
15448        pub fn set_type_argument(&mut self, field: u32) {
15449            self.type_argument = Some(field);
15450        }
15451        ///Sets `type_argument` with the provided value.
15452        pub fn with_type_argument(mut self, field: u32) -> Self {
15453            self.set_type_argument(field);
15454            self
15455        }
15456        ///Sets `kind` with the provided value.
15457        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15458            mut self,
15459            field: T,
15460        ) -> Self {
15461            self.set_kind(field.into());
15462            self
15463        }
15464    }
15465    impl super::TypeOrigin {
15466        pub const fn const_default() -> Self {
15467            Self {
15468                module_name: None,
15469                datatype_name: None,
15470                package_id: None,
15471            }
15472        }
15473        #[doc(hidden)]
15474        pub fn default_instance() -> &'static Self {
15475            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15476            &DEFAULT
15477        }
15478        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15479        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15480            self.module_name.as_mut().map(|field| field as _)
15481        }
15482        ///Returns a mutable reference to `module_name`.
15483        ///If the field is unset, it is first initialized with the default value.
15484        pub fn module_name_mut(&mut self) -> &mut String {
15485            self.module_name.get_or_insert_default()
15486        }
15487        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15488        pub fn module_name_opt(&self) -> Option<&str> {
15489            self.module_name.as_ref().map(|field| field as _)
15490        }
15491        ///Sets `module_name` with the provided value.
15492        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15493            self.module_name = Some(field.into().into());
15494        }
15495        ///Sets `module_name` with the provided value.
15496        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15497            self.set_module_name(field.into());
15498            self
15499        }
15500        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15501        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15502            self.datatype_name.as_mut().map(|field| field as _)
15503        }
15504        ///Returns a mutable reference to `datatype_name`.
15505        ///If the field is unset, it is first initialized with the default value.
15506        pub fn datatype_name_mut(&mut self) -> &mut String {
15507            self.datatype_name.get_or_insert_default()
15508        }
15509        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15510        pub fn datatype_name_opt(&self) -> Option<&str> {
15511            self.datatype_name.as_ref().map(|field| field as _)
15512        }
15513        ///Sets `datatype_name` with the provided value.
15514        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15515            self.datatype_name = Some(field.into().into());
15516        }
15517        ///Sets `datatype_name` with the provided value.
15518        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15519            self.set_datatype_name(field.into());
15520            self
15521        }
15522        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15523        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15524            self.package_id.as_mut().map(|field| field as _)
15525        }
15526        ///Returns a mutable reference to `package_id`.
15527        ///If the field is unset, it is first initialized with the default value.
15528        pub fn package_id_mut(&mut self) -> &mut String {
15529            self.package_id.get_or_insert_default()
15530        }
15531        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15532        pub fn package_id_opt(&self) -> Option<&str> {
15533            self.package_id.as_ref().map(|field| field as _)
15534        }
15535        ///Sets `package_id` with the provided value.
15536        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15537            self.package_id = Some(field.into().into());
15538        }
15539        ///Sets `package_id` with the provided value.
15540        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15541            self.set_package_id(field.into());
15542            self
15543        }
15544    }
15545    impl super::TypeParameter {
15546        pub const fn const_default() -> Self {
15547            Self {
15548                constraints: Vec::new(),
15549                is_phantom: None,
15550            }
15551        }
15552        #[doc(hidden)]
15553        pub fn default_instance() -> &'static Self {
15554            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15555            &DEFAULT
15556        }
15557        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15558        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15559            self.is_phantom.as_mut().map(|field| field as _)
15560        }
15561        ///Returns a mutable reference to `is_phantom`.
15562        ///If the field is unset, it is first initialized with the default value.
15563        pub fn is_phantom_mut(&mut self) -> &mut bool {
15564            self.is_phantom.get_or_insert_default()
15565        }
15566        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15567        pub fn is_phantom_opt(&self) -> Option<bool> {
15568            self.is_phantom.as_ref().map(|field| *field)
15569        }
15570        ///Sets `is_phantom` with the provided value.
15571        pub fn set_is_phantom(&mut self, field: bool) {
15572            self.is_phantom = Some(field);
15573        }
15574        ///Sets `is_phantom` with the provided value.
15575        pub fn with_is_phantom(mut self, field: bool) -> Self {
15576            self.set_is_phantom(field);
15577            self
15578        }
15579    }
15580    impl super::UnchangedConsensusObject {
15581        pub const fn const_default() -> Self {
15582            Self {
15583                kind: None,
15584                object_id: None,
15585                version: None,
15586                digest: None,
15587                object_type: None,
15588            }
15589        }
15590        #[doc(hidden)]
15591        pub fn default_instance() -> &'static Self {
15592            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15593            &DEFAULT
15594        }
15595        ///Sets `kind` with the provided value.
15596        pub fn with_kind<
15597            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15598        >(mut self, field: T) -> Self {
15599            self.set_kind(field.into());
15600            self
15601        }
15602        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15603        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15604            self.object_id.as_mut().map(|field| field as _)
15605        }
15606        ///Returns a mutable reference to `object_id`.
15607        ///If the field is unset, it is first initialized with the default value.
15608        pub fn object_id_mut(&mut self) -> &mut String {
15609            self.object_id.get_or_insert_default()
15610        }
15611        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15612        pub fn object_id_opt(&self) -> Option<&str> {
15613            self.object_id.as_ref().map(|field| field as _)
15614        }
15615        ///Sets `object_id` with the provided value.
15616        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15617            self.object_id = Some(field.into().into());
15618        }
15619        ///Sets `object_id` with the provided value.
15620        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15621            self.set_object_id(field.into());
15622            self
15623        }
15624        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15625        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15626            self.version.as_mut().map(|field| field as _)
15627        }
15628        ///Returns a mutable reference to `version`.
15629        ///If the field is unset, it is first initialized with the default value.
15630        pub fn version_mut(&mut self) -> &mut u64 {
15631            self.version.get_or_insert_default()
15632        }
15633        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15634        pub fn version_opt(&self) -> Option<u64> {
15635            self.version.as_ref().map(|field| *field)
15636        }
15637        ///Sets `version` with the provided value.
15638        pub fn set_version(&mut self, field: u64) {
15639            self.version = Some(field);
15640        }
15641        ///Sets `version` with the provided value.
15642        pub fn with_version(mut self, field: u64) -> Self {
15643            self.set_version(field);
15644            self
15645        }
15646        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15647        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15648            self.digest.as_mut().map(|field| field as _)
15649        }
15650        ///Returns a mutable reference to `digest`.
15651        ///If the field is unset, it is first initialized with the default value.
15652        pub fn digest_mut(&mut self) -> &mut String {
15653            self.digest.get_or_insert_default()
15654        }
15655        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15656        pub fn digest_opt(&self) -> Option<&str> {
15657            self.digest.as_ref().map(|field| field as _)
15658        }
15659        ///Sets `digest` with the provided value.
15660        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15661            self.digest = Some(field.into().into());
15662        }
15663        ///Sets `digest` with the provided value.
15664        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15665            self.set_digest(field.into());
15666            self
15667        }
15668        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15669        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15670            self.object_type.as_mut().map(|field| field as _)
15671        }
15672        ///Returns a mutable reference to `object_type`.
15673        ///If the field is unset, it is first initialized with the default value.
15674        pub fn object_type_mut(&mut self) -> &mut String {
15675            self.object_type.get_or_insert_default()
15676        }
15677        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15678        pub fn object_type_opt(&self) -> Option<&str> {
15679            self.object_type.as_ref().map(|field| field as _)
15680        }
15681        ///Sets `object_type` with the provided value.
15682        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15683            self.object_type = Some(field.into().into());
15684        }
15685        ///Sets `object_type` with the provided value.
15686        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15687            self.set_object_type(field.into());
15688            self
15689        }
15690    }
15691    impl super::Upgrade {
15692        pub const fn const_default() -> Self {
15693            Self {
15694                modules: Vec::new(),
15695                dependencies: Vec::new(),
15696                package: None,
15697                ticket: None,
15698            }
15699        }
15700        #[doc(hidden)]
15701        pub fn default_instance() -> &'static Self {
15702            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15703            &DEFAULT
15704        }
15705        ///Returns the value of `modules`, or the default value if `modules` is unset.
15706        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15707            &self.modules
15708        }
15709        ///Returns a mutable reference to `modules`.
15710        ///If the field is unset, it is first initialized with the default value.
15711        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15712            &mut self.modules
15713        }
15714        ///Sets `modules` with the provided value.
15715        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15716            self.modules = field;
15717        }
15718        ///Sets `modules` with the provided value.
15719        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15720            self.set_modules(field);
15721            self
15722        }
15723        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15724        pub fn dependencies(&self) -> &[String] {
15725            &self.dependencies
15726        }
15727        ///Returns a mutable reference to `dependencies`.
15728        ///If the field is unset, it is first initialized with the default value.
15729        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15730            &mut self.dependencies
15731        }
15732        ///Sets `dependencies` with the provided value.
15733        pub fn set_dependencies(&mut self, field: Vec<String>) {
15734            self.dependencies = field;
15735        }
15736        ///Sets `dependencies` with the provided value.
15737        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15738            self.set_dependencies(field);
15739            self
15740        }
15741        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15742        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15743            self.package.as_mut().map(|field| field as _)
15744        }
15745        ///Returns a mutable reference to `package`.
15746        ///If the field is unset, it is first initialized with the default value.
15747        pub fn package_mut(&mut self) -> &mut String {
15748            self.package.get_or_insert_default()
15749        }
15750        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15751        pub fn package_opt(&self) -> Option<&str> {
15752            self.package.as_ref().map(|field| field as _)
15753        }
15754        ///Sets `package` with the provided value.
15755        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15756            self.package = Some(field.into().into());
15757        }
15758        ///Sets `package` with the provided value.
15759        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15760            self.set_package(field.into());
15761            self
15762        }
15763        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15764        pub fn ticket(&self) -> &super::Argument {
15765            self.ticket
15766                .as_ref()
15767                .map(|field| field as _)
15768                .unwrap_or_else(|| super::Argument::default_instance() as _)
15769        }
15770        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15771        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15772            self.ticket.as_mut().map(|field| field as _)
15773        }
15774        ///Returns a mutable reference to `ticket`.
15775        ///If the field is unset, it is first initialized with the default value.
15776        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15777            self.ticket.get_or_insert_default()
15778        }
15779        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15780        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15781            self.ticket.as_ref().map(|field| field as _)
15782        }
15783        ///Sets `ticket` with the provided value.
15784        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15785            self.ticket = Some(field.into().into());
15786        }
15787        ///Sets `ticket` with the provided value.
15788        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15789            self.set_ticket(field.into());
15790            self
15791        }
15792    }
15793    impl super::UserSignature {
15794        pub const fn const_default() -> Self {
15795            Self {
15796                bcs: None,
15797                scheme: None,
15798                signature: None,
15799            }
15800        }
15801        #[doc(hidden)]
15802        pub fn default_instance() -> &'static Self {
15803            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15804            &DEFAULT
15805        }
15806        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15807        pub fn bcs(&self) -> &super::Bcs {
15808            self.bcs
15809                .as_ref()
15810                .map(|field| field as _)
15811                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15812        }
15813        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15814        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15815            self.bcs.as_mut().map(|field| field as _)
15816        }
15817        ///Returns a mutable reference to `bcs`.
15818        ///If the field is unset, it is first initialized with the default value.
15819        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15820            self.bcs.get_or_insert_default()
15821        }
15822        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15823        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15824            self.bcs.as_ref().map(|field| field as _)
15825        }
15826        ///Sets `bcs` with the provided value.
15827        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15828            self.bcs = Some(field.into().into());
15829        }
15830        ///Sets `bcs` with the provided value.
15831        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15832            self.set_bcs(field.into());
15833            self
15834        }
15835        ///Sets `scheme` with the provided value.
15836        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15837            self.set_scheme(field.into());
15838            self
15839        }
15840        ///Returns the value of `simple`, or the default value if `simple` is unset.
15841        pub fn simple(&self) -> &super::SimpleSignature {
15842            if let Some(super::user_signature::Signature::Simple(field)) = &self
15843                .signature
15844            {
15845                field as _
15846            } else {
15847                super::SimpleSignature::default_instance() as _
15848            }
15849        }
15850        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15851        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15852            if let Some(super::user_signature::Signature::Simple(field)) = &self
15853                .signature
15854            {
15855                Some(field as _)
15856            } else {
15857                None
15858            }
15859        }
15860        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15861        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15862            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15863                .signature
15864            {
15865                Some(field as _)
15866            } else {
15867                None
15868            }
15869        }
15870        ///Returns a mutable reference to `simple`.
15871        ///If the field is unset, it is first initialized with the default value.
15872        ///If any other oneof field in the same oneof is set, it will be cleared.
15873        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15874            if self.simple_opt_mut().is_none() {
15875                self.signature = Some(
15876                    super::user_signature::Signature::Simple(
15877                        super::SimpleSignature::default(),
15878                    ),
15879                );
15880            }
15881            self.simple_opt_mut().unwrap()
15882        }
15883        ///Sets `simple` with the provided value.
15884        ///If any other oneof field in the same oneof is set, it will be cleared.
15885        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15886            self.signature = Some(
15887                super::user_signature::Signature::Simple(field.into().into()),
15888            );
15889        }
15890        ///Sets `simple` with the provided value.
15891        ///If any other oneof field in the same oneof is set, it will be cleared.
15892        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15893            self.set_simple(field.into());
15894            self
15895        }
15896        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15897        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15898            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15899                .signature
15900            {
15901                field as _
15902            } else {
15903                super::MultisigAggregatedSignature::default_instance() as _
15904            }
15905        }
15906        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15907        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15908            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15909                .signature
15910            {
15911                Some(field as _)
15912            } else {
15913                None
15914            }
15915        }
15916        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15917        pub fn multisig_opt_mut(
15918            &mut self,
15919        ) -> Option<&mut super::MultisigAggregatedSignature> {
15920            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15921                .signature
15922            {
15923                Some(field as _)
15924            } else {
15925                None
15926            }
15927        }
15928        ///Returns a mutable reference to `multisig`.
15929        ///If the field is unset, it is first initialized with the default value.
15930        ///If any other oneof field in the same oneof is set, it will be cleared.
15931        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15932            if self.multisig_opt_mut().is_none() {
15933                self.signature = Some(
15934                    super::user_signature::Signature::Multisig(
15935                        super::MultisigAggregatedSignature::default(),
15936                    ),
15937                );
15938            }
15939            self.multisig_opt_mut().unwrap()
15940        }
15941        ///Sets `multisig` with the provided value.
15942        ///If any other oneof field in the same oneof is set, it will be cleared.
15943        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15944            &mut self,
15945            field: T,
15946        ) {
15947            self.signature = Some(
15948                super::user_signature::Signature::Multisig(field.into().into()),
15949            );
15950        }
15951        ///Sets `multisig` with the provided value.
15952        ///If any other oneof field in the same oneof is set, it will be cleared.
15953        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15954            mut self,
15955            field: T,
15956        ) -> Self {
15957            self.set_multisig(field.into());
15958            self
15959        }
15960        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15961        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15962            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15963                .signature
15964            {
15965                field as _
15966            } else {
15967                super::ZkLoginAuthenticator::default_instance() as _
15968            }
15969        }
15970        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15971        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15972            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15973                .signature
15974            {
15975                Some(field as _)
15976            } else {
15977                None
15978            }
15979        }
15980        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15981        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15982            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15983                .signature
15984            {
15985                Some(field as _)
15986            } else {
15987                None
15988            }
15989        }
15990        ///Returns a mutable reference to `zklogin`.
15991        ///If the field is unset, it is first initialized with the default value.
15992        ///If any other oneof field in the same oneof is set, it will be cleared.
15993        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15994            if self.zklogin_opt_mut().is_none() {
15995                self.signature = Some(
15996                    super::user_signature::Signature::Zklogin(
15997                        super::ZkLoginAuthenticator::default(),
15998                    ),
15999                );
16000            }
16001            self.zklogin_opt_mut().unwrap()
16002        }
16003        ///Sets `zklogin` with the provided value.
16004        ///If any other oneof field in the same oneof is set, it will be cleared.
16005        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
16006            self.signature = Some(
16007                super::user_signature::Signature::Zklogin(field.into().into()),
16008            );
16009        }
16010        ///Sets `zklogin` with the provided value.
16011        ///If any other oneof field in the same oneof is set, it will be cleared.
16012        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
16013            mut self,
16014            field: T,
16015        ) -> Self {
16016            self.set_zklogin(field.into());
16017            self
16018        }
16019        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
16020        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
16021            if let Some(super::user_signature::Signature::Passkey(field)) = &self
16022                .signature
16023            {
16024                field as _
16025            } else {
16026                super::PasskeyAuthenticator::default_instance() as _
16027            }
16028        }
16029        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
16030        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
16031            if let Some(super::user_signature::Signature::Passkey(field)) = &self
16032                .signature
16033            {
16034                Some(field as _)
16035            } else {
16036                None
16037            }
16038        }
16039        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16040        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
16041            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
16042                .signature
16043            {
16044                Some(field as _)
16045            } else {
16046                None
16047            }
16048        }
16049        ///Returns a mutable reference to `passkey`.
16050        ///If the field is unset, it is first initialized with the default value.
16051        ///If any other oneof field in the same oneof is set, it will be cleared.
16052        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
16053            if self.passkey_opt_mut().is_none() {
16054                self.signature = Some(
16055                    super::user_signature::Signature::Passkey(
16056                        super::PasskeyAuthenticator::default(),
16057                    ),
16058                );
16059            }
16060            self.passkey_opt_mut().unwrap()
16061        }
16062        ///Sets `passkey` with the provided value.
16063        ///If any other oneof field in the same oneof is set, it will be cleared.
16064        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
16065            self.signature = Some(
16066                super::user_signature::Signature::Passkey(field.into().into()),
16067            );
16068        }
16069        ///Sets `passkey` with the provided value.
16070        ///If any other oneof field in the same oneof is set, it will be cleared.
16071        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
16072            mut self,
16073            field: T,
16074        ) -> Self {
16075            self.set_passkey(field.into());
16076            self
16077        }
16078    }
16079    impl super::Validator {
16080        pub const fn const_default() -> Self {
16081            Self {
16082                name: None,
16083                address: None,
16084                description: None,
16085                image_url: None,
16086                project_url: None,
16087                protocol_public_key: None,
16088                proof_of_possession: None,
16089                network_public_key: None,
16090                worker_public_key: None,
16091                network_address: None,
16092                p2p_address: None,
16093                primary_address: None,
16094                worker_address: None,
16095                next_epoch_protocol_public_key: None,
16096                next_epoch_proof_of_possession: None,
16097                next_epoch_network_public_key: None,
16098                next_epoch_worker_public_key: None,
16099                next_epoch_network_address: None,
16100                next_epoch_p2p_address: None,
16101                next_epoch_primary_address: None,
16102                next_epoch_worker_address: None,
16103                metadata_extra_fields: None,
16104                voting_power: None,
16105                operation_cap_id: None,
16106                gas_price: None,
16107                staking_pool: None,
16108                commission_rate: None,
16109                next_epoch_stake: None,
16110                next_epoch_gas_price: None,
16111                next_epoch_commission_rate: None,
16112                extra_fields: None,
16113            }
16114        }
16115        #[doc(hidden)]
16116        pub fn default_instance() -> &'static Self {
16117            static DEFAULT: super::Validator = super::Validator::const_default();
16118            &DEFAULT
16119        }
16120        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16121        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16122            self.name.as_mut().map(|field| field as _)
16123        }
16124        ///Returns a mutable reference to `name`.
16125        ///If the field is unset, it is first initialized with the default value.
16126        pub fn name_mut(&mut self) -> &mut String {
16127            self.name.get_or_insert_default()
16128        }
16129        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
16130        pub fn name_opt(&self) -> Option<&str> {
16131            self.name.as_ref().map(|field| field as _)
16132        }
16133        ///Sets `name` with the provided value.
16134        pub fn set_name<T: Into<String>>(&mut self, field: T) {
16135            self.name = Some(field.into().into());
16136        }
16137        ///Sets `name` with the provided value.
16138        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16139            self.set_name(field.into());
16140            self
16141        }
16142        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16143        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16144            self.address.as_mut().map(|field| field as _)
16145        }
16146        ///Returns a mutable reference to `address`.
16147        ///If the field is unset, it is first initialized with the default value.
16148        pub fn address_mut(&mut self) -> &mut String {
16149            self.address.get_or_insert_default()
16150        }
16151        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16152        pub fn address_opt(&self) -> Option<&str> {
16153            self.address.as_ref().map(|field| field as _)
16154        }
16155        ///Sets `address` with the provided value.
16156        pub fn set_address<T: Into<String>>(&mut self, field: T) {
16157            self.address = Some(field.into().into());
16158        }
16159        ///Sets `address` with the provided value.
16160        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16161            self.set_address(field.into());
16162            self
16163        }
16164        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16165        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16166            self.description.as_mut().map(|field| field as _)
16167        }
16168        ///Returns a mutable reference to `description`.
16169        ///If the field is unset, it is first initialized with the default value.
16170        pub fn description_mut(&mut self) -> &mut String {
16171            self.description.get_or_insert_default()
16172        }
16173        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
16174        pub fn description_opt(&self) -> Option<&str> {
16175            self.description.as_ref().map(|field| field as _)
16176        }
16177        ///Sets `description` with the provided value.
16178        pub fn set_description<T: Into<String>>(&mut self, field: T) {
16179            self.description = Some(field.into().into());
16180        }
16181        ///Sets `description` with the provided value.
16182        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16183            self.set_description(field.into());
16184            self
16185        }
16186        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16187        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16188            self.image_url.as_mut().map(|field| field as _)
16189        }
16190        ///Returns a mutable reference to `image_url`.
16191        ///If the field is unset, it is first initialized with the default value.
16192        pub fn image_url_mut(&mut self) -> &mut String {
16193            self.image_url.get_or_insert_default()
16194        }
16195        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16196        pub fn image_url_opt(&self) -> Option<&str> {
16197            self.image_url.as_ref().map(|field| field as _)
16198        }
16199        ///Sets `image_url` with the provided value.
16200        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16201            self.image_url = Some(field.into().into());
16202        }
16203        ///Sets `image_url` with the provided value.
16204        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16205            self.set_image_url(field.into());
16206            self
16207        }
16208        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16209        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16210            self.project_url.as_mut().map(|field| field as _)
16211        }
16212        ///Returns a mutable reference to `project_url`.
16213        ///If the field is unset, it is first initialized with the default value.
16214        pub fn project_url_mut(&mut self) -> &mut String {
16215            self.project_url.get_or_insert_default()
16216        }
16217        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16218        pub fn project_url_opt(&self) -> Option<&str> {
16219            self.project_url.as_ref().map(|field| field as _)
16220        }
16221        ///Sets `project_url` with the provided value.
16222        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16223            self.project_url = Some(field.into().into());
16224        }
16225        ///Sets `project_url` with the provided value.
16226        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16227            self.set_project_url(field.into());
16228            self
16229        }
16230        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16231        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16232            self.protocol_public_key.as_ref().map(|field| field as _)
16233        }
16234        ///Sets `protocol_public_key` with the provided value.
16235        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16236            &mut self,
16237            field: T,
16238        ) {
16239            self.protocol_public_key = Some(field.into().into());
16240        }
16241        ///Sets `protocol_public_key` with the provided value.
16242        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16243            mut self,
16244            field: T,
16245        ) -> Self {
16246            self.set_protocol_public_key(field.into());
16247            self
16248        }
16249        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16250        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16251            self.proof_of_possession.as_ref().map(|field| field as _)
16252        }
16253        ///Sets `proof_of_possession` with the provided value.
16254        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16255            &mut self,
16256            field: T,
16257        ) {
16258            self.proof_of_possession = Some(field.into().into());
16259        }
16260        ///Sets `proof_of_possession` with the provided value.
16261        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16262            mut self,
16263            field: T,
16264        ) -> Self {
16265            self.set_proof_of_possession(field.into());
16266            self
16267        }
16268        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16269        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16270            self.network_public_key.as_ref().map(|field| field as _)
16271        }
16272        ///Sets `network_public_key` with the provided value.
16273        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16274            &mut self,
16275            field: T,
16276        ) {
16277            self.network_public_key = Some(field.into().into());
16278        }
16279        ///Sets `network_public_key` with the provided value.
16280        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16281            mut self,
16282            field: T,
16283        ) -> Self {
16284            self.set_network_public_key(field.into());
16285            self
16286        }
16287        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16288        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16289            self.worker_public_key.as_ref().map(|field| field as _)
16290        }
16291        ///Sets `worker_public_key` with the provided value.
16292        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16293            &mut self,
16294            field: T,
16295        ) {
16296            self.worker_public_key = Some(field.into().into());
16297        }
16298        ///Sets `worker_public_key` with the provided value.
16299        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16300            mut self,
16301            field: T,
16302        ) -> Self {
16303            self.set_worker_public_key(field.into());
16304            self
16305        }
16306        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16307        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16308            self.network_address.as_mut().map(|field| field as _)
16309        }
16310        ///Returns a mutable reference to `network_address`.
16311        ///If the field is unset, it is first initialized with the default value.
16312        pub fn network_address_mut(&mut self) -> &mut String {
16313            self.network_address.get_or_insert_default()
16314        }
16315        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16316        pub fn network_address_opt(&self) -> Option<&str> {
16317            self.network_address.as_ref().map(|field| field as _)
16318        }
16319        ///Sets `network_address` with the provided value.
16320        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16321            self.network_address = Some(field.into().into());
16322        }
16323        ///Sets `network_address` with the provided value.
16324        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16325            self.set_network_address(field.into());
16326            self
16327        }
16328        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16329        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16330            self.p2p_address.as_mut().map(|field| field as _)
16331        }
16332        ///Returns a mutable reference to `p2p_address`.
16333        ///If the field is unset, it is first initialized with the default value.
16334        pub fn p2p_address_mut(&mut self) -> &mut String {
16335            self.p2p_address.get_or_insert_default()
16336        }
16337        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16338        pub fn p2p_address_opt(&self) -> Option<&str> {
16339            self.p2p_address.as_ref().map(|field| field as _)
16340        }
16341        ///Sets `p2p_address` with the provided value.
16342        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16343            self.p2p_address = Some(field.into().into());
16344        }
16345        ///Sets `p2p_address` with the provided value.
16346        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16347            self.set_p2p_address(field.into());
16348            self
16349        }
16350        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16351        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16352            self.primary_address.as_mut().map(|field| field as _)
16353        }
16354        ///Returns a mutable reference to `primary_address`.
16355        ///If the field is unset, it is first initialized with the default value.
16356        pub fn primary_address_mut(&mut self) -> &mut String {
16357            self.primary_address.get_or_insert_default()
16358        }
16359        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16360        pub fn primary_address_opt(&self) -> Option<&str> {
16361            self.primary_address.as_ref().map(|field| field as _)
16362        }
16363        ///Sets `primary_address` with the provided value.
16364        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16365            self.primary_address = Some(field.into().into());
16366        }
16367        ///Sets `primary_address` with the provided value.
16368        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16369            self.set_primary_address(field.into());
16370            self
16371        }
16372        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16373        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16374            self.worker_address.as_mut().map(|field| field as _)
16375        }
16376        ///Returns a mutable reference to `worker_address`.
16377        ///If the field is unset, it is first initialized with the default value.
16378        pub fn worker_address_mut(&mut self) -> &mut String {
16379            self.worker_address.get_or_insert_default()
16380        }
16381        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16382        pub fn worker_address_opt(&self) -> Option<&str> {
16383            self.worker_address.as_ref().map(|field| field as _)
16384        }
16385        ///Sets `worker_address` with the provided value.
16386        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16387            self.worker_address = Some(field.into().into());
16388        }
16389        ///Sets `worker_address` with the provided value.
16390        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16391            self.set_worker_address(field.into());
16392            self
16393        }
16394        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16395        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16396            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16397        }
16398        ///Sets `next_epoch_protocol_public_key` with the provided value.
16399        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16400            &mut self,
16401            field: T,
16402        ) {
16403            self.next_epoch_protocol_public_key = Some(field.into().into());
16404        }
16405        ///Sets `next_epoch_protocol_public_key` with the provided value.
16406        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16407            mut self,
16408            field: T,
16409        ) -> Self {
16410            self.set_next_epoch_protocol_public_key(field.into());
16411            self
16412        }
16413        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16414        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16415            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16416        }
16417        ///Sets `next_epoch_proof_of_possession` with the provided value.
16418        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16419            &mut self,
16420            field: T,
16421        ) {
16422            self.next_epoch_proof_of_possession = Some(field.into().into());
16423        }
16424        ///Sets `next_epoch_proof_of_possession` with the provided value.
16425        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16426            mut self,
16427            field: T,
16428        ) -> Self {
16429            self.set_next_epoch_proof_of_possession(field.into());
16430            self
16431        }
16432        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16433        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16434            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16435        }
16436        ///Sets `next_epoch_network_public_key` with the provided value.
16437        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16438            &mut self,
16439            field: T,
16440        ) {
16441            self.next_epoch_network_public_key = Some(field.into().into());
16442        }
16443        ///Sets `next_epoch_network_public_key` with the provided value.
16444        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16445            mut self,
16446            field: T,
16447        ) -> Self {
16448            self.set_next_epoch_network_public_key(field.into());
16449            self
16450        }
16451        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16452        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16453            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16454        }
16455        ///Sets `next_epoch_worker_public_key` with the provided value.
16456        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16457            &mut self,
16458            field: T,
16459        ) {
16460            self.next_epoch_worker_public_key = Some(field.into().into());
16461        }
16462        ///Sets `next_epoch_worker_public_key` with the provided value.
16463        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16464            mut self,
16465            field: T,
16466        ) -> Self {
16467            self.set_next_epoch_worker_public_key(field.into());
16468            self
16469        }
16470        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16471        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16472            self.next_epoch_network_address.as_mut().map(|field| field as _)
16473        }
16474        ///Returns a mutable reference to `next_epoch_network_address`.
16475        ///If the field is unset, it is first initialized with the default value.
16476        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16477            self.next_epoch_network_address.get_or_insert_default()
16478        }
16479        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16480        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16481            self.next_epoch_network_address.as_ref().map(|field| field as _)
16482        }
16483        ///Sets `next_epoch_network_address` with the provided value.
16484        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16485            self.next_epoch_network_address = Some(field.into().into());
16486        }
16487        ///Sets `next_epoch_network_address` with the provided value.
16488        pub fn with_next_epoch_network_address<T: Into<String>>(
16489            mut self,
16490            field: T,
16491        ) -> Self {
16492            self.set_next_epoch_network_address(field.into());
16493            self
16494        }
16495        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16496        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16497            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16498        }
16499        ///Returns a mutable reference to `next_epoch_p2p_address`.
16500        ///If the field is unset, it is first initialized with the default value.
16501        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16502            self.next_epoch_p2p_address.get_or_insert_default()
16503        }
16504        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16505        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16506            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16507        }
16508        ///Sets `next_epoch_p2p_address` with the provided value.
16509        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16510            self.next_epoch_p2p_address = Some(field.into().into());
16511        }
16512        ///Sets `next_epoch_p2p_address` with the provided value.
16513        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16514            self.set_next_epoch_p2p_address(field.into());
16515            self
16516        }
16517        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16518        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16519            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16520        }
16521        ///Returns a mutable reference to `next_epoch_primary_address`.
16522        ///If the field is unset, it is first initialized with the default value.
16523        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16524            self.next_epoch_primary_address.get_or_insert_default()
16525        }
16526        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16527        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16528            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16529        }
16530        ///Sets `next_epoch_primary_address` with the provided value.
16531        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16532            self.next_epoch_primary_address = Some(field.into().into());
16533        }
16534        ///Sets `next_epoch_primary_address` with the provided value.
16535        pub fn with_next_epoch_primary_address<T: Into<String>>(
16536            mut self,
16537            field: T,
16538        ) -> Self {
16539            self.set_next_epoch_primary_address(field.into());
16540            self
16541        }
16542        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16543        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16544            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16545        }
16546        ///Returns a mutable reference to `next_epoch_worker_address`.
16547        ///If the field is unset, it is first initialized with the default value.
16548        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16549            self.next_epoch_worker_address.get_or_insert_default()
16550        }
16551        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16552        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16553            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16554        }
16555        ///Sets `next_epoch_worker_address` with the provided value.
16556        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16557            self.next_epoch_worker_address = Some(field.into().into());
16558        }
16559        ///Sets `next_epoch_worker_address` with the provided value.
16560        pub fn with_next_epoch_worker_address<T: Into<String>>(
16561            mut self,
16562            field: T,
16563        ) -> Self {
16564            self.set_next_epoch_worker_address(field.into());
16565            self
16566        }
16567        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16568        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16569            self.metadata_extra_fields
16570                .as_ref()
16571                .map(|field| field as _)
16572                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16573        }
16574        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16575        pub fn metadata_extra_fields_opt_mut(
16576            &mut self,
16577        ) -> Option<&mut super::MoveTable> {
16578            self.metadata_extra_fields.as_mut().map(|field| field as _)
16579        }
16580        ///Returns a mutable reference to `metadata_extra_fields`.
16581        ///If the field is unset, it is first initialized with the default value.
16582        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16583            self.metadata_extra_fields.get_or_insert_default()
16584        }
16585        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16586        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16587            self.metadata_extra_fields.as_ref().map(|field| field as _)
16588        }
16589        ///Sets `metadata_extra_fields` with the provided value.
16590        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16591            &mut self,
16592            field: T,
16593        ) {
16594            self.metadata_extra_fields = Some(field.into().into());
16595        }
16596        ///Sets `metadata_extra_fields` with the provided value.
16597        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16598            mut self,
16599            field: T,
16600        ) -> Self {
16601            self.set_metadata_extra_fields(field.into());
16602            self
16603        }
16604        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16605        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16606            self.voting_power.as_mut().map(|field| field as _)
16607        }
16608        ///Returns a mutable reference to `voting_power`.
16609        ///If the field is unset, it is first initialized with the default value.
16610        pub fn voting_power_mut(&mut self) -> &mut u64 {
16611            self.voting_power.get_or_insert_default()
16612        }
16613        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16614        pub fn voting_power_opt(&self) -> Option<u64> {
16615            self.voting_power.as_ref().map(|field| *field)
16616        }
16617        ///Sets `voting_power` with the provided value.
16618        pub fn set_voting_power(&mut self, field: u64) {
16619            self.voting_power = Some(field);
16620        }
16621        ///Sets `voting_power` with the provided value.
16622        pub fn with_voting_power(mut self, field: u64) -> Self {
16623            self.set_voting_power(field);
16624            self
16625        }
16626        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16627        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16628            self.operation_cap_id.as_mut().map(|field| field as _)
16629        }
16630        ///Returns a mutable reference to `operation_cap_id`.
16631        ///If the field is unset, it is first initialized with the default value.
16632        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16633            self.operation_cap_id.get_or_insert_default()
16634        }
16635        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16636        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16637            self.operation_cap_id.as_ref().map(|field| field as _)
16638        }
16639        ///Sets `operation_cap_id` with the provided value.
16640        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16641            self.operation_cap_id = Some(field.into().into());
16642        }
16643        ///Sets `operation_cap_id` with the provided value.
16644        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16645            self.set_operation_cap_id(field.into());
16646            self
16647        }
16648        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16649        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16650            self.gas_price.as_mut().map(|field| field as _)
16651        }
16652        ///Returns a mutable reference to `gas_price`.
16653        ///If the field is unset, it is first initialized with the default value.
16654        pub fn gas_price_mut(&mut self) -> &mut u64 {
16655            self.gas_price.get_or_insert_default()
16656        }
16657        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16658        pub fn gas_price_opt(&self) -> Option<u64> {
16659            self.gas_price.as_ref().map(|field| *field)
16660        }
16661        ///Sets `gas_price` with the provided value.
16662        pub fn set_gas_price(&mut self, field: u64) {
16663            self.gas_price = Some(field);
16664        }
16665        ///Sets `gas_price` with the provided value.
16666        pub fn with_gas_price(mut self, field: u64) -> Self {
16667            self.set_gas_price(field);
16668            self
16669        }
16670        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16671        pub fn staking_pool(&self) -> &super::StakingPool {
16672            self.staking_pool
16673                .as_ref()
16674                .map(|field| field as _)
16675                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16676        }
16677        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16678        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16679            self.staking_pool.as_mut().map(|field| field as _)
16680        }
16681        ///Returns a mutable reference to `staking_pool`.
16682        ///If the field is unset, it is first initialized with the default value.
16683        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16684            self.staking_pool.get_or_insert_default()
16685        }
16686        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16687        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16688            self.staking_pool.as_ref().map(|field| field as _)
16689        }
16690        ///Sets `staking_pool` with the provided value.
16691        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16692            self.staking_pool = Some(field.into().into());
16693        }
16694        ///Sets `staking_pool` with the provided value.
16695        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16696            mut self,
16697            field: T,
16698        ) -> Self {
16699            self.set_staking_pool(field.into());
16700            self
16701        }
16702        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16703        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16704            self.commission_rate.as_mut().map(|field| field as _)
16705        }
16706        ///Returns a mutable reference to `commission_rate`.
16707        ///If the field is unset, it is first initialized with the default value.
16708        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16709            self.commission_rate.get_or_insert_default()
16710        }
16711        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16712        pub fn commission_rate_opt(&self) -> Option<u64> {
16713            self.commission_rate.as_ref().map(|field| *field)
16714        }
16715        ///Sets `commission_rate` with the provided value.
16716        pub fn set_commission_rate(&mut self, field: u64) {
16717            self.commission_rate = Some(field);
16718        }
16719        ///Sets `commission_rate` with the provided value.
16720        pub fn with_commission_rate(mut self, field: u64) -> Self {
16721            self.set_commission_rate(field);
16722            self
16723        }
16724        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16725        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16726            self.next_epoch_stake.as_mut().map(|field| field as _)
16727        }
16728        ///Returns a mutable reference to `next_epoch_stake`.
16729        ///If the field is unset, it is first initialized with the default value.
16730        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16731            self.next_epoch_stake.get_or_insert_default()
16732        }
16733        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16734        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16735            self.next_epoch_stake.as_ref().map(|field| *field)
16736        }
16737        ///Sets `next_epoch_stake` with the provided value.
16738        pub fn set_next_epoch_stake(&mut self, field: u64) {
16739            self.next_epoch_stake = Some(field);
16740        }
16741        ///Sets `next_epoch_stake` with the provided value.
16742        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16743            self.set_next_epoch_stake(field);
16744            self
16745        }
16746        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16747        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16748            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16749        }
16750        ///Returns a mutable reference to `next_epoch_gas_price`.
16751        ///If the field is unset, it is first initialized with the default value.
16752        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16753            self.next_epoch_gas_price.get_or_insert_default()
16754        }
16755        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16756        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16757            self.next_epoch_gas_price.as_ref().map(|field| *field)
16758        }
16759        ///Sets `next_epoch_gas_price` with the provided value.
16760        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16761            self.next_epoch_gas_price = Some(field);
16762        }
16763        ///Sets `next_epoch_gas_price` with the provided value.
16764        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16765            self.set_next_epoch_gas_price(field);
16766            self
16767        }
16768        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16769        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16770            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16771        }
16772        ///Returns a mutable reference to `next_epoch_commission_rate`.
16773        ///If the field is unset, it is first initialized with the default value.
16774        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16775            self.next_epoch_commission_rate.get_or_insert_default()
16776        }
16777        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16778        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16779            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16780        }
16781        ///Sets `next_epoch_commission_rate` with the provided value.
16782        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16783            self.next_epoch_commission_rate = Some(field);
16784        }
16785        ///Sets `next_epoch_commission_rate` with the provided value.
16786        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16787            self.set_next_epoch_commission_rate(field);
16788            self
16789        }
16790        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16791        pub fn extra_fields(&self) -> &super::MoveTable {
16792            self.extra_fields
16793                .as_ref()
16794                .map(|field| field as _)
16795                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16796        }
16797        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16798        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16799            self.extra_fields.as_mut().map(|field| field as _)
16800        }
16801        ///Returns a mutable reference to `extra_fields`.
16802        ///If the field is unset, it is first initialized with the default value.
16803        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16804            self.extra_fields.get_or_insert_default()
16805        }
16806        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16807        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16808            self.extra_fields.as_ref().map(|field| field as _)
16809        }
16810        ///Sets `extra_fields` with the provided value.
16811        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16812            self.extra_fields = Some(field.into().into());
16813        }
16814        ///Sets `extra_fields` with the provided value.
16815        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16816            self.set_extra_fields(field.into());
16817            self
16818        }
16819    }
16820    impl super::ValidatorAggregatedSignature {
16821        pub const fn const_default() -> Self {
16822            Self {
16823                epoch: None,
16824                signature: None,
16825                bitmap: None,
16826            }
16827        }
16828        #[doc(hidden)]
16829        pub fn default_instance() -> &'static Self {
16830            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16831            &DEFAULT
16832        }
16833        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16834        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16835            self.epoch.as_mut().map(|field| field as _)
16836        }
16837        ///Returns a mutable reference to `epoch`.
16838        ///If the field is unset, it is first initialized with the default value.
16839        pub fn epoch_mut(&mut self) -> &mut u64 {
16840            self.epoch.get_or_insert_default()
16841        }
16842        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16843        pub fn epoch_opt(&self) -> Option<u64> {
16844            self.epoch.as_ref().map(|field| *field)
16845        }
16846        ///Sets `epoch` with the provided value.
16847        pub fn set_epoch(&mut self, field: u64) {
16848            self.epoch = Some(field);
16849        }
16850        ///Sets `epoch` with the provided value.
16851        pub fn with_epoch(mut self, field: u64) -> Self {
16852            self.set_epoch(field);
16853            self
16854        }
16855        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16856        pub fn signature_opt(&self) -> Option<&[u8]> {
16857            self.signature.as_ref().map(|field| field as _)
16858        }
16859        ///Sets `signature` with the provided value.
16860        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16861            self.signature = Some(field.into().into());
16862        }
16863        ///Sets `signature` with the provided value.
16864        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16865            mut self,
16866            field: T,
16867        ) -> Self {
16868            self.set_signature(field.into());
16869            self
16870        }
16871        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16872        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16873            self.bitmap.as_ref().map(|field| field as _)
16874        }
16875        ///Sets `bitmap` with the provided value.
16876        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16877            self.bitmap = Some(field.into().into());
16878        }
16879        ///Sets `bitmap` with the provided value.
16880        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16881            self.set_bitmap(field.into());
16882            self
16883        }
16884    }
16885    impl super::ValidatorCommittee {
16886        pub const fn const_default() -> Self {
16887            Self {
16888                epoch: None,
16889                members: Vec::new(),
16890            }
16891        }
16892        #[doc(hidden)]
16893        pub fn default_instance() -> &'static Self {
16894            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16895            &DEFAULT
16896        }
16897        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16898        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16899            self.epoch.as_mut().map(|field| field as _)
16900        }
16901        ///Returns a mutable reference to `epoch`.
16902        ///If the field is unset, it is first initialized with the default value.
16903        pub fn epoch_mut(&mut self) -> &mut u64 {
16904            self.epoch.get_or_insert_default()
16905        }
16906        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16907        pub fn epoch_opt(&self) -> Option<u64> {
16908            self.epoch.as_ref().map(|field| *field)
16909        }
16910        ///Sets `epoch` with the provided value.
16911        pub fn set_epoch(&mut self, field: u64) {
16912            self.epoch = Some(field);
16913        }
16914        ///Sets `epoch` with the provided value.
16915        pub fn with_epoch(mut self, field: u64) -> Self {
16916            self.set_epoch(field);
16917            self
16918        }
16919        ///Returns the value of `members`, or the default value if `members` is unset.
16920        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16921            &self.members
16922        }
16923        ///Returns a mutable reference to `members`.
16924        ///If the field is unset, it is first initialized with the default value.
16925        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16926            &mut self.members
16927        }
16928        ///Sets `members` with the provided value.
16929        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16930            self.members = field;
16931        }
16932        ///Sets `members` with the provided value.
16933        pub fn with_members(
16934            mut self,
16935            field: Vec<super::ValidatorCommitteeMember>,
16936        ) -> Self {
16937            self.set_members(field);
16938            self
16939        }
16940    }
16941    impl super::ValidatorCommitteeMember {
16942        pub const fn const_default() -> Self {
16943            Self {
16944                public_key: None,
16945                weight: None,
16946            }
16947        }
16948        #[doc(hidden)]
16949        pub fn default_instance() -> &'static Self {
16950            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16951            &DEFAULT
16952        }
16953        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16954        pub fn public_key_opt(&self) -> Option<&[u8]> {
16955            self.public_key.as_ref().map(|field| field as _)
16956        }
16957        ///Sets `public_key` with the provided value.
16958        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16959            self.public_key = Some(field.into().into());
16960        }
16961        ///Sets `public_key` with the provided value.
16962        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16963            mut self,
16964            field: T,
16965        ) -> Self {
16966            self.set_public_key(field.into());
16967            self
16968        }
16969        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16970        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16971            self.weight.as_mut().map(|field| field as _)
16972        }
16973        ///Returns a mutable reference to `weight`.
16974        ///If the field is unset, it is first initialized with the default value.
16975        pub fn weight_mut(&mut self) -> &mut u64 {
16976            self.weight.get_or_insert_default()
16977        }
16978        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16979        pub fn weight_opt(&self) -> Option<u64> {
16980            self.weight.as_ref().map(|field| *field)
16981        }
16982        ///Sets `weight` with the provided value.
16983        pub fn set_weight(&mut self, field: u64) {
16984            self.weight = Some(field);
16985        }
16986        ///Sets `weight` with the provided value.
16987        pub fn with_weight(mut self, field: u64) -> Self {
16988            self.set_weight(field);
16989            self
16990        }
16991    }
16992    impl super::ValidatorExecutionTimeObservation {
16993        pub const fn const_default() -> Self {
16994            Self {
16995                validator: None,
16996                duration: None,
16997            }
16998        }
16999        #[doc(hidden)]
17000        pub fn default_instance() -> &'static Self {
17001            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
17002            &DEFAULT
17003        }
17004        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
17005        pub fn validator_opt(&self) -> Option<&[u8]> {
17006            self.validator.as_ref().map(|field| field as _)
17007        }
17008        ///Sets `validator` with the provided value.
17009        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17010            self.validator = Some(field.into().into());
17011        }
17012        ///Sets `validator` with the provided value.
17013        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
17014            mut self,
17015            field: T,
17016        ) -> Self {
17017            self.set_validator(field.into());
17018            self
17019        }
17020        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17021        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
17022            self.duration.as_mut().map(|field| field as _)
17023        }
17024        ///Returns a mutable reference to `duration`.
17025        ///If the field is unset, it is first initialized with the default value.
17026        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
17027            self.duration.get_or_insert_default()
17028        }
17029        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
17030        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
17031            self.duration.as_ref().map(|field| field as _)
17032        }
17033        ///Sets `duration` with the provided value.
17034        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
17035            self.duration = Some(field.into().into());
17036        }
17037        ///Sets `duration` with the provided value.
17038        pub fn with_duration<T: Into<::prost_types::Duration>>(
17039            mut self,
17040            field: T,
17041        ) -> Self {
17042            self.set_duration(field.into());
17043            self
17044        }
17045    }
17046    impl super::ValidatorReportRecord {
17047        pub const fn const_default() -> Self {
17048            Self {
17049                reported: None,
17050                reporters: Vec::new(),
17051            }
17052        }
17053        #[doc(hidden)]
17054        pub fn default_instance() -> &'static Self {
17055            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
17056            &DEFAULT
17057        }
17058        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17059        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
17060            self.reported.as_mut().map(|field| field as _)
17061        }
17062        ///Returns a mutable reference to `reported`.
17063        ///If the field is unset, it is first initialized with the default value.
17064        pub fn reported_mut(&mut self) -> &mut String {
17065            self.reported.get_or_insert_default()
17066        }
17067        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
17068        pub fn reported_opt(&self) -> Option<&str> {
17069            self.reported.as_ref().map(|field| field as _)
17070        }
17071        ///Sets `reported` with the provided value.
17072        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
17073            self.reported = Some(field.into().into());
17074        }
17075        ///Sets `reported` with the provided value.
17076        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
17077            self.set_reported(field.into());
17078            self
17079        }
17080        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
17081        pub fn reporters(&self) -> &[String] {
17082            &self.reporters
17083        }
17084        ///Returns a mutable reference to `reporters`.
17085        ///If the field is unset, it is first initialized with the default value.
17086        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
17087            &mut self.reporters
17088        }
17089        ///Sets `reporters` with the provided value.
17090        pub fn set_reporters(&mut self, field: Vec<String>) {
17091            self.reporters = field;
17092        }
17093        ///Sets `reporters` with the provided value.
17094        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
17095            self.set_reporters(field);
17096            self
17097        }
17098    }
17099    impl super::ValidatorSet {
17100        pub const fn const_default() -> Self {
17101            Self {
17102                total_stake: None,
17103                active_validators: Vec::new(),
17104                pending_active_validators: None,
17105                pending_removals: Vec::new(),
17106                staking_pool_mappings: None,
17107                inactive_validators: None,
17108                validator_candidates: None,
17109                at_risk_validators: std::collections::BTreeMap::new(),
17110                extra_fields: None,
17111            }
17112        }
17113        #[doc(hidden)]
17114        pub fn default_instance() -> &'static Self {
17115            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17116            &DEFAULT
17117        }
17118        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17119        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17120            self.total_stake.as_mut().map(|field| field as _)
17121        }
17122        ///Returns a mutable reference to `total_stake`.
17123        ///If the field is unset, it is first initialized with the default value.
17124        pub fn total_stake_mut(&mut self) -> &mut u64 {
17125            self.total_stake.get_or_insert_default()
17126        }
17127        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
17128        pub fn total_stake_opt(&self) -> Option<u64> {
17129            self.total_stake.as_ref().map(|field| *field)
17130        }
17131        ///Sets `total_stake` with the provided value.
17132        pub fn set_total_stake(&mut self, field: u64) {
17133            self.total_stake = Some(field);
17134        }
17135        ///Sets `total_stake` with the provided value.
17136        pub fn with_total_stake(mut self, field: u64) -> Self {
17137            self.set_total_stake(field);
17138            self
17139        }
17140        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
17141        pub fn active_validators(&self) -> &[super::Validator] {
17142            &self.active_validators
17143        }
17144        ///Returns a mutable reference to `active_validators`.
17145        ///If the field is unset, it is first initialized with the default value.
17146        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17147            &mut self.active_validators
17148        }
17149        ///Sets `active_validators` with the provided value.
17150        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17151            self.active_validators = field;
17152        }
17153        ///Sets `active_validators` with the provided value.
17154        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17155            self.set_active_validators(field);
17156            self
17157        }
17158        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
17159        pub fn pending_active_validators(&self) -> &super::MoveTable {
17160            self.pending_active_validators
17161                .as_ref()
17162                .map(|field| field as _)
17163                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17164        }
17165        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17166        pub fn pending_active_validators_opt_mut(
17167            &mut self,
17168        ) -> Option<&mut super::MoveTable> {
17169            self.pending_active_validators.as_mut().map(|field| field as _)
17170        }
17171        ///Returns a mutable reference to `pending_active_validators`.
17172        ///If the field is unset, it is first initialized with the default value.
17173        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17174            self.pending_active_validators.get_or_insert_default()
17175        }
17176        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17177        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17178            self.pending_active_validators.as_ref().map(|field| field as _)
17179        }
17180        ///Sets `pending_active_validators` with the provided value.
17181        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17182            &mut self,
17183            field: T,
17184        ) {
17185            self.pending_active_validators = Some(field.into().into());
17186        }
17187        ///Sets `pending_active_validators` with the provided value.
17188        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17189            mut self,
17190            field: T,
17191        ) -> Self {
17192            self.set_pending_active_validators(field.into());
17193            self
17194        }
17195        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
17196        pub fn pending_removals(&self) -> &[u64] {
17197            &self.pending_removals
17198        }
17199        ///Returns a mutable reference to `pending_removals`.
17200        ///If the field is unset, it is first initialized with the default value.
17201        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17202            &mut self.pending_removals
17203        }
17204        ///Sets `pending_removals` with the provided value.
17205        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17206            self.pending_removals = field;
17207        }
17208        ///Sets `pending_removals` with the provided value.
17209        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17210            self.set_pending_removals(field);
17211            self
17212        }
17213        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
17214        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17215            self.staking_pool_mappings
17216                .as_ref()
17217                .map(|field| field as _)
17218                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17219        }
17220        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17221        pub fn staking_pool_mappings_opt_mut(
17222            &mut self,
17223        ) -> Option<&mut super::MoveTable> {
17224            self.staking_pool_mappings.as_mut().map(|field| field as _)
17225        }
17226        ///Returns a mutable reference to `staking_pool_mappings`.
17227        ///If the field is unset, it is first initialized with the default value.
17228        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17229            self.staking_pool_mappings.get_or_insert_default()
17230        }
17231        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
17232        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17233            self.staking_pool_mappings.as_ref().map(|field| field as _)
17234        }
17235        ///Sets `staking_pool_mappings` with the provided value.
17236        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17237            &mut self,
17238            field: T,
17239        ) {
17240            self.staking_pool_mappings = Some(field.into().into());
17241        }
17242        ///Sets `staking_pool_mappings` with the provided value.
17243        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17244            mut self,
17245            field: T,
17246        ) -> Self {
17247            self.set_staking_pool_mappings(field.into());
17248            self
17249        }
17250        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17251        pub fn inactive_validators(&self) -> &super::MoveTable {
17252            self.inactive_validators
17253                .as_ref()
17254                .map(|field| field as _)
17255                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17256        }
17257        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17258        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17259            self.inactive_validators.as_mut().map(|field| field as _)
17260        }
17261        ///Returns a mutable reference to `inactive_validators`.
17262        ///If the field is unset, it is first initialized with the default value.
17263        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17264            self.inactive_validators.get_or_insert_default()
17265        }
17266        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17267        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17268            self.inactive_validators.as_ref().map(|field| field as _)
17269        }
17270        ///Sets `inactive_validators` with the provided value.
17271        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17272            self.inactive_validators = Some(field.into().into());
17273        }
17274        ///Sets `inactive_validators` with the provided value.
17275        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17276            mut self,
17277            field: T,
17278        ) -> Self {
17279            self.set_inactive_validators(field.into());
17280            self
17281        }
17282        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17283        pub fn validator_candidates(&self) -> &super::MoveTable {
17284            self.validator_candidates
17285                .as_ref()
17286                .map(|field| field as _)
17287                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17288        }
17289        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17290        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17291            self.validator_candidates.as_mut().map(|field| field as _)
17292        }
17293        ///Returns a mutable reference to `validator_candidates`.
17294        ///If the field is unset, it is first initialized with the default value.
17295        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17296            self.validator_candidates.get_or_insert_default()
17297        }
17298        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17299        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17300            self.validator_candidates.as_ref().map(|field| field as _)
17301        }
17302        ///Sets `validator_candidates` with the provided value.
17303        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17304            self.validator_candidates = Some(field.into().into());
17305        }
17306        ///Sets `validator_candidates` with the provided value.
17307        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17308            mut self,
17309            field: T,
17310        ) -> Self {
17311            self.set_validator_candidates(field.into());
17312            self
17313        }
17314        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17315        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17316            &self.at_risk_validators
17317        }
17318        ///Returns a mutable reference to `at_risk_validators`.
17319        ///If the field is unset, it is first initialized with the default value.
17320        pub fn at_risk_validators_mut(
17321            &mut self,
17322        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17323            &mut self.at_risk_validators
17324        }
17325        ///Sets `at_risk_validators` with the provided value.
17326        pub fn set_at_risk_validators(
17327            &mut self,
17328            field: ::std::collections::BTreeMap<String, u64>,
17329        ) {
17330            self.at_risk_validators = field;
17331        }
17332        ///Sets `at_risk_validators` with the provided value.
17333        pub fn with_at_risk_validators(
17334            mut self,
17335            field: ::std::collections::BTreeMap<String, u64>,
17336        ) -> Self {
17337            self.set_at_risk_validators(field);
17338            self
17339        }
17340        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17341        pub fn extra_fields(&self) -> &super::MoveTable {
17342            self.extra_fields
17343                .as_ref()
17344                .map(|field| field as _)
17345                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17346        }
17347        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17348        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17349            self.extra_fields.as_mut().map(|field| field as _)
17350        }
17351        ///Returns a mutable reference to `extra_fields`.
17352        ///If the field is unset, it is first initialized with the default value.
17353        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17354            self.extra_fields.get_or_insert_default()
17355        }
17356        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17357        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17358            self.extra_fields.as_ref().map(|field| field as _)
17359        }
17360        ///Sets `extra_fields` with the provided value.
17361        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17362            self.extra_fields = Some(field.into().into());
17363        }
17364        ///Sets `extra_fields` with the provided value.
17365        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17366            self.set_extra_fields(field.into());
17367            self
17368        }
17369    }
17370    impl super::VariantDescriptor {
17371        pub const fn const_default() -> Self {
17372            Self {
17373                name: None,
17374                position: None,
17375                fields: Vec::new(),
17376            }
17377        }
17378        #[doc(hidden)]
17379        pub fn default_instance() -> &'static Self {
17380            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17381            &DEFAULT
17382        }
17383        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17384        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17385            self.name.as_mut().map(|field| field as _)
17386        }
17387        ///Returns a mutable reference to `name`.
17388        ///If the field is unset, it is first initialized with the default value.
17389        pub fn name_mut(&mut self) -> &mut String {
17390            self.name.get_or_insert_default()
17391        }
17392        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17393        pub fn name_opt(&self) -> Option<&str> {
17394            self.name.as_ref().map(|field| field as _)
17395        }
17396        ///Sets `name` with the provided value.
17397        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17398            self.name = Some(field.into().into());
17399        }
17400        ///Sets `name` with the provided value.
17401        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17402            self.set_name(field.into());
17403            self
17404        }
17405        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17406        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17407            self.position.as_mut().map(|field| field as _)
17408        }
17409        ///Returns a mutable reference to `position`.
17410        ///If the field is unset, it is first initialized with the default value.
17411        pub fn position_mut(&mut self) -> &mut u32 {
17412            self.position.get_or_insert_default()
17413        }
17414        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17415        pub fn position_opt(&self) -> Option<u32> {
17416            self.position.as_ref().map(|field| *field)
17417        }
17418        ///Sets `position` with the provided value.
17419        pub fn set_position(&mut self, field: u32) {
17420            self.position = Some(field);
17421        }
17422        ///Sets `position` with the provided value.
17423        pub fn with_position(mut self, field: u32) -> Self {
17424            self.set_position(field);
17425            self
17426        }
17427        ///Returns the value of `fields`, or the default value if `fields` is unset.
17428        pub fn fields(&self) -> &[super::FieldDescriptor] {
17429            &self.fields
17430        }
17431        ///Returns a mutable reference to `fields`.
17432        ///If the field is unset, it is first initialized with the default value.
17433        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17434            &mut self.fields
17435        }
17436        ///Sets `fields` with the provided value.
17437        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17438            self.fields = field;
17439        }
17440        ///Sets `fields` with the provided value.
17441        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17442            self.set_fields(field);
17443            self
17444        }
17445    }
17446    impl super::VerifySignatureRequest {
17447        pub const fn const_default() -> Self {
17448            Self {
17449                message: None,
17450                signature: None,
17451                address: None,
17452                jwks: Vec::new(),
17453            }
17454        }
17455        #[doc(hidden)]
17456        pub fn default_instance() -> &'static Self {
17457            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17458            &DEFAULT
17459        }
17460        ///Returns the value of `message`, or the default value if `message` is unset.
17461        pub fn message(&self) -> &super::Bcs {
17462            self.message
17463                .as_ref()
17464                .map(|field| field as _)
17465                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17466        }
17467        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17468        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17469            self.message.as_mut().map(|field| field as _)
17470        }
17471        ///Returns a mutable reference to `message`.
17472        ///If the field is unset, it is first initialized with the default value.
17473        pub fn message_mut(&mut self) -> &mut super::Bcs {
17474            self.message.get_or_insert_default()
17475        }
17476        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17477        pub fn message_opt(&self) -> Option<&super::Bcs> {
17478            self.message.as_ref().map(|field| field as _)
17479        }
17480        ///Sets `message` with the provided value.
17481        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17482            self.message = Some(field.into().into());
17483        }
17484        ///Sets `message` with the provided value.
17485        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17486            self.set_message(field.into());
17487            self
17488        }
17489        ///Returns the value of `signature`, or the default value if `signature` is unset.
17490        pub fn signature(&self) -> &super::UserSignature {
17491            self.signature
17492                .as_ref()
17493                .map(|field| field as _)
17494                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17495        }
17496        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17497        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17498            self.signature.as_mut().map(|field| field as _)
17499        }
17500        ///Returns a mutable reference to `signature`.
17501        ///If the field is unset, it is first initialized with the default value.
17502        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17503            self.signature.get_or_insert_default()
17504        }
17505        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17506        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17507            self.signature.as_ref().map(|field| field as _)
17508        }
17509        ///Sets `signature` with the provided value.
17510        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17511            self.signature = Some(field.into().into());
17512        }
17513        ///Sets `signature` with the provided value.
17514        pub fn with_signature<T: Into<super::UserSignature>>(
17515            mut self,
17516            field: T,
17517        ) -> Self {
17518            self.set_signature(field.into());
17519            self
17520        }
17521        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17522        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17523            self.address.as_mut().map(|field| field as _)
17524        }
17525        ///Returns a mutable reference to `address`.
17526        ///If the field is unset, it is first initialized with the default value.
17527        pub fn address_mut(&mut self) -> &mut String {
17528            self.address.get_or_insert_default()
17529        }
17530        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17531        pub fn address_opt(&self) -> Option<&str> {
17532            self.address.as_ref().map(|field| field as _)
17533        }
17534        ///Sets `address` with the provided value.
17535        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17536            self.address = Some(field.into().into());
17537        }
17538        ///Sets `address` with the provided value.
17539        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17540            self.set_address(field.into());
17541            self
17542        }
17543        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17544        pub fn jwks(&self) -> &[super::ActiveJwk] {
17545            &self.jwks
17546        }
17547        ///Returns a mutable reference to `jwks`.
17548        ///If the field is unset, it is first initialized with the default value.
17549        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17550            &mut self.jwks
17551        }
17552        ///Sets `jwks` with the provided value.
17553        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17554            self.jwks = field;
17555        }
17556        ///Sets `jwks` with the provided value.
17557        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17558            self.set_jwks(field);
17559            self
17560        }
17561    }
17562    impl super::VerifySignatureResponse {
17563        pub const fn const_default() -> Self {
17564            Self {
17565                is_valid: None,
17566                reason: None,
17567            }
17568        }
17569        #[doc(hidden)]
17570        pub fn default_instance() -> &'static Self {
17571            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17572            &DEFAULT
17573        }
17574        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17575        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17576            self.is_valid.as_mut().map(|field| field as _)
17577        }
17578        ///Returns a mutable reference to `is_valid`.
17579        ///If the field is unset, it is first initialized with the default value.
17580        pub fn is_valid_mut(&mut self) -> &mut bool {
17581            self.is_valid.get_or_insert_default()
17582        }
17583        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17584        pub fn is_valid_opt(&self) -> Option<bool> {
17585            self.is_valid.as_ref().map(|field| *field)
17586        }
17587        ///Sets `is_valid` with the provided value.
17588        pub fn set_is_valid(&mut self, field: bool) {
17589            self.is_valid = Some(field);
17590        }
17591        ///Sets `is_valid` with the provided value.
17592        pub fn with_is_valid(mut self, field: bool) -> Self {
17593            self.set_is_valid(field);
17594            self
17595        }
17596        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17597        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17598            self.reason.as_mut().map(|field| field as _)
17599        }
17600        ///Returns a mutable reference to `reason`.
17601        ///If the field is unset, it is first initialized with the default value.
17602        pub fn reason_mut(&mut self) -> &mut String {
17603            self.reason.get_or_insert_default()
17604        }
17605        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17606        pub fn reason_opt(&self) -> Option<&str> {
17607            self.reason.as_ref().map(|field| field as _)
17608        }
17609        ///Sets `reason` with the provided value.
17610        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17611            self.reason = Some(field.into().into());
17612        }
17613        ///Sets `reason` with the provided value.
17614        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17615            self.set_reason(field.into());
17616            self
17617        }
17618    }
17619    impl super::VersionAssignment {
17620        pub const fn const_default() -> Self {
17621            Self {
17622                object_id: None,
17623                start_version: None,
17624                version: None,
17625            }
17626        }
17627        #[doc(hidden)]
17628        pub fn default_instance() -> &'static Self {
17629            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17630            &DEFAULT
17631        }
17632        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17633        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17634            self.object_id.as_mut().map(|field| field as _)
17635        }
17636        ///Returns a mutable reference to `object_id`.
17637        ///If the field is unset, it is first initialized with the default value.
17638        pub fn object_id_mut(&mut self) -> &mut String {
17639            self.object_id.get_or_insert_default()
17640        }
17641        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17642        pub fn object_id_opt(&self) -> Option<&str> {
17643            self.object_id.as_ref().map(|field| field as _)
17644        }
17645        ///Sets `object_id` with the provided value.
17646        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17647            self.object_id = Some(field.into().into());
17648        }
17649        ///Sets `object_id` with the provided value.
17650        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17651            self.set_object_id(field.into());
17652            self
17653        }
17654        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17655        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17656            self.start_version.as_mut().map(|field| field as _)
17657        }
17658        ///Returns a mutable reference to `start_version`.
17659        ///If the field is unset, it is first initialized with the default value.
17660        pub fn start_version_mut(&mut self) -> &mut u64 {
17661            self.start_version.get_or_insert_default()
17662        }
17663        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17664        pub fn start_version_opt(&self) -> Option<u64> {
17665            self.start_version.as_ref().map(|field| *field)
17666        }
17667        ///Sets `start_version` with the provided value.
17668        pub fn set_start_version(&mut self, field: u64) {
17669            self.start_version = Some(field);
17670        }
17671        ///Sets `start_version` with the provided value.
17672        pub fn with_start_version(mut self, field: u64) -> Self {
17673            self.set_start_version(field);
17674            self
17675        }
17676        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17677        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17678            self.version.as_mut().map(|field| field as _)
17679        }
17680        ///Returns a mutable reference to `version`.
17681        ///If the field is unset, it is first initialized with the default value.
17682        pub fn version_mut(&mut self) -> &mut u64 {
17683            self.version.get_or_insert_default()
17684        }
17685        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17686        pub fn version_opt(&self) -> Option<u64> {
17687            self.version.as_ref().map(|field| *field)
17688        }
17689        ///Sets `version` with the provided value.
17690        pub fn set_version(&mut self, field: u64) {
17691            self.version = Some(field);
17692        }
17693        ///Sets `version` with the provided value.
17694        pub fn with_version(mut self, field: u64) -> Self {
17695            self.set_version(field);
17696            self
17697        }
17698    }
17699    impl super::ZkLoginAuthenticator {
17700        pub const fn const_default() -> Self {
17701            Self {
17702                inputs: None,
17703                max_epoch: None,
17704                signature: None,
17705                public_identifier: None,
17706                jwk_id: None,
17707            }
17708        }
17709        #[doc(hidden)]
17710        pub fn default_instance() -> &'static Self {
17711            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17712            &DEFAULT
17713        }
17714        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17715        pub fn inputs(&self) -> &super::ZkLoginInputs {
17716            self.inputs
17717                .as_ref()
17718                .map(|field| field as _)
17719                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17720        }
17721        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17722        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17723            self.inputs.as_mut().map(|field| field as _)
17724        }
17725        ///Returns a mutable reference to `inputs`.
17726        ///If the field is unset, it is first initialized with the default value.
17727        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17728            self.inputs.get_or_insert_default()
17729        }
17730        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17731        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17732            self.inputs.as_ref().map(|field| field as _)
17733        }
17734        ///Sets `inputs` with the provided value.
17735        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17736            self.inputs = Some(field.into().into());
17737        }
17738        ///Sets `inputs` with the provided value.
17739        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17740            self.set_inputs(field.into());
17741            self
17742        }
17743        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17744        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17745            self.max_epoch.as_mut().map(|field| field as _)
17746        }
17747        ///Returns a mutable reference to `max_epoch`.
17748        ///If the field is unset, it is first initialized with the default value.
17749        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17750            self.max_epoch.get_or_insert_default()
17751        }
17752        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17753        pub fn max_epoch_opt(&self) -> Option<u64> {
17754            self.max_epoch.as_ref().map(|field| *field)
17755        }
17756        ///Sets `max_epoch` with the provided value.
17757        pub fn set_max_epoch(&mut self, field: u64) {
17758            self.max_epoch = Some(field);
17759        }
17760        ///Sets `max_epoch` with the provided value.
17761        pub fn with_max_epoch(mut self, field: u64) -> Self {
17762            self.set_max_epoch(field);
17763            self
17764        }
17765        ///Returns the value of `signature`, or the default value if `signature` is unset.
17766        pub fn signature(&self) -> &super::SimpleSignature {
17767            self.signature
17768                .as_ref()
17769                .map(|field| field as _)
17770                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17771        }
17772        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17773        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17774            self.signature.as_mut().map(|field| field as _)
17775        }
17776        ///Returns a mutable reference to `signature`.
17777        ///If the field is unset, it is first initialized with the default value.
17778        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17779            self.signature.get_or_insert_default()
17780        }
17781        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17782        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17783            self.signature.as_ref().map(|field| field as _)
17784        }
17785        ///Sets `signature` with the provided value.
17786        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17787            self.signature = Some(field.into().into());
17788        }
17789        ///Sets `signature` with the provided value.
17790        pub fn with_signature<T: Into<super::SimpleSignature>>(
17791            mut self,
17792            field: T,
17793        ) -> Self {
17794            self.set_signature(field.into());
17795            self
17796        }
17797        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17798        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17799            self.public_identifier
17800                .as_ref()
17801                .map(|field| field as _)
17802                .unwrap_or_else(|| {
17803                    super::ZkLoginPublicIdentifier::default_instance() as _
17804                })
17805        }
17806        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17807        pub fn public_identifier_opt_mut(
17808            &mut self,
17809        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17810            self.public_identifier.as_mut().map(|field| field as _)
17811        }
17812        ///Returns a mutable reference to `public_identifier`.
17813        ///If the field is unset, it is first initialized with the default value.
17814        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17815            self.public_identifier.get_or_insert_default()
17816        }
17817        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17818        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17819            self.public_identifier.as_ref().map(|field| field as _)
17820        }
17821        ///Sets `public_identifier` with the provided value.
17822        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17823            &mut self,
17824            field: T,
17825        ) {
17826            self.public_identifier = Some(field.into().into());
17827        }
17828        ///Sets `public_identifier` with the provided value.
17829        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17830            mut self,
17831            field: T,
17832        ) -> Self {
17833            self.set_public_identifier(field.into());
17834            self
17835        }
17836        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17837        pub fn jwk_id(&self) -> &super::JwkId {
17838            self.jwk_id
17839                .as_ref()
17840                .map(|field| field as _)
17841                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17842        }
17843        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17844        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17845            self.jwk_id.as_mut().map(|field| field as _)
17846        }
17847        ///Returns a mutable reference to `jwk_id`.
17848        ///If the field is unset, it is first initialized with the default value.
17849        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17850            self.jwk_id.get_or_insert_default()
17851        }
17852        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17853        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17854            self.jwk_id.as_ref().map(|field| field as _)
17855        }
17856        ///Sets `jwk_id` with the provided value.
17857        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17858            self.jwk_id = Some(field.into().into());
17859        }
17860        ///Sets `jwk_id` with the provided value.
17861        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17862            self.set_jwk_id(field.into());
17863            self
17864        }
17865    }
17866    impl super::ZkLoginClaim {
17867        pub const fn const_default() -> Self {
17868            Self {
17869                value: None,
17870                index_mod_4: None,
17871            }
17872        }
17873        #[doc(hidden)]
17874        pub fn default_instance() -> &'static Self {
17875            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17876            &DEFAULT
17877        }
17878        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17879        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17880            self.value.as_mut().map(|field| field as _)
17881        }
17882        ///Returns a mutable reference to `value`.
17883        ///If the field is unset, it is first initialized with the default value.
17884        pub fn value_mut(&mut self) -> &mut String {
17885            self.value.get_or_insert_default()
17886        }
17887        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17888        pub fn value_opt(&self) -> Option<&str> {
17889            self.value.as_ref().map(|field| field as _)
17890        }
17891        ///Sets `value` with the provided value.
17892        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17893            self.value = Some(field.into().into());
17894        }
17895        ///Sets `value` with the provided value.
17896        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17897            self.set_value(field.into());
17898            self
17899        }
17900        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17901        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17902            self.index_mod_4.as_mut().map(|field| field as _)
17903        }
17904        ///Returns a mutable reference to `index_mod_4`.
17905        ///If the field is unset, it is first initialized with the default value.
17906        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17907            self.index_mod_4.get_or_insert_default()
17908        }
17909        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17910        pub fn index_mod_4_opt(&self) -> Option<u32> {
17911            self.index_mod_4.as_ref().map(|field| *field)
17912        }
17913        ///Sets `index_mod_4` with the provided value.
17914        pub fn set_index_mod_4(&mut self, field: u32) {
17915            self.index_mod_4 = Some(field);
17916        }
17917        ///Sets `index_mod_4` with the provided value.
17918        pub fn with_index_mod_4(mut self, field: u32) -> Self {
17919            self.set_index_mod_4(field);
17920            self
17921        }
17922    }
17923    impl super::ZkLoginInputs {
17924        pub const fn const_default() -> Self {
17925            Self {
17926                proof_points: None,
17927                iss_base64_details: None,
17928                header_base64: None,
17929                address_seed: None,
17930            }
17931        }
17932        #[doc(hidden)]
17933        pub fn default_instance() -> &'static Self {
17934            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17935            &DEFAULT
17936        }
17937        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17938        pub fn proof_points(&self) -> &super::ZkLoginProof {
17939            self.proof_points
17940                .as_ref()
17941                .map(|field| field as _)
17942                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17943        }
17944        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17945        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17946            self.proof_points.as_mut().map(|field| field as _)
17947        }
17948        ///Returns a mutable reference to `proof_points`.
17949        ///If the field is unset, it is first initialized with the default value.
17950        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17951            self.proof_points.get_or_insert_default()
17952        }
17953        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17954        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17955            self.proof_points.as_ref().map(|field| field as _)
17956        }
17957        ///Sets `proof_points` with the provided value.
17958        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17959            self.proof_points = Some(field.into().into());
17960        }
17961        ///Sets `proof_points` with the provided value.
17962        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17963            mut self,
17964            field: T,
17965        ) -> Self {
17966            self.set_proof_points(field.into());
17967            self
17968        }
17969        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17970        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17971            self.iss_base64_details
17972                .as_ref()
17973                .map(|field| field as _)
17974                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17975        }
17976        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17977        pub fn iss_base64_details_opt_mut(
17978            &mut self,
17979        ) -> Option<&mut super::ZkLoginClaim> {
17980            self.iss_base64_details.as_mut().map(|field| field as _)
17981        }
17982        ///Returns a mutable reference to `iss_base64_details`.
17983        ///If the field is unset, it is first initialized with the default value.
17984        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17985            self.iss_base64_details.get_or_insert_default()
17986        }
17987        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17988        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17989            self.iss_base64_details.as_ref().map(|field| field as _)
17990        }
17991        ///Sets `iss_base64_details` with the provided value.
17992        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17993            &mut self,
17994            field: T,
17995        ) {
17996            self.iss_base64_details = Some(field.into().into());
17997        }
17998        ///Sets `iss_base64_details` with the provided value.
17999        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18000            mut self,
18001            field: T,
18002        ) -> Self {
18003            self.set_iss_base64_details(field.into());
18004            self
18005        }
18006        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18007        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
18008            self.header_base64.as_mut().map(|field| field as _)
18009        }
18010        ///Returns a mutable reference to `header_base64`.
18011        ///If the field is unset, it is first initialized with the default value.
18012        pub fn header_base64_mut(&mut self) -> &mut String {
18013            self.header_base64.get_or_insert_default()
18014        }
18015        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
18016        pub fn header_base64_opt(&self) -> Option<&str> {
18017            self.header_base64.as_ref().map(|field| field as _)
18018        }
18019        ///Sets `header_base64` with the provided value.
18020        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
18021            self.header_base64 = Some(field.into().into());
18022        }
18023        ///Sets `header_base64` with the provided value.
18024        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
18025            self.set_header_base64(field.into());
18026            self
18027        }
18028        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18029        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18030            self.address_seed.as_mut().map(|field| field as _)
18031        }
18032        ///Returns a mutable reference to `address_seed`.
18033        ///If the field is unset, it is first initialized with the default value.
18034        pub fn address_seed_mut(&mut self) -> &mut String {
18035            self.address_seed.get_or_insert_default()
18036        }
18037        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18038        pub fn address_seed_opt(&self) -> Option<&str> {
18039            self.address_seed.as_ref().map(|field| field as _)
18040        }
18041        ///Sets `address_seed` with the provided value.
18042        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18043            self.address_seed = Some(field.into().into());
18044        }
18045        ///Sets `address_seed` with the provided value.
18046        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18047            self.set_address_seed(field.into());
18048            self
18049        }
18050    }
18051    impl super::ZkLoginProof {
18052        pub const fn const_default() -> Self {
18053            Self { a: None, b: None, c: None }
18054        }
18055        #[doc(hidden)]
18056        pub fn default_instance() -> &'static Self {
18057            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
18058            &DEFAULT
18059        }
18060        ///Returns the value of `a`, or the default value if `a` is unset.
18061        pub fn a(&self) -> &super::CircomG1 {
18062            self.a
18063                .as_ref()
18064                .map(|field| field as _)
18065                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18066        }
18067        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18068        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18069            self.a.as_mut().map(|field| field as _)
18070        }
18071        ///Returns a mutable reference to `a`.
18072        ///If the field is unset, it is first initialized with the default value.
18073        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
18074            self.a.get_or_insert_default()
18075        }
18076        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
18077        pub fn a_opt(&self) -> Option<&super::CircomG1> {
18078            self.a.as_ref().map(|field| field as _)
18079        }
18080        ///Sets `a` with the provided value.
18081        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
18082            self.a = Some(field.into().into());
18083        }
18084        ///Sets `a` with the provided value.
18085        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18086            self.set_a(field.into());
18087            self
18088        }
18089        ///Returns the value of `b`, or the default value if `b` is unset.
18090        pub fn b(&self) -> &super::CircomG2 {
18091            self.b
18092                .as_ref()
18093                .map(|field| field as _)
18094                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
18095        }
18096        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18097        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
18098            self.b.as_mut().map(|field| field as _)
18099        }
18100        ///Returns a mutable reference to `b`.
18101        ///If the field is unset, it is first initialized with the default value.
18102        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
18103            self.b.get_or_insert_default()
18104        }
18105        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
18106        pub fn b_opt(&self) -> Option<&super::CircomG2> {
18107            self.b.as_ref().map(|field| field as _)
18108        }
18109        ///Sets `b` with the provided value.
18110        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18111            self.b = Some(field.into().into());
18112        }
18113        ///Sets `b` with the provided value.
18114        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18115            self.set_b(field.into());
18116            self
18117        }
18118        ///Returns the value of `c`, or the default value if `c` is unset.
18119        pub fn c(&self) -> &super::CircomG1 {
18120            self.c
18121                .as_ref()
18122                .map(|field| field as _)
18123                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18124        }
18125        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18126        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18127            self.c.as_mut().map(|field| field as _)
18128        }
18129        ///Returns a mutable reference to `c`.
18130        ///If the field is unset, it is first initialized with the default value.
18131        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18132            self.c.get_or_insert_default()
18133        }
18134        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
18135        pub fn c_opt(&self) -> Option<&super::CircomG1> {
18136            self.c.as_ref().map(|field| field as _)
18137        }
18138        ///Sets `c` with the provided value.
18139        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18140            self.c = Some(field.into().into());
18141        }
18142        ///Sets `c` with the provided value.
18143        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18144            self.set_c(field.into());
18145            self
18146        }
18147    }
18148    impl super::ZkLoginPublicIdentifier {
18149        pub const fn const_default() -> Self {
18150            Self {
18151                iss: None,
18152                address_seed: None,
18153            }
18154        }
18155        #[doc(hidden)]
18156        pub fn default_instance() -> &'static Self {
18157            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18158            &DEFAULT
18159        }
18160        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18161        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18162            self.iss.as_mut().map(|field| field as _)
18163        }
18164        ///Returns a mutable reference to `iss`.
18165        ///If the field is unset, it is first initialized with the default value.
18166        pub fn iss_mut(&mut self) -> &mut String {
18167            self.iss.get_or_insert_default()
18168        }
18169        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
18170        pub fn iss_opt(&self) -> Option<&str> {
18171            self.iss.as_ref().map(|field| field as _)
18172        }
18173        ///Sets `iss` with the provided value.
18174        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18175            self.iss = Some(field.into().into());
18176        }
18177        ///Sets `iss` with the provided value.
18178        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18179            self.set_iss(field.into());
18180            self
18181        }
18182        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18183        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18184            self.address_seed.as_mut().map(|field| field as _)
18185        }
18186        ///Returns a mutable reference to `address_seed`.
18187        ///If the field is unset, it is first initialized with the default value.
18188        pub fn address_seed_mut(&mut self) -> &mut String {
18189            self.address_seed.get_or_insert_default()
18190        }
18191        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18192        pub fn address_seed_opt(&self) -> Option<&str> {
18193            self.address_seed.as_ref().map(|field| field as _)
18194        }
18195        ///Sets `address_seed` with the provided value.
18196        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18197            self.address_seed = Some(field.into().into());
18198        }
18199        ///Sets `address_seed` with the provided value.
18200        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18201            self.set_address_seed(field.into());
18202            self
18203        }
18204    }
18205}