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

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::AccumulatorWrite {
4        pub const fn const_default() -> Self {
5            Self {
6                address: None,
7                accumulator_type: None,
8                operation: None,
9                value: None,
10            }
11        }
12        #[doc(hidden)]
13        pub fn default_instance() -> &'static Self {
14            static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
15            &DEFAULT
16        }
17        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
19            self.address.as_mut().map(|field| field as _)
20        }
21        ///Returns a mutable reference to `address`.
22        ///If the field is unset, it is first initialized with the default value.
23        pub fn address_mut(&mut self) -> &mut String {
24            self.address.get_or_insert_default()
25        }
26        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
27        pub fn address_opt(&self) -> Option<&str> {
28            self.address.as_ref().map(|field| field as _)
29        }
30        ///Sets `address` with the provided value.
31        pub fn set_address<T: Into<String>>(&mut self, field: T) {
32            self.address = Some(field.into().into());
33        }
34        ///Sets `address` with the provided value.
35        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
36            self.set_address(field.into());
37            self
38        }
39        ///If `accumulator_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
40        pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
41            self.accumulator_type.as_mut().map(|field| field as _)
42        }
43        ///Returns a mutable reference to `accumulator_type`.
44        ///If the field is unset, it is first initialized with the default value.
45        pub fn accumulator_type_mut(&mut self) -> &mut String {
46            self.accumulator_type.get_or_insert_default()
47        }
48        ///If `accumulator_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
49        pub fn accumulator_type_opt(&self) -> Option<&str> {
50            self.accumulator_type.as_ref().map(|field| field as _)
51        }
52        ///Sets `accumulator_type` with the provided value.
53        pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
54            self.accumulator_type = Some(field.into().into());
55        }
56        ///Sets `accumulator_type` with the provided value.
57        pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
58            self.set_accumulator_type(field.into());
59            self
60        }
61        ///Sets `operation` with the provided value.
62        pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
63            mut self,
64            field: T,
65        ) -> Self {
66            self.set_operation(field.into());
67            self
68        }
69        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
70        pub fn value_opt_mut(&mut self) -> Option<&mut u64> {
71            self.value.as_mut().map(|field| field as _)
72        }
73        ///Returns a mutable reference to `value`.
74        ///If the field is unset, it is first initialized with the default value.
75        pub fn value_mut(&mut self) -> &mut u64 {
76            self.value.get_or_insert_default()
77        }
78        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
79        pub fn value_opt(&self) -> Option<u64> {
80            self.value.as_ref().map(|field| *field)
81        }
82        ///Sets `value` with the provided value.
83        pub fn set_value(&mut self, field: u64) {
84            self.value = Some(field);
85        }
86        ///Sets `value` with the provided value.
87        pub fn with_value(mut self, field: u64) -> Self {
88            self.set_value(field);
89            self
90        }
91    }
92    impl super::ActiveJwk {
93        pub const fn const_default() -> Self {
94            Self {
95                id: None,
96                jwk: None,
97                epoch: None,
98            }
99        }
100        #[doc(hidden)]
101        pub fn default_instance() -> &'static Self {
102            static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
103            &DEFAULT
104        }
105        ///Returns the value of `id`, or the default value if `id` is unset.
106        pub fn id(&self) -> &super::JwkId {
107            self.id
108                .as_ref()
109                .map(|field| field as _)
110                .unwrap_or_else(|| super::JwkId::default_instance() as _)
111        }
112        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
113        pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
114            self.id.as_mut().map(|field| field as _)
115        }
116        ///Returns a mutable reference to `id`.
117        ///If the field is unset, it is first initialized with the default value.
118        pub fn id_mut(&mut self) -> &mut super::JwkId {
119            self.id.get_or_insert_default()
120        }
121        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
122        pub fn id_opt(&self) -> Option<&super::JwkId> {
123            self.id.as_ref().map(|field| field as _)
124        }
125        ///Sets `id` with the provided value.
126        pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
127            self.id = Some(field.into().into());
128        }
129        ///Sets `id` with the provided value.
130        pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
131            self.set_id(field.into());
132            self
133        }
134        ///Returns the value of `jwk`, or the default value if `jwk` is unset.
135        pub fn jwk(&self) -> &super::Jwk {
136            self.jwk
137                .as_ref()
138                .map(|field| field as _)
139                .unwrap_or_else(|| super::Jwk::default_instance() as _)
140        }
141        ///If `jwk` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
142        pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
143            self.jwk.as_mut().map(|field| field as _)
144        }
145        ///Returns a mutable reference to `jwk`.
146        ///If the field is unset, it is first initialized with the default value.
147        pub fn jwk_mut(&mut self) -> &mut super::Jwk {
148            self.jwk.get_or_insert_default()
149        }
150        ///If `jwk` is set, returns [`Some`] with the value; otherwise returns [`None`].
151        pub fn jwk_opt(&self) -> Option<&super::Jwk> {
152            self.jwk.as_ref().map(|field| field as _)
153        }
154        ///Sets `jwk` with the provided value.
155        pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
156            self.jwk = Some(field.into().into());
157        }
158        ///Sets `jwk` with the provided value.
159        pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
160            self.set_jwk(field.into());
161            self
162        }
163        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
164        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
165            self.epoch.as_mut().map(|field| field as _)
166        }
167        ///Returns a mutable reference to `epoch`.
168        ///If the field is unset, it is first initialized with the default value.
169        pub fn epoch_mut(&mut self) -> &mut u64 {
170            self.epoch.get_or_insert_default()
171        }
172        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
173        pub fn epoch_opt(&self) -> Option<u64> {
174            self.epoch.as_ref().map(|field| *field)
175        }
176        ///Sets `epoch` with the provided value.
177        pub fn set_epoch(&mut self, field: u64) {
178            self.epoch = Some(field);
179        }
180        ///Sets `epoch` with the provided value.
181        pub fn with_epoch(mut self, field: u64) -> Self {
182            self.set_epoch(field);
183            self
184        }
185    }
186    impl super::AddressAliasesVersion {
187        pub const fn const_default() -> Self {
188            Self { version: None }
189        }
190        #[doc(hidden)]
191        pub fn default_instance() -> &'static Self {
192            static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
193            &DEFAULT
194        }
195        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
196        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
197            self.version.as_mut().map(|field| field as _)
198        }
199        ///Returns a mutable reference to `version`.
200        ///If the field is unset, it is first initialized with the default value.
201        pub fn version_mut(&mut self) -> &mut u64 {
202            self.version.get_or_insert_default()
203        }
204        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
205        pub fn version_opt(&self) -> Option<u64> {
206            self.version.as_ref().map(|field| *field)
207        }
208        ///Sets `version` with the provided value.
209        pub fn set_version(&mut self, field: u64) {
210            self.version = Some(field);
211        }
212        ///Sets `version` with the provided value.
213        pub fn with_version(mut self, field: u64) -> Self {
214            self.set_version(field);
215            self
216        }
217    }
218    impl super::Argument {
219        pub const fn const_default() -> Self {
220            Self {
221                kind: None,
222                input: None,
223                result: None,
224                subresult: None,
225            }
226        }
227        #[doc(hidden)]
228        pub fn default_instance() -> &'static Self {
229            static DEFAULT: super::Argument = super::Argument::const_default();
230            &DEFAULT
231        }
232        ///Sets `kind` with the provided value.
233        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
234            mut self,
235            field: T,
236        ) -> Self {
237            self.set_kind(field.into());
238            self
239        }
240        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
241        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
242            self.input.as_mut().map(|field| field as _)
243        }
244        ///Returns a mutable reference to `input`.
245        ///If the field is unset, it is first initialized with the default value.
246        pub fn input_mut(&mut self) -> &mut u32 {
247            self.input.get_or_insert_default()
248        }
249        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
250        pub fn input_opt(&self) -> Option<u32> {
251            self.input.as_ref().map(|field| *field)
252        }
253        ///Sets `input` with the provided value.
254        pub fn set_input(&mut self, field: u32) {
255            self.input = Some(field);
256        }
257        ///Sets `input` with the provided value.
258        pub fn with_input(mut self, field: u32) -> Self {
259            self.set_input(field);
260            self
261        }
262        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
263        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
264            self.result.as_mut().map(|field| field as _)
265        }
266        ///Returns a mutable reference to `result`.
267        ///If the field is unset, it is first initialized with the default value.
268        pub fn result_mut(&mut self) -> &mut u32 {
269            self.result.get_or_insert_default()
270        }
271        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
272        pub fn result_opt(&self) -> Option<u32> {
273            self.result.as_ref().map(|field| *field)
274        }
275        ///Sets `result` with the provided value.
276        pub fn set_result(&mut self, field: u32) {
277            self.result = Some(field);
278        }
279        ///Sets `result` with the provided value.
280        pub fn with_result(mut self, field: u32) -> Self {
281            self.set_result(field);
282            self
283        }
284        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
285        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
286            self.subresult.as_mut().map(|field| field as _)
287        }
288        ///Returns a mutable reference to `subresult`.
289        ///If the field is unset, it is first initialized with the default value.
290        pub fn subresult_mut(&mut self) -> &mut u32 {
291            self.subresult.get_or_insert_default()
292        }
293        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
294        pub fn subresult_opt(&self) -> Option<u32> {
295            self.subresult.as_ref().map(|field| *field)
296        }
297        ///Sets `subresult` with the provided value.
298        pub fn set_subresult(&mut self, field: u32) {
299            self.subresult = Some(field);
300        }
301        ///Sets `subresult` with the provided value.
302        pub fn with_subresult(mut self, field: u32) -> Self {
303            self.set_subresult(field);
304            self
305        }
306    }
307    impl super::AuthenticatorStateExpire {
308        pub const fn const_default() -> Self {
309            Self {
310                min_epoch: None,
311                authenticator_object_initial_shared_version: None,
312            }
313        }
314        #[doc(hidden)]
315        pub fn default_instance() -> &'static Self {
316            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
317            &DEFAULT
318        }
319        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
320        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
321            self.min_epoch.as_mut().map(|field| field as _)
322        }
323        ///Returns a mutable reference to `min_epoch`.
324        ///If the field is unset, it is first initialized with the default value.
325        pub fn min_epoch_mut(&mut self) -> &mut u64 {
326            self.min_epoch.get_or_insert_default()
327        }
328        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
329        pub fn min_epoch_opt(&self) -> Option<u64> {
330            self.min_epoch.as_ref().map(|field| *field)
331        }
332        ///Sets `min_epoch` with the provided value.
333        pub fn set_min_epoch(&mut self, field: u64) {
334            self.min_epoch = Some(field);
335        }
336        ///Sets `min_epoch` with the provided value.
337        pub fn with_min_epoch(mut self, field: u64) -> Self {
338            self.set_min_epoch(field);
339            self
340        }
341        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
342        pub fn authenticator_object_initial_shared_version_opt_mut(
343            &mut self,
344        ) -> Option<&mut u64> {
345            self.authenticator_object_initial_shared_version
346                .as_mut()
347                .map(|field| field as _)
348        }
349        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
350        ///If the field is unset, it is first initialized with the default value.
351        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
352            self.authenticator_object_initial_shared_version.get_or_insert_default()
353        }
354        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
355        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
356            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
357        }
358        ///Sets `authenticator_object_initial_shared_version` with the provided value.
359        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
360            self.authenticator_object_initial_shared_version = Some(field);
361        }
362        ///Sets `authenticator_object_initial_shared_version` with the provided value.
363        pub fn with_authenticator_object_initial_shared_version(
364            mut self,
365            field: u64,
366        ) -> Self {
367            self.set_authenticator_object_initial_shared_version(field);
368            self
369        }
370    }
371    impl super::AuthenticatorStateUpdate {
372        pub const fn const_default() -> Self {
373            Self {
374                epoch: None,
375                round: None,
376                new_active_jwks: Vec::new(),
377                authenticator_object_initial_shared_version: None,
378            }
379        }
380        #[doc(hidden)]
381        pub fn default_instance() -> &'static Self {
382            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
383            &DEFAULT
384        }
385        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
386        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
387            self.epoch.as_mut().map(|field| field as _)
388        }
389        ///Returns a mutable reference to `epoch`.
390        ///If the field is unset, it is first initialized with the default value.
391        pub fn epoch_mut(&mut self) -> &mut u64 {
392            self.epoch.get_or_insert_default()
393        }
394        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
395        pub fn epoch_opt(&self) -> Option<u64> {
396            self.epoch.as_ref().map(|field| *field)
397        }
398        ///Sets `epoch` with the provided value.
399        pub fn set_epoch(&mut self, field: u64) {
400            self.epoch = Some(field);
401        }
402        ///Sets `epoch` with the provided value.
403        pub fn with_epoch(mut self, field: u64) -> Self {
404            self.set_epoch(field);
405            self
406        }
407        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
408        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
409            self.round.as_mut().map(|field| field as _)
410        }
411        ///Returns a mutable reference to `round`.
412        ///If the field is unset, it is first initialized with the default value.
413        pub fn round_mut(&mut self) -> &mut u64 {
414            self.round.get_or_insert_default()
415        }
416        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
417        pub fn round_opt(&self) -> Option<u64> {
418            self.round.as_ref().map(|field| *field)
419        }
420        ///Sets `round` with the provided value.
421        pub fn set_round(&mut self, field: u64) {
422            self.round = Some(field);
423        }
424        ///Sets `round` with the provided value.
425        pub fn with_round(mut self, field: u64) -> Self {
426            self.set_round(field);
427            self
428        }
429        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
430        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
431            &self.new_active_jwks
432        }
433        ///Returns a mutable reference to `new_active_jwks`.
434        ///If the field is unset, it is first initialized with the default value.
435        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
436            &mut self.new_active_jwks
437        }
438        ///Sets `new_active_jwks` with the provided value.
439        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
440            self.new_active_jwks = field;
441        }
442        ///Sets `new_active_jwks` with the provided value.
443        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
444            self.set_new_active_jwks(field);
445            self
446        }
447        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
448        pub fn authenticator_object_initial_shared_version_opt_mut(
449            &mut self,
450        ) -> Option<&mut u64> {
451            self.authenticator_object_initial_shared_version
452                .as_mut()
453                .map(|field| field as _)
454        }
455        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
456        ///If the field is unset, it is first initialized with the default value.
457        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
458            self.authenticator_object_initial_shared_version.get_or_insert_default()
459        }
460        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
461        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
462            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
463        }
464        ///Sets `authenticator_object_initial_shared_version` with the provided value.
465        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
466            self.authenticator_object_initial_shared_version = Some(field);
467        }
468        ///Sets `authenticator_object_initial_shared_version` with the provided value.
469        pub fn with_authenticator_object_initial_shared_version(
470            mut self,
471            field: u64,
472        ) -> Self {
473            self.set_authenticator_object_initial_shared_version(field);
474            self
475        }
476    }
477    impl super::Balance {
478        pub const fn const_default() -> Self {
479            Self {
480                coin_type: None,
481                balance: None,
482                address_balance: None,
483                coin_balance: None,
484            }
485        }
486        #[doc(hidden)]
487        pub fn default_instance() -> &'static Self {
488            static DEFAULT: super::Balance = super::Balance::const_default();
489            &DEFAULT
490        }
491        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
492        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
493            self.coin_type.as_mut().map(|field| field as _)
494        }
495        ///Returns a mutable reference to `coin_type`.
496        ///If the field is unset, it is first initialized with the default value.
497        pub fn coin_type_mut(&mut self) -> &mut String {
498            self.coin_type.get_or_insert_default()
499        }
500        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
501        pub fn coin_type_opt(&self) -> Option<&str> {
502            self.coin_type.as_ref().map(|field| field as _)
503        }
504        ///Sets `coin_type` with the provided value.
505        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
506            self.coin_type = Some(field.into().into());
507        }
508        ///Sets `coin_type` with the provided value.
509        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
510            self.set_coin_type(field.into());
511            self
512        }
513        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
514        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
515            self.balance.as_mut().map(|field| field as _)
516        }
517        ///Returns a mutable reference to `balance`.
518        ///If the field is unset, it is first initialized with the default value.
519        pub fn balance_mut(&mut self) -> &mut u64 {
520            self.balance.get_or_insert_default()
521        }
522        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
523        pub fn balance_opt(&self) -> Option<u64> {
524            self.balance.as_ref().map(|field| *field)
525        }
526        ///Sets `balance` with the provided value.
527        pub fn set_balance(&mut self, field: u64) {
528            self.balance = Some(field);
529        }
530        ///Sets `balance` with the provided value.
531        pub fn with_balance(mut self, field: u64) -> Self {
532            self.set_balance(field);
533            self
534        }
535        ///If `address_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
536        pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
537            self.address_balance.as_mut().map(|field| field as _)
538        }
539        ///Returns a mutable reference to `address_balance`.
540        ///If the field is unset, it is first initialized with the default value.
541        pub fn address_balance_mut(&mut self) -> &mut u64 {
542            self.address_balance.get_or_insert_default()
543        }
544        ///If `address_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
545        pub fn address_balance_opt(&self) -> Option<u64> {
546            self.address_balance.as_ref().map(|field| *field)
547        }
548        ///Sets `address_balance` with the provided value.
549        pub fn set_address_balance(&mut self, field: u64) {
550            self.address_balance = Some(field);
551        }
552        ///Sets `address_balance` with the provided value.
553        pub fn with_address_balance(mut self, field: u64) -> Self {
554            self.set_address_balance(field);
555            self
556        }
557        ///If `coin_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
558        pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
559            self.coin_balance.as_mut().map(|field| field as _)
560        }
561        ///Returns a mutable reference to `coin_balance`.
562        ///If the field is unset, it is first initialized with the default value.
563        pub fn coin_balance_mut(&mut self) -> &mut u64 {
564            self.coin_balance.get_or_insert_default()
565        }
566        ///If `coin_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
567        pub fn coin_balance_opt(&self) -> Option<u64> {
568            self.coin_balance.as_ref().map(|field| *field)
569        }
570        ///Sets `coin_balance` with the provided value.
571        pub fn set_coin_balance(&mut self, field: u64) {
572            self.coin_balance = Some(field);
573        }
574        ///Sets `coin_balance` with the provided value.
575        pub fn with_coin_balance(mut self, field: u64) -> Self {
576            self.set_coin_balance(field);
577            self
578        }
579    }
580    impl super::BalanceChange {
581        pub const fn const_default() -> Self {
582            Self {
583                address: None,
584                coin_type: None,
585                amount: None,
586            }
587        }
588        #[doc(hidden)]
589        pub fn default_instance() -> &'static Self {
590            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
591            &DEFAULT
592        }
593        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
594        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
595            self.address.as_mut().map(|field| field as _)
596        }
597        ///Returns a mutable reference to `address`.
598        ///If the field is unset, it is first initialized with the default value.
599        pub fn address_mut(&mut self) -> &mut String {
600            self.address.get_or_insert_default()
601        }
602        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
603        pub fn address_opt(&self) -> Option<&str> {
604            self.address.as_ref().map(|field| field as _)
605        }
606        ///Sets `address` with the provided value.
607        pub fn set_address<T: Into<String>>(&mut self, field: T) {
608            self.address = Some(field.into().into());
609        }
610        ///Sets `address` with the provided value.
611        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
612            self.set_address(field.into());
613            self
614        }
615        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
616        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
617            self.coin_type.as_mut().map(|field| field as _)
618        }
619        ///Returns a mutable reference to `coin_type`.
620        ///If the field is unset, it is first initialized with the default value.
621        pub fn coin_type_mut(&mut self) -> &mut String {
622            self.coin_type.get_or_insert_default()
623        }
624        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
625        pub fn coin_type_opt(&self) -> Option<&str> {
626            self.coin_type.as_ref().map(|field| field as _)
627        }
628        ///Sets `coin_type` with the provided value.
629        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
630            self.coin_type = Some(field.into().into());
631        }
632        ///Sets `coin_type` with the provided value.
633        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
634            self.set_coin_type(field.into());
635            self
636        }
637        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
638        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
639            self.amount.as_mut().map(|field| field as _)
640        }
641        ///Returns a mutable reference to `amount`.
642        ///If the field is unset, it is first initialized with the default value.
643        pub fn amount_mut(&mut self) -> &mut String {
644            self.amount.get_or_insert_default()
645        }
646        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
647        pub fn amount_opt(&self) -> Option<&str> {
648            self.amount.as_ref().map(|field| field as _)
649        }
650        ///Sets `amount` with the provided value.
651        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
652            self.amount = Some(field.into().into());
653        }
654        ///Sets `amount` with the provided value.
655        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
656            self.set_amount(field.into());
657            self
658        }
659    }
660    impl super::BatchGetObjectsRequest {
661        pub const fn const_default() -> Self {
662            Self {
663                requests: Vec::new(),
664                read_mask: None,
665            }
666        }
667        #[doc(hidden)]
668        pub fn default_instance() -> &'static Self {
669            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
670            &DEFAULT
671        }
672        ///Returns the value of `requests`, or the default value if `requests` is unset.
673        pub fn requests(&self) -> &[super::GetObjectRequest] {
674            &self.requests
675        }
676        ///Returns a mutable reference to `requests`.
677        ///If the field is unset, it is first initialized with the default value.
678        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
679            &mut self.requests
680        }
681        ///Sets `requests` with the provided value.
682        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
683            self.requests = field;
684        }
685        ///Sets `requests` with the provided value.
686        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
687            self.set_requests(field);
688            self
689        }
690        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
691        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
692            self.read_mask.as_mut().map(|field| field as _)
693        }
694        ///Returns a mutable reference to `read_mask`.
695        ///If the field is unset, it is first initialized with the default value.
696        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
697            self.read_mask.get_or_insert_default()
698        }
699        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
700        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
701            self.read_mask.as_ref().map(|field| field as _)
702        }
703        ///Sets `read_mask` with the provided value.
704        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
705            self.read_mask = Some(field.into().into());
706        }
707        ///Sets `read_mask` with the provided value.
708        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
709            mut self,
710            field: T,
711        ) -> Self {
712            self.set_read_mask(field.into());
713            self
714        }
715    }
716    impl super::BatchGetObjectsResponse {
717        pub const fn const_default() -> Self {
718            Self { objects: Vec::new() }
719        }
720        #[doc(hidden)]
721        pub fn default_instance() -> &'static Self {
722            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
723            &DEFAULT
724        }
725        ///Returns the value of `objects`, or the default value if `objects` is unset.
726        pub fn objects(&self) -> &[super::GetObjectResult] {
727            &self.objects
728        }
729        ///Returns a mutable reference to `objects`.
730        ///If the field is unset, it is first initialized with the default value.
731        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
732            &mut self.objects
733        }
734        ///Sets `objects` with the provided value.
735        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
736            self.objects = field;
737        }
738        ///Sets `objects` with the provided value.
739        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
740            self.set_objects(field);
741            self
742        }
743    }
744    impl super::BatchGetTransactionsRequest {
745        pub const fn const_default() -> Self {
746            Self {
747                digests: Vec::new(),
748                read_mask: None,
749            }
750        }
751        #[doc(hidden)]
752        pub fn default_instance() -> &'static Self {
753            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
754            &DEFAULT
755        }
756        ///Returns the value of `digests`, or the default value if `digests` is unset.
757        pub fn digests(&self) -> &[String] {
758            &self.digests
759        }
760        ///Returns a mutable reference to `digests`.
761        ///If the field is unset, it is first initialized with the default value.
762        pub fn digests_mut(&mut self) -> &mut Vec<String> {
763            &mut self.digests
764        }
765        ///Sets `digests` with the provided value.
766        pub fn set_digests(&mut self, field: Vec<String>) {
767            self.digests = field;
768        }
769        ///Sets `digests` with the provided value.
770        pub fn with_digests(mut self, field: Vec<String>) -> Self {
771            self.set_digests(field);
772            self
773        }
774        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
775        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
776            self.read_mask.as_mut().map(|field| field as _)
777        }
778        ///Returns a mutable reference to `read_mask`.
779        ///If the field is unset, it is first initialized with the default value.
780        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
781            self.read_mask.get_or_insert_default()
782        }
783        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
784        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
785            self.read_mask.as_ref().map(|field| field as _)
786        }
787        ///Sets `read_mask` with the provided value.
788        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
789            self.read_mask = Some(field.into().into());
790        }
791        ///Sets `read_mask` with the provided value.
792        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
793            mut self,
794            field: T,
795        ) -> Self {
796            self.set_read_mask(field.into());
797            self
798        }
799    }
800    impl super::BatchGetTransactionsResponse {
801        pub const fn const_default() -> Self {
802            Self { transactions: Vec::new() }
803        }
804        #[doc(hidden)]
805        pub fn default_instance() -> &'static Self {
806            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
807            &DEFAULT
808        }
809        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
810        pub fn transactions(&self) -> &[super::GetTransactionResult] {
811            &self.transactions
812        }
813        ///Returns a mutable reference to `transactions`.
814        ///If the field is unset, it is first initialized with the default value.
815        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
816            &mut self.transactions
817        }
818        ///Sets `transactions` with the provided value.
819        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
820            self.transactions = field;
821        }
822        ///Sets `transactions` with the provided value.
823        pub fn with_transactions(
824            mut self,
825            field: Vec<super::GetTransactionResult>,
826        ) -> Self {
827            self.set_transactions(field);
828            self
829        }
830    }
831    impl super::Bcs {
832        pub const fn const_default() -> Self {
833            Self { name: None, value: None }
834        }
835        #[doc(hidden)]
836        pub fn default_instance() -> &'static Self {
837            static DEFAULT: super::Bcs = super::Bcs::const_default();
838            &DEFAULT
839        }
840        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
841        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
842            self.name.as_mut().map(|field| field as _)
843        }
844        ///Returns a mutable reference to `name`.
845        ///If the field is unset, it is first initialized with the default value.
846        pub fn name_mut(&mut self) -> &mut String {
847            self.name.get_or_insert_default()
848        }
849        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
850        pub fn name_opt(&self) -> Option<&str> {
851            self.name.as_ref().map(|field| field as _)
852        }
853        ///Sets `name` with the provided value.
854        pub fn set_name<T: Into<String>>(&mut self, field: T) {
855            self.name = Some(field.into().into());
856        }
857        ///Sets `name` with the provided value.
858        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
859            self.set_name(field.into());
860            self
861        }
862        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
863        pub fn value_opt(&self) -> Option<&[u8]> {
864            self.value.as_ref().map(|field| field as _)
865        }
866        ///Sets `value` with the provided value.
867        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
868            self.value = Some(field.into().into());
869        }
870        ///Sets `value` with the provided value.
871        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
872            self.set_value(field.into());
873            self
874        }
875    }
876    impl super::CanceledTransaction {
877        pub const fn const_default() -> Self {
878            Self {
879                digest: None,
880                version_assignments: Vec::new(),
881            }
882        }
883        #[doc(hidden)]
884        pub fn default_instance() -> &'static Self {
885            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
886            &DEFAULT
887        }
888        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
889        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
890            self.digest.as_mut().map(|field| field as _)
891        }
892        ///Returns a mutable reference to `digest`.
893        ///If the field is unset, it is first initialized with the default value.
894        pub fn digest_mut(&mut self) -> &mut String {
895            self.digest.get_or_insert_default()
896        }
897        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
898        pub fn digest_opt(&self) -> Option<&str> {
899            self.digest.as_ref().map(|field| field as _)
900        }
901        ///Sets `digest` with the provided value.
902        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
903            self.digest = Some(field.into().into());
904        }
905        ///Sets `digest` with the provided value.
906        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
907            self.set_digest(field.into());
908            self
909        }
910        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
911        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
912            &self.version_assignments
913        }
914        ///Returns a mutable reference to `version_assignments`.
915        ///If the field is unset, it is first initialized with the default value.
916        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
917            &mut self.version_assignments
918        }
919        ///Sets `version_assignments` with the provided value.
920        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
921            self.version_assignments = field;
922        }
923        ///Sets `version_assignments` with the provided value.
924        pub fn with_version_assignments(
925            mut self,
926            field: Vec<super::VersionAssignment>,
927        ) -> Self {
928            self.set_version_assignments(field);
929            self
930        }
931    }
932    impl super::ChangeEpoch {
933        pub const fn const_default() -> Self {
934            Self {
935                epoch: None,
936                protocol_version: None,
937                storage_charge: None,
938                computation_charge: None,
939                storage_rebate: None,
940                non_refundable_storage_fee: None,
941                epoch_start_timestamp: None,
942                system_packages: Vec::new(),
943            }
944        }
945        #[doc(hidden)]
946        pub fn default_instance() -> &'static Self {
947            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
948            &DEFAULT
949        }
950        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
951        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
952            self.epoch.as_mut().map(|field| field as _)
953        }
954        ///Returns a mutable reference to `epoch`.
955        ///If the field is unset, it is first initialized with the default value.
956        pub fn epoch_mut(&mut self) -> &mut u64 {
957            self.epoch.get_or_insert_default()
958        }
959        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
960        pub fn epoch_opt(&self) -> Option<u64> {
961            self.epoch.as_ref().map(|field| *field)
962        }
963        ///Sets `epoch` with the provided value.
964        pub fn set_epoch(&mut self, field: u64) {
965            self.epoch = Some(field);
966        }
967        ///Sets `epoch` with the provided value.
968        pub fn with_epoch(mut self, field: u64) -> Self {
969            self.set_epoch(field);
970            self
971        }
972        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
973        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
974            self.protocol_version.as_mut().map(|field| field as _)
975        }
976        ///Returns a mutable reference to `protocol_version`.
977        ///If the field is unset, it is first initialized with the default value.
978        pub fn protocol_version_mut(&mut self) -> &mut u64 {
979            self.protocol_version.get_or_insert_default()
980        }
981        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
982        pub fn protocol_version_opt(&self) -> Option<u64> {
983            self.protocol_version.as_ref().map(|field| *field)
984        }
985        ///Sets `protocol_version` with the provided value.
986        pub fn set_protocol_version(&mut self, field: u64) {
987            self.protocol_version = Some(field);
988        }
989        ///Sets `protocol_version` with the provided value.
990        pub fn with_protocol_version(mut self, field: u64) -> Self {
991            self.set_protocol_version(field);
992            self
993        }
994        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
995        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
996            self.storage_charge.as_mut().map(|field| field as _)
997        }
998        ///Returns a mutable reference to `storage_charge`.
999        ///If the field is unset, it is first initialized with the default value.
1000        pub fn storage_charge_mut(&mut self) -> &mut u64 {
1001            self.storage_charge.get_or_insert_default()
1002        }
1003        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1004        pub fn storage_charge_opt(&self) -> Option<u64> {
1005            self.storage_charge.as_ref().map(|field| *field)
1006        }
1007        ///Sets `storage_charge` with the provided value.
1008        pub fn set_storage_charge(&mut self, field: u64) {
1009            self.storage_charge = Some(field);
1010        }
1011        ///Sets `storage_charge` with the provided value.
1012        pub fn with_storage_charge(mut self, field: u64) -> Self {
1013            self.set_storage_charge(field);
1014            self
1015        }
1016        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1017        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1018            self.computation_charge.as_mut().map(|field| field as _)
1019        }
1020        ///Returns a mutable reference to `computation_charge`.
1021        ///If the field is unset, it is first initialized with the default value.
1022        pub fn computation_charge_mut(&mut self) -> &mut u64 {
1023            self.computation_charge.get_or_insert_default()
1024        }
1025        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1026        pub fn computation_charge_opt(&self) -> Option<u64> {
1027            self.computation_charge.as_ref().map(|field| *field)
1028        }
1029        ///Sets `computation_charge` with the provided value.
1030        pub fn set_computation_charge(&mut self, field: u64) {
1031            self.computation_charge = Some(field);
1032        }
1033        ///Sets `computation_charge` with the provided value.
1034        pub fn with_computation_charge(mut self, field: u64) -> Self {
1035            self.set_computation_charge(field);
1036            self
1037        }
1038        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1039        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1040            self.storage_rebate.as_mut().map(|field| field as _)
1041        }
1042        ///Returns a mutable reference to `storage_rebate`.
1043        ///If the field is unset, it is first initialized with the default value.
1044        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1045            self.storage_rebate.get_or_insert_default()
1046        }
1047        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
1048        pub fn storage_rebate_opt(&self) -> Option<u64> {
1049            self.storage_rebate.as_ref().map(|field| *field)
1050        }
1051        ///Sets `storage_rebate` with the provided value.
1052        pub fn set_storage_rebate(&mut self, field: u64) {
1053            self.storage_rebate = Some(field);
1054        }
1055        ///Sets `storage_rebate` with the provided value.
1056        pub fn with_storage_rebate(mut self, field: u64) -> Self {
1057            self.set_storage_rebate(field);
1058            self
1059        }
1060        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1061        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1062            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1063        }
1064        ///Returns a mutable reference to `non_refundable_storage_fee`.
1065        ///If the field is unset, it is first initialized with the default value.
1066        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1067            self.non_refundable_storage_fee.get_or_insert_default()
1068        }
1069        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
1070        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1071            self.non_refundable_storage_fee.as_ref().map(|field| *field)
1072        }
1073        ///Sets `non_refundable_storage_fee` with the provided value.
1074        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1075            self.non_refundable_storage_fee = Some(field);
1076        }
1077        ///Sets `non_refundable_storage_fee` with the provided value.
1078        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1079            self.set_non_refundable_storage_fee(field);
1080            self
1081        }
1082        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1083        pub fn epoch_start_timestamp_opt_mut(
1084            &mut self,
1085        ) -> Option<&mut ::prost_types::Timestamp> {
1086            self.epoch_start_timestamp.as_mut().map(|field| field as _)
1087        }
1088        ///Returns a mutable reference to `epoch_start_timestamp`.
1089        ///If the field is unset, it is first initialized with the default value.
1090        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1091            self.epoch_start_timestamp.get_or_insert_default()
1092        }
1093        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1094        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1095            self.epoch_start_timestamp.as_ref().map(|field| field as _)
1096        }
1097        ///Sets `epoch_start_timestamp` with the provided value.
1098        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1099            &mut self,
1100            field: T,
1101        ) {
1102            self.epoch_start_timestamp = Some(field.into().into());
1103        }
1104        ///Sets `epoch_start_timestamp` with the provided value.
1105        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1106            mut self,
1107            field: T,
1108        ) -> Self {
1109            self.set_epoch_start_timestamp(field.into());
1110            self
1111        }
1112        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
1113        pub fn system_packages(&self) -> &[super::SystemPackage] {
1114            &self.system_packages
1115        }
1116        ///Returns a mutable reference to `system_packages`.
1117        ///If the field is unset, it is first initialized with the default value.
1118        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1119            &mut self.system_packages
1120        }
1121        ///Sets `system_packages` with the provided value.
1122        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1123            self.system_packages = field;
1124        }
1125        ///Sets `system_packages` with the provided value.
1126        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1127            self.set_system_packages(field);
1128            self
1129        }
1130    }
1131    impl super::ChangedObject {
1132        pub const fn const_default() -> Self {
1133            Self {
1134                object_id: None,
1135                input_state: None,
1136                input_version: None,
1137                input_digest: None,
1138                input_owner: None,
1139                output_state: None,
1140                output_version: None,
1141                output_digest: None,
1142                output_owner: None,
1143                accumulator_write: None,
1144                id_operation: None,
1145                object_type: None,
1146            }
1147        }
1148        #[doc(hidden)]
1149        pub fn default_instance() -> &'static Self {
1150            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1151            &DEFAULT
1152        }
1153        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1154        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1155            self.object_id.as_mut().map(|field| field as _)
1156        }
1157        ///Returns a mutable reference to `object_id`.
1158        ///If the field is unset, it is first initialized with the default value.
1159        pub fn object_id_mut(&mut self) -> &mut String {
1160            self.object_id.get_or_insert_default()
1161        }
1162        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1163        pub fn object_id_opt(&self) -> Option<&str> {
1164            self.object_id.as_ref().map(|field| field as _)
1165        }
1166        ///Sets `object_id` with the provided value.
1167        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1168            self.object_id = Some(field.into().into());
1169        }
1170        ///Sets `object_id` with the provided value.
1171        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1172            self.set_object_id(field.into());
1173            self
1174        }
1175        ///Sets `input_state` with the provided value.
1176        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1177            mut self,
1178            field: T,
1179        ) -> Self {
1180            self.set_input_state(field.into());
1181            self
1182        }
1183        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1184        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1185            self.input_version.as_mut().map(|field| field as _)
1186        }
1187        ///Returns a mutable reference to `input_version`.
1188        ///If the field is unset, it is first initialized with the default value.
1189        pub fn input_version_mut(&mut self) -> &mut u64 {
1190            self.input_version.get_or_insert_default()
1191        }
1192        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1193        pub fn input_version_opt(&self) -> Option<u64> {
1194            self.input_version.as_ref().map(|field| *field)
1195        }
1196        ///Sets `input_version` with the provided value.
1197        pub fn set_input_version(&mut self, field: u64) {
1198            self.input_version = Some(field);
1199        }
1200        ///Sets `input_version` with the provided value.
1201        pub fn with_input_version(mut self, field: u64) -> Self {
1202            self.set_input_version(field);
1203            self
1204        }
1205        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1206        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1207            self.input_digest.as_mut().map(|field| field as _)
1208        }
1209        ///Returns a mutable reference to `input_digest`.
1210        ///If the field is unset, it is first initialized with the default value.
1211        pub fn input_digest_mut(&mut self) -> &mut String {
1212            self.input_digest.get_or_insert_default()
1213        }
1214        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1215        pub fn input_digest_opt(&self) -> Option<&str> {
1216            self.input_digest.as_ref().map(|field| field as _)
1217        }
1218        ///Sets `input_digest` with the provided value.
1219        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1220            self.input_digest = Some(field.into().into());
1221        }
1222        ///Sets `input_digest` with the provided value.
1223        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1224            self.set_input_digest(field.into());
1225            self
1226        }
1227        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1228        pub fn input_owner(&self) -> &super::Owner {
1229            self.input_owner
1230                .as_ref()
1231                .map(|field| field as _)
1232                .unwrap_or_else(|| super::Owner::default_instance() as _)
1233        }
1234        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1235        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1236            self.input_owner.as_mut().map(|field| field as _)
1237        }
1238        ///Returns a mutable reference to `input_owner`.
1239        ///If the field is unset, it is first initialized with the default value.
1240        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1241            self.input_owner.get_or_insert_default()
1242        }
1243        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1244        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1245            self.input_owner.as_ref().map(|field| field as _)
1246        }
1247        ///Sets `input_owner` with the provided value.
1248        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1249            self.input_owner = Some(field.into().into());
1250        }
1251        ///Sets `input_owner` with the provided value.
1252        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1253            self.set_input_owner(field.into());
1254            self
1255        }
1256        ///Sets `output_state` with the provided value.
1257        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1258            mut self,
1259            field: T,
1260        ) -> Self {
1261            self.set_output_state(field.into());
1262            self
1263        }
1264        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1265        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1266            self.output_version.as_mut().map(|field| field as _)
1267        }
1268        ///Returns a mutable reference to `output_version`.
1269        ///If the field is unset, it is first initialized with the default value.
1270        pub fn output_version_mut(&mut self) -> &mut u64 {
1271            self.output_version.get_or_insert_default()
1272        }
1273        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1274        pub fn output_version_opt(&self) -> Option<u64> {
1275            self.output_version.as_ref().map(|field| *field)
1276        }
1277        ///Sets `output_version` with the provided value.
1278        pub fn set_output_version(&mut self, field: u64) {
1279            self.output_version = Some(field);
1280        }
1281        ///Sets `output_version` with the provided value.
1282        pub fn with_output_version(mut self, field: u64) -> Self {
1283            self.set_output_version(field);
1284            self
1285        }
1286        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1287        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1288            self.output_digest.as_mut().map(|field| field as _)
1289        }
1290        ///Returns a mutable reference to `output_digest`.
1291        ///If the field is unset, it is first initialized with the default value.
1292        pub fn output_digest_mut(&mut self) -> &mut String {
1293            self.output_digest.get_or_insert_default()
1294        }
1295        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1296        pub fn output_digest_opt(&self) -> Option<&str> {
1297            self.output_digest.as_ref().map(|field| field as _)
1298        }
1299        ///Sets `output_digest` with the provided value.
1300        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1301            self.output_digest = Some(field.into().into());
1302        }
1303        ///Sets `output_digest` with the provided value.
1304        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1305            self.set_output_digest(field.into());
1306            self
1307        }
1308        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1309        pub fn output_owner(&self) -> &super::Owner {
1310            self.output_owner
1311                .as_ref()
1312                .map(|field| field as _)
1313                .unwrap_or_else(|| super::Owner::default_instance() as _)
1314        }
1315        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1316        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1317            self.output_owner.as_mut().map(|field| field as _)
1318        }
1319        ///Returns a mutable reference to `output_owner`.
1320        ///If the field is unset, it is first initialized with the default value.
1321        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1322            self.output_owner.get_or_insert_default()
1323        }
1324        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1325        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1326            self.output_owner.as_ref().map(|field| field as _)
1327        }
1328        ///Sets `output_owner` with the provided value.
1329        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1330            self.output_owner = Some(field.into().into());
1331        }
1332        ///Sets `output_owner` with the provided value.
1333        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1334            self.set_output_owner(field.into());
1335            self
1336        }
1337        ///Returns the value of `accumulator_write`, or the default value if `accumulator_write` is unset.
1338        pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1339            self.accumulator_write
1340                .as_ref()
1341                .map(|field| field as _)
1342                .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1343        }
1344        ///If `accumulator_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1345        pub fn accumulator_write_opt_mut(
1346            &mut self,
1347        ) -> Option<&mut super::AccumulatorWrite> {
1348            self.accumulator_write.as_mut().map(|field| field as _)
1349        }
1350        ///Returns a mutable reference to `accumulator_write`.
1351        ///If the field is unset, it is first initialized with the default value.
1352        pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1353            self.accumulator_write.get_or_insert_default()
1354        }
1355        ///If `accumulator_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
1356        pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1357            self.accumulator_write.as_ref().map(|field| field as _)
1358        }
1359        ///Sets `accumulator_write` with the provided value.
1360        pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1361            &mut self,
1362            field: T,
1363        ) {
1364            self.accumulator_write = Some(field.into().into());
1365        }
1366        ///Sets `accumulator_write` with the provided value.
1367        pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1368            mut self,
1369            field: T,
1370        ) -> Self {
1371            self.set_accumulator_write(field.into());
1372            self
1373        }
1374        ///Sets `id_operation` with the provided value.
1375        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1376            mut self,
1377            field: T,
1378        ) -> Self {
1379            self.set_id_operation(field.into());
1380            self
1381        }
1382        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1383        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1384            self.object_type.as_mut().map(|field| field as _)
1385        }
1386        ///Returns a mutable reference to `object_type`.
1387        ///If the field is unset, it is first initialized with the default value.
1388        pub fn object_type_mut(&mut self) -> &mut String {
1389            self.object_type.get_or_insert_default()
1390        }
1391        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1392        pub fn object_type_opt(&self) -> Option<&str> {
1393            self.object_type.as_ref().map(|field| field as _)
1394        }
1395        ///Sets `object_type` with the provided value.
1396        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1397            self.object_type = Some(field.into().into());
1398        }
1399        ///Sets `object_type` with the provided value.
1400        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1401            self.set_object_type(field.into());
1402            self
1403        }
1404    }
1405    impl super::Checkpoint {
1406        pub const fn const_default() -> Self {
1407            Self {
1408                sequence_number: None,
1409                digest: None,
1410                summary: None,
1411                signature: None,
1412                contents: None,
1413                transactions: Vec::new(),
1414                objects: None,
1415            }
1416        }
1417        #[doc(hidden)]
1418        pub fn default_instance() -> &'static Self {
1419            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1420            &DEFAULT
1421        }
1422        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1423        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1424            self.sequence_number.as_mut().map(|field| field as _)
1425        }
1426        ///Returns a mutable reference to `sequence_number`.
1427        ///If the field is unset, it is first initialized with the default value.
1428        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1429            self.sequence_number.get_or_insert_default()
1430        }
1431        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1432        pub fn sequence_number_opt(&self) -> Option<u64> {
1433            self.sequence_number.as_ref().map(|field| *field)
1434        }
1435        ///Sets `sequence_number` with the provided value.
1436        pub fn set_sequence_number(&mut self, field: u64) {
1437            self.sequence_number = Some(field);
1438        }
1439        ///Sets `sequence_number` with the provided value.
1440        pub fn with_sequence_number(mut self, field: u64) -> Self {
1441            self.set_sequence_number(field);
1442            self
1443        }
1444        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1445        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1446            self.digest.as_mut().map(|field| field as _)
1447        }
1448        ///Returns a mutable reference to `digest`.
1449        ///If the field is unset, it is first initialized with the default value.
1450        pub fn digest_mut(&mut self) -> &mut String {
1451            self.digest.get_or_insert_default()
1452        }
1453        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1454        pub fn digest_opt(&self) -> Option<&str> {
1455            self.digest.as_ref().map(|field| field as _)
1456        }
1457        ///Sets `digest` with the provided value.
1458        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1459            self.digest = Some(field.into().into());
1460        }
1461        ///Sets `digest` with the provided value.
1462        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1463            self.set_digest(field.into());
1464            self
1465        }
1466        ///Returns the value of `summary`, or the default value if `summary` is unset.
1467        pub fn summary(&self) -> &super::CheckpointSummary {
1468            self.summary
1469                .as_ref()
1470                .map(|field| field as _)
1471                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1472        }
1473        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1474        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1475            self.summary.as_mut().map(|field| field as _)
1476        }
1477        ///Returns a mutable reference to `summary`.
1478        ///If the field is unset, it is first initialized with the default value.
1479        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1480            self.summary.get_or_insert_default()
1481        }
1482        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1483        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1484            self.summary.as_ref().map(|field| field as _)
1485        }
1486        ///Sets `summary` with the provided value.
1487        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1488            self.summary = Some(field.into().into());
1489        }
1490        ///Sets `summary` with the provided value.
1491        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1492            mut self,
1493            field: T,
1494        ) -> Self {
1495            self.set_summary(field.into());
1496            self
1497        }
1498        ///Returns the value of `signature`, or the default value if `signature` is unset.
1499        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1500            self.signature
1501                .as_ref()
1502                .map(|field| field as _)
1503                .unwrap_or_else(|| {
1504                    super::ValidatorAggregatedSignature::default_instance() as _
1505                })
1506        }
1507        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1508        pub fn signature_opt_mut(
1509            &mut self,
1510        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1511            self.signature.as_mut().map(|field| field as _)
1512        }
1513        ///Returns a mutable reference to `signature`.
1514        ///If the field is unset, it is first initialized with the default value.
1515        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1516            self.signature.get_or_insert_default()
1517        }
1518        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1519        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1520            self.signature.as_ref().map(|field| field as _)
1521        }
1522        ///Sets `signature` with the provided value.
1523        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1524            &mut self,
1525            field: T,
1526        ) {
1527            self.signature = Some(field.into().into());
1528        }
1529        ///Sets `signature` with the provided value.
1530        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1531            mut self,
1532            field: T,
1533        ) -> Self {
1534            self.set_signature(field.into());
1535            self
1536        }
1537        ///Returns the value of `contents`, or the default value if `contents` is unset.
1538        pub fn contents(&self) -> &super::CheckpointContents {
1539            self.contents
1540                .as_ref()
1541                .map(|field| field as _)
1542                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1543        }
1544        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1545        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1546            self.contents.as_mut().map(|field| field as _)
1547        }
1548        ///Returns a mutable reference to `contents`.
1549        ///If the field is unset, it is first initialized with the default value.
1550        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1551            self.contents.get_or_insert_default()
1552        }
1553        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1554        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1555            self.contents.as_ref().map(|field| field as _)
1556        }
1557        ///Sets `contents` with the provided value.
1558        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1559            self.contents = Some(field.into().into());
1560        }
1561        ///Sets `contents` with the provided value.
1562        pub fn with_contents<T: Into<super::CheckpointContents>>(
1563            mut self,
1564            field: T,
1565        ) -> Self {
1566            self.set_contents(field.into());
1567            self
1568        }
1569        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1570        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1571            &self.transactions
1572        }
1573        ///Returns a mutable reference to `transactions`.
1574        ///If the field is unset, it is first initialized with the default value.
1575        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1576            &mut self.transactions
1577        }
1578        ///Sets `transactions` with the provided value.
1579        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1580            self.transactions = field;
1581        }
1582        ///Sets `transactions` with the provided value.
1583        pub fn with_transactions(
1584            mut self,
1585            field: Vec<super::ExecutedTransaction>,
1586        ) -> Self {
1587            self.set_transactions(field);
1588            self
1589        }
1590        ///Returns the value of `objects`, or the default value if `objects` is unset.
1591        pub fn objects(&self) -> &super::ObjectSet {
1592            self.objects
1593                .as_ref()
1594                .map(|field| field as _)
1595                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1596        }
1597        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1598        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1599            self.objects.as_mut().map(|field| field as _)
1600        }
1601        ///Returns a mutable reference to `objects`.
1602        ///If the field is unset, it is first initialized with the default value.
1603        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1604            self.objects.get_or_insert_default()
1605        }
1606        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1607        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1608            self.objects.as_ref().map(|field| field as _)
1609        }
1610        ///Sets `objects` with the provided value.
1611        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1612            self.objects = Some(field.into().into());
1613        }
1614        ///Sets `objects` with the provided value.
1615        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1616            self.set_objects(field.into());
1617            self
1618        }
1619    }
1620    impl super::CheckpointCommitment {
1621        pub const fn const_default() -> Self {
1622            Self { kind: None, digest: None }
1623        }
1624        #[doc(hidden)]
1625        pub fn default_instance() -> &'static Self {
1626            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1627            &DEFAULT
1628        }
1629        ///Sets `kind` with the provided value.
1630        pub fn with_kind<
1631            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1632        >(mut self, field: T) -> Self {
1633            self.set_kind(field.into());
1634            self
1635        }
1636        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1637        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1638            self.digest.as_mut().map(|field| field as _)
1639        }
1640        ///Returns a mutable reference to `digest`.
1641        ///If the field is unset, it is first initialized with the default value.
1642        pub fn digest_mut(&mut self) -> &mut String {
1643            self.digest.get_or_insert_default()
1644        }
1645        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1646        pub fn digest_opt(&self) -> Option<&str> {
1647            self.digest.as_ref().map(|field| field as _)
1648        }
1649        ///Sets `digest` with the provided value.
1650        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1651            self.digest = Some(field.into().into());
1652        }
1653        ///Sets `digest` with the provided value.
1654        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1655            self.set_digest(field.into());
1656            self
1657        }
1658    }
1659    impl super::CheckpointContents {
1660        pub const fn const_default() -> Self {
1661            Self {
1662                bcs: None,
1663                digest: None,
1664                version: None,
1665                transactions: Vec::new(),
1666            }
1667        }
1668        #[doc(hidden)]
1669        pub fn default_instance() -> &'static Self {
1670            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1671            &DEFAULT
1672        }
1673        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1674        pub fn bcs(&self) -> &super::Bcs {
1675            self.bcs
1676                .as_ref()
1677                .map(|field| field as _)
1678                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1679        }
1680        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1681        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1682            self.bcs.as_mut().map(|field| field as _)
1683        }
1684        ///Returns a mutable reference to `bcs`.
1685        ///If the field is unset, it is first initialized with the default value.
1686        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1687            self.bcs.get_or_insert_default()
1688        }
1689        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1690        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1691            self.bcs.as_ref().map(|field| field as _)
1692        }
1693        ///Sets `bcs` with the provided value.
1694        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1695            self.bcs = Some(field.into().into());
1696        }
1697        ///Sets `bcs` with the provided value.
1698        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1699            self.set_bcs(field.into());
1700            self
1701        }
1702        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1703        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1704            self.digest.as_mut().map(|field| field as _)
1705        }
1706        ///Returns a mutable reference to `digest`.
1707        ///If the field is unset, it is first initialized with the default value.
1708        pub fn digest_mut(&mut self) -> &mut String {
1709            self.digest.get_or_insert_default()
1710        }
1711        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1712        pub fn digest_opt(&self) -> Option<&str> {
1713            self.digest.as_ref().map(|field| field as _)
1714        }
1715        ///Sets `digest` with the provided value.
1716        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1717            self.digest = Some(field.into().into());
1718        }
1719        ///Sets `digest` with the provided value.
1720        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1721            self.set_digest(field.into());
1722            self
1723        }
1724        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1725        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1726            self.version.as_mut().map(|field| field as _)
1727        }
1728        ///Returns a mutable reference to `version`.
1729        ///If the field is unset, it is first initialized with the default value.
1730        pub fn version_mut(&mut self) -> &mut i32 {
1731            self.version.get_or_insert_default()
1732        }
1733        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1734        pub fn version_opt(&self) -> Option<i32> {
1735            self.version.as_ref().map(|field| *field)
1736        }
1737        ///Sets `version` with the provided value.
1738        pub fn set_version(&mut self, field: i32) {
1739            self.version = Some(field);
1740        }
1741        ///Sets `version` with the provided value.
1742        pub fn with_version(mut self, field: i32) -> Self {
1743            self.set_version(field);
1744            self
1745        }
1746        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1747        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1748            &self.transactions
1749        }
1750        ///Returns a mutable reference to `transactions`.
1751        ///If the field is unset, it is first initialized with the default value.
1752        pub fn transactions_mut(
1753            &mut self,
1754        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1755            &mut self.transactions
1756        }
1757        ///Sets `transactions` with the provided value.
1758        pub fn set_transactions(
1759            &mut self,
1760            field: Vec<super::CheckpointedTransactionInfo>,
1761        ) {
1762            self.transactions = field;
1763        }
1764        ///Sets `transactions` with the provided value.
1765        pub fn with_transactions(
1766            mut self,
1767            field: Vec<super::CheckpointedTransactionInfo>,
1768        ) -> Self {
1769            self.set_transactions(field);
1770            self
1771        }
1772    }
1773    impl super::CheckpointSummary {
1774        pub const fn const_default() -> Self {
1775            Self {
1776                bcs: None,
1777                digest: None,
1778                epoch: None,
1779                sequence_number: None,
1780                total_network_transactions: None,
1781                content_digest: None,
1782                previous_digest: None,
1783                epoch_rolling_gas_cost_summary: None,
1784                timestamp: None,
1785                commitments: Vec::new(),
1786                end_of_epoch_data: None,
1787                version_specific_data: None,
1788            }
1789        }
1790        #[doc(hidden)]
1791        pub fn default_instance() -> &'static Self {
1792            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1793            &DEFAULT
1794        }
1795        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1796        pub fn bcs(&self) -> &super::Bcs {
1797            self.bcs
1798                .as_ref()
1799                .map(|field| field as _)
1800                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1801        }
1802        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1803        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1804            self.bcs.as_mut().map(|field| field as _)
1805        }
1806        ///Returns a mutable reference to `bcs`.
1807        ///If the field is unset, it is first initialized with the default value.
1808        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1809            self.bcs.get_or_insert_default()
1810        }
1811        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1812        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1813            self.bcs.as_ref().map(|field| field as _)
1814        }
1815        ///Sets `bcs` with the provided value.
1816        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1817            self.bcs = Some(field.into().into());
1818        }
1819        ///Sets `bcs` with the provided value.
1820        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1821            self.set_bcs(field.into());
1822            self
1823        }
1824        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1825        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1826            self.digest.as_mut().map(|field| field as _)
1827        }
1828        ///Returns a mutable reference to `digest`.
1829        ///If the field is unset, it is first initialized with the default value.
1830        pub fn digest_mut(&mut self) -> &mut String {
1831            self.digest.get_or_insert_default()
1832        }
1833        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1834        pub fn digest_opt(&self) -> Option<&str> {
1835            self.digest.as_ref().map(|field| field as _)
1836        }
1837        ///Sets `digest` with the provided value.
1838        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1839            self.digest = Some(field.into().into());
1840        }
1841        ///Sets `digest` with the provided value.
1842        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1843            self.set_digest(field.into());
1844            self
1845        }
1846        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1847        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1848            self.epoch.as_mut().map(|field| field as _)
1849        }
1850        ///Returns a mutable reference to `epoch`.
1851        ///If the field is unset, it is first initialized with the default value.
1852        pub fn epoch_mut(&mut self) -> &mut u64 {
1853            self.epoch.get_or_insert_default()
1854        }
1855        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1856        pub fn epoch_opt(&self) -> Option<u64> {
1857            self.epoch.as_ref().map(|field| *field)
1858        }
1859        ///Sets `epoch` with the provided value.
1860        pub fn set_epoch(&mut self, field: u64) {
1861            self.epoch = Some(field);
1862        }
1863        ///Sets `epoch` with the provided value.
1864        pub fn with_epoch(mut self, field: u64) -> Self {
1865            self.set_epoch(field);
1866            self
1867        }
1868        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1869        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1870            self.sequence_number.as_mut().map(|field| field as _)
1871        }
1872        ///Returns a mutable reference to `sequence_number`.
1873        ///If the field is unset, it is first initialized with the default value.
1874        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1875            self.sequence_number.get_or_insert_default()
1876        }
1877        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1878        pub fn sequence_number_opt(&self) -> Option<u64> {
1879            self.sequence_number.as_ref().map(|field| *field)
1880        }
1881        ///Sets `sequence_number` with the provided value.
1882        pub fn set_sequence_number(&mut self, field: u64) {
1883            self.sequence_number = Some(field);
1884        }
1885        ///Sets `sequence_number` with the provided value.
1886        pub fn with_sequence_number(mut self, field: u64) -> Self {
1887            self.set_sequence_number(field);
1888            self
1889        }
1890        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1891        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1892            self.total_network_transactions.as_mut().map(|field| field as _)
1893        }
1894        ///Returns a mutable reference to `total_network_transactions`.
1895        ///If the field is unset, it is first initialized with the default value.
1896        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1897            self.total_network_transactions.get_or_insert_default()
1898        }
1899        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1900        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1901            self.total_network_transactions.as_ref().map(|field| *field)
1902        }
1903        ///Sets `total_network_transactions` with the provided value.
1904        pub fn set_total_network_transactions(&mut self, field: u64) {
1905            self.total_network_transactions = Some(field);
1906        }
1907        ///Sets `total_network_transactions` with the provided value.
1908        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1909            self.set_total_network_transactions(field);
1910            self
1911        }
1912        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1913        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1914            self.content_digest.as_mut().map(|field| field as _)
1915        }
1916        ///Returns a mutable reference to `content_digest`.
1917        ///If the field is unset, it is first initialized with the default value.
1918        pub fn content_digest_mut(&mut self) -> &mut String {
1919            self.content_digest.get_or_insert_default()
1920        }
1921        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1922        pub fn content_digest_opt(&self) -> Option<&str> {
1923            self.content_digest.as_ref().map(|field| field as _)
1924        }
1925        ///Sets `content_digest` with the provided value.
1926        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1927            self.content_digest = Some(field.into().into());
1928        }
1929        ///Sets `content_digest` with the provided value.
1930        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1931            self.set_content_digest(field.into());
1932            self
1933        }
1934        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1935        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1936            self.previous_digest.as_mut().map(|field| field as _)
1937        }
1938        ///Returns a mutable reference to `previous_digest`.
1939        ///If the field is unset, it is first initialized with the default value.
1940        pub fn previous_digest_mut(&mut self) -> &mut String {
1941            self.previous_digest.get_or_insert_default()
1942        }
1943        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1944        pub fn previous_digest_opt(&self) -> Option<&str> {
1945            self.previous_digest.as_ref().map(|field| field as _)
1946        }
1947        ///Sets `previous_digest` with the provided value.
1948        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1949            self.previous_digest = Some(field.into().into());
1950        }
1951        ///Sets `previous_digest` with the provided value.
1952        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1953            self.set_previous_digest(field.into());
1954            self
1955        }
1956        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
1957        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1958            self.epoch_rolling_gas_cost_summary
1959                .as_ref()
1960                .map(|field| field as _)
1961                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1962        }
1963        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1964        pub fn epoch_rolling_gas_cost_summary_opt_mut(
1965            &mut self,
1966        ) -> Option<&mut super::GasCostSummary> {
1967            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1968        }
1969        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
1970        ///If the field is unset, it is first initialized with the default value.
1971        pub fn epoch_rolling_gas_cost_summary_mut(
1972            &mut self,
1973        ) -> &mut super::GasCostSummary {
1974            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1975        }
1976        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1977        pub fn epoch_rolling_gas_cost_summary_opt(
1978            &self,
1979        ) -> Option<&super::GasCostSummary> {
1980            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1981        }
1982        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1983        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1984            &mut self,
1985            field: T,
1986        ) {
1987            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1988        }
1989        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1990        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1991            mut self,
1992            field: T,
1993        ) -> Self {
1994            self.set_epoch_rolling_gas_cost_summary(field.into());
1995            self
1996        }
1997        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1998        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1999            self.timestamp.as_mut().map(|field| field as _)
2000        }
2001        ///Returns a mutable reference to `timestamp`.
2002        ///If the field is unset, it is first initialized with the default value.
2003        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2004            self.timestamp.get_or_insert_default()
2005        }
2006        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
2007        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2008            self.timestamp.as_ref().map(|field| field as _)
2009        }
2010        ///Sets `timestamp` with the provided value.
2011        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2012            self.timestamp = Some(field.into().into());
2013        }
2014        ///Sets `timestamp` with the provided value.
2015        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2016            mut self,
2017            field: T,
2018        ) -> Self {
2019            self.set_timestamp(field.into());
2020            self
2021        }
2022        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
2023        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2024            &self.commitments
2025        }
2026        ///Returns a mutable reference to `commitments`.
2027        ///If the field is unset, it is first initialized with the default value.
2028        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2029            &mut self.commitments
2030        }
2031        ///Sets `commitments` with the provided value.
2032        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2033            self.commitments = field;
2034        }
2035        ///Sets `commitments` with the provided value.
2036        pub fn with_commitments(
2037            mut self,
2038            field: Vec<super::CheckpointCommitment>,
2039        ) -> Self {
2040            self.set_commitments(field);
2041            self
2042        }
2043        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
2044        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2045            self.end_of_epoch_data
2046                .as_ref()
2047                .map(|field| field as _)
2048                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2049        }
2050        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2051        pub fn end_of_epoch_data_opt_mut(
2052            &mut self,
2053        ) -> Option<&mut super::EndOfEpochData> {
2054            self.end_of_epoch_data.as_mut().map(|field| field as _)
2055        }
2056        ///Returns a mutable reference to `end_of_epoch_data`.
2057        ///If the field is unset, it is first initialized with the default value.
2058        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2059            self.end_of_epoch_data.get_or_insert_default()
2060        }
2061        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2062        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2063            self.end_of_epoch_data.as_ref().map(|field| field as _)
2064        }
2065        ///Sets `end_of_epoch_data` with the provided value.
2066        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2067            &mut self,
2068            field: T,
2069        ) {
2070            self.end_of_epoch_data = Some(field.into().into());
2071        }
2072        ///Sets `end_of_epoch_data` with the provided value.
2073        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2074            mut self,
2075            field: T,
2076        ) -> Self {
2077            self.set_end_of_epoch_data(field.into());
2078            self
2079        }
2080        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2081        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2082            self.version_specific_data.as_ref().map(|field| field as _)
2083        }
2084        ///Sets `version_specific_data` with the provided value.
2085        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2086            &mut self,
2087            field: T,
2088        ) {
2089            self.version_specific_data = Some(field.into().into());
2090        }
2091        ///Sets `version_specific_data` with the provided value.
2092        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2093            mut self,
2094            field: T,
2095        ) -> Self {
2096            self.set_version_specific_data(field.into());
2097            self
2098        }
2099    }
2100    impl super::CheckpointedTransactionInfo {
2101        pub const fn const_default() -> Self {
2102            Self {
2103                transaction: None,
2104                effects: None,
2105                signatures: Vec::new(),
2106                address_aliases_versions: Vec::new(),
2107            }
2108        }
2109        #[doc(hidden)]
2110        pub fn default_instance() -> &'static Self {
2111            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2112            &DEFAULT
2113        }
2114        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2115        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2116            self.transaction.as_mut().map(|field| field as _)
2117        }
2118        ///Returns a mutable reference to `transaction`.
2119        ///If the field is unset, it is first initialized with the default value.
2120        pub fn transaction_mut(&mut self) -> &mut String {
2121            self.transaction.get_or_insert_default()
2122        }
2123        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2124        pub fn transaction_opt(&self) -> Option<&str> {
2125            self.transaction.as_ref().map(|field| field as _)
2126        }
2127        ///Sets `transaction` with the provided value.
2128        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2129            self.transaction = Some(field.into().into());
2130        }
2131        ///Sets `transaction` with the provided value.
2132        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2133            self.set_transaction(field.into());
2134            self
2135        }
2136        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2137        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2138            self.effects.as_mut().map(|field| field as _)
2139        }
2140        ///Returns a mutable reference to `effects`.
2141        ///If the field is unset, it is first initialized with the default value.
2142        pub fn effects_mut(&mut self) -> &mut String {
2143            self.effects.get_or_insert_default()
2144        }
2145        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2146        pub fn effects_opt(&self) -> Option<&str> {
2147            self.effects.as_ref().map(|field| field as _)
2148        }
2149        ///Sets `effects` with the provided value.
2150        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2151            self.effects = Some(field.into().into());
2152        }
2153        ///Sets `effects` with the provided value.
2154        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2155            self.set_effects(field.into());
2156            self
2157        }
2158        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
2159        pub fn signatures(&self) -> &[super::UserSignature] {
2160            &self.signatures
2161        }
2162        ///Returns a mutable reference to `signatures`.
2163        ///If the field is unset, it is first initialized with the default value.
2164        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2165            &mut self.signatures
2166        }
2167        ///Sets `signatures` with the provided value.
2168        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2169            self.signatures = field;
2170        }
2171        ///Sets `signatures` with the provided value.
2172        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2173            self.set_signatures(field);
2174            self
2175        }
2176        ///Returns the value of `address_aliases_versions`, or the default value if `address_aliases_versions` is unset.
2177        pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2178            &self.address_aliases_versions
2179        }
2180        ///Returns a mutable reference to `address_aliases_versions`.
2181        ///If the field is unset, it is first initialized with the default value.
2182        pub fn address_aliases_versions_mut(
2183            &mut self,
2184        ) -> &mut Vec<super::AddressAliasesVersion> {
2185            &mut self.address_aliases_versions
2186        }
2187        ///Sets `address_aliases_versions` with the provided value.
2188        pub fn set_address_aliases_versions(
2189            &mut self,
2190            field: Vec<super::AddressAliasesVersion>,
2191        ) {
2192            self.address_aliases_versions = field;
2193        }
2194        ///Sets `address_aliases_versions` with the provided value.
2195        pub fn with_address_aliases_versions(
2196            mut self,
2197            field: Vec<super::AddressAliasesVersion>,
2198        ) -> Self {
2199            self.set_address_aliases_versions(field);
2200            self
2201        }
2202    }
2203    impl super::CircomG1 {
2204        pub const fn const_default() -> Self {
2205            Self {
2206                e0: None,
2207                e1: None,
2208                e2: None,
2209            }
2210        }
2211        #[doc(hidden)]
2212        pub fn default_instance() -> &'static Self {
2213            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2214            &DEFAULT
2215        }
2216        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2217        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2218            self.e0.as_mut().map(|field| field as _)
2219        }
2220        ///Returns a mutable reference to `e0`.
2221        ///If the field is unset, it is first initialized with the default value.
2222        pub fn e0_mut(&mut self) -> &mut String {
2223            self.e0.get_or_insert_default()
2224        }
2225        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2226        pub fn e0_opt(&self) -> Option<&str> {
2227            self.e0.as_ref().map(|field| field as _)
2228        }
2229        ///Sets `e0` with the provided value.
2230        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2231            self.e0 = Some(field.into().into());
2232        }
2233        ///Sets `e0` with the provided value.
2234        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2235            self.set_e0(field.into());
2236            self
2237        }
2238        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2239        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2240            self.e1.as_mut().map(|field| field as _)
2241        }
2242        ///Returns a mutable reference to `e1`.
2243        ///If the field is unset, it is first initialized with the default value.
2244        pub fn e1_mut(&mut self) -> &mut String {
2245            self.e1.get_or_insert_default()
2246        }
2247        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2248        pub fn e1_opt(&self) -> Option<&str> {
2249            self.e1.as_ref().map(|field| field as _)
2250        }
2251        ///Sets `e1` with the provided value.
2252        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2253            self.e1 = Some(field.into().into());
2254        }
2255        ///Sets `e1` with the provided value.
2256        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2257            self.set_e1(field.into());
2258            self
2259        }
2260        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2261        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2262            self.e2.as_mut().map(|field| field as _)
2263        }
2264        ///Returns a mutable reference to `e2`.
2265        ///If the field is unset, it is first initialized with the default value.
2266        pub fn e2_mut(&mut self) -> &mut String {
2267            self.e2.get_or_insert_default()
2268        }
2269        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2270        pub fn e2_opt(&self) -> Option<&str> {
2271            self.e2.as_ref().map(|field| field as _)
2272        }
2273        ///Sets `e2` with the provided value.
2274        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2275            self.e2 = Some(field.into().into());
2276        }
2277        ///Sets `e2` with the provided value.
2278        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2279            self.set_e2(field.into());
2280            self
2281        }
2282    }
2283    impl super::CircomG2 {
2284        pub const fn const_default() -> Self {
2285            Self {
2286                e00: None,
2287                e01: None,
2288                e10: None,
2289                e11: None,
2290                e20: None,
2291                e21: None,
2292            }
2293        }
2294        #[doc(hidden)]
2295        pub fn default_instance() -> &'static Self {
2296            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2297            &DEFAULT
2298        }
2299        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2300        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2301            self.e00.as_mut().map(|field| field as _)
2302        }
2303        ///Returns a mutable reference to `e00`.
2304        ///If the field is unset, it is first initialized with the default value.
2305        pub fn e00_mut(&mut self) -> &mut String {
2306            self.e00.get_or_insert_default()
2307        }
2308        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2309        pub fn e00_opt(&self) -> Option<&str> {
2310            self.e00.as_ref().map(|field| field as _)
2311        }
2312        ///Sets `e00` with the provided value.
2313        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2314            self.e00 = Some(field.into().into());
2315        }
2316        ///Sets `e00` with the provided value.
2317        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2318            self.set_e00(field.into());
2319            self
2320        }
2321        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2322        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2323            self.e01.as_mut().map(|field| field as _)
2324        }
2325        ///Returns a mutable reference to `e01`.
2326        ///If the field is unset, it is first initialized with the default value.
2327        pub fn e01_mut(&mut self) -> &mut String {
2328            self.e01.get_or_insert_default()
2329        }
2330        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2331        pub fn e01_opt(&self) -> Option<&str> {
2332            self.e01.as_ref().map(|field| field as _)
2333        }
2334        ///Sets `e01` with the provided value.
2335        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2336            self.e01 = Some(field.into().into());
2337        }
2338        ///Sets `e01` with the provided value.
2339        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2340            self.set_e01(field.into());
2341            self
2342        }
2343        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2344        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2345            self.e10.as_mut().map(|field| field as _)
2346        }
2347        ///Returns a mutable reference to `e10`.
2348        ///If the field is unset, it is first initialized with the default value.
2349        pub fn e10_mut(&mut self) -> &mut String {
2350            self.e10.get_or_insert_default()
2351        }
2352        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2353        pub fn e10_opt(&self) -> Option<&str> {
2354            self.e10.as_ref().map(|field| field as _)
2355        }
2356        ///Sets `e10` with the provided value.
2357        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2358            self.e10 = Some(field.into().into());
2359        }
2360        ///Sets `e10` with the provided value.
2361        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2362            self.set_e10(field.into());
2363            self
2364        }
2365        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2366        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2367            self.e11.as_mut().map(|field| field as _)
2368        }
2369        ///Returns a mutable reference to `e11`.
2370        ///If the field is unset, it is first initialized with the default value.
2371        pub fn e11_mut(&mut self) -> &mut String {
2372            self.e11.get_or_insert_default()
2373        }
2374        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2375        pub fn e11_opt(&self) -> Option<&str> {
2376            self.e11.as_ref().map(|field| field as _)
2377        }
2378        ///Sets `e11` with the provided value.
2379        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2380            self.e11 = Some(field.into().into());
2381        }
2382        ///Sets `e11` with the provided value.
2383        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2384            self.set_e11(field.into());
2385            self
2386        }
2387        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2388        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2389            self.e20.as_mut().map(|field| field as _)
2390        }
2391        ///Returns a mutable reference to `e20`.
2392        ///If the field is unset, it is first initialized with the default value.
2393        pub fn e20_mut(&mut self) -> &mut String {
2394            self.e20.get_or_insert_default()
2395        }
2396        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2397        pub fn e20_opt(&self) -> Option<&str> {
2398            self.e20.as_ref().map(|field| field as _)
2399        }
2400        ///Sets `e20` with the provided value.
2401        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2402            self.e20 = Some(field.into().into());
2403        }
2404        ///Sets `e20` with the provided value.
2405        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2406            self.set_e20(field.into());
2407            self
2408        }
2409        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2410        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2411            self.e21.as_mut().map(|field| field as _)
2412        }
2413        ///Returns a mutable reference to `e21`.
2414        ///If the field is unset, it is first initialized with the default value.
2415        pub fn e21_mut(&mut self) -> &mut String {
2416            self.e21.get_or_insert_default()
2417        }
2418        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2419        pub fn e21_opt(&self) -> Option<&str> {
2420            self.e21.as_ref().map(|field| field as _)
2421        }
2422        ///Sets `e21` with the provided value.
2423        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2424            self.e21 = Some(field.into().into());
2425        }
2426        ///Sets `e21` with the provided value.
2427        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2428            self.set_e21(field.into());
2429            self
2430        }
2431    }
2432    impl super::CleverError {
2433        pub const fn const_default() -> Self {
2434            Self {
2435                error_code: None,
2436                line_number: None,
2437                constant_name: None,
2438                constant_type: None,
2439                value: None,
2440            }
2441        }
2442        #[doc(hidden)]
2443        pub fn default_instance() -> &'static Self {
2444            static DEFAULT: super::CleverError = super::CleverError::const_default();
2445            &DEFAULT
2446        }
2447        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2448        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2449            self.error_code.as_mut().map(|field| field as _)
2450        }
2451        ///Returns a mutable reference to `error_code`.
2452        ///If the field is unset, it is first initialized with the default value.
2453        pub fn error_code_mut(&mut self) -> &mut u64 {
2454            self.error_code.get_or_insert_default()
2455        }
2456        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2457        pub fn error_code_opt(&self) -> Option<u64> {
2458            self.error_code.as_ref().map(|field| *field)
2459        }
2460        ///Sets `error_code` with the provided value.
2461        pub fn set_error_code(&mut self, field: u64) {
2462            self.error_code = Some(field);
2463        }
2464        ///Sets `error_code` with the provided value.
2465        pub fn with_error_code(mut self, field: u64) -> Self {
2466            self.set_error_code(field);
2467            self
2468        }
2469        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2470        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2471            self.line_number.as_mut().map(|field| field as _)
2472        }
2473        ///Returns a mutable reference to `line_number`.
2474        ///If the field is unset, it is first initialized with the default value.
2475        pub fn line_number_mut(&mut self) -> &mut u64 {
2476            self.line_number.get_or_insert_default()
2477        }
2478        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2479        pub fn line_number_opt(&self) -> Option<u64> {
2480            self.line_number.as_ref().map(|field| *field)
2481        }
2482        ///Sets `line_number` with the provided value.
2483        pub fn set_line_number(&mut self, field: u64) {
2484            self.line_number = Some(field);
2485        }
2486        ///Sets `line_number` with the provided value.
2487        pub fn with_line_number(mut self, field: u64) -> Self {
2488            self.set_line_number(field);
2489            self
2490        }
2491        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2492        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2493            self.constant_name.as_mut().map(|field| field as _)
2494        }
2495        ///Returns a mutable reference to `constant_name`.
2496        ///If the field is unset, it is first initialized with the default value.
2497        pub fn constant_name_mut(&mut self) -> &mut String {
2498            self.constant_name.get_or_insert_default()
2499        }
2500        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2501        pub fn constant_name_opt(&self) -> Option<&str> {
2502            self.constant_name.as_ref().map(|field| field as _)
2503        }
2504        ///Sets `constant_name` with the provided value.
2505        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2506            self.constant_name = Some(field.into().into());
2507        }
2508        ///Sets `constant_name` with the provided value.
2509        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2510            self.set_constant_name(field.into());
2511            self
2512        }
2513        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2514        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2515            self.constant_type.as_mut().map(|field| field as _)
2516        }
2517        ///Returns a mutable reference to `constant_type`.
2518        ///If the field is unset, it is first initialized with the default value.
2519        pub fn constant_type_mut(&mut self) -> &mut String {
2520            self.constant_type.get_or_insert_default()
2521        }
2522        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2523        pub fn constant_type_opt(&self) -> Option<&str> {
2524            self.constant_type.as_ref().map(|field| field as _)
2525        }
2526        ///Sets `constant_type` with the provided value.
2527        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2528            self.constant_type = Some(field.into().into());
2529        }
2530        ///Sets `constant_type` with the provided value.
2531        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2532            self.set_constant_type(field.into());
2533            self
2534        }
2535        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2536        pub fn rendered(&self) -> &str {
2537            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2538                field as _
2539            } else {
2540                ""
2541            }
2542        }
2543        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2544        pub fn rendered_opt(&self) -> Option<&str> {
2545            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2546                Some(field as _)
2547            } else {
2548                None
2549            }
2550        }
2551        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2552        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2553            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2554                Some(field as _)
2555            } else {
2556                None
2557            }
2558        }
2559        ///Returns a mutable reference to `rendered`.
2560        ///If the field is unset, it is first initialized with the default value.
2561        ///If any other oneof field in the same oneof is set, it will be cleared.
2562        pub fn rendered_mut(&mut self) -> &mut String {
2563            if self.rendered_opt_mut().is_none() {
2564                self.value = Some(
2565                    super::clever_error::Value::Rendered(String::default()),
2566                );
2567            }
2568            self.rendered_opt_mut().unwrap()
2569        }
2570        ///Sets `rendered` with the provided value.
2571        ///If any other oneof field in the same oneof is set, it will be cleared.
2572        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2573            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2574        }
2575        ///Sets `rendered` with the provided value.
2576        ///If any other oneof field in the same oneof is set, it will be cleared.
2577        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2578            self.set_rendered(field.into());
2579            self
2580        }
2581        ///Returns the value of `raw`, or the default value if `raw` is unset.
2582        pub fn raw(&self) -> &[u8] {
2583            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2584                field as _
2585            } else {
2586                &[]
2587            }
2588        }
2589        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2590        pub fn raw_opt(&self) -> Option<&[u8]> {
2591            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2592                Some(field as _)
2593            } else {
2594                None
2595            }
2596        }
2597        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2598        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2599            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2600                Some(field as _)
2601            } else {
2602                None
2603            }
2604        }
2605        ///Returns a mutable reference to `raw`.
2606        ///If the field is unset, it is first initialized with the default value.
2607        ///If any other oneof field in the same oneof is set, it will be cleared.
2608        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2609            if self.raw_opt_mut().is_none() {
2610                self.value = Some(
2611                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2612                );
2613            }
2614            self.raw_opt_mut().unwrap()
2615        }
2616        ///Sets `raw` with the provided value.
2617        ///If any other oneof field in the same oneof is set, it will be cleared.
2618        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2619            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2620        }
2621        ///Sets `raw` with the provided value.
2622        ///If any other oneof field in the same oneof is set, it will be cleared.
2623        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2624            self.set_raw(field.into());
2625            self
2626        }
2627    }
2628    impl super::CoinDenyListError {
2629        pub const fn const_default() -> Self {
2630            Self {
2631                address: None,
2632                coin_type: None,
2633            }
2634        }
2635        #[doc(hidden)]
2636        pub fn default_instance() -> &'static Self {
2637            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2638            &DEFAULT
2639        }
2640        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2641        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2642            self.address.as_mut().map(|field| field as _)
2643        }
2644        ///Returns a mutable reference to `address`.
2645        ///If the field is unset, it is first initialized with the default value.
2646        pub fn address_mut(&mut self) -> &mut String {
2647            self.address.get_or_insert_default()
2648        }
2649        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2650        pub fn address_opt(&self) -> Option<&str> {
2651            self.address.as_ref().map(|field| field as _)
2652        }
2653        ///Sets `address` with the provided value.
2654        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2655            self.address = Some(field.into().into());
2656        }
2657        ///Sets `address` with the provided value.
2658        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2659            self.set_address(field.into());
2660            self
2661        }
2662        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2663        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2664            self.coin_type.as_mut().map(|field| field as _)
2665        }
2666        ///Returns a mutable reference to `coin_type`.
2667        ///If the field is unset, it is first initialized with the default value.
2668        pub fn coin_type_mut(&mut self) -> &mut String {
2669            self.coin_type.get_or_insert_default()
2670        }
2671        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2672        pub fn coin_type_opt(&self) -> Option<&str> {
2673            self.coin_type.as_ref().map(|field| field as _)
2674        }
2675        ///Sets `coin_type` with the provided value.
2676        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2677            self.coin_type = Some(field.into().into());
2678        }
2679        ///Sets `coin_type` with the provided value.
2680        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2681            self.set_coin_type(field.into());
2682            self
2683        }
2684    }
2685    impl super::CoinMetadata {
2686        pub const fn const_default() -> Self {
2687            Self {
2688                id: None,
2689                decimals: None,
2690                name: None,
2691                symbol: None,
2692                description: None,
2693                icon_url: None,
2694                metadata_cap_id: None,
2695                metadata_cap_state: None,
2696            }
2697        }
2698        #[doc(hidden)]
2699        pub fn default_instance() -> &'static Self {
2700            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2701            &DEFAULT
2702        }
2703        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2704        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2705            self.id.as_mut().map(|field| field as _)
2706        }
2707        ///Returns a mutable reference to `id`.
2708        ///If the field is unset, it is first initialized with the default value.
2709        pub fn id_mut(&mut self) -> &mut String {
2710            self.id.get_or_insert_default()
2711        }
2712        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2713        pub fn id_opt(&self) -> Option<&str> {
2714            self.id.as_ref().map(|field| field as _)
2715        }
2716        ///Sets `id` with the provided value.
2717        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2718            self.id = Some(field.into().into());
2719        }
2720        ///Sets `id` with the provided value.
2721        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2722            self.set_id(field.into());
2723            self
2724        }
2725        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2726        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2727            self.decimals.as_mut().map(|field| field as _)
2728        }
2729        ///Returns a mutable reference to `decimals`.
2730        ///If the field is unset, it is first initialized with the default value.
2731        pub fn decimals_mut(&mut self) -> &mut u32 {
2732            self.decimals.get_or_insert_default()
2733        }
2734        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2735        pub fn decimals_opt(&self) -> Option<u32> {
2736            self.decimals.as_ref().map(|field| *field)
2737        }
2738        ///Sets `decimals` with the provided value.
2739        pub fn set_decimals(&mut self, field: u32) {
2740            self.decimals = Some(field);
2741        }
2742        ///Sets `decimals` with the provided value.
2743        pub fn with_decimals(mut self, field: u32) -> Self {
2744            self.set_decimals(field);
2745            self
2746        }
2747        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2748        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2749            self.name.as_mut().map(|field| field as _)
2750        }
2751        ///Returns a mutable reference to `name`.
2752        ///If the field is unset, it is first initialized with the default value.
2753        pub fn name_mut(&mut self) -> &mut String {
2754            self.name.get_or_insert_default()
2755        }
2756        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2757        pub fn name_opt(&self) -> Option<&str> {
2758            self.name.as_ref().map(|field| field as _)
2759        }
2760        ///Sets `name` with the provided value.
2761        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2762            self.name = Some(field.into().into());
2763        }
2764        ///Sets `name` with the provided value.
2765        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2766            self.set_name(field.into());
2767            self
2768        }
2769        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2770        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2771            self.symbol.as_mut().map(|field| field as _)
2772        }
2773        ///Returns a mutable reference to `symbol`.
2774        ///If the field is unset, it is first initialized with the default value.
2775        pub fn symbol_mut(&mut self) -> &mut String {
2776            self.symbol.get_or_insert_default()
2777        }
2778        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2779        pub fn symbol_opt(&self) -> Option<&str> {
2780            self.symbol.as_ref().map(|field| field as _)
2781        }
2782        ///Sets `symbol` with the provided value.
2783        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2784            self.symbol = Some(field.into().into());
2785        }
2786        ///Sets `symbol` with the provided value.
2787        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2788            self.set_symbol(field.into());
2789            self
2790        }
2791        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2792        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2793            self.description.as_mut().map(|field| field as _)
2794        }
2795        ///Returns a mutable reference to `description`.
2796        ///If the field is unset, it is first initialized with the default value.
2797        pub fn description_mut(&mut self) -> &mut String {
2798            self.description.get_or_insert_default()
2799        }
2800        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2801        pub fn description_opt(&self) -> Option<&str> {
2802            self.description.as_ref().map(|field| field as _)
2803        }
2804        ///Sets `description` with the provided value.
2805        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2806            self.description = Some(field.into().into());
2807        }
2808        ///Sets `description` with the provided value.
2809        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2810            self.set_description(field.into());
2811            self
2812        }
2813        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2814        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2815            self.icon_url.as_mut().map(|field| field as _)
2816        }
2817        ///Returns a mutable reference to `icon_url`.
2818        ///If the field is unset, it is first initialized with the default value.
2819        pub fn icon_url_mut(&mut self) -> &mut String {
2820            self.icon_url.get_or_insert_default()
2821        }
2822        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2823        pub fn icon_url_opt(&self) -> Option<&str> {
2824            self.icon_url.as_ref().map(|field| field as _)
2825        }
2826        ///Sets `icon_url` with the provided value.
2827        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2828            self.icon_url = Some(field.into().into());
2829        }
2830        ///Sets `icon_url` with the provided value.
2831        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2832            self.set_icon_url(field.into());
2833            self
2834        }
2835        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2836        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2837            self.metadata_cap_id.as_mut().map(|field| field as _)
2838        }
2839        ///Returns a mutable reference to `metadata_cap_id`.
2840        ///If the field is unset, it is first initialized with the default value.
2841        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2842            self.metadata_cap_id.get_or_insert_default()
2843        }
2844        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2845        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2846            self.metadata_cap_id.as_ref().map(|field| field as _)
2847        }
2848        ///Sets `metadata_cap_id` with the provided value.
2849        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2850            self.metadata_cap_id = Some(field.into().into());
2851        }
2852        ///Sets `metadata_cap_id` with the provided value.
2853        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2854            self.set_metadata_cap_id(field.into());
2855            self
2856        }
2857        ///Sets `metadata_cap_state` with the provided value.
2858        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2859            mut self,
2860            field: T,
2861        ) -> Self {
2862            self.set_metadata_cap_state(field.into());
2863            self
2864        }
2865    }
2866    impl super::CoinTreasury {
2867        pub const fn const_default() -> Self {
2868            Self {
2869                id: None,
2870                total_supply: None,
2871                supply_state: None,
2872            }
2873        }
2874        #[doc(hidden)]
2875        pub fn default_instance() -> &'static Self {
2876            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2877            &DEFAULT
2878        }
2879        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2880        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2881            self.id.as_mut().map(|field| field as _)
2882        }
2883        ///Returns a mutable reference to `id`.
2884        ///If the field is unset, it is first initialized with the default value.
2885        pub fn id_mut(&mut self) -> &mut String {
2886            self.id.get_or_insert_default()
2887        }
2888        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2889        pub fn id_opt(&self) -> Option<&str> {
2890            self.id.as_ref().map(|field| field as _)
2891        }
2892        ///Sets `id` with the provided value.
2893        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2894            self.id = Some(field.into().into());
2895        }
2896        ///Sets `id` with the provided value.
2897        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2898            self.set_id(field.into());
2899            self
2900        }
2901        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2902        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2903            self.total_supply.as_mut().map(|field| field as _)
2904        }
2905        ///Returns a mutable reference to `total_supply`.
2906        ///If the field is unset, it is first initialized with the default value.
2907        pub fn total_supply_mut(&mut self) -> &mut u64 {
2908            self.total_supply.get_or_insert_default()
2909        }
2910        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2911        pub fn total_supply_opt(&self) -> Option<u64> {
2912            self.total_supply.as_ref().map(|field| *field)
2913        }
2914        ///Sets `total_supply` with the provided value.
2915        pub fn set_total_supply(&mut self, field: u64) {
2916            self.total_supply = Some(field);
2917        }
2918        ///Sets `total_supply` with the provided value.
2919        pub fn with_total_supply(mut self, field: u64) -> Self {
2920            self.set_total_supply(field);
2921            self
2922        }
2923        ///Sets `supply_state` with the provided value.
2924        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2925            mut self,
2926            field: T,
2927        ) -> Self {
2928            self.set_supply_state(field.into());
2929            self
2930        }
2931    }
2932    impl super::Command {
2933        pub const fn const_default() -> Self {
2934            Self { command: None }
2935        }
2936        #[doc(hidden)]
2937        pub fn default_instance() -> &'static Self {
2938            static DEFAULT: super::Command = super::Command::const_default();
2939            &DEFAULT
2940        }
2941        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2942        pub fn move_call(&self) -> &super::MoveCall {
2943            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2944                field as _
2945            } else {
2946                super::MoveCall::default_instance() as _
2947            }
2948        }
2949        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
2950        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2951            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2952                Some(field as _)
2953            } else {
2954                None
2955            }
2956        }
2957        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2958        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2959            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2960                Some(field as _)
2961            } else {
2962                None
2963            }
2964        }
2965        ///Returns a mutable reference to `move_call`.
2966        ///If the field is unset, it is first initialized with the default value.
2967        ///If any other oneof field in the same oneof is set, it will be cleared.
2968        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2969            if self.move_call_opt_mut().is_none() {
2970                self.command = Some(
2971                    super::command::Command::MoveCall(super::MoveCall::default()),
2972                );
2973            }
2974            self.move_call_opt_mut().unwrap()
2975        }
2976        ///Sets `move_call` with the provided value.
2977        ///If any other oneof field in the same oneof is set, it will be cleared.
2978        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2979            self.command = Some(super::command::Command::MoveCall(field.into().into()));
2980        }
2981        ///Sets `move_call` with the provided value.
2982        ///If any other oneof field in the same oneof is set, it will be cleared.
2983        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2984            self.set_move_call(field.into());
2985            self
2986        }
2987        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
2988        pub fn transfer_objects(&self) -> &super::TransferObjects {
2989            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2990            {
2991                field as _
2992            } else {
2993                super::TransferObjects::default_instance() as _
2994            }
2995        }
2996        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2997        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2998            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2999            {
3000                Some(field as _)
3001            } else {
3002                None
3003            }
3004        }
3005        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3006        pub fn transfer_objects_opt_mut(
3007            &mut self,
3008        ) -> Option<&mut super::TransferObjects> {
3009            if let Some(super::command::Command::TransferObjects(field)) = &mut self
3010                .command
3011            {
3012                Some(field as _)
3013            } else {
3014                None
3015            }
3016        }
3017        ///Returns a mutable reference to `transfer_objects`.
3018        ///If the field is unset, it is first initialized with the default value.
3019        ///If any other oneof field in the same oneof is set, it will be cleared.
3020        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3021            if self.transfer_objects_opt_mut().is_none() {
3022                self.command = Some(
3023                    super::command::Command::TransferObjects(
3024                        super::TransferObjects::default(),
3025                    ),
3026                );
3027            }
3028            self.transfer_objects_opt_mut().unwrap()
3029        }
3030        ///Sets `transfer_objects` with the provided value.
3031        ///If any other oneof field in the same oneof is set, it will be cleared.
3032        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3033            &mut self,
3034            field: T,
3035        ) {
3036            self.command = Some(
3037                super::command::Command::TransferObjects(field.into().into()),
3038            );
3039        }
3040        ///Sets `transfer_objects` with the provided value.
3041        ///If any other oneof field in the same oneof is set, it will be cleared.
3042        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3043            mut self,
3044            field: T,
3045        ) -> Self {
3046            self.set_transfer_objects(field.into());
3047            self
3048        }
3049        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
3050        pub fn split_coins(&self) -> &super::SplitCoins {
3051            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3052                field as _
3053            } else {
3054                super::SplitCoins::default_instance() as _
3055            }
3056        }
3057        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3058        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3059            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3060                Some(field as _)
3061            } else {
3062                None
3063            }
3064        }
3065        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3066        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3067            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3068                Some(field as _)
3069            } else {
3070                None
3071            }
3072        }
3073        ///Returns a mutable reference to `split_coins`.
3074        ///If the field is unset, it is first initialized with the default value.
3075        ///If any other oneof field in the same oneof is set, it will be cleared.
3076        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3077            if self.split_coins_opt_mut().is_none() {
3078                self.command = Some(
3079                    super::command::Command::SplitCoins(super::SplitCoins::default()),
3080                );
3081            }
3082            self.split_coins_opt_mut().unwrap()
3083        }
3084        ///Sets `split_coins` with the provided value.
3085        ///If any other oneof field in the same oneof is set, it will be cleared.
3086        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3087            self.command = Some(
3088                super::command::Command::SplitCoins(field.into().into()),
3089            );
3090        }
3091        ///Sets `split_coins` with the provided value.
3092        ///If any other oneof field in the same oneof is set, it will be cleared.
3093        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3094            self.set_split_coins(field.into());
3095            self
3096        }
3097        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
3098        pub fn merge_coins(&self) -> &super::MergeCoins {
3099            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3100                field as _
3101            } else {
3102                super::MergeCoins::default_instance() as _
3103            }
3104        }
3105        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3106        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3107            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3108                Some(field as _)
3109            } else {
3110                None
3111            }
3112        }
3113        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3114        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3115            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3116                Some(field as _)
3117            } else {
3118                None
3119            }
3120        }
3121        ///Returns a mutable reference to `merge_coins`.
3122        ///If the field is unset, it is first initialized with the default value.
3123        ///If any other oneof field in the same oneof is set, it will be cleared.
3124        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3125            if self.merge_coins_opt_mut().is_none() {
3126                self.command = Some(
3127                    super::command::Command::MergeCoins(super::MergeCoins::default()),
3128                );
3129            }
3130            self.merge_coins_opt_mut().unwrap()
3131        }
3132        ///Sets `merge_coins` with the provided value.
3133        ///If any other oneof field in the same oneof is set, it will be cleared.
3134        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3135            self.command = Some(
3136                super::command::Command::MergeCoins(field.into().into()),
3137            );
3138        }
3139        ///Sets `merge_coins` with the provided value.
3140        ///If any other oneof field in the same oneof is set, it will be cleared.
3141        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3142            self.set_merge_coins(field.into());
3143            self
3144        }
3145        ///Returns the value of `publish`, or the default value if `publish` is unset.
3146        pub fn publish(&self) -> &super::Publish {
3147            if let Some(super::command::Command::Publish(field)) = &self.command {
3148                field as _
3149            } else {
3150                super::Publish::default_instance() as _
3151            }
3152        }
3153        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
3154        pub fn publish_opt(&self) -> Option<&super::Publish> {
3155            if let Some(super::command::Command::Publish(field)) = &self.command {
3156                Some(field as _)
3157            } else {
3158                None
3159            }
3160        }
3161        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3162        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3163            if let Some(super::command::Command::Publish(field)) = &mut self.command {
3164                Some(field as _)
3165            } else {
3166                None
3167            }
3168        }
3169        ///Returns a mutable reference to `publish`.
3170        ///If the field is unset, it is first initialized with the default value.
3171        ///If any other oneof field in the same oneof is set, it will be cleared.
3172        pub fn publish_mut(&mut self) -> &mut super::Publish {
3173            if self.publish_opt_mut().is_none() {
3174                self.command = Some(
3175                    super::command::Command::Publish(super::Publish::default()),
3176                );
3177            }
3178            self.publish_opt_mut().unwrap()
3179        }
3180        ///Sets `publish` with the provided value.
3181        ///If any other oneof field in the same oneof is set, it will be cleared.
3182        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3183            self.command = Some(super::command::Command::Publish(field.into().into()));
3184        }
3185        ///Sets `publish` with the provided value.
3186        ///If any other oneof field in the same oneof is set, it will be cleared.
3187        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3188            self.set_publish(field.into());
3189            self
3190        }
3191        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
3192        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3193            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3194                field as _
3195            } else {
3196                super::MakeMoveVector::default_instance() as _
3197            }
3198        }
3199        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
3200        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3201            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3202                Some(field as _)
3203            } else {
3204                None
3205            }
3206        }
3207        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3208        pub fn make_move_vector_opt_mut(
3209            &mut self,
3210        ) -> Option<&mut super::MakeMoveVector> {
3211            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3212                .command
3213            {
3214                Some(field as _)
3215            } else {
3216                None
3217            }
3218        }
3219        ///Returns a mutable reference to `make_move_vector`.
3220        ///If the field is unset, it is first initialized with the default value.
3221        ///If any other oneof field in the same oneof is set, it will be cleared.
3222        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3223            if self.make_move_vector_opt_mut().is_none() {
3224                self.command = Some(
3225                    super::command::Command::MakeMoveVector(
3226                        super::MakeMoveVector::default(),
3227                    ),
3228                );
3229            }
3230            self.make_move_vector_opt_mut().unwrap()
3231        }
3232        ///Sets `make_move_vector` with the provided value.
3233        ///If any other oneof field in the same oneof is set, it will be cleared.
3234        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3235            &mut self,
3236            field: T,
3237        ) {
3238            self.command = Some(
3239                super::command::Command::MakeMoveVector(field.into().into()),
3240            );
3241        }
3242        ///Sets `make_move_vector` with the provided value.
3243        ///If any other oneof field in the same oneof is set, it will be cleared.
3244        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3245            mut self,
3246            field: T,
3247        ) -> Self {
3248            self.set_make_move_vector(field.into());
3249            self
3250        }
3251        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3252        pub fn upgrade(&self) -> &super::Upgrade {
3253            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3254                field as _
3255            } else {
3256                super::Upgrade::default_instance() as _
3257            }
3258        }
3259        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3260        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3261            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3262                Some(field as _)
3263            } else {
3264                None
3265            }
3266        }
3267        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3268        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3269            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3270                Some(field as _)
3271            } else {
3272                None
3273            }
3274        }
3275        ///Returns a mutable reference to `upgrade`.
3276        ///If the field is unset, it is first initialized with the default value.
3277        ///If any other oneof field in the same oneof is set, it will be cleared.
3278        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3279            if self.upgrade_opt_mut().is_none() {
3280                self.command = Some(
3281                    super::command::Command::Upgrade(super::Upgrade::default()),
3282                );
3283            }
3284            self.upgrade_opt_mut().unwrap()
3285        }
3286        ///Sets `upgrade` with the provided value.
3287        ///If any other oneof field in the same oneof is set, it will be cleared.
3288        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3289            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3290        }
3291        ///Sets `upgrade` with the provided value.
3292        ///If any other oneof field in the same oneof is set, it will be cleared.
3293        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3294            self.set_upgrade(field.into());
3295            self
3296        }
3297    }
3298    impl super::CommandArgumentError {
3299        pub const fn const_default() -> Self {
3300            Self {
3301                argument: None,
3302                kind: None,
3303                index_error: None,
3304            }
3305        }
3306        #[doc(hidden)]
3307        pub fn default_instance() -> &'static Self {
3308            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3309            &DEFAULT
3310        }
3311        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3312        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3313            self.argument.as_mut().map(|field| field as _)
3314        }
3315        ///Returns a mutable reference to `argument`.
3316        ///If the field is unset, it is first initialized with the default value.
3317        pub fn argument_mut(&mut self) -> &mut u32 {
3318            self.argument.get_or_insert_default()
3319        }
3320        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3321        pub fn argument_opt(&self) -> Option<u32> {
3322            self.argument.as_ref().map(|field| *field)
3323        }
3324        ///Sets `argument` with the provided value.
3325        pub fn set_argument(&mut self, field: u32) {
3326            self.argument = Some(field);
3327        }
3328        ///Sets `argument` with the provided value.
3329        pub fn with_argument(mut self, field: u32) -> Self {
3330            self.set_argument(field);
3331            self
3332        }
3333        ///Sets `kind` with the provided value.
3334        pub fn with_kind<
3335            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3336        >(mut self, field: T) -> Self {
3337            self.set_kind(field.into());
3338            self
3339        }
3340        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3341        pub fn index_error(&self) -> &super::IndexError {
3342            self.index_error
3343                .as_ref()
3344                .map(|field| field as _)
3345                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3346        }
3347        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3348        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3349            self.index_error.as_mut().map(|field| field as _)
3350        }
3351        ///Returns a mutable reference to `index_error`.
3352        ///If the field is unset, it is first initialized with the default value.
3353        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3354            self.index_error.get_or_insert_default()
3355        }
3356        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3357        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3358            self.index_error.as_ref().map(|field| field as _)
3359        }
3360        ///Sets `index_error` with the provided value.
3361        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3362            self.index_error = Some(field.into().into());
3363        }
3364        ///Sets `index_error` with the provided value.
3365        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3366            self.set_index_error(field.into());
3367            self
3368        }
3369    }
3370    impl super::CommandOutput {
3371        pub const fn const_default() -> Self {
3372            Self {
3373                argument: None,
3374                value: None,
3375                json: None,
3376            }
3377        }
3378        #[doc(hidden)]
3379        pub fn default_instance() -> &'static Self {
3380            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3381            &DEFAULT
3382        }
3383        ///Returns the value of `argument`, or the default value if `argument` is unset.
3384        pub fn argument(&self) -> &super::Argument {
3385            self.argument
3386                .as_ref()
3387                .map(|field| field as _)
3388                .unwrap_or_else(|| super::Argument::default_instance() as _)
3389        }
3390        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3391        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3392            self.argument.as_mut().map(|field| field as _)
3393        }
3394        ///Returns a mutable reference to `argument`.
3395        ///If the field is unset, it is first initialized with the default value.
3396        pub fn argument_mut(&mut self) -> &mut super::Argument {
3397            self.argument.get_or_insert_default()
3398        }
3399        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3400        pub fn argument_opt(&self) -> Option<&super::Argument> {
3401            self.argument.as_ref().map(|field| field as _)
3402        }
3403        ///Sets `argument` with the provided value.
3404        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3405            self.argument = Some(field.into().into());
3406        }
3407        ///Sets `argument` with the provided value.
3408        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3409            self.set_argument(field.into());
3410            self
3411        }
3412        ///Returns the value of `value`, or the default value if `value` is unset.
3413        pub fn value(&self) -> &super::Bcs {
3414            self.value
3415                .as_ref()
3416                .map(|field| field as _)
3417                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3418        }
3419        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3420        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3421            self.value.as_mut().map(|field| field as _)
3422        }
3423        ///Returns a mutable reference to `value`.
3424        ///If the field is unset, it is first initialized with the default value.
3425        pub fn value_mut(&mut self) -> &mut super::Bcs {
3426            self.value.get_or_insert_default()
3427        }
3428        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3429        pub fn value_opt(&self) -> Option<&super::Bcs> {
3430            self.value.as_ref().map(|field| field as _)
3431        }
3432        ///Sets `value` with the provided value.
3433        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3434            self.value = Some(field.into().into());
3435        }
3436        ///Sets `value` with the provided value.
3437        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3438            self.set_value(field.into());
3439            self
3440        }
3441        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3442        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3443            self.json.as_mut().map(|field| field as _)
3444        }
3445        ///Returns a mutable reference to `json`.
3446        ///If the field is unset, it is first initialized with the default value.
3447        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3448            self.json.get_or_insert_default()
3449        }
3450        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3451        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3452            self.json.as_ref().map(|field| field as _)
3453        }
3454        ///Sets `json` with the provided value.
3455        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3456            self.json = Some(field.into().into());
3457        }
3458        ///Sets `json` with the provided value.
3459        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3460            self.set_json(field.into());
3461            self
3462        }
3463    }
3464    impl super::CommandResult {
3465        pub const fn const_default() -> Self {
3466            Self {
3467                return_values: Vec::new(),
3468                mutated_by_ref: Vec::new(),
3469            }
3470        }
3471        #[doc(hidden)]
3472        pub fn default_instance() -> &'static Self {
3473            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3474            &DEFAULT
3475        }
3476        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3477        pub fn return_values(&self) -> &[super::CommandOutput] {
3478            &self.return_values
3479        }
3480        ///Returns a mutable reference to `return_values`.
3481        ///If the field is unset, it is first initialized with the default value.
3482        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3483            &mut self.return_values
3484        }
3485        ///Sets `return_values` with the provided value.
3486        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3487            self.return_values = field;
3488        }
3489        ///Sets `return_values` with the provided value.
3490        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3491            self.set_return_values(field);
3492            self
3493        }
3494        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3495        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3496            &self.mutated_by_ref
3497        }
3498        ///Returns a mutable reference to `mutated_by_ref`.
3499        ///If the field is unset, it is first initialized with the default value.
3500        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3501            &mut self.mutated_by_ref
3502        }
3503        ///Sets `mutated_by_ref` with the provided value.
3504        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3505            self.mutated_by_ref = field;
3506        }
3507        ///Sets `mutated_by_ref` with the provided value.
3508        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3509            self.set_mutated_by_ref(field);
3510            self
3511        }
3512    }
3513    impl super::CongestedObjects {
3514        pub const fn const_default() -> Self {
3515            Self { objects: Vec::new() }
3516        }
3517        #[doc(hidden)]
3518        pub fn default_instance() -> &'static Self {
3519            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3520            &DEFAULT
3521        }
3522        ///Returns the value of `objects`, or the default value if `objects` is unset.
3523        pub fn objects(&self) -> &[String] {
3524            &self.objects
3525        }
3526        ///Returns a mutable reference to `objects`.
3527        ///If the field is unset, it is first initialized with the default value.
3528        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3529            &mut self.objects
3530        }
3531        ///Sets `objects` with the provided value.
3532        pub fn set_objects(&mut self, field: Vec<String>) {
3533            self.objects = field;
3534        }
3535        ///Sets `objects` with the provided value.
3536        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3537            self.set_objects(field);
3538            self
3539        }
3540    }
3541    impl super::ConsensusCommitPrologue {
3542        pub const fn const_default() -> Self {
3543            Self {
3544                epoch: None,
3545                round: None,
3546                commit_timestamp: None,
3547                consensus_commit_digest: None,
3548                sub_dag_index: None,
3549                consensus_determined_version_assignments: None,
3550                additional_state_digest: None,
3551            }
3552        }
3553        #[doc(hidden)]
3554        pub fn default_instance() -> &'static Self {
3555            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3556            &DEFAULT
3557        }
3558        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3559        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3560            self.epoch.as_mut().map(|field| field as _)
3561        }
3562        ///Returns a mutable reference to `epoch`.
3563        ///If the field is unset, it is first initialized with the default value.
3564        pub fn epoch_mut(&mut self) -> &mut u64 {
3565            self.epoch.get_or_insert_default()
3566        }
3567        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3568        pub fn epoch_opt(&self) -> Option<u64> {
3569            self.epoch.as_ref().map(|field| *field)
3570        }
3571        ///Sets `epoch` with the provided value.
3572        pub fn set_epoch(&mut self, field: u64) {
3573            self.epoch = Some(field);
3574        }
3575        ///Sets `epoch` with the provided value.
3576        pub fn with_epoch(mut self, field: u64) -> Self {
3577            self.set_epoch(field);
3578            self
3579        }
3580        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3581        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3582            self.round.as_mut().map(|field| field as _)
3583        }
3584        ///Returns a mutable reference to `round`.
3585        ///If the field is unset, it is first initialized with the default value.
3586        pub fn round_mut(&mut self) -> &mut u64 {
3587            self.round.get_or_insert_default()
3588        }
3589        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3590        pub fn round_opt(&self) -> Option<u64> {
3591            self.round.as_ref().map(|field| *field)
3592        }
3593        ///Sets `round` with the provided value.
3594        pub fn set_round(&mut self, field: u64) {
3595            self.round = Some(field);
3596        }
3597        ///Sets `round` with the provided value.
3598        pub fn with_round(mut self, field: u64) -> Self {
3599            self.set_round(field);
3600            self
3601        }
3602        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3603        pub fn commit_timestamp_opt_mut(
3604            &mut self,
3605        ) -> Option<&mut ::prost_types::Timestamp> {
3606            self.commit_timestamp.as_mut().map(|field| field as _)
3607        }
3608        ///Returns a mutable reference to `commit_timestamp`.
3609        ///If the field is unset, it is first initialized with the default value.
3610        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3611            self.commit_timestamp.get_or_insert_default()
3612        }
3613        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3614        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3615            self.commit_timestamp.as_ref().map(|field| field as _)
3616        }
3617        ///Sets `commit_timestamp` with the provided value.
3618        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3619            &mut self,
3620            field: T,
3621        ) {
3622            self.commit_timestamp = Some(field.into().into());
3623        }
3624        ///Sets `commit_timestamp` with the provided value.
3625        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3626            mut self,
3627            field: T,
3628        ) -> Self {
3629            self.set_commit_timestamp(field.into());
3630            self
3631        }
3632        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3633        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3634            self.consensus_commit_digest.as_mut().map(|field| field as _)
3635        }
3636        ///Returns a mutable reference to `consensus_commit_digest`.
3637        ///If the field is unset, it is first initialized with the default value.
3638        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3639            self.consensus_commit_digest.get_or_insert_default()
3640        }
3641        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3642        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3643            self.consensus_commit_digest.as_ref().map(|field| field as _)
3644        }
3645        ///Sets `consensus_commit_digest` with the provided value.
3646        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3647            self.consensus_commit_digest = Some(field.into().into());
3648        }
3649        ///Sets `consensus_commit_digest` with the provided value.
3650        pub fn with_consensus_commit_digest<T: Into<String>>(
3651            mut self,
3652            field: T,
3653        ) -> Self {
3654            self.set_consensus_commit_digest(field.into());
3655            self
3656        }
3657        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3658        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3659            self.sub_dag_index.as_mut().map(|field| field as _)
3660        }
3661        ///Returns a mutable reference to `sub_dag_index`.
3662        ///If the field is unset, it is first initialized with the default value.
3663        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3664            self.sub_dag_index.get_or_insert_default()
3665        }
3666        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3667        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3668            self.sub_dag_index.as_ref().map(|field| *field)
3669        }
3670        ///Sets `sub_dag_index` with the provided value.
3671        pub fn set_sub_dag_index(&mut self, field: u64) {
3672            self.sub_dag_index = Some(field);
3673        }
3674        ///Sets `sub_dag_index` with the provided value.
3675        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3676            self.set_sub_dag_index(field);
3677            self
3678        }
3679        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3680        pub fn consensus_determined_version_assignments(
3681            &self,
3682        ) -> &super::ConsensusDeterminedVersionAssignments {
3683            self.consensus_determined_version_assignments
3684                .as_ref()
3685                .map(|field| field as _)
3686                .unwrap_or_else(|| {
3687                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3688                })
3689        }
3690        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3691        pub fn consensus_determined_version_assignments_opt_mut(
3692            &mut self,
3693        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3694            self.consensus_determined_version_assignments
3695                .as_mut()
3696                .map(|field| field as _)
3697        }
3698        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3699        ///If the field is unset, it is first initialized with the default value.
3700        pub fn consensus_determined_version_assignments_mut(
3701            &mut self,
3702        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3703            self.consensus_determined_version_assignments.get_or_insert_default()
3704        }
3705        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3706        pub fn consensus_determined_version_assignments_opt(
3707            &self,
3708        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3709            self.consensus_determined_version_assignments
3710                .as_ref()
3711                .map(|field| field as _)
3712        }
3713        ///Sets `consensus_determined_version_assignments` with the provided value.
3714        pub fn set_consensus_determined_version_assignments<
3715            T: Into<super::ConsensusDeterminedVersionAssignments>,
3716        >(&mut self, field: T) {
3717            self.consensus_determined_version_assignments = Some(field.into().into());
3718        }
3719        ///Sets `consensus_determined_version_assignments` with the provided value.
3720        pub fn with_consensus_determined_version_assignments<
3721            T: Into<super::ConsensusDeterminedVersionAssignments>,
3722        >(mut self, field: T) -> Self {
3723            self.set_consensus_determined_version_assignments(field.into());
3724            self
3725        }
3726        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3727        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3728            self.additional_state_digest.as_mut().map(|field| field as _)
3729        }
3730        ///Returns a mutable reference to `additional_state_digest`.
3731        ///If the field is unset, it is first initialized with the default value.
3732        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3733            self.additional_state_digest.get_or_insert_default()
3734        }
3735        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3736        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3737            self.additional_state_digest.as_ref().map(|field| field as _)
3738        }
3739        ///Sets `additional_state_digest` with the provided value.
3740        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3741            self.additional_state_digest = Some(field.into().into());
3742        }
3743        ///Sets `additional_state_digest` with the provided value.
3744        pub fn with_additional_state_digest<T: Into<String>>(
3745            mut self,
3746            field: T,
3747        ) -> Self {
3748            self.set_additional_state_digest(field.into());
3749            self
3750        }
3751    }
3752    impl super::ConsensusDeterminedVersionAssignments {
3753        pub const fn const_default() -> Self {
3754            Self {
3755                version: None,
3756                canceled_transactions: Vec::new(),
3757            }
3758        }
3759        #[doc(hidden)]
3760        pub fn default_instance() -> &'static Self {
3761            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3762            &DEFAULT
3763        }
3764        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3765        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3766            self.version.as_mut().map(|field| field as _)
3767        }
3768        ///Returns a mutable reference to `version`.
3769        ///If the field is unset, it is first initialized with the default value.
3770        pub fn version_mut(&mut self) -> &mut i32 {
3771            self.version.get_or_insert_default()
3772        }
3773        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3774        pub fn version_opt(&self) -> Option<i32> {
3775            self.version.as_ref().map(|field| *field)
3776        }
3777        ///Sets `version` with the provided value.
3778        pub fn set_version(&mut self, field: i32) {
3779            self.version = Some(field);
3780        }
3781        ///Sets `version` with the provided value.
3782        pub fn with_version(mut self, field: i32) -> Self {
3783            self.set_version(field);
3784            self
3785        }
3786        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3787        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3788            &self.canceled_transactions
3789        }
3790        ///Returns a mutable reference to `canceled_transactions`.
3791        ///If the field is unset, it is first initialized with the default value.
3792        pub fn canceled_transactions_mut(
3793            &mut self,
3794        ) -> &mut Vec<super::CanceledTransaction> {
3795            &mut self.canceled_transactions
3796        }
3797        ///Sets `canceled_transactions` with the provided value.
3798        pub fn set_canceled_transactions(
3799            &mut self,
3800            field: Vec<super::CanceledTransaction>,
3801        ) {
3802            self.canceled_transactions = field;
3803        }
3804        ///Sets `canceled_transactions` with the provided value.
3805        pub fn with_canceled_transactions(
3806            mut self,
3807            field: Vec<super::CanceledTransaction>,
3808        ) -> Self {
3809            self.set_canceled_transactions(field);
3810            self
3811        }
3812    }
3813    impl super::DatatypeDescriptor {
3814        pub const fn const_default() -> Self {
3815            Self {
3816                type_name: None,
3817                defining_id: None,
3818                module: None,
3819                name: None,
3820                abilities: Vec::new(),
3821                type_parameters: Vec::new(),
3822                kind: None,
3823                fields: Vec::new(),
3824                variants: Vec::new(),
3825            }
3826        }
3827        #[doc(hidden)]
3828        pub fn default_instance() -> &'static Self {
3829            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3830            &DEFAULT
3831        }
3832        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3833        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3834            self.type_name.as_mut().map(|field| field as _)
3835        }
3836        ///Returns a mutable reference to `type_name`.
3837        ///If the field is unset, it is first initialized with the default value.
3838        pub fn type_name_mut(&mut self) -> &mut String {
3839            self.type_name.get_or_insert_default()
3840        }
3841        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3842        pub fn type_name_opt(&self) -> Option<&str> {
3843            self.type_name.as_ref().map(|field| field as _)
3844        }
3845        ///Sets `type_name` with the provided value.
3846        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3847            self.type_name = Some(field.into().into());
3848        }
3849        ///Sets `type_name` with the provided value.
3850        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3851            self.set_type_name(field.into());
3852            self
3853        }
3854        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3855        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3856            self.defining_id.as_mut().map(|field| field as _)
3857        }
3858        ///Returns a mutable reference to `defining_id`.
3859        ///If the field is unset, it is first initialized with the default value.
3860        pub fn defining_id_mut(&mut self) -> &mut String {
3861            self.defining_id.get_or_insert_default()
3862        }
3863        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3864        pub fn defining_id_opt(&self) -> Option<&str> {
3865            self.defining_id.as_ref().map(|field| field as _)
3866        }
3867        ///Sets `defining_id` with the provided value.
3868        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3869            self.defining_id = Some(field.into().into());
3870        }
3871        ///Sets `defining_id` with the provided value.
3872        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3873            self.set_defining_id(field.into());
3874            self
3875        }
3876        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3877        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3878            self.module.as_mut().map(|field| field as _)
3879        }
3880        ///Returns a mutable reference to `module`.
3881        ///If the field is unset, it is first initialized with the default value.
3882        pub fn module_mut(&mut self) -> &mut String {
3883            self.module.get_or_insert_default()
3884        }
3885        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3886        pub fn module_opt(&self) -> Option<&str> {
3887            self.module.as_ref().map(|field| field as _)
3888        }
3889        ///Sets `module` with the provided value.
3890        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3891            self.module = Some(field.into().into());
3892        }
3893        ///Sets `module` with the provided value.
3894        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3895            self.set_module(field.into());
3896            self
3897        }
3898        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3899        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3900            self.name.as_mut().map(|field| field as _)
3901        }
3902        ///Returns a mutable reference to `name`.
3903        ///If the field is unset, it is first initialized with the default value.
3904        pub fn name_mut(&mut self) -> &mut String {
3905            self.name.get_or_insert_default()
3906        }
3907        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3908        pub fn name_opt(&self) -> Option<&str> {
3909            self.name.as_ref().map(|field| field as _)
3910        }
3911        ///Sets `name` with the provided value.
3912        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3913            self.name = Some(field.into().into());
3914        }
3915        ///Sets `name` with the provided value.
3916        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3917            self.set_name(field.into());
3918            self
3919        }
3920        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3921        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3922            &self.type_parameters
3923        }
3924        ///Returns a mutable reference to `type_parameters`.
3925        ///If the field is unset, it is first initialized with the default value.
3926        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3927            &mut self.type_parameters
3928        }
3929        ///Sets `type_parameters` with the provided value.
3930        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3931            self.type_parameters = field;
3932        }
3933        ///Sets `type_parameters` with the provided value.
3934        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3935            self.set_type_parameters(field);
3936            self
3937        }
3938        ///Sets `kind` with the provided value.
3939        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3940            mut self,
3941            field: T,
3942        ) -> Self {
3943            self.set_kind(field.into());
3944            self
3945        }
3946        ///Returns the value of `fields`, or the default value if `fields` is unset.
3947        pub fn fields(&self) -> &[super::FieldDescriptor] {
3948            &self.fields
3949        }
3950        ///Returns a mutable reference to `fields`.
3951        ///If the field is unset, it is first initialized with the default value.
3952        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3953            &mut self.fields
3954        }
3955        ///Sets `fields` with the provided value.
3956        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3957            self.fields = field;
3958        }
3959        ///Sets `fields` with the provided value.
3960        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3961            self.set_fields(field);
3962            self
3963        }
3964        ///Returns the value of `variants`, or the default value if `variants` is unset.
3965        pub fn variants(&self) -> &[super::VariantDescriptor] {
3966            &self.variants
3967        }
3968        ///Returns a mutable reference to `variants`.
3969        ///If the field is unset, it is first initialized with the default value.
3970        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3971            &mut self.variants
3972        }
3973        ///Sets `variants` with the provided value.
3974        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3975            self.variants = field;
3976        }
3977        ///Sets `variants` with the provided value.
3978        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3979            self.set_variants(field);
3980            self
3981        }
3982    }
3983    impl super::DynamicField {
3984        pub const fn const_default() -> Self {
3985            Self {
3986                kind: None,
3987                parent: None,
3988                field_id: None,
3989                field_object: None,
3990                name: None,
3991                value: None,
3992                value_type: None,
3993                child_id: None,
3994                child_object: None,
3995            }
3996        }
3997        #[doc(hidden)]
3998        pub fn default_instance() -> &'static Self {
3999            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4000            &DEFAULT
4001        }
4002        ///Sets `kind` with the provided value.
4003        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4004            mut self,
4005            field: T,
4006        ) -> Self {
4007            self.set_kind(field.into());
4008            self
4009        }
4010        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4011        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4012            self.parent.as_mut().map(|field| field as _)
4013        }
4014        ///Returns a mutable reference to `parent`.
4015        ///If the field is unset, it is first initialized with the default value.
4016        pub fn parent_mut(&mut self) -> &mut String {
4017            self.parent.get_or_insert_default()
4018        }
4019        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
4020        pub fn parent_opt(&self) -> Option<&str> {
4021            self.parent.as_ref().map(|field| field as _)
4022        }
4023        ///Sets `parent` with the provided value.
4024        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4025            self.parent = Some(field.into().into());
4026        }
4027        ///Sets `parent` with the provided value.
4028        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4029            self.set_parent(field.into());
4030            self
4031        }
4032        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4033        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4034            self.field_id.as_mut().map(|field| field as _)
4035        }
4036        ///Returns a mutable reference to `field_id`.
4037        ///If the field is unset, it is first initialized with the default value.
4038        pub fn field_id_mut(&mut self) -> &mut String {
4039            self.field_id.get_or_insert_default()
4040        }
4041        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4042        pub fn field_id_opt(&self) -> Option<&str> {
4043            self.field_id.as_ref().map(|field| field as _)
4044        }
4045        ///Sets `field_id` with the provided value.
4046        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4047            self.field_id = Some(field.into().into());
4048        }
4049        ///Sets `field_id` with the provided value.
4050        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4051            self.set_field_id(field.into());
4052            self
4053        }
4054        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4055        pub fn field_object(&self) -> &super::Object {
4056            self.field_object
4057                .as_ref()
4058                .map(|field| field as _)
4059                .unwrap_or_else(|| super::Object::default_instance() as _)
4060        }
4061        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4062        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4063            self.field_object.as_mut().map(|field| field as _)
4064        }
4065        ///Returns a mutable reference to `field_object`.
4066        ///If the field is unset, it is first initialized with the default value.
4067        pub fn field_object_mut(&mut self) -> &mut super::Object {
4068            self.field_object.get_or_insert_default()
4069        }
4070        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4071        pub fn field_object_opt(&self) -> Option<&super::Object> {
4072            self.field_object.as_ref().map(|field| field as _)
4073        }
4074        ///Sets `field_object` with the provided value.
4075        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4076            self.field_object = Some(field.into().into());
4077        }
4078        ///Sets `field_object` with the provided value.
4079        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4080            self.set_field_object(field.into());
4081            self
4082        }
4083        ///Returns the value of `name`, or the default value if `name` is unset.
4084        pub fn name(&self) -> &super::Bcs {
4085            self.name
4086                .as_ref()
4087                .map(|field| field as _)
4088                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4089        }
4090        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4091        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4092            self.name.as_mut().map(|field| field as _)
4093        }
4094        ///Returns a mutable reference to `name`.
4095        ///If the field is unset, it is first initialized with the default value.
4096        pub fn name_mut(&mut self) -> &mut super::Bcs {
4097            self.name.get_or_insert_default()
4098        }
4099        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4100        pub fn name_opt(&self) -> Option<&super::Bcs> {
4101            self.name.as_ref().map(|field| field as _)
4102        }
4103        ///Sets `name` with the provided value.
4104        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4105            self.name = Some(field.into().into());
4106        }
4107        ///Sets `name` with the provided value.
4108        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4109            self.set_name(field.into());
4110            self
4111        }
4112        ///Returns the value of `value`, or the default value if `value` is unset.
4113        pub fn value(&self) -> &super::Bcs {
4114            self.value
4115                .as_ref()
4116                .map(|field| field as _)
4117                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4118        }
4119        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4120        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4121            self.value.as_mut().map(|field| field as _)
4122        }
4123        ///Returns a mutable reference to `value`.
4124        ///If the field is unset, it is first initialized with the default value.
4125        pub fn value_mut(&mut self) -> &mut super::Bcs {
4126            self.value.get_or_insert_default()
4127        }
4128        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4129        pub fn value_opt(&self) -> Option<&super::Bcs> {
4130            self.value.as_ref().map(|field| field as _)
4131        }
4132        ///Sets `value` with the provided value.
4133        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4134            self.value = Some(field.into().into());
4135        }
4136        ///Sets `value` with the provided value.
4137        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4138            self.set_value(field.into());
4139            self
4140        }
4141        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4142        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4143            self.value_type.as_mut().map(|field| field as _)
4144        }
4145        ///Returns a mutable reference to `value_type`.
4146        ///If the field is unset, it is first initialized with the default value.
4147        pub fn value_type_mut(&mut self) -> &mut String {
4148            self.value_type.get_or_insert_default()
4149        }
4150        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4151        pub fn value_type_opt(&self) -> Option<&str> {
4152            self.value_type.as_ref().map(|field| field as _)
4153        }
4154        ///Sets `value_type` with the provided value.
4155        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4156            self.value_type = Some(field.into().into());
4157        }
4158        ///Sets `value_type` with the provided value.
4159        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4160            self.set_value_type(field.into());
4161            self
4162        }
4163        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4164        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4165            self.child_id.as_mut().map(|field| field as _)
4166        }
4167        ///Returns a mutable reference to `child_id`.
4168        ///If the field is unset, it is first initialized with the default value.
4169        pub fn child_id_mut(&mut self) -> &mut String {
4170            self.child_id.get_or_insert_default()
4171        }
4172        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4173        pub fn child_id_opt(&self) -> Option<&str> {
4174            self.child_id.as_ref().map(|field| field as _)
4175        }
4176        ///Sets `child_id` with the provided value.
4177        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4178            self.child_id = Some(field.into().into());
4179        }
4180        ///Sets `child_id` with the provided value.
4181        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4182            self.set_child_id(field.into());
4183            self
4184        }
4185        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4186        pub fn child_object(&self) -> &super::Object {
4187            self.child_object
4188                .as_ref()
4189                .map(|field| field as _)
4190                .unwrap_or_else(|| super::Object::default_instance() as _)
4191        }
4192        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4193        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4194            self.child_object.as_mut().map(|field| field as _)
4195        }
4196        ///Returns a mutable reference to `child_object`.
4197        ///If the field is unset, it is first initialized with the default value.
4198        pub fn child_object_mut(&mut self) -> &mut super::Object {
4199            self.child_object.get_or_insert_default()
4200        }
4201        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4202        pub fn child_object_opt(&self) -> Option<&super::Object> {
4203            self.child_object.as_ref().map(|field| field as _)
4204        }
4205        ///Sets `child_object` with the provided value.
4206        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4207            self.child_object = Some(field.into().into());
4208        }
4209        ///Sets `child_object` with the provided value.
4210        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4211            self.set_child_object(field.into());
4212            self
4213        }
4214    }
4215    impl super::EndOfEpochData {
4216        pub const fn const_default() -> Self {
4217            Self {
4218                next_epoch_committee: Vec::new(),
4219                next_epoch_protocol_version: None,
4220                epoch_commitments: Vec::new(),
4221            }
4222        }
4223        #[doc(hidden)]
4224        pub fn default_instance() -> &'static Self {
4225            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4226            &DEFAULT
4227        }
4228        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4229        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4230            &self.next_epoch_committee
4231        }
4232        ///Returns a mutable reference to `next_epoch_committee`.
4233        ///If the field is unset, it is first initialized with the default value.
4234        pub fn next_epoch_committee_mut(
4235            &mut self,
4236        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4237            &mut self.next_epoch_committee
4238        }
4239        ///Sets `next_epoch_committee` with the provided value.
4240        pub fn set_next_epoch_committee(
4241            &mut self,
4242            field: Vec<super::ValidatorCommitteeMember>,
4243        ) {
4244            self.next_epoch_committee = field;
4245        }
4246        ///Sets `next_epoch_committee` with the provided value.
4247        pub fn with_next_epoch_committee(
4248            mut self,
4249            field: Vec<super::ValidatorCommitteeMember>,
4250        ) -> Self {
4251            self.set_next_epoch_committee(field);
4252            self
4253        }
4254        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4255        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4256            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4257        }
4258        ///Returns a mutable reference to `next_epoch_protocol_version`.
4259        ///If the field is unset, it is first initialized with the default value.
4260        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4261            self.next_epoch_protocol_version.get_or_insert_default()
4262        }
4263        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4264        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4265            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4266        }
4267        ///Sets `next_epoch_protocol_version` with the provided value.
4268        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4269            self.next_epoch_protocol_version = Some(field);
4270        }
4271        ///Sets `next_epoch_protocol_version` with the provided value.
4272        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4273            self.set_next_epoch_protocol_version(field);
4274            self
4275        }
4276        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4277        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4278            &self.epoch_commitments
4279        }
4280        ///Returns a mutable reference to `epoch_commitments`.
4281        ///If the field is unset, it is first initialized with the default value.
4282        pub fn epoch_commitments_mut(
4283            &mut self,
4284        ) -> &mut Vec<super::CheckpointCommitment> {
4285            &mut self.epoch_commitments
4286        }
4287        ///Sets `epoch_commitments` with the provided value.
4288        pub fn set_epoch_commitments(
4289            &mut self,
4290            field: Vec<super::CheckpointCommitment>,
4291        ) {
4292            self.epoch_commitments = field;
4293        }
4294        ///Sets `epoch_commitments` with the provided value.
4295        pub fn with_epoch_commitments(
4296            mut self,
4297            field: Vec<super::CheckpointCommitment>,
4298        ) -> Self {
4299            self.set_epoch_commitments(field);
4300            self
4301        }
4302    }
4303    impl super::EndOfEpochTransaction {
4304        pub const fn const_default() -> Self {
4305            Self { transactions: Vec::new() }
4306        }
4307        #[doc(hidden)]
4308        pub fn default_instance() -> &'static Self {
4309            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4310            &DEFAULT
4311        }
4312        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4313        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4314            &self.transactions
4315        }
4316        ///Returns a mutable reference to `transactions`.
4317        ///If the field is unset, it is first initialized with the default value.
4318        pub fn transactions_mut(
4319            &mut self,
4320        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4321            &mut self.transactions
4322        }
4323        ///Sets `transactions` with the provided value.
4324        pub fn set_transactions(
4325            &mut self,
4326            field: Vec<super::EndOfEpochTransactionKind>,
4327        ) {
4328            self.transactions = field;
4329        }
4330        ///Sets `transactions` with the provided value.
4331        pub fn with_transactions(
4332            mut self,
4333            field: Vec<super::EndOfEpochTransactionKind>,
4334        ) -> Self {
4335            self.set_transactions(field);
4336            self
4337        }
4338    }
4339    impl super::EndOfEpochTransactionKind {
4340        pub const fn const_default() -> Self {
4341            Self { kind: None, data: None }
4342        }
4343        #[doc(hidden)]
4344        pub fn default_instance() -> &'static Self {
4345            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4346            &DEFAULT
4347        }
4348        ///Sets `kind` with the provided value.
4349        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4350            mut self,
4351            field: T,
4352        ) -> Self {
4353            self.set_kind(field.into());
4354            self
4355        }
4356        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4357        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4358            if let Some(
4359                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4360            ) = &self.data
4361            {
4362                field as _
4363            } else {
4364                super::ChangeEpoch::default_instance() as _
4365            }
4366        }
4367        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4368        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4369            if let Some(
4370                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4371            ) = &self.data
4372            {
4373                Some(field as _)
4374            } else {
4375                None
4376            }
4377        }
4378        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4379        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4380            if let Some(
4381                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4382            ) = &mut self.data
4383            {
4384                Some(field as _)
4385            } else {
4386                None
4387            }
4388        }
4389        ///Returns a mutable reference to `change_epoch`.
4390        ///If the field is unset, it is first initialized with the default value.
4391        ///If any other oneof field in the same oneof is set, it will be cleared.
4392        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4393            if self.change_epoch_opt_mut().is_none() {
4394                self.data = Some(
4395                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4396                        super::ChangeEpoch::default(),
4397                    ),
4398                );
4399            }
4400            self.change_epoch_opt_mut().unwrap()
4401        }
4402        ///Sets `change_epoch` with the provided value.
4403        ///If any other oneof field in the same oneof is set, it will be cleared.
4404        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4405            self.data = Some(
4406                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4407                    field.into().into(),
4408                ),
4409            );
4410        }
4411        ///Sets `change_epoch` with the provided value.
4412        ///If any other oneof field in the same oneof is set, it will be cleared.
4413        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4414            mut self,
4415            field: T,
4416        ) -> Self {
4417            self.set_change_epoch(field.into());
4418            self
4419        }
4420        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4421        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4422            if let Some(
4423                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4424                    field,
4425                ),
4426            ) = &self.data
4427            {
4428                field as _
4429            } else {
4430                super::AuthenticatorStateExpire::default_instance() as _
4431            }
4432        }
4433        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4434        pub fn authenticator_state_expire_opt(
4435            &self,
4436        ) -> Option<&super::AuthenticatorStateExpire> {
4437            if let Some(
4438                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4439                    field,
4440                ),
4441            ) = &self.data
4442            {
4443                Some(field as _)
4444            } else {
4445                None
4446            }
4447        }
4448        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4449        pub fn authenticator_state_expire_opt_mut(
4450            &mut self,
4451        ) -> Option<&mut super::AuthenticatorStateExpire> {
4452            if let Some(
4453                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4454                    field,
4455                ),
4456            ) = &mut self.data
4457            {
4458                Some(field as _)
4459            } else {
4460                None
4461            }
4462        }
4463        ///Returns a mutable reference to `authenticator_state_expire`.
4464        ///If the field is unset, it is first initialized with the default value.
4465        ///If any other oneof field in the same oneof is set, it will be cleared.
4466        pub fn authenticator_state_expire_mut(
4467            &mut self,
4468        ) -> &mut super::AuthenticatorStateExpire {
4469            if self.authenticator_state_expire_opt_mut().is_none() {
4470                self.data = Some(
4471                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4472                        super::AuthenticatorStateExpire::default(),
4473                    ),
4474                );
4475            }
4476            self.authenticator_state_expire_opt_mut().unwrap()
4477        }
4478        ///Sets `authenticator_state_expire` with the provided value.
4479        ///If any other oneof field in the same oneof is set, it will be cleared.
4480        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4481            &mut self,
4482            field: T,
4483        ) {
4484            self.data = Some(
4485                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4486                    field.into().into(),
4487                ),
4488            );
4489        }
4490        ///Sets `authenticator_state_expire` with the provided value.
4491        ///If any other oneof field in the same oneof is set, it will be cleared.
4492        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4493            mut self,
4494            field: T,
4495        ) -> Self {
4496            self.set_authenticator_state_expire(field.into());
4497            self
4498        }
4499        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4500        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4501            if let Some(
4502                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4503                    field,
4504                ),
4505            ) = &self.data
4506            {
4507                field as _
4508            } else {
4509                super::ExecutionTimeObservations::default_instance() as _
4510            }
4511        }
4512        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4513        pub fn execution_time_observations_opt(
4514            &self,
4515        ) -> Option<&super::ExecutionTimeObservations> {
4516            if let Some(
4517                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4518                    field,
4519                ),
4520            ) = &self.data
4521            {
4522                Some(field as _)
4523            } else {
4524                None
4525            }
4526        }
4527        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4528        pub fn execution_time_observations_opt_mut(
4529            &mut self,
4530        ) -> Option<&mut super::ExecutionTimeObservations> {
4531            if let Some(
4532                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4533                    field,
4534                ),
4535            ) = &mut self.data
4536            {
4537                Some(field as _)
4538            } else {
4539                None
4540            }
4541        }
4542        ///Returns a mutable reference to `execution_time_observations`.
4543        ///If the field is unset, it is first initialized with the default value.
4544        ///If any other oneof field in the same oneof is set, it will be cleared.
4545        pub fn execution_time_observations_mut(
4546            &mut self,
4547        ) -> &mut super::ExecutionTimeObservations {
4548            if self.execution_time_observations_opt_mut().is_none() {
4549                self.data = Some(
4550                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4551                        super::ExecutionTimeObservations::default(),
4552                    ),
4553                );
4554            }
4555            self.execution_time_observations_opt_mut().unwrap()
4556        }
4557        ///Sets `execution_time_observations` with the provided value.
4558        ///If any other oneof field in the same oneof is set, it will be cleared.
4559        pub fn set_execution_time_observations<
4560            T: Into<super::ExecutionTimeObservations>,
4561        >(&mut self, field: T) {
4562            self.data = Some(
4563                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4564                    field.into().into(),
4565                ),
4566            );
4567        }
4568        ///Sets `execution_time_observations` with the provided value.
4569        ///If any other oneof field in the same oneof is set, it will be cleared.
4570        pub fn with_execution_time_observations<
4571            T: Into<super::ExecutionTimeObservations>,
4572        >(mut self, field: T) -> Self {
4573            self.set_execution_time_observations(field.into());
4574            self
4575        }
4576        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4577        pub fn bridge_chain_id(&self) -> &str {
4578            if let Some(
4579                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4580            ) = &self.data
4581            {
4582                field as _
4583            } else {
4584                ""
4585            }
4586        }
4587        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4588        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4589            if let Some(
4590                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4591            ) = &self.data
4592            {
4593                Some(field as _)
4594            } else {
4595                None
4596            }
4597        }
4598        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4599        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4600            if let Some(
4601                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4602            ) = &mut self.data
4603            {
4604                Some(field as _)
4605            } else {
4606                None
4607            }
4608        }
4609        ///Returns a mutable reference to `bridge_chain_id`.
4610        ///If the field is unset, it is first initialized with the default value.
4611        ///If any other oneof field in the same oneof is set, it will be cleared.
4612        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4613            if self.bridge_chain_id_opt_mut().is_none() {
4614                self.data = Some(
4615                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4616                        String::default(),
4617                    ),
4618                );
4619            }
4620            self.bridge_chain_id_opt_mut().unwrap()
4621        }
4622        ///Sets `bridge_chain_id` with the provided value.
4623        ///If any other oneof field in the same oneof is set, it will be cleared.
4624        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4625            self.data = Some(
4626                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4627                    field.into().into(),
4628                ),
4629            );
4630        }
4631        ///Sets `bridge_chain_id` with the provided value.
4632        ///If any other oneof field in the same oneof is set, it will be cleared.
4633        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4634            self.set_bridge_chain_id(field.into());
4635            self
4636        }
4637        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4638        pub fn bridge_object_version(&self) -> u64 {
4639            if let Some(
4640                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4641            ) = &self.data
4642            {
4643                *field
4644            } else {
4645                0u64
4646            }
4647        }
4648        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4649        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4650            if let Some(
4651                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4652            ) = &self.data
4653            {
4654                Some(*field)
4655            } else {
4656                None
4657            }
4658        }
4659        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4660        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4661            if let Some(
4662                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4663            ) = &mut self.data
4664            {
4665                Some(field as _)
4666            } else {
4667                None
4668            }
4669        }
4670        ///Returns a mutable reference to `bridge_object_version`.
4671        ///If the field is unset, it is first initialized with the default value.
4672        ///If any other oneof field in the same oneof is set, it will be cleared.
4673        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4674            if self.bridge_object_version_opt_mut().is_none() {
4675                self.data = Some(
4676                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4677                        u64::default(),
4678                    ),
4679                );
4680            }
4681            self.bridge_object_version_opt_mut().unwrap()
4682        }
4683        ///Sets `bridge_object_version` with the provided value.
4684        ///If any other oneof field in the same oneof is set, it will be cleared.
4685        pub fn set_bridge_object_version(&mut self, field: u64) {
4686            self.data = Some(
4687                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4688            );
4689        }
4690        ///Sets `bridge_object_version` with the provided value.
4691        ///If any other oneof field in the same oneof is set, it will be cleared.
4692        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4693            self.set_bridge_object_version(field);
4694            self
4695        }
4696    }
4697    impl super::Epoch {
4698        pub const fn const_default() -> Self {
4699            Self {
4700                epoch: None,
4701                committee: None,
4702                system_state: None,
4703                first_checkpoint: None,
4704                last_checkpoint: None,
4705                start: None,
4706                end: None,
4707                reference_gas_price: None,
4708                protocol_config: None,
4709            }
4710        }
4711        #[doc(hidden)]
4712        pub fn default_instance() -> &'static Self {
4713            static DEFAULT: super::Epoch = super::Epoch::const_default();
4714            &DEFAULT
4715        }
4716        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4717        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4718            self.epoch.as_mut().map(|field| field as _)
4719        }
4720        ///Returns a mutable reference to `epoch`.
4721        ///If the field is unset, it is first initialized with the default value.
4722        pub fn epoch_mut(&mut self) -> &mut u64 {
4723            self.epoch.get_or_insert_default()
4724        }
4725        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4726        pub fn epoch_opt(&self) -> Option<u64> {
4727            self.epoch.as_ref().map(|field| *field)
4728        }
4729        ///Sets `epoch` with the provided value.
4730        pub fn set_epoch(&mut self, field: u64) {
4731            self.epoch = Some(field);
4732        }
4733        ///Sets `epoch` with the provided value.
4734        pub fn with_epoch(mut self, field: u64) -> Self {
4735            self.set_epoch(field);
4736            self
4737        }
4738        ///Returns the value of `committee`, or the default value if `committee` is unset.
4739        pub fn committee(&self) -> &super::ValidatorCommittee {
4740            self.committee
4741                .as_ref()
4742                .map(|field| field as _)
4743                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4744        }
4745        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4746        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4747            self.committee.as_mut().map(|field| field as _)
4748        }
4749        ///Returns a mutable reference to `committee`.
4750        ///If the field is unset, it is first initialized with the default value.
4751        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4752            self.committee.get_or_insert_default()
4753        }
4754        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4755        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4756            self.committee.as_ref().map(|field| field as _)
4757        }
4758        ///Sets `committee` with the provided value.
4759        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4760            self.committee = Some(field.into().into());
4761        }
4762        ///Sets `committee` with the provided value.
4763        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4764            mut self,
4765            field: T,
4766        ) -> Self {
4767            self.set_committee(field.into());
4768            self
4769        }
4770        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4771        pub fn system_state(&self) -> &super::SystemState {
4772            self.system_state
4773                .as_ref()
4774                .map(|field| field as _)
4775                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4776        }
4777        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4778        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4779            self.system_state.as_mut().map(|field| field as _)
4780        }
4781        ///Returns a mutable reference to `system_state`.
4782        ///If the field is unset, it is first initialized with the default value.
4783        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4784            self.system_state.get_or_insert_default()
4785        }
4786        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4787        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4788            self.system_state.as_ref().map(|field| field as _)
4789        }
4790        ///Sets `system_state` with the provided value.
4791        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4792            self.system_state = Some(field.into().into());
4793        }
4794        ///Sets `system_state` with the provided value.
4795        pub fn with_system_state<T: Into<super::SystemState>>(
4796            mut self,
4797            field: T,
4798        ) -> Self {
4799            self.set_system_state(field.into());
4800            self
4801        }
4802        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4803        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4804            self.first_checkpoint.as_mut().map(|field| field as _)
4805        }
4806        ///Returns a mutable reference to `first_checkpoint`.
4807        ///If the field is unset, it is first initialized with the default value.
4808        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4809            self.first_checkpoint.get_or_insert_default()
4810        }
4811        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4812        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4813            self.first_checkpoint.as_ref().map(|field| *field)
4814        }
4815        ///Sets `first_checkpoint` with the provided value.
4816        pub fn set_first_checkpoint(&mut self, field: u64) {
4817            self.first_checkpoint = Some(field);
4818        }
4819        ///Sets `first_checkpoint` with the provided value.
4820        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4821            self.set_first_checkpoint(field);
4822            self
4823        }
4824        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4825        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4826            self.last_checkpoint.as_mut().map(|field| field as _)
4827        }
4828        ///Returns a mutable reference to `last_checkpoint`.
4829        ///If the field is unset, it is first initialized with the default value.
4830        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4831            self.last_checkpoint.get_or_insert_default()
4832        }
4833        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4834        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4835            self.last_checkpoint.as_ref().map(|field| *field)
4836        }
4837        ///Sets `last_checkpoint` with the provided value.
4838        pub fn set_last_checkpoint(&mut self, field: u64) {
4839            self.last_checkpoint = Some(field);
4840        }
4841        ///Sets `last_checkpoint` with the provided value.
4842        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4843            self.set_last_checkpoint(field);
4844            self
4845        }
4846        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4847        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4848            self.start.as_mut().map(|field| field as _)
4849        }
4850        ///Returns a mutable reference to `start`.
4851        ///If the field is unset, it is first initialized with the default value.
4852        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4853            self.start.get_or_insert_default()
4854        }
4855        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4856        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4857            self.start.as_ref().map(|field| field as _)
4858        }
4859        ///Sets `start` with the provided value.
4860        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4861            self.start = Some(field.into().into());
4862        }
4863        ///Sets `start` with the provided value.
4864        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4865            mut self,
4866            field: T,
4867        ) -> Self {
4868            self.set_start(field.into());
4869            self
4870        }
4871        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4872        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4873            self.end.as_mut().map(|field| field as _)
4874        }
4875        ///Returns a mutable reference to `end`.
4876        ///If the field is unset, it is first initialized with the default value.
4877        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4878            self.end.get_or_insert_default()
4879        }
4880        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4881        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4882            self.end.as_ref().map(|field| field as _)
4883        }
4884        ///Sets `end` with the provided value.
4885        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4886            self.end = Some(field.into().into());
4887        }
4888        ///Sets `end` with the provided value.
4889        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4890            self.set_end(field.into());
4891            self
4892        }
4893        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4894        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4895            self.reference_gas_price.as_mut().map(|field| field as _)
4896        }
4897        ///Returns a mutable reference to `reference_gas_price`.
4898        ///If the field is unset, it is first initialized with the default value.
4899        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4900            self.reference_gas_price.get_or_insert_default()
4901        }
4902        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
4903        pub fn reference_gas_price_opt(&self) -> Option<u64> {
4904            self.reference_gas_price.as_ref().map(|field| *field)
4905        }
4906        ///Sets `reference_gas_price` with the provided value.
4907        pub fn set_reference_gas_price(&mut self, field: u64) {
4908            self.reference_gas_price = Some(field);
4909        }
4910        ///Sets `reference_gas_price` with the provided value.
4911        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4912            self.set_reference_gas_price(field);
4913            self
4914        }
4915        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
4916        pub fn protocol_config(&self) -> &super::ProtocolConfig {
4917            self.protocol_config
4918                .as_ref()
4919                .map(|field| field as _)
4920                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4921        }
4922        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4923        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4924            self.protocol_config.as_mut().map(|field| field as _)
4925        }
4926        ///Returns a mutable reference to `protocol_config`.
4927        ///If the field is unset, it is first initialized with the default value.
4928        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4929            self.protocol_config.get_or_insert_default()
4930        }
4931        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
4932        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4933            self.protocol_config.as_ref().map(|field| field as _)
4934        }
4935        ///Sets `protocol_config` with the provided value.
4936        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4937            self.protocol_config = Some(field.into().into());
4938        }
4939        ///Sets `protocol_config` with the provided value.
4940        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4941            mut self,
4942            field: T,
4943        ) -> Self {
4944            self.set_protocol_config(field.into());
4945            self
4946        }
4947    }
4948    impl super::Event {
4949        pub const fn const_default() -> Self {
4950            Self {
4951                package_id: None,
4952                module: None,
4953                sender: None,
4954                event_type: None,
4955                contents: None,
4956                json: None,
4957            }
4958        }
4959        #[doc(hidden)]
4960        pub fn default_instance() -> &'static Self {
4961            static DEFAULT: super::Event = super::Event::const_default();
4962            &DEFAULT
4963        }
4964        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4965        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4966            self.package_id.as_mut().map(|field| field as _)
4967        }
4968        ///Returns a mutable reference to `package_id`.
4969        ///If the field is unset, it is first initialized with the default value.
4970        pub fn package_id_mut(&mut self) -> &mut String {
4971            self.package_id.get_or_insert_default()
4972        }
4973        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4974        pub fn package_id_opt(&self) -> Option<&str> {
4975            self.package_id.as_ref().map(|field| field as _)
4976        }
4977        ///Sets `package_id` with the provided value.
4978        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4979            self.package_id = Some(field.into().into());
4980        }
4981        ///Sets `package_id` with the provided value.
4982        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4983            self.set_package_id(field.into());
4984            self
4985        }
4986        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4987        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4988            self.module.as_mut().map(|field| field as _)
4989        }
4990        ///Returns a mutable reference to `module`.
4991        ///If the field is unset, it is first initialized with the default value.
4992        pub fn module_mut(&mut self) -> &mut String {
4993            self.module.get_or_insert_default()
4994        }
4995        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4996        pub fn module_opt(&self) -> Option<&str> {
4997            self.module.as_ref().map(|field| field as _)
4998        }
4999        ///Sets `module` with the provided value.
5000        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5001            self.module = Some(field.into().into());
5002        }
5003        ///Sets `module` with the provided value.
5004        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5005            self.set_module(field.into());
5006            self
5007        }
5008        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5009        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5010            self.sender.as_mut().map(|field| field as _)
5011        }
5012        ///Returns a mutable reference to `sender`.
5013        ///If the field is unset, it is first initialized with the default value.
5014        pub fn sender_mut(&mut self) -> &mut String {
5015            self.sender.get_or_insert_default()
5016        }
5017        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5018        pub fn sender_opt(&self) -> Option<&str> {
5019            self.sender.as_ref().map(|field| field as _)
5020        }
5021        ///Sets `sender` with the provided value.
5022        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5023            self.sender = Some(field.into().into());
5024        }
5025        ///Sets `sender` with the provided value.
5026        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5027            self.set_sender(field.into());
5028            self
5029        }
5030        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5031        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5032            self.event_type.as_mut().map(|field| field as _)
5033        }
5034        ///Returns a mutable reference to `event_type`.
5035        ///If the field is unset, it is first initialized with the default value.
5036        pub fn event_type_mut(&mut self) -> &mut String {
5037            self.event_type.get_or_insert_default()
5038        }
5039        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5040        pub fn event_type_opt(&self) -> Option<&str> {
5041            self.event_type.as_ref().map(|field| field as _)
5042        }
5043        ///Sets `event_type` with the provided value.
5044        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5045            self.event_type = Some(field.into().into());
5046        }
5047        ///Sets `event_type` with the provided value.
5048        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5049            self.set_event_type(field.into());
5050            self
5051        }
5052        ///Returns the value of `contents`, or the default value if `contents` is unset.
5053        pub fn contents(&self) -> &super::Bcs {
5054            self.contents
5055                .as_ref()
5056                .map(|field| field as _)
5057                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5058        }
5059        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5060        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5061            self.contents.as_mut().map(|field| field as _)
5062        }
5063        ///Returns a mutable reference to `contents`.
5064        ///If the field is unset, it is first initialized with the default value.
5065        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5066            self.contents.get_or_insert_default()
5067        }
5068        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5069        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5070            self.contents.as_ref().map(|field| field as _)
5071        }
5072        ///Sets `contents` with the provided value.
5073        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5074            self.contents = Some(field.into().into());
5075        }
5076        ///Sets `contents` with the provided value.
5077        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5078            self.set_contents(field.into());
5079            self
5080        }
5081        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5082        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5083            self.json.as_mut().map(|field| field as _)
5084        }
5085        ///Returns a mutable reference to `json`.
5086        ///If the field is unset, it is first initialized with the default value.
5087        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5088            self.json.get_or_insert_default()
5089        }
5090        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5091        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5092            self.json.as_ref().map(|field| field as _)
5093        }
5094        ///Sets `json` with the provided value.
5095        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5096            self.json = Some(field.into().into());
5097        }
5098        ///Sets `json` with the provided value.
5099        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5100            self.set_json(field.into());
5101            self
5102        }
5103    }
5104    impl super::ExecuteTransactionRequest {
5105        pub const fn const_default() -> Self {
5106            Self {
5107                transaction: None,
5108                signatures: Vec::new(),
5109                read_mask: None,
5110            }
5111        }
5112        #[doc(hidden)]
5113        pub fn default_instance() -> &'static Self {
5114            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5115            &DEFAULT
5116        }
5117        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5118        pub fn transaction(&self) -> &super::Transaction {
5119            self.transaction
5120                .as_ref()
5121                .map(|field| field as _)
5122                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5123        }
5124        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5125        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5126            self.transaction.as_mut().map(|field| field as _)
5127        }
5128        ///Returns a mutable reference to `transaction`.
5129        ///If the field is unset, it is first initialized with the default value.
5130        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5131            self.transaction.get_or_insert_default()
5132        }
5133        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5134        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5135            self.transaction.as_ref().map(|field| field as _)
5136        }
5137        ///Sets `transaction` with the provided value.
5138        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5139            self.transaction = Some(field.into().into());
5140        }
5141        ///Sets `transaction` with the provided value.
5142        pub fn with_transaction<T: Into<super::Transaction>>(
5143            mut self,
5144            field: T,
5145        ) -> Self {
5146            self.set_transaction(field.into());
5147            self
5148        }
5149        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5150        pub fn signatures(&self) -> &[super::UserSignature] {
5151            &self.signatures
5152        }
5153        ///Returns a mutable reference to `signatures`.
5154        ///If the field is unset, it is first initialized with the default value.
5155        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5156            &mut self.signatures
5157        }
5158        ///Sets `signatures` with the provided value.
5159        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5160            self.signatures = field;
5161        }
5162        ///Sets `signatures` with the provided value.
5163        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5164            self.set_signatures(field);
5165            self
5166        }
5167        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5168        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5169            self.read_mask.as_mut().map(|field| field as _)
5170        }
5171        ///Returns a mutable reference to `read_mask`.
5172        ///If the field is unset, it is first initialized with the default value.
5173        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5174            self.read_mask.get_or_insert_default()
5175        }
5176        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
5177        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5178            self.read_mask.as_ref().map(|field| field as _)
5179        }
5180        ///Sets `read_mask` with the provided value.
5181        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5182            self.read_mask = Some(field.into().into());
5183        }
5184        ///Sets `read_mask` with the provided value.
5185        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5186            mut self,
5187            field: T,
5188        ) -> Self {
5189            self.set_read_mask(field.into());
5190            self
5191        }
5192    }
5193    impl super::ExecuteTransactionResponse {
5194        pub const fn const_default() -> Self {
5195            Self { transaction: None }
5196        }
5197        #[doc(hidden)]
5198        pub fn default_instance() -> &'static Self {
5199            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5200            &DEFAULT
5201        }
5202        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5203        pub fn transaction(&self) -> &super::ExecutedTransaction {
5204            self.transaction
5205                .as_ref()
5206                .map(|field| field as _)
5207                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5208        }
5209        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5210        pub fn transaction_opt_mut(
5211            &mut self,
5212        ) -> Option<&mut super::ExecutedTransaction> {
5213            self.transaction.as_mut().map(|field| field as _)
5214        }
5215        ///Returns a mutable reference to `transaction`.
5216        ///If the field is unset, it is first initialized with the default value.
5217        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5218            self.transaction.get_or_insert_default()
5219        }
5220        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5221        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5222            self.transaction.as_ref().map(|field| field as _)
5223        }
5224        ///Sets `transaction` with the provided value.
5225        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5226            &mut self,
5227            field: T,
5228        ) {
5229            self.transaction = Some(field.into().into());
5230        }
5231        ///Sets `transaction` with the provided value.
5232        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5233            mut self,
5234            field: T,
5235        ) -> Self {
5236            self.set_transaction(field.into());
5237            self
5238        }
5239    }
5240    impl super::ExecutedTransaction {
5241        pub const fn const_default() -> Self {
5242            Self {
5243                digest: None,
5244                transaction: None,
5245                signatures: Vec::new(),
5246                effects: None,
5247                events: None,
5248                checkpoint: None,
5249                timestamp: None,
5250                balance_changes: Vec::new(),
5251                objects: None,
5252            }
5253        }
5254        #[doc(hidden)]
5255        pub fn default_instance() -> &'static Self {
5256            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5257            &DEFAULT
5258        }
5259        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5260        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5261            self.digest.as_mut().map(|field| field as _)
5262        }
5263        ///Returns a mutable reference to `digest`.
5264        ///If the field is unset, it is first initialized with the default value.
5265        pub fn digest_mut(&mut self) -> &mut String {
5266            self.digest.get_or_insert_default()
5267        }
5268        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5269        pub fn digest_opt(&self) -> Option<&str> {
5270            self.digest.as_ref().map(|field| field as _)
5271        }
5272        ///Sets `digest` with the provided value.
5273        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5274            self.digest = Some(field.into().into());
5275        }
5276        ///Sets `digest` with the provided value.
5277        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5278            self.set_digest(field.into());
5279            self
5280        }
5281        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5282        pub fn transaction(&self) -> &super::Transaction {
5283            self.transaction
5284                .as_ref()
5285                .map(|field| field as _)
5286                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5287        }
5288        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5289        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5290            self.transaction.as_mut().map(|field| field as _)
5291        }
5292        ///Returns a mutable reference to `transaction`.
5293        ///If the field is unset, it is first initialized with the default value.
5294        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5295            self.transaction.get_or_insert_default()
5296        }
5297        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5298        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5299            self.transaction.as_ref().map(|field| field as _)
5300        }
5301        ///Sets `transaction` with the provided value.
5302        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5303            self.transaction = Some(field.into().into());
5304        }
5305        ///Sets `transaction` with the provided value.
5306        pub fn with_transaction<T: Into<super::Transaction>>(
5307            mut self,
5308            field: T,
5309        ) -> Self {
5310            self.set_transaction(field.into());
5311            self
5312        }
5313        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5314        pub fn signatures(&self) -> &[super::UserSignature] {
5315            &self.signatures
5316        }
5317        ///Returns a mutable reference to `signatures`.
5318        ///If the field is unset, it is first initialized with the default value.
5319        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5320            &mut self.signatures
5321        }
5322        ///Sets `signatures` with the provided value.
5323        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5324            self.signatures = field;
5325        }
5326        ///Sets `signatures` with the provided value.
5327        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5328            self.set_signatures(field);
5329            self
5330        }
5331        ///Returns the value of `effects`, or the default value if `effects` is unset.
5332        pub fn effects(&self) -> &super::TransactionEffects {
5333            self.effects
5334                .as_ref()
5335                .map(|field| field as _)
5336                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5337        }
5338        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5339        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5340            self.effects.as_mut().map(|field| field as _)
5341        }
5342        ///Returns a mutable reference to `effects`.
5343        ///If the field is unset, it is first initialized with the default value.
5344        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5345            self.effects.get_or_insert_default()
5346        }
5347        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5348        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5349            self.effects.as_ref().map(|field| field as _)
5350        }
5351        ///Sets `effects` with the provided value.
5352        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5353            self.effects = Some(field.into().into());
5354        }
5355        ///Sets `effects` with the provided value.
5356        pub fn with_effects<T: Into<super::TransactionEffects>>(
5357            mut self,
5358            field: T,
5359        ) -> Self {
5360            self.set_effects(field.into());
5361            self
5362        }
5363        ///Returns the value of `events`, or the default value if `events` is unset.
5364        pub fn events(&self) -> &super::TransactionEvents {
5365            self.events
5366                .as_ref()
5367                .map(|field| field as _)
5368                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5369        }
5370        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5371        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5372            self.events.as_mut().map(|field| field as _)
5373        }
5374        ///Returns a mutable reference to `events`.
5375        ///If the field is unset, it is first initialized with the default value.
5376        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5377            self.events.get_or_insert_default()
5378        }
5379        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5380        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5381            self.events.as_ref().map(|field| field as _)
5382        }
5383        ///Sets `events` with the provided value.
5384        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5385            self.events = Some(field.into().into());
5386        }
5387        ///Sets `events` with the provided value.
5388        pub fn with_events<T: Into<super::TransactionEvents>>(
5389            mut self,
5390            field: T,
5391        ) -> Self {
5392            self.set_events(field.into());
5393            self
5394        }
5395        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5396        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5397            self.checkpoint.as_mut().map(|field| field as _)
5398        }
5399        ///Returns a mutable reference to `checkpoint`.
5400        ///If the field is unset, it is first initialized with the default value.
5401        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5402            self.checkpoint.get_or_insert_default()
5403        }
5404        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5405        pub fn checkpoint_opt(&self) -> Option<u64> {
5406            self.checkpoint.as_ref().map(|field| *field)
5407        }
5408        ///Sets `checkpoint` with the provided value.
5409        pub fn set_checkpoint(&mut self, field: u64) {
5410            self.checkpoint = Some(field);
5411        }
5412        ///Sets `checkpoint` with the provided value.
5413        pub fn with_checkpoint(mut self, field: u64) -> Self {
5414            self.set_checkpoint(field);
5415            self
5416        }
5417        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5418        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5419            self.timestamp.as_mut().map(|field| field as _)
5420        }
5421        ///Returns a mutable reference to `timestamp`.
5422        ///If the field is unset, it is first initialized with the default value.
5423        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5424            self.timestamp.get_or_insert_default()
5425        }
5426        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5427        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5428            self.timestamp.as_ref().map(|field| field as _)
5429        }
5430        ///Sets `timestamp` with the provided value.
5431        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5432            self.timestamp = Some(field.into().into());
5433        }
5434        ///Sets `timestamp` with the provided value.
5435        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5436            mut self,
5437            field: T,
5438        ) -> Self {
5439            self.set_timestamp(field.into());
5440            self
5441        }
5442        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5443        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5444            &self.balance_changes
5445        }
5446        ///Returns a mutable reference to `balance_changes`.
5447        ///If the field is unset, it is first initialized with the default value.
5448        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5449            &mut self.balance_changes
5450        }
5451        ///Sets `balance_changes` with the provided value.
5452        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5453            self.balance_changes = field;
5454        }
5455        ///Sets `balance_changes` with the provided value.
5456        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5457            self.set_balance_changes(field);
5458            self
5459        }
5460        ///Returns the value of `objects`, or the default value if `objects` is unset.
5461        pub fn objects(&self) -> &super::ObjectSet {
5462            self.objects
5463                .as_ref()
5464                .map(|field| field as _)
5465                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5466        }
5467        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5468        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5469            self.objects.as_mut().map(|field| field as _)
5470        }
5471        ///Returns a mutable reference to `objects`.
5472        ///If the field is unset, it is first initialized with the default value.
5473        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5474            self.objects.get_or_insert_default()
5475        }
5476        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5477        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5478            self.objects.as_ref().map(|field| field as _)
5479        }
5480        ///Sets `objects` with the provided value.
5481        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5482            self.objects = Some(field.into().into());
5483        }
5484        ///Sets `objects` with the provided value.
5485        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5486            self.set_objects(field.into());
5487            self
5488        }
5489    }
5490    impl super::ExecutionError {
5491        pub const fn const_default() -> Self {
5492            Self {
5493                description: None,
5494                command: None,
5495                kind: None,
5496                error_details: None,
5497            }
5498        }
5499        #[doc(hidden)]
5500        pub fn default_instance() -> &'static Self {
5501            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5502            &DEFAULT
5503        }
5504        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5505        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5506            self.description.as_mut().map(|field| field as _)
5507        }
5508        ///Returns a mutable reference to `description`.
5509        ///If the field is unset, it is first initialized with the default value.
5510        pub fn description_mut(&mut self) -> &mut String {
5511            self.description.get_or_insert_default()
5512        }
5513        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5514        pub fn description_opt(&self) -> Option<&str> {
5515            self.description.as_ref().map(|field| field as _)
5516        }
5517        ///Sets `description` with the provided value.
5518        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5519            self.description = Some(field.into().into());
5520        }
5521        ///Sets `description` with the provided value.
5522        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5523            self.set_description(field.into());
5524            self
5525        }
5526        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5527        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5528            self.command.as_mut().map(|field| field as _)
5529        }
5530        ///Returns a mutable reference to `command`.
5531        ///If the field is unset, it is first initialized with the default value.
5532        pub fn command_mut(&mut self) -> &mut u64 {
5533            self.command.get_or_insert_default()
5534        }
5535        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5536        pub fn command_opt(&self) -> Option<u64> {
5537            self.command.as_ref().map(|field| *field)
5538        }
5539        ///Sets `command` with the provided value.
5540        pub fn set_command(&mut self, field: u64) {
5541            self.command = Some(field);
5542        }
5543        ///Sets `command` with the provided value.
5544        pub fn with_command(mut self, field: u64) -> Self {
5545            self.set_command(field);
5546            self
5547        }
5548        ///Sets `kind` with the provided value.
5549        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5550            mut self,
5551            field: T,
5552        ) -> Self {
5553            self.set_kind(field.into());
5554            self
5555        }
5556        ///Returns the value of `abort`, or the default value if `abort` is unset.
5557        pub fn abort(&self) -> &super::MoveAbort {
5558            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5559                .error_details
5560            {
5561                field as _
5562            } else {
5563                super::MoveAbort::default_instance() as _
5564            }
5565        }
5566        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5567        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5568            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5569                .error_details
5570            {
5571                Some(field as _)
5572            } else {
5573                None
5574            }
5575        }
5576        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5577        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5578            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5579                .error_details
5580            {
5581                Some(field as _)
5582            } else {
5583                None
5584            }
5585        }
5586        ///Returns a mutable reference to `abort`.
5587        ///If the field is unset, it is first initialized with the default value.
5588        ///If any other oneof field in the same oneof is set, it will be cleared.
5589        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5590            if self.abort_opt_mut().is_none() {
5591                self.error_details = Some(
5592                    super::execution_error::ErrorDetails::Abort(
5593                        super::MoveAbort::default(),
5594                    ),
5595                );
5596            }
5597            self.abort_opt_mut().unwrap()
5598        }
5599        ///Sets `abort` with the provided value.
5600        ///If any other oneof field in the same oneof is set, it will be cleared.
5601        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5602            self.error_details = Some(
5603                super::execution_error::ErrorDetails::Abort(field.into().into()),
5604            );
5605        }
5606        ///Sets `abort` with the provided value.
5607        ///If any other oneof field in the same oneof is set, it will be cleared.
5608        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5609            self.set_abort(field.into());
5610            self
5611        }
5612        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5613        pub fn size_error(&self) -> &super::SizeError {
5614            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5615                .error_details
5616            {
5617                field as _
5618            } else {
5619                super::SizeError::default_instance() as _
5620            }
5621        }
5622        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5623        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5624            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5625                .error_details
5626            {
5627                Some(field as _)
5628            } else {
5629                None
5630            }
5631        }
5632        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5633        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5634            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5635                .error_details
5636            {
5637                Some(field as _)
5638            } else {
5639                None
5640            }
5641        }
5642        ///Returns a mutable reference to `size_error`.
5643        ///If the field is unset, it is first initialized with the default value.
5644        ///If any other oneof field in the same oneof is set, it will be cleared.
5645        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5646            if self.size_error_opt_mut().is_none() {
5647                self.error_details = Some(
5648                    super::execution_error::ErrorDetails::SizeError(
5649                        super::SizeError::default(),
5650                    ),
5651                );
5652            }
5653            self.size_error_opt_mut().unwrap()
5654        }
5655        ///Sets `size_error` with the provided value.
5656        ///If any other oneof field in the same oneof is set, it will be cleared.
5657        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5658            self.error_details = Some(
5659                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5660            );
5661        }
5662        ///Sets `size_error` with the provided value.
5663        ///If any other oneof field in the same oneof is set, it will be cleared.
5664        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5665            self.set_size_error(field.into());
5666            self
5667        }
5668        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5669        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5670            if let Some(
5671                super::execution_error::ErrorDetails::CommandArgumentError(field),
5672            ) = &self.error_details
5673            {
5674                field as _
5675            } else {
5676                super::CommandArgumentError::default_instance() as _
5677            }
5678        }
5679        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5680        pub fn command_argument_error_opt(
5681            &self,
5682        ) -> Option<&super::CommandArgumentError> {
5683            if let Some(
5684                super::execution_error::ErrorDetails::CommandArgumentError(field),
5685            ) = &self.error_details
5686            {
5687                Some(field as _)
5688            } else {
5689                None
5690            }
5691        }
5692        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5693        pub fn command_argument_error_opt_mut(
5694            &mut self,
5695        ) -> Option<&mut super::CommandArgumentError> {
5696            if let Some(
5697                super::execution_error::ErrorDetails::CommandArgumentError(field),
5698            ) = &mut self.error_details
5699            {
5700                Some(field as _)
5701            } else {
5702                None
5703            }
5704        }
5705        ///Returns a mutable reference to `command_argument_error`.
5706        ///If the field is unset, it is first initialized with the default value.
5707        ///If any other oneof field in the same oneof is set, it will be cleared.
5708        pub fn command_argument_error_mut(
5709            &mut self,
5710        ) -> &mut super::CommandArgumentError {
5711            if self.command_argument_error_opt_mut().is_none() {
5712                self.error_details = Some(
5713                    super::execution_error::ErrorDetails::CommandArgumentError(
5714                        super::CommandArgumentError::default(),
5715                    ),
5716                );
5717            }
5718            self.command_argument_error_opt_mut().unwrap()
5719        }
5720        ///Sets `command_argument_error` with the provided value.
5721        ///If any other oneof field in the same oneof is set, it will be cleared.
5722        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5723            &mut self,
5724            field: T,
5725        ) {
5726            self.error_details = Some(
5727                super::execution_error::ErrorDetails::CommandArgumentError(
5728                    field.into().into(),
5729                ),
5730            );
5731        }
5732        ///Sets `command_argument_error` with the provided value.
5733        ///If any other oneof field in the same oneof is set, it will be cleared.
5734        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5735            mut self,
5736            field: T,
5737        ) -> Self {
5738            self.set_command_argument_error(field.into());
5739            self
5740        }
5741        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5742        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5743            if let Some(
5744                super::execution_error::ErrorDetails::TypeArgumentError(field),
5745            ) = &self.error_details
5746            {
5747                field as _
5748            } else {
5749                super::TypeArgumentError::default_instance() as _
5750            }
5751        }
5752        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5753        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5754            if let Some(
5755                super::execution_error::ErrorDetails::TypeArgumentError(field),
5756            ) = &self.error_details
5757            {
5758                Some(field as _)
5759            } else {
5760                None
5761            }
5762        }
5763        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5764        pub fn type_argument_error_opt_mut(
5765            &mut self,
5766        ) -> Option<&mut super::TypeArgumentError> {
5767            if let Some(
5768                super::execution_error::ErrorDetails::TypeArgumentError(field),
5769            ) = &mut self.error_details
5770            {
5771                Some(field as _)
5772            } else {
5773                None
5774            }
5775        }
5776        ///Returns a mutable reference to `type_argument_error`.
5777        ///If the field is unset, it is first initialized with the default value.
5778        ///If any other oneof field in the same oneof is set, it will be cleared.
5779        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5780            if self.type_argument_error_opt_mut().is_none() {
5781                self.error_details = Some(
5782                    super::execution_error::ErrorDetails::TypeArgumentError(
5783                        super::TypeArgumentError::default(),
5784                    ),
5785                );
5786            }
5787            self.type_argument_error_opt_mut().unwrap()
5788        }
5789        ///Sets `type_argument_error` with the provided value.
5790        ///If any other oneof field in the same oneof is set, it will be cleared.
5791        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5792            &mut self,
5793            field: T,
5794        ) {
5795            self.error_details = Some(
5796                super::execution_error::ErrorDetails::TypeArgumentError(
5797                    field.into().into(),
5798                ),
5799            );
5800        }
5801        ///Sets `type_argument_error` with the provided value.
5802        ///If any other oneof field in the same oneof is set, it will be cleared.
5803        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5804            mut self,
5805            field: T,
5806        ) -> Self {
5807            self.set_type_argument_error(field.into());
5808            self
5809        }
5810        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5811        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5812            if let Some(
5813                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5814            ) = &self.error_details
5815            {
5816                field as _
5817            } else {
5818                super::PackageUpgradeError::default_instance() as _
5819            }
5820        }
5821        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5822        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5823            if let Some(
5824                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5825            ) = &self.error_details
5826            {
5827                Some(field as _)
5828            } else {
5829                None
5830            }
5831        }
5832        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5833        pub fn package_upgrade_error_opt_mut(
5834            &mut self,
5835        ) -> Option<&mut super::PackageUpgradeError> {
5836            if let Some(
5837                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5838            ) = &mut self.error_details
5839            {
5840                Some(field as _)
5841            } else {
5842                None
5843            }
5844        }
5845        ///Returns a mutable reference to `package_upgrade_error`.
5846        ///If the field is unset, it is first initialized with the default value.
5847        ///If any other oneof field in the same oneof is set, it will be cleared.
5848        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5849            if self.package_upgrade_error_opt_mut().is_none() {
5850                self.error_details = Some(
5851                    super::execution_error::ErrorDetails::PackageUpgradeError(
5852                        super::PackageUpgradeError::default(),
5853                    ),
5854                );
5855            }
5856            self.package_upgrade_error_opt_mut().unwrap()
5857        }
5858        ///Sets `package_upgrade_error` with the provided value.
5859        ///If any other oneof field in the same oneof is set, it will be cleared.
5860        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5861            &mut self,
5862            field: T,
5863        ) {
5864            self.error_details = Some(
5865                super::execution_error::ErrorDetails::PackageUpgradeError(
5866                    field.into().into(),
5867                ),
5868            );
5869        }
5870        ///Sets `package_upgrade_error` with the provided value.
5871        ///If any other oneof field in the same oneof is set, it will be cleared.
5872        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5873            mut self,
5874            field: T,
5875        ) -> Self {
5876            self.set_package_upgrade_error(field.into());
5877            self
5878        }
5879        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5880        pub fn index_error(&self) -> &super::IndexError {
5881            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5882                .error_details
5883            {
5884                field as _
5885            } else {
5886                super::IndexError::default_instance() as _
5887            }
5888        }
5889        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5890        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5891            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5892                .error_details
5893            {
5894                Some(field as _)
5895            } else {
5896                None
5897            }
5898        }
5899        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5900        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5901            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5902                .error_details
5903            {
5904                Some(field as _)
5905            } else {
5906                None
5907            }
5908        }
5909        ///Returns a mutable reference to `index_error`.
5910        ///If the field is unset, it is first initialized with the default value.
5911        ///If any other oneof field in the same oneof is set, it will be cleared.
5912        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5913            if self.index_error_opt_mut().is_none() {
5914                self.error_details = Some(
5915                    super::execution_error::ErrorDetails::IndexError(
5916                        super::IndexError::default(),
5917                    ),
5918                );
5919            }
5920            self.index_error_opt_mut().unwrap()
5921        }
5922        ///Sets `index_error` with the provided value.
5923        ///If any other oneof field in the same oneof is set, it will be cleared.
5924        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5925            self.error_details = Some(
5926                super::execution_error::ErrorDetails::IndexError(field.into().into()),
5927            );
5928        }
5929        ///Sets `index_error` with the provided value.
5930        ///If any other oneof field in the same oneof is set, it will be cleared.
5931        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5932            self.set_index_error(field.into());
5933            self
5934        }
5935        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
5936        pub fn object_id(&self) -> &str {
5937            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5938                .error_details
5939            {
5940                field as _
5941            } else {
5942                ""
5943            }
5944        }
5945        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5946        pub fn object_id_opt(&self) -> Option<&str> {
5947            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5948                .error_details
5949            {
5950                Some(field as _)
5951            } else {
5952                None
5953            }
5954        }
5955        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5956        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5957            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5958                .error_details
5959            {
5960                Some(field as _)
5961            } else {
5962                None
5963            }
5964        }
5965        ///Returns a mutable reference to `object_id`.
5966        ///If the field is unset, it is first initialized with the default value.
5967        ///If any other oneof field in the same oneof is set, it will be cleared.
5968        pub fn object_id_mut(&mut self) -> &mut String {
5969            if self.object_id_opt_mut().is_none() {
5970                self.error_details = Some(
5971                    super::execution_error::ErrorDetails::ObjectId(String::default()),
5972                );
5973            }
5974            self.object_id_opt_mut().unwrap()
5975        }
5976        ///Sets `object_id` with the provided value.
5977        ///If any other oneof field in the same oneof is set, it will be cleared.
5978        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5979            self.error_details = Some(
5980                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5981            );
5982        }
5983        ///Sets `object_id` with the provided value.
5984        ///If any other oneof field in the same oneof is set, it will be cleared.
5985        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5986            self.set_object_id(field.into());
5987            self
5988        }
5989        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
5990        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5991            if let Some(
5992                super::execution_error::ErrorDetails::CoinDenyListError(field),
5993            ) = &self.error_details
5994            {
5995                field as _
5996            } else {
5997                super::CoinDenyListError::default_instance() as _
5998            }
5999        }
6000        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6001        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6002            if let Some(
6003                super::execution_error::ErrorDetails::CoinDenyListError(field),
6004            ) = &self.error_details
6005            {
6006                Some(field as _)
6007            } else {
6008                None
6009            }
6010        }
6011        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6012        pub fn coin_deny_list_error_opt_mut(
6013            &mut self,
6014        ) -> Option<&mut super::CoinDenyListError> {
6015            if let Some(
6016                super::execution_error::ErrorDetails::CoinDenyListError(field),
6017            ) = &mut self.error_details
6018            {
6019                Some(field as _)
6020            } else {
6021                None
6022            }
6023        }
6024        ///Returns a mutable reference to `coin_deny_list_error`.
6025        ///If the field is unset, it is first initialized with the default value.
6026        ///If any other oneof field in the same oneof is set, it will be cleared.
6027        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6028            if self.coin_deny_list_error_opt_mut().is_none() {
6029                self.error_details = Some(
6030                    super::execution_error::ErrorDetails::CoinDenyListError(
6031                        super::CoinDenyListError::default(),
6032                    ),
6033                );
6034            }
6035            self.coin_deny_list_error_opt_mut().unwrap()
6036        }
6037        ///Sets `coin_deny_list_error` with the provided value.
6038        ///If any other oneof field in the same oneof is set, it will be cleared.
6039        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6040            &mut self,
6041            field: T,
6042        ) {
6043            self.error_details = Some(
6044                super::execution_error::ErrorDetails::CoinDenyListError(
6045                    field.into().into(),
6046                ),
6047            );
6048        }
6049        ///Sets `coin_deny_list_error` with the provided value.
6050        ///If any other oneof field in the same oneof is set, it will be cleared.
6051        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6052            mut self,
6053            field: T,
6054        ) -> Self {
6055            self.set_coin_deny_list_error(field.into());
6056            self
6057        }
6058        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6059        pub fn congested_objects(&self) -> &super::CongestedObjects {
6060            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6061                .error_details
6062            {
6063                field as _
6064            } else {
6065                super::CongestedObjects::default_instance() as _
6066            }
6067        }
6068        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6069        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6070            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6071                .error_details
6072            {
6073                Some(field as _)
6074            } else {
6075                None
6076            }
6077        }
6078        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6079        pub fn congested_objects_opt_mut(
6080            &mut self,
6081        ) -> Option<&mut super::CongestedObjects> {
6082            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6083                .error_details
6084            {
6085                Some(field as _)
6086            } else {
6087                None
6088            }
6089        }
6090        ///Returns a mutable reference to `congested_objects`.
6091        ///If the field is unset, it is first initialized with the default value.
6092        ///If any other oneof field in the same oneof is set, it will be cleared.
6093        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6094            if self.congested_objects_opt_mut().is_none() {
6095                self.error_details = Some(
6096                    super::execution_error::ErrorDetails::CongestedObjects(
6097                        super::CongestedObjects::default(),
6098                    ),
6099                );
6100            }
6101            self.congested_objects_opt_mut().unwrap()
6102        }
6103        ///Sets `congested_objects` with the provided value.
6104        ///If any other oneof field in the same oneof is set, it will be cleared.
6105        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6106            &mut self,
6107            field: T,
6108        ) {
6109            self.error_details = Some(
6110                super::execution_error::ErrorDetails::CongestedObjects(
6111                    field.into().into(),
6112                ),
6113            );
6114        }
6115        ///Sets `congested_objects` with the provided value.
6116        ///If any other oneof field in the same oneof is set, it will be cleared.
6117        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6118            mut self,
6119            field: T,
6120        ) -> Self {
6121            self.set_congested_objects(field.into());
6122            self
6123        }
6124    }
6125    impl super::ExecutionStatus {
6126        pub const fn const_default() -> Self {
6127            Self { success: None, error: None }
6128        }
6129        #[doc(hidden)]
6130        pub fn default_instance() -> &'static Self {
6131            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6132            &DEFAULT
6133        }
6134        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6135        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6136            self.success.as_mut().map(|field| field as _)
6137        }
6138        ///Returns a mutable reference to `success`.
6139        ///If the field is unset, it is first initialized with the default value.
6140        pub fn success_mut(&mut self) -> &mut bool {
6141            self.success.get_or_insert_default()
6142        }
6143        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
6144        pub fn success_opt(&self) -> Option<bool> {
6145            self.success.as_ref().map(|field| *field)
6146        }
6147        ///Sets `success` with the provided value.
6148        pub fn set_success(&mut self, field: bool) {
6149            self.success = Some(field);
6150        }
6151        ///Sets `success` with the provided value.
6152        pub fn with_success(mut self, field: bool) -> Self {
6153            self.set_success(field);
6154            self
6155        }
6156        ///Returns the value of `error`, or the default value if `error` is unset.
6157        pub fn error(&self) -> &super::ExecutionError {
6158            self.error
6159                .as_ref()
6160                .map(|field| field as _)
6161                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6162        }
6163        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6164        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6165            self.error.as_mut().map(|field| field as _)
6166        }
6167        ///Returns a mutable reference to `error`.
6168        ///If the field is unset, it is first initialized with the default value.
6169        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6170            self.error.get_or_insert_default()
6171        }
6172        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6173        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6174            self.error.as_ref().map(|field| field as _)
6175        }
6176        ///Sets `error` with the provided value.
6177        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6178            self.error = Some(field.into().into());
6179        }
6180        ///Sets `error` with the provided value.
6181        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6182            self.set_error(field.into());
6183            self
6184        }
6185    }
6186    impl super::ExecutionTimeObservation {
6187        pub const fn const_default() -> Self {
6188            Self {
6189                kind: None,
6190                move_entry_point: None,
6191                validator_observations: Vec::new(),
6192            }
6193        }
6194        #[doc(hidden)]
6195        pub fn default_instance() -> &'static Self {
6196            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6197            &DEFAULT
6198        }
6199        ///Sets `kind` with the provided value.
6200        pub fn with_kind<
6201            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6202        >(mut self, field: T) -> Self {
6203            self.set_kind(field.into());
6204            self
6205        }
6206        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
6207        pub fn move_entry_point(&self) -> &super::MoveCall {
6208            self.move_entry_point
6209                .as_ref()
6210                .map(|field| field as _)
6211                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6212        }
6213        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6214        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6215            self.move_entry_point.as_mut().map(|field| field as _)
6216        }
6217        ///Returns a mutable reference to `move_entry_point`.
6218        ///If the field is unset, it is first initialized with the default value.
6219        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6220            self.move_entry_point.get_or_insert_default()
6221        }
6222        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
6223        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6224            self.move_entry_point.as_ref().map(|field| field as _)
6225        }
6226        ///Sets `move_entry_point` with the provided value.
6227        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6228            self.move_entry_point = Some(field.into().into());
6229        }
6230        ///Sets `move_entry_point` with the provided value.
6231        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6232            mut self,
6233            field: T,
6234        ) -> Self {
6235            self.set_move_entry_point(field.into());
6236            self
6237        }
6238        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6239        pub fn validator_observations(
6240            &self,
6241        ) -> &[super::ValidatorExecutionTimeObservation] {
6242            &self.validator_observations
6243        }
6244        ///Returns a mutable reference to `validator_observations`.
6245        ///If the field is unset, it is first initialized with the default value.
6246        pub fn validator_observations_mut(
6247            &mut self,
6248        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6249            &mut self.validator_observations
6250        }
6251        ///Sets `validator_observations` with the provided value.
6252        pub fn set_validator_observations(
6253            &mut self,
6254            field: Vec<super::ValidatorExecutionTimeObservation>,
6255        ) {
6256            self.validator_observations = field;
6257        }
6258        ///Sets `validator_observations` with the provided value.
6259        pub fn with_validator_observations(
6260            mut self,
6261            field: Vec<super::ValidatorExecutionTimeObservation>,
6262        ) -> Self {
6263            self.set_validator_observations(field);
6264            self
6265        }
6266    }
6267    impl super::ExecutionTimeObservations {
6268        pub const fn const_default() -> Self {
6269            Self {
6270                version: None,
6271                observations: Vec::new(),
6272            }
6273        }
6274        #[doc(hidden)]
6275        pub fn default_instance() -> &'static Self {
6276            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6277            &DEFAULT
6278        }
6279        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6280        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6281            self.version.as_mut().map(|field| field as _)
6282        }
6283        ///Returns a mutable reference to `version`.
6284        ///If the field is unset, it is first initialized with the default value.
6285        pub fn version_mut(&mut self) -> &mut i32 {
6286            self.version.get_or_insert_default()
6287        }
6288        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6289        pub fn version_opt(&self) -> Option<i32> {
6290            self.version.as_ref().map(|field| *field)
6291        }
6292        ///Sets `version` with the provided value.
6293        pub fn set_version(&mut self, field: i32) {
6294            self.version = Some(field);
6295        }
6296        ///Sets `version` with the provided value.
6297        pub fn with_version(mut self, field: i32) -> Self {
6298            self.set_version(field);
6299            self
6300        }
6301        ///Returns the value of `observations`, or the default value if `observations` is unset.
6302        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6303            &self.observations
6304        }
6305        ///Returns a mutable reference to `observations`.
6306        ///If the field is unset, it is first initialized with the default value.
6307        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6308            &mut self.observations
6309        }
6310        ///Sets `observations` with the provided value.
6311        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6312            self.observations = field;
6313        }
6314        ///Sets `observations` with the provided value.
6315        pub fn with_observations(
6316            mut self,
6317            field: Vec<super::ExecutionTimeObservation>,
6318        ) -> Self {
6319            self.set_observations(field);
6320            self
6321        }
6322    }
6323    impl super::FieldDescriptor {
6324        pub const fn const_default() -> Self {
6325            Self {
6326                name: None,
6327                position: None,
6328                r#type: None,
6329            }
6330        }
6331        #[doc(hidden)]
6332        pub fn default_instance() -> &'static Self {
6333            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6334            &DEFAULT
6335        }
6336        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6337        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6338            self.name.as_mut().map(|field| field as _)
6339        }
6340        ///Returns a mutable reference to `name`.
6341        ///If the field is unset, it is first initialized with the default value.
6342        pub fn name_mut(&mut self) -> &mut String {
6343            self.name.get_or_insert_default()
6344        }
6345        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6346        pub fn name_opt(&self) -> Option<&str> {
6347            self.name.as_ref().map(|field| field as _)
6348        }
6349        ///Sets `name` with the provided value.
6350        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6351            self.name = Some(field.into().into());
6352        }
6353        ///Sets `name` with the provided value.
6354        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6355            self.set_name(field.into());
6356            self
6357        }
6358        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6359        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6360            self.position.as_mut().map(|field| field as _)
6361        }
6362        ///Returns a mutable reference to `position`.
6363        ///If the field is unset, it is first initialized with the default value.
6364        pub fn position_mut(&mut self) -> &mut u32 {
6365            self.position.get_or_insert_default()
6366        }
6367        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6368        pub fn position_opt(&self) -> Option<u32> {
6369            self.position.as_ref().map(|field| *field)
6370        }
6371        ///Sets `position` with the provided value.
6372        pub fn set_position(&mut self, field: u32) {
6373            self.position = Some(field);
6374        }
6375        ///Sets `position` with the provided value.
6376        pub fn with_position(mut self, field: u32) -> Self {
6377            self.set_position(field);
6378            self
6379        }
6380        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6381        pub fn r#type(&self) -> &super::OpenSignatureBody {
6382            self.r#type
6383                .as_ref()
6384                .map(|field| field as _)
6385                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6386        }
6387        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6388        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6389            self.r#type.as_mut().map(|field| field as _)
6390        }
6391        ///Returns a mutable reference to `r#type`.
6392        ///If the field is unset, it is first initialized with the default value.
6393        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6394            self.r#type.get_or_insert_default()
6395        }
6396        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6397        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6398            self.r#type.as_ref().map(|field| field as _)
6399        }
6400        ///Sets `r#type` with the provided value.
6401        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6402            self.r#type = Some(field.into().into());
6403        }
6404        ///Sets `r#type` with the provided value.
6405        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6406            self.set_type(field.into());
6407            self
6408        }
6409    }
6410    impl super::FunctionDescriptor {
6411        pub const fn const_default() -> Self {
6412            Self {
6413                name: None,
6414                visibility: None,
6415                is_entry: None,
6416                type_parameters: Vec::new(),
6417                parameters: Vec::new(),
6418                returns: Vec::new(),
6419            }
6420        }
6421        #[doc(hidden)]
6422        pub fn default_instance() -> &'static Self {
6423            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6424            &DEFAULT
6425        }
6426        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6427        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6428            self.name.as_mut().map(|field| field as _)
6429        }
6430        ///Returns a mutable reference to `name`.
6431        ///If the field is unset, it is first initialized with the default value.
6432        pub fn name_mut(&mut self) -> &mut String {
6433            self.name.get_or_insert_default()
6434        }
6435        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6436        pub fn name_opt(&self) -> Option<&str> {
6437            self.name.as_ref().map(|field| field as _)
6438        }
6439        ///Sets `name` with the provided value.
6440        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6441            self.name = Some(field.into().into());
6442        }
6443        ///Sets `name` with the provided value.
6444        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6445            self.set_name(field.into());
6446            self
6447        }
6448        ///Sets `visibility` with the provided value.
6449        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6450            mut self,
6451            field: T,
6452        ) -> Self {
6453            self.set_visibility(field.into());
6454            self
6455        }
6456        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6457        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6458            self.is_entry.as_mut().map(|field| field as _)
6459        }
6460        ///Returns a mutable reference to `is_entry`.
6461        ///If the field is unset, it is first initialized with the default value.
6462        pub fn is_entry_mut(&mut self) -> &mut bool {
6463            self.is_entry.get_or_insert_default()
6464        }
6465        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6466        pub fn is_entry_opt(&self) -> Option<bool> {
6467            self.is_entry.as_ref().map(|field| *field)
6468        }
6469        ///Sets `is_entry` with the provided value.
6470        pub fn set_is_entry(&mut self, field: bool) {
6471            self.is_entry = Some(field);
6472        }
6473        ///Sets `is_entry` with the provided value.
6474        pub fn with_is_entry(mut self, field: bool) -> Self {
6475            self.set_is_entry(field);
6476            self
6477        }
6478        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6479        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6480            &self.type_parameters
6481        }
6482        ///Returns a mutable reference to `type_parameters`.
6483        ///If the field is unset, it is first initialized with the default value.
6484        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6485            &mut self.type_parameters
6486        }
6487        ///Sets `type_parameters` with the provided value.
6488        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6489            self.type_parameters = field;
6490        }
6491        ///Sets `type_parameters` with the provided value.
6492        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6493            self.set_type_parameters(field);
6494            self
6495        }
6496        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6497        pub fn parameters(&self) -> &[super::OpenSignature] {
6498            &self.parameters
6499        }
6500        ///Returns a mutable reference to `parameters`.
6501        ///If the field is unset, it is first initialized with the default value.
6502        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6503            &mut self.parameters
6504        }
6505        ///Sets `parameters` with the provided value.
6506        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6507            self.parameters = field;
6508        }
6509        ///Sets `parameters` with the provided value.
6510        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6511            self.set_parameters(field);
6512            self
6513        }
6514        ///Returns the value of `returns`, or the default value if `returns` is unset.
6515        pub fn returns(&self) -> &[super::OpenSignature] {
6516            &self.returns
6517        }
6518        ///Returns a mutable reference to `returns`.
6519        ///If the field is unset, it is first initialized with the default value.
6520        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6521            &mut self.returns
6522        }
6523        ///Sets `returns` with the provided value.
6524        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6525            self.returns = field;
6526        }
6527        ///Sets `returns` with the provided value.
6528        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6529            self.set_returns(field);
6530            self
6531        }
6532    }
6533    impl super::FundsWithdrawal {
6534        pub const fn const_default() -> Self {
6535            Self {
6536                amount: None,
6537                coin_type: None,
6538                source: None,
6539            }
6540        }
6541        #[doc(hidden)]
6542        pub fn default_instance() -> &'static Self {
6543            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6544            &DEFAULT
6545        }
6546        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6547        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6548            self.amount.as_mut().map(|field| field as _)
6549        }
6550        ///Returns a mutable reference to `amount`.
6551        ///If the field is unset, it is first initialized with the default value.
6552        pub fn amount_mut(&mut self) -> &mut u64 {
6553            self.amount.get_or_insert_default()
6554        }
6555        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
6556        pub fn amount_opt(&self) -> Option<u64> {
6557            self.amount.as_ref().map(|field| *field)
6558        }
6559        ///Sets `amount` with the provided value.
6560        pub fn set_amount(&mut self, field: u64) {
6561            self.amount = Some(field);
6562        }
6563        ///Sets `amount` with the provided value.
6564        pub fn with_amount(mut self, field: u64) -> Self {
6565            self.set_amount(field);
6566            self
6567        }
6568        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6569        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6570            self.coin_type.as_mut().map(|field| field as _)
6571        }
6572        ///Returns a mutable reference to `coin_type`.
6573        ///If the field is unset, it is first initialized with the default value.
6574        pub fn coin_type_mut(&mut self) -> &mut String {
6575            self.coin_type.get_or_insert_default()
6576        }
6577        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6578        pub fn coin_type_opt(&self) -> Option<&str> {
6579            self.coin_type.as_ref().map(|field| field as _)
6580        }
6581        ///Sets `coin_type` with the provided value.
6582        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6583            self.coin_type = Some(field.into().into());
6584        }
6585        ///Sets `coin_type` with the provided value.
6586        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6587            self.set_coin_type(field.into());
6588            self
6589        }
6590        ///Sets `source` with the provided value.
6591        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6592            mut self,
6593            field: T,
6594        ) -> Self {
6595            self.set_source(field.into());
6596            self
6597        }
6598    }
6599    impl super::GasCostSummary {
6600        pub const fn const_default() -> Self {
6601            Self {
6602                computation_cost: None,
6603                storage_cost: None,
6604                storage_rebate: None,
6605                non_refundable_storage_fee: None,
6606            }
6607        }
6608        #[doc(hidden)]
6609        pub fn default_instance() -> &'static Self {
6610            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6611            &DEFAULT
6612        }
6613        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6614        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6615            self.computation_cost.as_mut().map(|field| field as _)
6616        }
6617        ///Returns a mutable reference to `computation_cost`.
6618        ///If the field is unset, it is first initialized with the default value.
6619        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6620            self.computation_cost.get_or_insert_default()
6621        }
6622        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6623        pub fn computation_cost_opt(&self) -> Option<u64> {
6624            self.computation_cost.as_ref().map(|field| *field)
6625        }
6626        ///Sets `computation_cost` with the provided value.
6627        pub fn set_computation_cost(&mut self, field: u64) {
6628            self.computation_cost = Some(field);
6629        }
6630        ///Sets `computation_cost` with the provided value.
6631        pub fn with_computation_cost(mut self, field: u64) -> Self {
6632            self.set_computation_cost(field);
6633            self
6634        }
6635        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6636        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6637            self.storage_cost.as_mut().map(|field| field as _)
6638        }
6639        ///Returns a mutable reference to `storage_cost`.
6640        ///If the field is unset, it is first initialized with the default value.
6641        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6642            self.storage_cost.get_or_insert_default()
6643        }
6644        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6645        pub fn storage_cost_opt(&self) -> Option<u64> {
6646            self.storage_cost.as_ref().map(|field| *field)
6647        }
6648        ///Sets `storage_cost` with the provided value.
6649        pub fn set_storage_cost(&mut self, field: u64) {
6650            self.storage_cost = Some(field);
6651        }
6652        ///Sets `storage_cost` with the provided value.
6653        pub fn with_storage_cost(mut self, field: u64) -> Self {
6654            self.set_storage_cost(field);
6655            self
6656        }
6657        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6658        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6659            self.storage_rebate.as_mut().map(|field| field as _)
6660        }
6661        ///Returns a mutable reference to `storage_rebate`.
6662        ///If the field is unset, it is first initialized with the default value.
6663        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6664            self.storage_rebate.get_or_insert_default()
6665        }
6666        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6667        pub fn storage_rebate_opt(&self) -> Option<u64> {
6668            self.storage_rebate.as_ref().map(|field| *field)
6669        }
6670        ///Sets `storage_rebate` with the provided value.
6671        pub fn set_storage_rebate(&mut self, field: u64) {
6672            self.storage_rebate = Some(field);
6673        }
6674        ///Sets `storage_rebate` with the provided value.
6675        pub fn with_storage_rebate(mut self, field: u64) -> Self {
6676            self.set_storage_rebate(field);
6677            self
6678        }
6679        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6680        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6681            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6682        }
6683        ///Returns a mutable reference to `non_refundable_storage_fee`.
6684        ///If the field is unset, it is first initialized with the default value.
6685        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6686            self.non_refundable_storage_fee.get_or_insert_default()
6687        }
6688        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6689        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6690            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6691        }
6692        ///Sets `non_refundable_storage_fee` with the provided value.
6693        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6694            self.non_refundable_storage_fee = Some(field);
6695        }
6696        ///Sets `non_refundable_storage_fee` with the provided value.
6697        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6698            self.set_non_refundable_storage_fee(field);
6699            self
6700        }
6701    }
6702    impl super::GasPayment {
6703        pub const fn const_default() -> Self {
6704            Self {
6705                objects: Vec::new(),
6706                owner: None,
6707                price: None,
6708                budget: None,
6709            }
6710        }
6711        #[doc(hidden)]
6712        pub fn default_instance() -> &'static Self {
6713            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6714            &DEFAULT
6715        }
6716        ///Returns the value of `objects`, or the default value if `objects` is unset.
6717        pub fn objects(&self) -> &[super::ObjectReference] {
6718            &self.objects
6719        }
6720        ///Returns a mutable reference to `objects`.
6721        ///If the field is unset, it is first initialized with the default value.
6722        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6723            &mut self.objects
6724        }
6725        ///Sets `objects` with the provided value.
6726        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6727            self.objects = field;
6728        }
6729        ///Sets `objects` with the provided value.
6730        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6731            self.set_objects(field);
6732            self
6733        }
6734        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6735        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6736            self.owner.as_mut().map(|field| field as _)
6737        }
6738        ///Returns a mutable reference to `owner`.
6739        ///If the field is unset, it is first initialized with the default value.
6740        pub fn owner_mut(&mut self) -> &mut String {
6741            self.owner.get_or_insert_default()
6742        }
6743        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6744        pub fn owner_opt(&self) -> Option<&str> {
6745            self.owner.as_ref().map(|field| field as _)
6746        }
6747        ///Sets `owner` with the provided value.
6748        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6749            self.owner = Some(field.into().into());
6750        }
6751        ///Sets `owner` with the provided value.
6752        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6753            self.set_owner(field.into());
6754            self
6755        }
6756        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6757        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6758            self.price.as_mut().map(|field| field as _)
6759        }
6760        ///Returns a mutable reference to `price`.
6761        ///If the field is unset, it is first initialized with the default value.
6762        pub fn price_mut(&mut self) -> &mut u64 {
6763            self.price.get_or_insert_default()
6764        }
6765        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6766        pub fn price_opt(&self) -> Option<u64> {
6767            self.price.as_ref().map(|field| *field)
6768        }
6769        ///Sets `price` with the provided value.
6770        pub fn set_price(&mut self, field: u64) {
6771            self.price = Some(field);
6772        }
6773        ///Sets `price` with the provided value.
6774        pub fn with_price(mut self, field: u64) -> Self {
6775            self.set_price(field);
6776            self
6777        }
6778        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6779        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6780            self.budget.as_mut().map(|field| field as _)
6781        }
6782        ///Returns a mutable reference to `budget`.
6783        ///If the field is unset, it is first initialized with the default value.
6784        pub fn budget_mut(&mut self) -> &mut u64 {
6785            self.budget.get_or_insert_default()
6786        }
6787        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6788        pub fn budget_opt(&self) -> Option<u64> {
6789            self.budget.as_ref().map(|field| *field)
6790        }
6791        ///Sets `budget` with the provided value.
6792        pub fn set_budget(&mut self, field: u64) {
6793            self.budget = Some(field);
6794        }
6795        ///Sets `budget` with the provided value.
6796        pub fn with_budget(mut self, field: u64) -> Self {
6797            self.set_budget(field);
6798            self
6799        }
6800    }
6801    impl super::GenesisTransaction {
6802        pub const fn const_default() -> Self {
6803            Self { objects: Vec::new() }
6804        }
6805        #[doc(hidden)]
6806        pub fn default_instance() -> &'static Self {
6807            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6808            &DEFAULT
6809        }
6810        ///Returns the value of `objects`, or the default value if `objects` is unset.
6811        pub fn objects(&self) -> &[super::Object] {
6812            &self.objects
6813        }
6814        ///Returns a mutable reference to `objects`.
6815        ///If the field is unset, it is first initialized with the default value.
6816        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6817            &mut self.objects
6818        }
6819        ///Sets `objects` with the provided value.
6820        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6821            self.objects = field;
6822        }
6823        ///Sets `objects` with the provided value.
6824        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6825            self.set_objects(field);
6826            self
6827        }
6828    }
6829    impl super::GetBalanceRequest {
6830        pub const fn const_default() -> Self {
6831            Self {
6832                owner: None,
6833                coin_type: None,
6834            }
6835        }
6836        #[doc(hidden)]
6837        pub fn default_instance() -> &'static Self {
6838            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6839            &DEFAULT
6840        }
6841        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6842        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6843            self.owner.as_mut().map(|field| field as _)
6844        }
6845        ///Returns a mutable reference to `owner`.
6846        ///If the field is unset, it is first initialized with the default value.
6847        pub fn owner_mut(&mut self) -> &mut String {
6848            self.owner.get_or_insert_default()
6849        }
6850        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6851        pub fn owner_opt(&self) -> Option<&str> {
6852            self.owner.as_ref().map(|field| field as _)
6853        }
6854        ///Sets `owner` with the provided value.
6855        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6856            self.owner = Some(field.into().into());
6857        }
6858        ///Sets `owner` with the provided value.
6859        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6860            self.set_owner(field.into());
6861            self
6862        }
6863        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6864        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6865            self.coin_type.as_mut().map(|field| field as _)
6866        }
6867        ///Returns a mutable reference to `coin_type`.
6868        ///If the field is unset, it is first initialized with the default value.
6869        pub fn coin_type_mut(&mut self) -> &mut String {
6870            self.coin_type.get_or_insert_default()
6871        }
6872        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6873        pub fn coin_type_opt(&self) -> Option<&str> {
6874            self.coin_type.as_ref().map(|field| field as _)
6875        }
6876        ///Sets `coin_type` with the provided value.
6877        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6878            self.coin_type = Some(field.into().into());
6879        }
6880        ///Sets `coin_type` with the provided value.
6881        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6882            self.set_coin_type(field.into());
6883            self
6884        }
6885    }
6886    impl super::GetBalanceResponse {
6887        pub const fn const_default() -> Self {
6888            Self { balance: None }
6889        }
6890        #[doc(hidden)]
6891        pub fn default_instance() -> &'static Self {
6892            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6893            &DEFAULT
6894        }
6895        ///Returns the value of `balance`, or the default value if `balance` is unset.
6896        pub fn balance(&self) -> &super::Balance {
6897            self.balance
6898                .as_ref()
6899                .map(|field| field as _)
6900                .unwrap_or_else(|| super::Balance::default_instance() as _)
6901        }
6902        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6903        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6904            self.balance.as_mut().map(|field| field as _)
6905        }
6906        ///Returns a mutable reference to `balance`.
6907        ///If the field is unset, it is first initialized with the default value.
6908        pub fn balance_mut(&mut self) -> &mut super::Balance {
6909            self.balance.get_or_insert_default()
6910        }
6911        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
6912        pub fn balance_opt(&self) -> Option<&super::Balance> {
6913            self.balance.as_ref().map(|field| field as _)
6914        }
6915        ///Sets `balance` with the provided value.
6916        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6917            self.balance = Some(field.into().into());
6918        }
6919        ///Sets `balance` with the provided value.
6920        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6921            self.set_balance(field.into());
6922            self
6923        }
6924    }
6925    impl super::GetCheckpointRequest {
6926        pub const fn const_default() -> Self {
6927            Self {
6928                read_mask: None,
6929                checkpoint_id: None,
6930            }
6931        }
6932        #[doc(hidden)]
6933        pub fn default_instance() -> &'static Self {
6934            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6935            &DEFAULT
6936        }
6937        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6938        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6939            self.read_mask.as_mut().map(|field| field as _)
6940        }
6941        ///Returns a mutable reference to `read_mask`.
6942        ///If the field is unset, it is first initialized with the default value.
6943        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6944            self.read_mask.get_or_insert_default()
6945        }
6946        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6947        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6948            self.read_mask.as_ref().map(|field| field as _)
6949        }
6950        ///Sets `read_mask` with the provided value.
6951        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6952            self.read_mask = Some(field.into().into());
6953        }
6954        ///Sets `read_mask` with the provided value.
6955        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6956            mut self,
6957            field: T,
6958        ) -> Self {
6959            self.set_read_mask(field.into());
6960            self
6961        }
6962        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
6963        pub fn sequence_number(&self) -> u64 {
6964            if let Some(
6965                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6966            ) = &self.checkpoint_id
6967            {
6968                *field
6969            } else {
6970                0u64
6971            }
6972        }
6973        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
6974        pub fn sequence_number_opt(&self) -> Option<u64> {
6975            if let Some(
6976                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6977            ) = &self.checkpoint_id
6978            {
6979                Some(*field)
6980            } else {
6981                None
6982            }
6983        }
6984        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6985        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6986            if let Some(
6987                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6988            ) = &mut self.checkpoint_id
6989            {
6990                Some(field as _)
6991            } else {
6992                None
6993            }
6994        }
6995        ///Returns a mutable reference to `sequence_number`.
6996        ///If the field is unset, it is first initialized with the default value.
6997        ///If any other oneof field in the same oneof is set, it will be cleared.
6998        pub fn sequence_number_mut(&mut self) -> &mut u64 {
6999            if self.sequence_number_opt_mut().is_none() {
7000                self.checkpoint_id = Some(
7001                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7002                        u64::default(),
7003                    ),
7004                );
7005            }
7006            self.sequence_number_opt_mut().unwrap()
7007        }
7008        ///Sets `sequence_number` with the provided value.
7009        ///If any other oneof field in the same oneof is set, it will be cleared.
7010        pub fn set_sequence_number(&mut self, field: u64) {
7011            self.checkpoint_id = Some(
7012                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7013            );
7014        }
7015        ///Sets `sequence_number` with the provided value.
7016        ///If any other oneof field in the same oneof is set, it will be cleared.
7017        pub fn with_sequence_number(mut self, field: u64) -> Self {
7018            self.set_sequence_number(field);
7019            self
7020        }
7021        ///Returns the value of `digest`, or the default value if `digest` is unset.
7022        pub fn digest(&self) -> &str {
7023            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7024                .checkpoint_id
7025            {
7026                field as _
7027            } else {
7028                ""
7029            }
7030        }
7031        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7032        pub fn digest_opt(&self) -> Option<&str> {
7033            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7034                .checkpoint_id
7035            {
7036                Some(field as _)
7037            } else {
7038                None
7039            }
7040        }
7041        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7042        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7043            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7044                .checkpoint_id
7045            {
7046                Some(field as _)
7047            } else {
7048                None
7049            }
7050        }
7051        ///Returns a mutable reference to `digest`.
7052        ///If the field is unset, it is first initialized with the default value.
7053        ///If any other oneof field in the same oneof is set, it will be cleared.
7054        pub fn digest_mut(&mut self) -> &mut String {
7055            if self.digest_opt_mut().is_none() {
7056                self.checkpoint_id = Some(
7057                    super::get_checkpoint_request::CheckpointId::Digest(
7058                        String::default(),
7059                    ),
7060                );
7061            }
7062            self.digest_opt_mut().unwrap()
7063        }
7064        ///Sets `digest` with the provided value.
7065        ///If any other oneof field in the same oneof is set, it will be cleared.
7066        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7067            self.checkpoint_id = Some(
7068                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7069            );
7070        }
7071        ///Sets `digest` with the provided value.
7072        ///If any other oneof field in the same oneof is set, it will be cleared.
7073        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7074            self.set_digest(field.into());
7075            self
7076        }
7077    }
7078    impl super::GetCheckpointResponse {
7079        pub const fn const_default() -> Self {
7080            Self { checkpoint: None }
7081        }
7082        #[doc(hidden)]
7083        pub fn default_instance() -> &'static Self {
7084            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7085            &DEFAULT
7086        }
7087        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7088        pub fn checkpoint(&self) -> &super::Checkpoint {
7089            self.checkpoint
7090                .as_ref()
7091                .map(|field| field as _)
7092                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7093        }
7094        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7095        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7096            self.checkpoint.as_mut().map(|field| field as _)
7097        }
7098        ///Returns a mutable reference to `checkpoint`.
7099        ///If the field is unset, it is first initialized with the default value.
7100        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7101            self.checkpoint.get_or_insert_default()
7102        }
7103        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7104        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7105            self.checkpoint.as_ref().map(|field| field as _)
7106        }
7107        ///Sets `checkpoint` with the provided value.
7108        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7109            self.checkpoint = Some(field.into().into());
7110        }
7111        ///Sets `checkpoint` with the provided value.
7112        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7113            self.set_checkpoint(field.into());
7114            self
7115        }
7116    }
7117    impl super::GetCoinInfoRequest {
7118        pub const fn const_default() -> Self {
7119            Self { coin_type: None }
7120        }
7121        #[doc(hidden)]
7122        pub fn default_instance() -> &'static Self {
7123            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7124            &DEFAULT
7125        }
7126        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7127        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7128            self.coin_type.as_mut().map(|field| field as _)
7129        }
7130        ///Returns a mutable reference to `coin_type`.
7131        ///If the field is unset, it is first initialized with the default value.
7132        pub fn coin_type_mut(&mut self) -> &mut String {
7133            self.coin_type.get_or_insert_default()
7134        }
7135        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7136        pub fn coin_type_opt(&self) -> Option<&str> {
7137            self.coin_type.as_ref().map(|field| field as _)
7138        }
7139        ///Sets `coin_type` with the provided value.
7140        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7141            self.coin_type = Some(field.into().into());
7142        }
7143        ///Sets `coin_type` with the provided value.
7144        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7145            self.set_coin_type(field.into());
7146            self
7147        }
7148    }
7149    impl super::GetCoinInfoResponse {
7150        pub const fn const_default() -> Self {
7151            Self {
7152                coin_type: None,
7153                metadata: None,
7154                treasury: None,
7155                regulated_metadata: None,
7156            }
7157        }
7158        #[doc(hidden)]
7159        pub fn default_instance() -> &'static Self {
7160            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7161            &DEFAULT
7162        }
7163        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7164        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7165            self.coin_type.as_mut().map(|field| field as _)
7166        }
7167        ///Returns a mutable reference to `coin_type`.
7168        ///If the field is unset, it is first initialized with the default value.
7169        pub fn coin_type_mut(&mut self) -> &mut String {
7170            self.coin_type.get_or_insert_default()
7171        }
7172        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7173        pub fn coin_type_opt(&self) -> Option<&str> {
7174            self.coin_type.as_ref().map(|field| field as _)
7175        }
7176        ///Sets `coin_type` with the provided value.
7177        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7178            self.coin_type = Some(field.into().into());
7179        }
7180        ///Sets `coin_type` with the provided value.
7181        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7182            self.set_coin_type(field.into());
7183            self
7184        }
7185        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
7186        pub fn metadata(&self) -> &super::CoinMetadata {
7187            self.metadata
7188                .as_ref()
7189                .map(|field| field as _)
7190                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7191        }
7192        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7193        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7194            self.metadata.as_mut().map(|field| field as _)
7195        }
7196        ///Returns a mutable reference to `metadata`.
7197        ///If the field is unset, it is first initialized with the default value.
7198        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7199            self.metadata.get_or_insert_default()
7200        }
7201        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7202        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7203            self.metadata.as_ref().map(|field| field as _)
7204        }
7205        ///Sets `metadata` with the provided value.
7206        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7207            self.metadata = Some(field.into().into());
7208        }
7209        ///Sets `metadata` with the provided value.
7210        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7211            self.set_metadata(field.into());
7212            self
7213        }
7214        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
7215        pub fn treasury(&self) -> &super::CoinTreasury {
7216            self.treasury
7217                .as_ref()
7218                .map(|field| field as _)
7219                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7220        }
7221        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7222        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7223            self.treasury.as_mut().map(|field| field as _)
7224        }
7225        ///Returns a mutable reference to `treasury`.
7226        ///If the field is unset, it is first initialized with the default value.
7227        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7228            self.treasury.get_or_insert_default()
7229        }
7230        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
7231        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7232            self.treasury.as_ref().map(|field| field as _)
7233        }
7234        ///Sets `treasury` with the provided value.
7235        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7236            self.treasury = Some(field.into().into());
7237        }
7238        ///Sets `treasury` with the provided value.
7239        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7240            self.set_treasury(field.into());
7241            self
7242        }
7243        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
7244        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7245            self.regulated_metadata
7246                .as_ref()
7247                .map(|field| field as _)
7248                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7249        }
7250        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7251        pub fn regulated_metadata_opt_mut(
7252            &mut self,
7253        ) -> Option<&mut super::RegulatedCoinMetadata> {
7254            self.regulated_metadata.as_mut().map(|field| field as _)
7255        }
7256        ///Returns a mutable reference to `regulated_metadata`.
7257        ///If the field is unset, it is first initialized with the default value.
7258        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7259            self.regulated_metadata.get_or_insert_default()
7260        }
7261        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7262        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7263            self.regulated_metadata.as_ref().map(|field| field as _)
7264        }
7265        ///Sets `regulated_metadata` with the provided value.
7266        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7267            &mut self,
7268            field: T,
7269        ) {
7270            self.regulated_metadata = Some(field.into().into());
7271        }
7272        ///Sets `regulated_metadata` with the provided value.
7273        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7274            mut self,
7275            field: T,
7276        ) -> Self {
7277            self.set_regulated_metadata(field.into());
7278            self
7279        }
7280    }
7281    impl super::GetDatatypeRequest {
7282        pub const fn const_default() -> Self {
7283            Self {
7284                package_id: None,
7285                module_name: None,
7286                name: None,
7287            }
7288        }
7289        #[doc(hidden)]
7290        pub fn default_instance() -> &'static Self {
7291            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7292            &DEFAULT
7293        }
7294        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7295        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7296            self.package_id.as_mut().map(|field| field as _)
7297        }
7298        ///Returns a mutable reference to `package_id`.
7299        ///If the field is unset, it is first initialized with the default value.
7300        pub fn package_id_mut(&mut self) -> &mut String {
7301            self.package_id.get_or_insert_default()
7302        }
7303        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7304        pub fn package_id_opt(&self) -> Option<&str> {
7305            self.package_id.as_ref().map(|field| field as _)
7306        }
7307        ///Sets `package_id` with the provided value.
7308        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7309            self.package_id = Some(field.into().into());
7310        }
7311        ///Sets `package_id` with the provided value.
7312        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7313            self.set_package_id(field.into());
7314            self
7315        }
7316        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7317        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7318            self.module_name.as_mut().map(|field| field as _)
7319        }
7320        ///Returns a mutable reference to `module_name`.
7321        ///If the field is unset, it is first initialized with the default value.
7322        pub fn module_name_mut(&mut self) -> &mut String {
7323            self.module_name.get_or_insert_default()
7324        }
7325        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7326        pub fn module_name_opt(&self) -> Option<&str> {
7327            self.module_name.as_ref().map(|field| field as _)
7328        }
7329        ///Sets `module_name` with the provided value.
7330        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7331            self.module_name = Some(field.into().into());
7332        }
7333        ///Sets `module_name` with the provided value.
7334        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7335            self.set_module_name(field.into());
7336            self
7337        }
7338        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7339        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7340            self.name.as_mut().map(|field| field as _)
7341        }
7342        ///Returns a mutable reference to `name`.
7343        ///If the field is unset, it is first initialized with the default value.
7344        pub fn name_mut(&mut self) -> &mut String {
7345            self.name.get_or_insert_default()
7346        }
7347        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7348        pub fn name_opt(&self) -> Option<&str> {
7349            self.name.as_ref().map(|field| field as _)
7350        }
7351        ///Sets `name` with the provided value.
7352        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7353            self.name = Some(field.into().into());
7354        }
7355        ///Sets `name` with the provided value.
7356        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7357            self.set_name(field.into());
7358            self
7359        }
7360    }
7361    impl super::GetDatatypeResponse {
7362        pub const fn const_default() -> Self {
7363            Self { datatype: None }
7364        }
7365        #[doc(hidden)]
7366        pub fn default_instance() -> &'static Self {
7367            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7368            &DEFAULT
7369        }
7370        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7371        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7372            self.datatype
7373                .as_ref()
7374                .map(|field| field as _)
7375                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7376        }
7377        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7378        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7379            self.datatype.as_mut().map(|field| field as _)
7380        }
7381        ///Returns a mutable reference to `datatype`.
7382        ///If the field is unset, it is first initialized with the default value.
7383        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7384            self.datatype.get_or_insert_default()
7385        }
7386        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7387        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7388            self.datatype.as_ref().map(|field| field as _)
7389        }
7390        ///Sets `datatype` with the provided value.
7391        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7392            self.datatype = Some(field.into().into());
7393        }
7394        ///Sets `datatype` with the provided value.
7395        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7396            mut self,
7397            field: T,
7398        ) -> Self {
7399            self.set_datatype(field.into());
7400            self
7401        }
7402    }
7403    impl super::GetEpochRequest {
7404        pub const fn const_default() -> Self {
7405            Self {
7406                epoch: None,
7407                read_mask: None,
7408            }
7409        }
7410        #[doc(hidden)]
7411        pub fn default_instance() -> &'static Self {
7412            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7413            &DEFAULT
7414        }
7415        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7416        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7417            self.epoch.as_mut().map(|field| field as _)
7418        }
7419        ///Returns a mutable reference to `epoch`.
7420        ///If the field is unset, it is first initialized with the default value.
7421        pub fn epoch_mut(&mut self) -> &mut u64 {
7422            self.epoch.get_or_insert_default()
7423        }
7424        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7425        pub fn epoch_opt(&self) -> Option<u64> {
7426            self.epoch.as_ref().map(|field| *field)
7427        }
7428        ///Sets `epoch` with the provided value.
7429        pub fn set_epoch(&mut self, field: u64) {
7430            self.epoch = Some(field);
7431        }
7432        ///Sets `epoch` with the provided value.
7433        pub fn with_epoch(mut self, field: u64) -> Self {
7434            self.set_epoch(field);
7435            self
7436        }
7437        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7438        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7439            self.read_mask.as_mut().map(|field| field as _)
7440        }
7441        ///Returns a mutable reference to `read_mask`.
7442        ///If the field is unset, it is first initialized with the default value.
7443        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7444            self.read_mask.get_or_insert_default()
7445        }
7446        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7447        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7448            self.read_mask.as_ref().map(|field| field as _)
7449        }
7450        ///Sets `read_mask` with the provided value.
7451        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7452            self.read_mask = Some(field.into().into());
7453        }
7454        ///Sets `read_mask` with the provided value.
7455        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7456            mut self,
7457            field: T,
7458        ) -> Self {
7459            self.set_read_mask(field.into());
7460            self
7461        }
7462    }
7463    impl super::GetEpochResponse {
7464        pub const fn const_default() -> Self {
7465            Self { epoch: None }
7466        }
7467        #[doc(hidden)]
7468        pub fn default_instance() -> &'static Self {
7469            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7470            &DEFAULT
7471        }
7472        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7473        pub fn epoch(&self) -> &super::Epoch {
7474            self.epoch
7475                .as_ref()
7476                .map(|field| field as _)
7477                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7478        }
7479        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7480        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7481            self.epoch.as_mut().map(|field| field as _)
7482        }
7483        ///Returns a mutable reference to `epoch`.
7484        ///If the field is unset, it is first initialized with the default value.
7485        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7486            self.epoch.get_or_insert_default()
7487        }
7488        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7489        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7490            self.epoch.as_ref().map(|field| field as _)
7491        }
7492        ///Sets `epoch` with the provided value.
7493        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7494            self.epoch = Some(field.into().into());
7495        }
7496        ///Sets `epoch` with the provided value.
7497        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7498            self.set_epoch(field.into());
7499            self
7500        }
7501    }
7502    impl super::GetFunctionRequest {
7503        pub const fn const_default() -> Self {
7504            Self {
7505                package_id: None,
7506                module_name: None,
7507                name: None,
7508            }
7509        }
7510        #[doc(hidden)]
7511        pub fn default_instance() -> &'static Self {
7512            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7513            &DEFAULT
7514        }
7515        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7516        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7517            self.package_id.as_mut().map(|field| field as _)
7518        }
7519        ///Returns a mutable reference to `package_id`.
7520        ///If the field is unset, it is first initialized with the default value.
7521        pub fn package_id_mut(&mut self) -> &mut String {
7522            self.package_id.get_or_insert_default()
7523        }
7524        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7525        pub fn package_id_opt(&self) -> Option<&str> {
7526            self.package_id.as_ref().map(|field| field as _)
7527        }
7528        ///Sets `package_id` with the provided value.
7529        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7530            self.package_id = Some(field.into().into());
7531        }
7532        ///Sets `package_id` with the provided value.
7533        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7534            self.set_package_id(field.into());
7535            self
7536        }
7537        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7538        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7539            self.module_name.as_mut().map(|field| field as _)
7540        }
7541        ///Returns a mutable reference to `module_name`.
7542        ///If the field is unset, it is first initialized with the default value.
7543        pub fn module_name_mut(&mut self) -> &mut String {
7544            self.module_name.get_or_insert_default()
7545        }
7546        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7547        pub fn module_name_opt(&self) -> Option<&str> {
7548            self.module_name.as_ref().map(|field| field as _)
7549        }
7550        ///Sets `module_name` with the provided value.
7551        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7552            self.module_name = Some(field.into().into());
7553        }
7554        ///Sets `module_name` with the provided value.
7555        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7556            self.set_module_name(field.into());
7557            self
7558        }
7559        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7560        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7561            self.name.as_mut().map(|field| field as _)
7562        }
7563        ///Returns a mutable reference to `name`.
7564        ///If the field is unset, it is first initialized with the default value.
7565        pub fn name_mut(&mut self) -> &mut String {
7566            self.name.get_or_insert_default()
7567        }
7568        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7569        pub fn name_opt(&self) -> Option<&str> {
7570            self.name.as_ref().map(|field| field as _)
7571        }
7572        ///Sets `name` with the provided value.
7573        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7574            self.name = Some(field.into().into());
7575        }
7576        ///Sets `name` with the provided value.
7577        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7578            self.set_name(field.into());
7579            self
7580        }
7581    }
7582    impl super::GetFunctionResponse {
7583        pub const fn const_default() -> Self {
7584            Self { function: None }
7585        }
7586        #[doc(hidden)]
7587        pub fn default_instance() -> &'static Self {
7588            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7589            &DEFAULT
7590        }
7591        ///Returns the value of `function`, or the default value if `function` is unset.
7592        pub fn function(&self) -> &super::FunctionDescriptor {
7593            self.function
7594                .as_ref()
7595                .map(|field| field as _)
7596                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7597        }
7598        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7599        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7600            self.function.as_mut().map(|field| field as _)
7601        }
7602        ///Returns a mutable reference to `function`.
7603        ///If the field is unset, it is first initialized with the default value.
7604        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7605            self.function.get_or_insert_default()
7606        }
7607        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7608        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7609            self.function.as_ref().map(|field| field as _)
7610        }
7611        ///Sets `function` with the provided value.
7612        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7613            self.function = Some(field.into().into());
7614        }
7615        ///Sets `function` with the provided value.
7616        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7617            mut self,
7618            field: T,
7619        ) -> Self {
7620            self.set_function(field.into());
7621            self
7622        }
7623    }
7624    impl super::GetObjectRequest {
7625        pub const fn const_default() -> Self {
7626            Self {
7627                object_id: None,
7628                version: None,
7629                read_mask: None,
7630            }
7631        }
7632        #[doc(hidden)]
7633        pub fn default_instance() -> &'static Self {
7634            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7635            &DEFAULT
7636        }
7637        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7638        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7639            self.object_id.as_mut().map(|field| field as _)
7640        }
7641        ///Returns a mutable reference to `object_id`.
7642        ///If the field is unset, it is first initialized with the default value.
7643        pub fn object_id_mut(&mut self) -> &mut String {
7644            self.object_id.get_or_insert_default()
7645        }
7646        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7647        pub fn object_id_opt(&self) -> Option<&str> {
7648            self.object_id.as_ref().map(|field| field as _)
7649        }
7650        ///Sets `object_id` with the provided value.
7651        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7652            self.object_id = Some(field.into().into());
7653        }
7654        ///Sets `object_id` with the provided value.
7655        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7656            self.set_object_id(field.into());
7657            self
7658        }
7659        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7660        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7661            self.version.as_mut().map(|field| field as _)
7662        }
7663        ///Returns a mutable reference to `version`.
7664        ///If the field is unset, it is first initialized with the default value.
7665        pub fn version_mut(&mut self) -> &mut u64 {
7666            self.version.get_or_insert_default()
7667        }
7668        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7669        pub fn version_opt(&self) -> Option<u64> {
7670            self.version.as_ref().map(|field| *field)
7671        }
7672        ///Sets `version` with the provided value.
7673        pub fn set_version(&mut self, field: u64) {
7674            self.version = Some(field);
7675        }
7676        ///Sets `version` with the provided value.
7677        pub fn with_version(mut self, field: u64) -> Self {
7678            self.set_version(field);
7679            self
7680        }
7681        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7682        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7683            self.read_mask.as_mut().map(|field| field as _)
7684        }
7685        ///Returns a mutable reference to `read_mask`.
7686        ///If the field is unset, it is first initialized with the default value.
7687        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7688            self.read_mask.get_or_insert_default()
7689        }
7690        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7691        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7692            self.read_mask.as_ref().map(|field| field as _)
7693        }
7694        ///Sets `read_mask` with the provided value.
7695        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7696            self.read_mask = Some(field.into().into());
7697        }
7698        ///Sets `read_mask` with the provided value.
7699        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7700            mut self,
7701            field: T,
7702        ) -> Self {
7703            self.set_read_mask(field.into());
7704            self
7705        }
7706    }
7707    impl super::GetObjectResponse {
7708        pub const fn const_default() -> Self {
7709            Self { object: None }
7710        }
7711        #[doc(hidden)]
7712        pub fn default_instance() -> &'static Self {
7713            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7714            &DEFAULT
7715        }
7716        ///Returns the value of `object`, or the default value if `object` is unset.
7717        pub fn object(&self) -> &super::Object {
7718            self.object
7719                .as_ref()
7720                .map(|field| field as _)
7721                .unwrap_or_else(|| super::Object::default_instance() as _)
7722        }
7723        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7724        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7725            self.object.as_mut().map(|field| field as _)
7726        }
7727        ///Returns a mutable reference to `object`.
7728        ///If the field is unset, it is first initialized with the default value.
7729        pub fn object_mut(&mut self) -> &mut super::Object {
7730            self.object.get_or_insert_default()
7731        }
7732        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7733        pub fn object_opt(&self) -> Option<&super::Object> {
7734            self.object.as_ref().map(|field| field as _)
7735        }
7736        ///Sets `object` with the provided value.
7737        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7738            self.object = Some(field.into().into());
7739        }
7740        ///Sets `object` with the provided value.
7741        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7742            self.set_object(field.into());
7743            self
7744        }
7745    }
7746    impl super::GetObjectResult {
7747        pub const fn const_default() -> Self {
7748            Self { result: None }
7749        }
7750        #[doc(hidden)]
7751        pub fn default_instance() -> &'static Self {
7752            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7753            &DEFAULT
7754        }
7755        ///Returns the value of `object`, or the default value if `object` is unset.
7756        pub fn object(&self) -> &super::Object {
7757            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7758                field as _
7759            } else {
7760                super::Object::default_instance() as _
7761            }
7762        }
7763        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7764        pub fn object_opt(&self) -> Option<&super::Object> {
7765            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7766                Some(field as _)
7767            } else {
7768                None
7769            }
7770        }
7771        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7772        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7773            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7774                .result
7775            {
7776                Some(field as _)
7777            } else {
7778                None
7779            }
7780        }
7781        ///Returns a mutable reference to `object`.
7782        ///If the field is unset, it is first initialized with the default value.
7783        ///If any other oneof field in the same oneof is set, it will be cleared.
7784        pub fn object_mut(&mut self) -> &mut super::Object {
7785            if self.object_opt_mut().is_none() {
7786                self.result = Some(
7787                    super::get_object_result::Result::Object(super::Object::default()),
7788                );
7789            }
7790            self.object_opt_mut().unwrap()
7791        }
7792        ///Sets `object` with the provided value.
7793        ///If any other oneof field in the same oneof is set, it will be cleared.
7794        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7795            self.result = Some(
7796                super::get_object_result::Result::Object(field.into().into()),
7797            );
7798        }
7799        ///Sets `object` with the provided value.
7800        ///If any other oneof field in the same oneof is set, it will be cleared.
7801        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7802            self.set_object(field.into());
7803            self
7804        }
7805        ///Returns the value of `error`, or the default value if `error` is unset.
7806        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7807            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7808                field as _
7809            } else {
7810                super::super::super::super::google::rpc::Status::default_instance() as _
7811            }
7812        }
7813        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7814        pub fn error_opt(
7815            &self,
7816        ) -> Option<&super::super::super::super::google::rpc::Status> {
7817            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7818                Some(field as _)
7819            } else {
7820                None
7821            }
7822        }
7823        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7824        pub fn error_opt_mut(
7825            &mut self,
7826        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7827            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7828                .result
7829            {
7830                Some(field as _)
7831            } else {
7832                None
7833            }
7834        }
7835        ///Returns a mutable reference to `error`.
7836        ///If the field is unset, it is first initialized with the default value.
7837        ///If any other oneof field in the same oneof is set, it will be cleared.
7838        pub fn error_mut(
7839            &mut self,
7840        ) -> &mut super::super::super::super::google::rpc::Status {
7841            if self.error_opt_mut().is_none() {
7842                self.result = Some(
7843                    super::get_object_result::Result::Error(
7844                        super::super::super::super::google::rpc::Status::default(),
7845                    ),
7846                );
7847            }
7848            self.error_opt_mut().unwrap()
7849        }
7850        ///Sets `error` with the provided value.
7851        ///If any other oneof field in the same oneof is set, it will be cleared.
7852        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7853            &mut self,
7854            field: T,
7855        ) {
7856            self.result = Some(
7857                super::get_object_result::Result::Error(field.into().into()),
7858            );
7859        }
7860        ///Sets `error` with the provided value.
7861        ///If any other oneof field in the same oneof is set, it will be cleared.
7862        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7863            mut self,
7864            field: T,
7865        ) -> Self {
7866            self.set_error(field.into());
7867            self
7868        }
7869    }
7870    impl super::GetPackageRequest {
7871        pub const fn const_default() -> Self {
7872            Self { package_id: None }
7873        }
7874        #[doc(hidden)]
7875        pub fn default_instance() -> &'static Self {
7876            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7877            &DEFAULT
7878        }
7879        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7880        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7881            self.package_id.as_mut().map(|field| field as _)
7882        }
7883        ///Returns a mutable reference to `package_id`.
7884        ///If the field is unset, it is first initialized with the default value.
7885        pub fn package_id_mut(&mut self) -> &mut String {
7886            self.package_id.get_or_insert_default()
7887        }
7888        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7889        pub fn package_id_opt(&self) -> Option<&str> {
7890            self.package_id.as_ref().map(|field| field as _)
7891        }
7892        ///Sets `package_id` with the provided value.
7893        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7894            self.package_id = Some(field.into().into());
7895        }
7896        ///Sets `package_id` with the provided value.
7897        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7898            self.set_package_id(field.into());
7899            self
7900        }
7901    }
7902    impl super::GetPackageResponse {
7903        pub const fn const_default() -> Self {
7904            Self { package: None }
7905        }
7906        #[doc(hidden)]
7907        pub fn default_instance() -> &'static Self {
7908            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7909            &DEFAULT
7910        }
7911        ///Returns the value of `package`, or the default value if `package` is unset.
7912        pub fn package(&self) -> &super::Package {
7913            self.package
7914                .as_ref()
7915                .map(|field| field as _)
7916                .unwrap_or_else(|| super::Package::default_instance() as _)
7917        }
7918        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7919        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7920            self.package.as_mut().map(|field| field as _)
7921        }
7922        ///Returns a mutable reference to `package`.
7923        ///If the field is unset, it is first initialized with the default value.
7924        pub fn package_mut(&mut self) -> &mut super::Package {
7925            self.package.get_or_insert_default()
7926        }
7927        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
7928        pub fn package_opt(&self) -> Option<&super::Package> {
7929            self.package.as_ref().map(|field| field as _)
7930        }
7931        ///Sets `package` with the provided value.
7932        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7933            self.package = Some(field.into().into());
7934        }
7935        ///Sets `package` with the provided value.
7936        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7937            self.set_package(field.into());
7938            self
7939        }
7940    }
7941    impl super::GetServiceInfoRequest {
7942        pub const fn const_default() -> Self {
7943            Self {}
7944        }
7945        #[doc(hidden)]
7946        pub fn default_instance() -> &'static Self {
7947            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7948            &DEFAULT
7949        }
7950    }
7951    impl super::GetServiceInfoResponse {
7952        pub const fn const_default() -> Self {
7953            Self {
7954                chain_id: None,
7955                chain: None,
7956                epoch: None,
7957                checkpoint_height: None,
7958                timestamp: None,
7959                lowest_available_checkpoint: None,
7960                lowest_available_checkpoint_objects: None,
7961                server: None,
7962            }
7963        }
7964        #[doc(hidden)]
7965        pub fn default_instance() -> &'static Self {
7966            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7967            &DEFAULT
7968        }
7969        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7970        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7971            self.chain_id.as_mut().map(|field| field as _)
7972        }
7973        ///Returns a mutable reference to `chain_id`.
7974        ///If the field is unset, it is first initialized with the default value.
7975        pub fn chain_id_mut(&mut self) -> &mut String {
7976            self.chain_id.get_or_insert_default()
7977        }
7978        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7979        pub fn chain_id_opt(&self) -> Option<&str> {
7980            self.chain_id.as_ref().map(|field| field as _)
7981        }
7982        ///Sets `chain_id` with the provided value.
7983        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7984            self.chain_id = Some(field.into().into());
7985        }
7986        ///Sets `chain_id` with the provided value.
7987        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7988            self.set_chain_id(field.into());
7989            self
7990        }
7991        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7992        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7993            self.chain.as_mut().map(|field| field as _)
7994        }
7995        ///Returns a mutable reference to `chain`.
7996        ///If the field is unset, it is first initialized with the default value.
7997        pub fn chain_mut(&mut self) -> &mut String {
7998            self.chain.get_or_insert_default()
7999        }
8000        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8001        pub fn chain_opt(&self) -> Option<&str> {
8002            self.chain.as_ref().map(|field| field as _)
8003        }
8004        ///Sets `chain` with the provided value.
8005        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8006            self.chain = Some(field.into().into());
8007        }
8008        ///Sets `chain` with the provided value.
8009        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8010            self.set_chain(field.into());
8011            self
8012        }
8013        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8014        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8015            self.epoch.as_mut().map(|field| field as _)
8016        }
8017        ///Returns a mutable reference to `epoch`.
8018        ///If the field is unset, it is first initialized with the default value.
8019        pub fn epoch_mut(&mut self) -> &mut u64 {
8020            self.epoch.get_or_insert_default()
8021        }
8022        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8023        pub fn epoch_opt(&self) -> Option<u64> {
8024            self.epoch.as_ref().map(|field| *field)
8025        }
8026        ///Sets `epoch` with the provided value.
8027        pub fn set_epoch(&mut self, field: u64) {
8028            self.epoch = Some(field);
8029        }
8030        ///Sets `epoch` with the provided value.
8031        pub fn with_epoch(mut self, field: u64) -> Self {
8032            self.set_epoch(field);
8033            self
8034        }
8035        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8036        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8037            self.checkpoint_height.as_mut().map(|field| field as _)
8038        }
8039        ///Returns a mutable reference to `checkpoint_height`.
8040        ///If the field is unset, it is first initialized with the default value.
8041        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8042            self.checkpoint_height.get_or_insert_default()
8043        }
8044        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8045        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8046            self.checkpoint_height.as_ref().map(|field| *field)
8047        }
8048        ///Sets `checkpoint_height` with the provided value.
8049        pub fn set_checkpoint_height(&mut self, field: u64) {
8050            self.checkpoint_height = Some(field);
8051        }
8052        ///Sets `checkpoint_height` with the provided value.
8053        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8054            self.set_checkpoint_height(field);
8055            self
8056        }
8057        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8058        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8059            self.timestamp.as_mut().map(|field| field as _)
8060        }
8061        ///Returns a mutable reference to `timestamp`.
8062        ///If the field is unset, it is first initialized with the default value.
8063        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8064            self.timestamp.get_or_insert_default()
8065        }
8066        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8067        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8068            self.timestamp.as_ref().map(|field| field as _)
8069        }
8070        ///Sets `timestamp` with the provided value.
8071        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8072            self.timestamp = Some(field.into().into());
8073        }
8074        ///Sets `timestamp` with the provided value.
8075        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8076            mut self,
8077            field: T,
8078        ) -> Self {
8079            self.set_timestamp(field.into());
8080            self
8081        }
8082        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8083        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8084            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8085        }
8086        ///Returns a mutable reference to `lowest_available_checkpoint`.
8087        ///If the field is unset, it is first initialized with the default value.
8088        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8089            self.lowest_available_checkpoint.get_or_insert_default()
8090        }
8091        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8092        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8093            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8094        }
8095        ///Sets `lowest_available_checkpoint` with the provided value.
8096        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8097            self.lowest_available_checkpoint = Some(field);
8098        }
8099        ///Sets `lowest_available_checkpoint` with the provided value.
8100        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8101            self.set_lowest_available_checkpoint(field);
8102            self
8103        }
8104        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8105        pub fn lowest_available_checkpoint_objects_opt_mut(
8106            &mut self,
8107        ) -> Option<&mut u64> {
8108            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8109        }
8110        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8111        ///If the field is unset, it is first initialized with the default value.
8112        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8113            self.lowest_available_checkpoint_objects.get_or_insert_default()
8114        }
8115        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8116        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8117            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8118        }
8119        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8120        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8121            self.lowest_available_checkpoint_objects = Some(field);
8122        }
8123        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8124        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8125            self.set_lowest_available_checkpoint_objects(field);
8126            self
8127        }
8128        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8129        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8130            self.server.as_mut().map(|field| field as _)
8131        }
8132        ///Returns a mutable reference to `server`.
8133        ///If the field is unset, it is first initialized with the default value.
8134        pub fn server_mut(&mut self) -> &mut String {
8135            self.server.get_or_insert_default()
8136        }
8137        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8138        pub fn server_opt(&self) -> Option<&str> {
8139            self.server.as_ref().map(|field| field as _)
8140        }
8141        ///Sets `server` with the provided value.
8142        pub fn set_server<T: Into<String>>(&mut self, field: T) {
8143            self.server = Some(field.into().into());
8144        }
8145        ///Sets `server` with the provided value.
8146        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8147            self.set_server(field.into());
8148            self
8149        }
8150    }
8151    impl super::GetTransactionRequest {
8152        pub const fn const_default() -> Self {
8153            Self {
8154                digest: None,
8155                read_mask: None,
8156            }
8157        }
8158        #[doc(hidden)]
8159        pub fn default_instance() -> &'static Self {
8160            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8161            &DEFAULT
8162        }
8163        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8164        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8165            self.digest.as_mut().map(|field| field as _)
8166        }
8167        ///Returns a mutable reference to `digest`.
8168        ///If the field is unset, it is first initialized with the default value.
8169        pub fn digest_mut(&mut self) -> &mut String {
8170            self.digest.get_or_insert_default()
8171        }
8172        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8173        pub fn digest_opt(&self) -> Option<&str> {
8174            self.digest.as_ref().map(|field| field as _)
8175        }
8176        ///Sets `digest` with the provided value.
8177        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8178            self.digest = Some(field.into().into());
8179        }
8180        ///Sets `digest` with the provided value.
8181        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8182            self.set_digest(field.into());
8183            self
8184        }
8185        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8186        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8187            self.read_mask.as_mut().map(|field| field as _)
8188        }
8189        ///Returns a mutable reference to `read_mask`.
8190        ///If the field is unset, it is first initialized with the default value.
8191        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8192            self.read_mask.get_or_insert_default()
8193        }
8194        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8195        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8196            self.read_mask.as_ref().map(|field| field as _)
8197        }
8198        ///Sets `read_mask` with the provided value.
8199        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8200            self.read_mask = Some(field.into().into());
8201        }
8202        ///Sets `read_mask` with the provided value.
8203        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8204            mut self,
8205            field: T,
8206        ) -> Self {
8207            self.set_read_mask(field.into());
8208            self
8209        }
8210    }
8211    impl super::GetTransactionResponse {
8212        pub const fn const_default() -> Self {
8213            Self { transaction: None }
8214        }
8215        #[doc(hidden)]
8216        pub fn default_instance() -> &'static Self {
8217            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8218            &DEFAULT
8219        }
8220        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8221        pub fn transaction(&self) -> &super::ExecutedTransaction {
8222            self.transaction
8223                .as_ref()
8224                .map(|field| field as _)
8225                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8226        }
8227        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8228        pub fn transaction_opt_mut(
8229            &mut self,
8230        ) -> Option<&mut super::ExecutedTransaction> {
8231            self.transaction.as_mut().map(|field| field as _)
8232        }
8233        ///Returns a mutable reference to `transaction`.
8234        ///If the field is unset, it is first initialized with the default value.
8235        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8236            self.transaction.get_or_insert_default()
8237        }
8238        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8239        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8240            self.transaction.as_ref().map(|field| field as _)
8241        }
8242        ///Sets `transaction` with the provided value.
8243        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8244            &mut self,
8245            field: T,
8246        ) {
8247            self.transaction = Some(field.into().into());
8248        }
8249        ///Sets `transaction` with the provided value.
8250        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8251            mut self,
8252            field: T,
8253        ) -> Self {
8254            self.set_transaction(field.into());
8255            self
8256        }
8257    }
8258    impl super::GetTransactionResult {
8259        pub const fn const_default() -> Self {
8260            Self { result: None }
8261        }
8262        #[doc(hidden)]
8263        pub fn default_instance() -> &'static Self {
8264            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8265            &DEFAULT
8266        }
8267        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8268        pub fn transaction(&self) -> &super::ExecutedTransaction {
8269            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8270                .result
8271            {
8272                field as _
8273            } else {
8274                super::ExecutedTransaction::default_instance() as _
8275            }
8276        }
8277        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8278        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8279            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8280                .result
8281            {
8282                Some(field as _)
8283            } else {
8284                None
8285            }
8286        }
8287        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8288        pub fn transaction_opt_mut(
8289            &mut self,
8290        ) -> Option<&mut super::ExecutedTransaction> {
8291            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8292                .result
8293            {
8294                Some(field as _)
8295            } else {
8296                None
8297            }
8298        }
8299        ///Returns a mutable reference to `transaction`.
8300        ///If the field is unset, it is first initialized with the default value.
8301        ///If any other oneof field in the same oneof is set, it will be cleared.
8302        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8303            if self.transaction_opt_mut().is_none() {
8304                self.result = Some(
8305                    super::get_transaction_result::Result::Transaction(
8306                        super::ExecutedTransaction::default(),
8307                    ),
8308                );
8309            }
8310            self.transaction_opt_mut().unwrap()
8311        }
8312        ///Sets `transaction` with the provided value.
8313        ///If any other oneof field in the same oneof is set, it will be cleared.
8314        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8315            &mut self,
8316            field: T,
8317        ) {
8318            self.result = Some(
8319                super::get_transaction_result::Result::Transaction(field.into().into()),
8320            );
8321        }
8322        ///Sets `transaction` with the provided value.
8323        ///If any other oneof field in the same oneof is set, it will be cleared.
8324        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8325            mut self,
8326            field: T,
8327        ) -> Self {
8328            self.set_transaction(field.into());
8329            self
8330        }
8331        ///Returns the value of `error`, or the default value if `error` is unset.
8332        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8333            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8334                .result
8335            {
8336                field as _
8337            } else {
8338                super::super::super::super::google::rpc::Status::default_instance() as _
8339            }
8340        }
8341        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8342        pub fn error_opt(
8343            &self,
8344        ) -> Option<&super::super::super::super::google::rpc::Status> {
8345            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8346                .result
8347            {
8348                Some(field as _)
8349            } else {
8350                None
8351            }
8352        }
8353        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8354        pub fn error_opt_mut(
8355            &mut self,
8356        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8357            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8358                .result
8359            {
8360                Some(field as _)
8361            } else {
8362                None
8363            }
8364        }
8365        ///Returns a mutable reference to `error`.
8366        ///If the field is unset, it is first initialized with the default value.
8367        ///If any other oneof field in the same oneof is set, it will be cleared.
8368        pub fn error_mut(
8369            &mut self,
8370        ) -> &mut super::super::super::super::google::rpc::Status {
8371            if self.error_opt_mut().is_none() {
8372                self.result = Some(
8373                    super::get_transaction_result::Result::Error(
8374                        super::super::super::super::google::rpc::Status::default(),
8375                    ),
8376                );
8377            }
8378            self.error_opt_mut().unwrap()
8379        }
8380        ///Sets `error` with the provided value.
8381        ///If any other oneof field in the same oneof is set, it will be cleared.
8382        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8383            &mut self,
8384            field: T,
8385        ) {
8386            self.result = Some(
8387                super::get_transaction_result::Result::Error(field.into().into()),
8388            );
8389        }
8390        ///Sets `error` with the provided value.
8391        ///If any other oneof field in the same oneof is set, it will be cleared.
8392        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8393            mut self,
8394            field: T,
8395        ) -> Self {
8396            self.set_error(field.into());
8397            self
8398        }
8399    }
8400    impl super::IndexError {
8401        pub const fn const_default() -> Self {
8402            Self {
8403                index: None,
8404                subresult: None,
8405            }
8406        }
8407        #[doc(hidden)]
8408        pub fn default_instance() -> &'static Self {
8409            static DEFAULT: super::IndexError = super::IndexError::const_default();
8410            &DEFAULT
8411        }
8412        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8413        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8414            self.index.as_mut().map(|field| field as _)
8415        }
8416        ///Returns a mutable reference to `index`.
8417        ///If the field is unset, it is first initialized with the default value.
8418        pub fn index_mut(&mut self) -> &mut u32 {
8419            self.index.get_or_insert_default()
8420        }
8421        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8422        pub fn index_opt(&self) -> Option<u32> {
8423            self.index.as_ref().map(|field| *field)
8424        }
8425        ///Sets `index` with the provided value.
8426        pub fn set_index(&mut self, field: u32) {
8427            self.index = Some(field);
8428        }
8429        ///Sets `index` with the provided value.
8430        pub fn with_index(mut self, field: u32) -> Self {
8431            self.set_index(field);
8432            self
8433        }
8434        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8435        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8436            self.subresult.as_mut().map(|field| field as _)
8437        }
8438        ///Returns a mutable reference to `subresult`.
8439        ///If the field is unset, it is first initialized with the default value.
8440        pub fn subresult_mut(&mut self) -> &mut u32 {
8441            self.subresult.get_or_insert_default()
8442        }
8443        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8444        pub fn subresult_opt(&self) -> Option<u32> {
8445            self.subresult.as_ref().map(|field| *field)
8446        }
8447        ///Sets `subresult` with the provided value.
8448        pub fn set_subresult(&mut self, field: u32) {
8449            self.subresult = Some(field);
8450        }
8451        ///Sets `subresult` with the provided value.
8452        pub fn with_subresult(mut self, field: u32) -> Self {
8453            self.set_subresult(field);
8454            self
8455        }
8456    }
8457    impl super::Input {
8458        pub const fn const_default() -> Self {
8459            Self {
8460                kind: None,
8461                pure: None,
8462                object_id: None,
8463                version: None,
8464                digest: None,
8465                mutable: None,
8466                mutability: None,
8467                funds_withdrawal: None,
8468                literal: None,
8469            }
8470        }
8471        #[doc(hidden)]
8472        pub fn default_instance() -> &'static Self {
8473            static DEFAULT: super::Input = super::Input::const_default();
8474            &DEFAULT
8475        }
8476        ///Sets `kind` with the provided value.
8477        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8478            self.set_kind(field.into());
8479            self
8480        }
8481        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8482        pub fn pure_opt(&self) -> Option<&[u8]> {
8483            self.pure.as_ref().map(|field| field as _)
8484        }
8485        ///Sets `pure` with the provided value.
8486        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8487            self.pure = Some(field.into().into());
8488        }
8489        ///Sets `pure` with the provided value.
8490        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8491            self.set_pure(field.into());
8492            self
8493        }
8494        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8495        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8496            self.object_id.as_mut().map(|field| field as _)
8497        }
8498        ///Returns a mutable reference to `object_id`.
8499        ///If the field is unset, it is first initialized with the default value.
8500        pub fn object_id_mut(&mut self) -> &mut String {
8501            self.object_id.get_or_insert_default()
8502        }
8503        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8504        pub fn object_id_opt(&self) -> Option<&str> {
8505            self.object_id.as_ref().map(|field| field as _)
8506        }
8507        ///Sets `object_id` with the provided value.
8508        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8509            self.object_id = Some(field.into().into());
8510        }
8511        ///Sets `object_id` with the provided value.
8512        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8513            self.set_object_id(field.into());
8514            self
8515        }
8516        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8517        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8518            self.version.as_mut().map(|field| field as _)
8519        }
8520        ///Returns a mutable reference to `version`.
8521        ///If the field is unset, it is first initialized with the default value.
8522        pub fn version_mut(&mut self) -> &mut u64 {
8523            self.version.get_or_insert_default()
8524        }
8525        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8526        pub fn version_opt(&self) -> Option<u64> {
8527            self.version.as_ref().map(|field| *field)
8528        }
8529        ///Sets `version` with the provided value.
8530        pub fn set_version(&mut self, field: u64) {
8531            self.version = Some(field);
8532        }
8533        ///Sets `version` with the provided value.
8534        pub fn with_version(mut self, field: u64) -> Self {
8535            self.set_version(field);
8536            self
8537        }
8538        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8539        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8540            self.digest.as_mut().map(|field| field as _)
8541        }
8542        ///Returns a mutable reference to `digest`.
8543        ///If the field is unset, it is first initialized with the default value.
8544        pub fn digest_mut(&mut self) -> &mut String {
8545            self.digest.get_or_insert_default()
8546        }
8547        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8548        pub fn digest_opt(&self) -> Option<&str> {
8549            self.digest.as_ref().map(|field| field as _)
8550        }
8551        ///Sets `digest` with the provided value.
8552        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8553            self.digest = Some(field.into().into());
8554        }
8555        ///Sets `digest` with the provided value.
8556        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8557            self.set_digest(field.into());
8558            self
8559        }
8560        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8561        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8562            self.mutable.as_mut().map(|field| field as _)
8563        }
8564        ///Returns a mutable reference to `mutable`.
8565        ///If the field is unset, it is first initialized with the default value.
8566        pub fn mutable_mut(&mut self) -> &mut bool {
8567            self.mutable.get_or_insert_default()
8568        }
8569        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8570        pub fn mutable_opt(&self) -> Option<bool> {
8571            self.mutable.as_ref().map(|field| *field)
8572        }
8573        ///Sets `mutable` with the provided value.
8574        pub fn set_mutable(&mut self, field: bool) {
8575            self.mutable = Some(field);
8576        }
8577        ///Sets `mutable` with the provided value.
8578        pub fn with_mutable(mut self, field: bool) -> Self {
8579            self.set_mutable(field);
8580            self
8581        }
8582        ///Sets `mutability` with the provided value.
8583        pub fn with_mutability<T: Into<super::input::Mutability>>(
8584            mut self,
8585            field: T,
8586        ) -> Self {
8587            self.set_mutability(field.into());
8588            self
8589        }
8590        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
8591        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8592            self.funds_withdrawal
8593                .as_ref()
8594                .map(|field| field as _)
8595                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8596        }
8597        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8598        pub fn funds_withdrawal_opt_mut(
8599            &mut self,
8600        ) -> Option<&mut super::FundsWithdrawal> {
8601            self.funds_withdrawal.as_mut().map(|field| field as _)
8602        }
8603        ///Returns a mutable reference to `funds_withdrawal`.
8604        ///If the field is unset, it is first initialized with the default value.
8605        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8606            self.funds_withdrawal.get_or_insert_default()
8607        }
8608        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8609        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8610            self.funds_withdrawal.as_ref().map(|field| field as _)
8611        }
8612        ///Sets `funds_withdrawal` with the provided value.
8613        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8614            &mut self,
8615            field: T,
8616        ) {
8617            self.funds_withdrawal = Some(field.into().into());
8618        }
8619        ///Sets `funds_withdrawal` with the provided value.
8620        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8621            mut self,
8622            field: T,
8623        ) -> Self {
8624            self.set_funds_withdrawal(field.into());
8625            self
8626        }
8627        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8628        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8629            self.literal.as_mut().map(|field| field as _)
8630        }
8631        ///Returns a mutable reference to `literal`.
8632        ///If the field is unset, it is first initialized with the default value.
8633        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8634            self.literal.get_or_insert_default()
8635        }
8636        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8637        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8638            self.literal.as_ref().map(|field| field as _)
8639        }
8640        ///Sets `literal` with the provided value.
8641        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8642            self.literal = Some(field.into().into());
8643        }
8644        ///Sets `literal` with the provided value.
8645        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8646            self.set_literal(field.into());
8647            self
8648        }
8649    }
8650    impl super::Jwk {
8651        pub const fn const_default() -> Self {
8652            Self {
8653                kty: None,
8654                e: None,
8655                n: None,
8656                alg: None,
8657            }
8658        }
8659        #[doc(hidden)]
8660        pub fn default_instance() -> &'static Self {
8661            static DEFAULT: super::Jwk = super::Jwk::const_default();
8662            &DEFAULT
8663        }
8664        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8665        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8666            self.kty.as_mut().map(|field| field as _)
8667        }
8668        ///Returns a mutable reference to `kty`.
8669        ///If the field is unset, it is first initialized with the default value.
8670        pub fn kty_mut(&mut self) -> &mut String {
8671            self.kty.get_or_insert_default()
8672        }
8673        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8674        pub fn kty_opt(&self) -> Option<&str> {
8675            self.kty.as_ref().map(|field| field as _)
8676        }
8677        ///Sets `kty` with the provided value.
8678        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8679            self.kty = Some(field.into().into());
8680        }
8681        ///Sets `kty` with the provided value.
8682        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8683            self.set_kty(field.into());
8684            self
8685        }
8686        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8687        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8688            self.e.as_mut().map(|field| field as _)
8689        }
8690        ///Returns a mutable reference to `e`.
8691        ///If the field is unset, it is first initialized with the default value.
8692        pub fn e_mut(&mut self) -> &mut String {
8693            self.e.get_or_insert_default()
8694        }
8695        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8696        pub fn e_opt(&self) -> Option<&str> {
8697            self.e.as_ref().map(|field| field as _)
8698        }
8699        ///Sets `e` with the provided value.
8700        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8701            self.e = Some(field.into().into());
8702        }
8703        ///Sets `e` with the provided value.
8704        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8705            self.set_e(field.into());
8706            self
8707        }
8708        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8709        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8710            self.n.as_mut().map(|field| field as _)
8711        }
8712        ///Returns a mutable reference to `n`.
8713        ///If the field is unset, it is first initialized with the default value.
8714        pub fn n_mut(&mut self) -> &mut String {
8715            self.n.get_or_insert_default()
8716        }
8717        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8718        pub fn n_opt(&self) -> Option<&str> {
8719            self.n.as_ref().map(|field| field as _)
8720        }
8721        ///Sets `n` with the provided value.
8722        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8723            self.n = Some(field.into().into());
8724        }
8725        ///Sets `n` with the provided value.
8726        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8727            self.set_n(field.into());
8728            self
8729        }
8730        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8731        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8732            self.alg.as_mut().map(|field| field as _)
8733        }
8734        ///Returns a mutable reference to `alg`.
8735        ///If the field is unset, it is first initialized with the default value.
8736        pub fn alg_mut(&mut self) -> &mut String {
8737            self.alg.get_or_insert_default()
8738        }
8739        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8740        pub fn alg_opt(&self) -> Option<&str> {
8741            self.alg.as_ref().map(|field| field as _)
8742        }
8743        ///Sets `alg` with the provided value.
8744        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8745            self.alg = Some(field.into().into());
8746        }
8747        ///Sets `alg` with the provided value.
8748        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8749            self.set_alg(field.into());
8750            self
8751        }
8752    }
8753    impl super::JwkId {
8754        pub const fn const_default() -> Self {
8755            Self { iss: None, kid: None }
8756        }
8757        #[doc(hidden)]
8758        pub fn default_instance() -> &'static Self {
8759            static DEFAULT: super::JwkId = super::JwkId::const_default();
8760            &DEFAULT
8761        }
8762        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8763        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8764            self.iss.as_mut().map(|field| field as _)
8765        }
8766        ///Returns a mutable reference to `iss`.
8767        ///If the field is unset, it is first initialized with the default value.
8768        pub fn iss_mut(&mut self) -> &mut String {
8769            self.iss.get_or_insert_default()
8770        }
8771        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8772        pub fn iss_opt(&self) -> Option<&str> {
8773            self.iss.as_ref().map(|field| field as _)
8774        }
8775        ///Sets `iss` with the provided value.
8776        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8777            self.iss = Some(field.into().into());
8778        }
8779        ///Sets `iss` with the provided value.
8780        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8781            self.set_iss(field.into());
8782            self
8783        }
8784        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8785        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8786            self.kid.as_mut().map(|field| field as _)
8787        }
8788        ///Returns a mutable reference to `kid`.
8789        ///If the field is unset, it is first initialized with the default value.
8790        pub fn kid_mut(&mut self) -> &mut String {
8791            self.kid.get_or_insert_default()
8792        }
8793        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8794        pub fn kid_opt(&self) -> Option<&str> {
8795            self.kid.as_ref().map(|field| field as _)
8796        }
8797        ///Sets `kid` with the provided value.
8798        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8799            self.kid = Some(field.into().into());
8800        }
8801        ///Sets `kid` with the provided value.
8802        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8803            self.set_kid(field.into());
8804            self
8805        }
8806    }
8807    impl super::Linkage {
8808        pub const fn const_default() -> Self {
8809            Self {
8810                original_id: None,
8811                upgraded_id: None,
8812                upgraded_version: None,
8813            }
8814        }
8815        #[doc(hidden)]
8816        pub fn default_instance() -> &'static Self {
8817            static DEFAULT: super::Linkage = super::Linkage::const_default();
8818            &DEFAULT
8819        }
8820        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8821        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8822            self.original_id.as_mut().map(|field| field as _)
8823        }
8824        ///Returns a mutable reference to `original_id`.
8825        ///If the field is unset, it is first initialized with the default value.
8826        pub fn original_id_mut(&mut self) -> &mut String {
8827            self.original_id.get_or_insert_default()
8828        }
8829        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8830        pub fn original_id_opt(&self) -> Option<&str> {
8831            self.original_id.as_ref().map(|field| field as _)
8832        }
8833        ///Sets `original_id` with the provided value.
8834        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8835            self.original_id = Some(field.into().into());
8836        }
8837        ///Sets `original_id` with the provided value.
8838        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8839            self.set_original_id(field.into());
8840            self
8841        }
8842        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8843        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8844            self.upgraded_id.as_mut().map(|field| field as _)
8845        }
8846        ///Returns a mutable reference to `upgraded_id`.
8847        ///If the field is unset, it is first initialized with the default value.
8848        pub fn upgraded_id_mut(&mut self) -> &mut String {
8849            self.upgraded_id.get_or_insert_default()
8850        }
8851        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8852        pub fn upgraded_id_opt(&self) -> Option<&str> {
8853            self.upgraded_id.as_ref().map(|field| field as _)
8854        }
8855        ///Sets `upgraded_id` with the provided value.
8856        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8857            self.upgraded_id = Some(field.into().into());
8858        }
8859        ///Sets `upgraded_id` with the provided value.
8860        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8861            self.set_upgraded_id(field.into());
8862            self
8863        }
8864        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8865        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8866            self.upgraded_version.as_mut().map(|field| field as _)
8867        }
8868        ///Returns a mutable reference to `upgraded_version`.
8869        ///If the field is unset, it is first initialized with the default value.
8870        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8871            self.upgraded_version.get_or_insert_default()
8872        }
8873        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8874        pub fn upgraded_version_opt(&self) -> Option<u64> {
8875            self.upgraded_version.as_ref().map(|field| *field)
8876        }
8877        ///Sets `upgraded_version` with the provided value.
8878        pub fn set_upgraded_version(&mut self, field: u64) {
8879            self.upgraded_version = Some(field);
8880        }
8881        ///Sets `upgraded_version` with the provided value.
8882        pub fn with_upgraded_version(mut self, field: u64) -> Self {
8883            self.set_upgraded_version(field);
8884            self
8885        }
8886    }
8887    impl super::ListBalancesRequest {
8888        pub const fn const_default() -> Self {
8889            Self {
8890                owner: None,
8891                page_size: None,
8892                page_token: None,
8893            }
8894        }
8895        #[doc(hidden)]
8896        pub fn default_instance() -> &'static Self {
8897            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8898            &DEFAULT
8899        }
8900        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8901        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8902            self.owner.as_mut().map(|field| field as _)
8903        }
8904        ///Returns a mutable reference to `owner`.
8905        ///If the field is unset, it is first initialized with the default value.
8906        pub fn owner_mut(&mut self) -> &mut String {
8907            self.owner.get_or_insert_default()
8908        }
8909        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8910        pub fn owner_opt(&self) -> Option<&str> {
8911            self.owner.as_ref().map(|field| field as _)
8912        }
8913        ///Sets `owner` with the provided value.
8914        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8915            self.owner = Some(field.into().into());
8916        }
8917        ///Sets `owner` with the provided value.
8918        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8919            self.set_owner(field.into());
8920            self
8921        }
8922        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8923        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8924            self.page_size.as_mut().map(|field| field as _)
8925        }
8926        ///Returns a mutable reference to `page_size`.
8927        ///If the field is unset, it is first initialized with the default value.
8928        pub fn page_size_mut(&mut self) -> &mut u32 {
8929            self.page_size.get_or_insert_default()
8930        }
8931        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8932        pub fn page_size_opt(&self) -> Option<u32> {
8933            self.page_size.as_ref().map(|field| *field)
8934        }
8935        ///Sets `page_size` with the provided value.
8936        pub fn set_page_size(&mut self, field: u32) {
8937            self.page_size = Some(field);
8938        }
8939        ///Sets `page_size` with the provided value.
8940        pub fn with_page_size(mut self, field: u32) -> Self {
8941            self.set_page_size(field);
8942            self
8943        }
8944        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8945        pub fn page_token_opt(&self) -> Option<&[u8]> {
8946            self.page_token.as_ref().map(|field| field as _)
8947        }
8948        ///Sets `page_token` with the provided value.
8949        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8950            self.page_token = Some(field.into().into());
8951        }
8952        ///Sets `page_token` with the provided value.
8953        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8954            mut self,
8955            field: T,
8956        ) -> Self {
8957            self.set_page_token(field.into());
8958            self
8959        }
8960    }
8961    impl super::ListBalancesResponse {
8962        pub const fn const_default() -> Self {
8963            Self {
8964                balances: Vec::new(),
8965                next_page_token: None,
8966            }
8967        }
8968        #[doc(hidden)]
8969        pub fn default_instance() -> &'static Self {
8970            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8971            &DEFAULT
8972        }
8973        ///Returns the value of `balances`, or the default value if `balances` is unset.
8974        pub fn balances(&self) -> &[super::Balance] {
8975            &self.balances
8976        }
8977        ///Returns a mutable reference to `balances`.
8978        ///If the field is unset, it is first initialized with the default value.
8979        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8980            &mut self.balances
8981        }
8982        ///Sets `balances` with the provided value.
8983        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8984            self.balances = field;
8985        }
8986        ///Sets `balances` with the provided value.
8987        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8988            self.set_balances(field);
8989            self
8990        }
8991        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8992        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8993            self.next_page_token.as_ref().map(|field| field as _)
8994        }
8995        ///Sets `next_page_token` with the provided value.
8996        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8997            self.next_page_token = Some(field.into().into());
8998        }
8999        ///Sets `next_page_token` with the provided value.
9000        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9001            mut self,
9002            field: T,
9003        ) -> Self {
9004            self.set_next_page_token(field.into());
9005            self
9006        }
9007    }
9008    impl super::ListDynamicFieldsRequest {
9009        pub const fn const_default() -> Self {
9010            Self {
9011                parent: None,
9012                page_size: None,
9013                page_token: None,
9014                read_mask: None,
9015            }
9016        }
9017        #[doc(hidden)]
9018        pub fn default_instance() -> &'static Self {
9019            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9020            &DEFAULT
9021        }
9022        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9023        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9024            self.parent.as_mut().map(|field| field as _)
9025        }
9026        ///Returns a mutable reference to `parent`.
9027        ///If the field is unset, it is first initialized with the default value.
9028        pub fn parent_mut(&mut self) -> &mut String {
9029            self.parent.get_or_insert_default()
9030        }
9031        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
9032        pub fn parent_opt(&self) -> Option<&str> {
9033            self.parent.as_ref().map(|field| field as _)
9034        }
9035        ///Sets `parent` with the provided value.
9036        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9037            self.parent = Some(field.into().into());
9038        }
9039        ///Sets `parent` with the provided value.
9040        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9041            self.set_parent(field.into());
9042            self
9043        }
9044        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9045        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9046            self.page_size.as_mut().map(|field| field as _)
9047        }
9048        ///Returns a mutable reference to `page_size`.
9049        ///If the field is unset, it is first initialized with the default value.
9050        pub fn page_size_mut(&mut self) -> &mut u32 {
9051            self.page_size.get_or_insert_default()
9052        }
9053        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9054        pub fn page_size_opt(&self) -> Option<u32> {
9055            self.page_size.as_ref().map(|field| *field)
9056        }
9057        ///Sets `page_size` with the provided value.
9058        pub fn set_page_size(&mut self, field: u32) {
9059            self.page_size = Some(field);
9060        }
9061        ///Sets `page_size` with the provided value.
9062        pub fn with_page_size(mut self, field: u32) -> Self {
9063            self.set_page_size(field);
9064            self
9065        }
9066        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9067        pub fn page_token_opt(&self) -> Option<&[u8]> {
9068            self.page_token.as_ref().map(|field| field as _)
9069        }
9070        ///Sets `page_token` with the provided value.
9071        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9072            self.page_token = Some(field.into().into());
9073        }
9074        ///Sets `page_token` with the provided value.
9075        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9076            mut self,
9077            field: T,
9078        ) -> Self {
9079            self.set_page_token(field.into());
9080            self
9081        }
9082        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9083        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9084            self.read_mask.as_mut().map(|field| field as _)
9085        }
9086        ///Returns a mutable reference to `read_mask`.
9087        ///If the field is unset, it is first initialized with the default value.
9088        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9089            self.read_mask.get_or_insert_default()
9090        }
9091        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9092        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9093            self.read_mask.as_ref().map(|field| field as _)
9094        }
9095        ///Sets `read_mask` with the provided value.
9096        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9097            self.read_mask = Some(field.into().into());
9098        }
9099        ///Sets `read_mask` with the provided value.
9100        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9101            mut self,
9102            field: T,
9103        ) -> Self {
9104            self.set_read_mask(field.into());
9105            self
9106        }
9107    }
9108    impl super::ListDynamicFieldsResponse {
9109        pub const fn const_default() -> Self {
9110            Self {
9111                dynamic_fields: Vec::new(),
9112                next_page_token: None,
9113            }
9114        }
9115        #[doc(hidden)]
9116        pub fn default_instance() -> &'static Self {
9117            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9118            &DEFAULT
9119        }
9120        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
9121        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9122            &self.dynamic_fields
9123        }
9124        ///Returns a mutable reference to `dynamic_fields`.
9125        ///If the field is unset, it is first initialized with the default value.
9126        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9127            &mut self.dynamic_fields
9128        }
9129        ///Sets `dynamic_fields` with the provided value.
9130        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9131            self.dynamic_fields = field;
9132        }
9133        ///Sets `dynamic_fields` with the provided value.
9134        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9135            self.set_dynamic_fields(field);
9136            self
9137        }
9138        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9139        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9140            self.next_page_token.as_ref().map(|field| field as _)
9141        }
9142        ///Sets `next_page_token` with the provided value.
9143        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9144            self.next_page_token = Some(field.into().into());
9145        }
9146        ///Sets `next_page_token` with the provided value.
9147        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9148            mut self,
9149            field: T,
9150        ) -> Self {
9151            self.set_next_page_token(field.into());
9152            self
9153        }
9154    }
9155    impl super::ListOwnedObjectsRequest {
9156        pub const fn const_default() -> Self {
9157            Self {
9158                owner: None,
9159                page_size: None,
9160                page_token: None,
9161                read_mask: None,
9162                object_type: None,
9163            }
9164        }
9165        #[doc(hidden)]
9166        pub fn default_instance() -> &'static Self {
9167            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9168            &DEFAULT
9169        }
9170        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9171        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9172            self.owner.as_mut().map(|field| field as _)
9173        }
9174        ///Returns a mutable reference to `owner`.
9175        ///If the field is unset, it is first initialized with the default value.
9176        pub fn owner_mut(&mut self) -> &mut String {
9177            self.owner.get_or_insert_default()
9178        }
9179        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9180        pub fn owner_opt(&self) -> Option<&str> {
9181            self.owner.as_ref().map(|field| field as _)
9182        }
9183        ///Sets `owner` with the provided value.
9184        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9185            self.owner = Some(field.into().into());
9186        }
9187        ///Sets `owner` with the provided value.
9188        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9189            self.set_owner(field.into());
9190            self
9191        }
9192        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9193        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9194            self.page_size.as_mut().map(|field| field as _)
9195        }
9196        ///Returns a mutable reference to `page_size`.
9197        ///If the field is unset, it is first initialized with the default value.
9198        pub fn page_size_mut(&mut self) -> &mut u32 {
9199            self.page_size.get_or_insert_default()
9200        }
9201        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9202        pub fn page_size_opt(&self) -> Option<u32> {
9203            self.page_size.as_ref().map(|field| *field)
9204        }
9205        ///Sets `page_size` with the provided value.
9206        pub fn set_page_size(&mut self, field: u32) {
9207            self.page_size = Some(field);
9208        }
9209        ///Sets `page_size` with the provided value.
9210        pub fn with_page_size(mut self, field: u32) -> Self {
9211            self.set_page_size(field);
9212            self
9213        }
9214        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9215        pub fn page_token_opt(&self) -> Option<&[u8]> {
9216            self.page_token.as_ref().map(|field| field as _)
9217        }
9218        ///Sets `page_token` with the provided value.
9219        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9220            self.page_token = Some(field.into().into());
9221        }
9222        ///Sets `page_token` with the provided value.
9223        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9224            mut self,
9225            field: T,
9226        ) -> Self {
9227            self.set_page_token(field.into());
9228            self
9229        }
9230        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9231        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9232            self.read_mask.as_mut().map(|field| field as _)
9233        }
9234        ///Returns a mutable reference to `read_mask`.
9235        ///If the field is unset, it is first initialized with the default value.
9236        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9237            self.read_mask.get_or_insert_default()
9238        }
9239        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9240        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9241            self.read_mask.as_ref().map(|field| field as _)
9242        }
9243        ///Sets `read_mask` with the provided value.
9244        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9245            self.read_mask = Some(field.into().into());
9246        }
9247        ///Sets `read_mask` with the provided value.
9248        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9249            mut self,
9250            field: T,
9251        ) -> Self {
9252            self.set_read_mask(field.into());
9253            self
9254        }
9255        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9256        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9257            self.object_type.as_mut().map(|field| field as _)
9258        }
9259        ///Returns a mutable reference to `object_type`.
9260        ///If the field is unset, it is first initialized with the default value.
9261        pub fn object_type_mut(&mut self) -> &mut String {
9262            self.object_type.get_or_insert_default()
9263        }
9264        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9265        pub fn object_type_opt(&self) -> Option<&str> {
9266            self.object_type.as_ref().map(|field| field as _)
9267        }
9268        ///Sets `object_type` with the provided value.
9269        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9270            self.object_type = Some(field.into().into());
9271        }
9272        ///Sets `object_type` with the provided value.
9273        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9274            self.set_object_type(field.into());
9275            self
9276        }
9277    }
9278    impl super::ListOwnedObjectsResponse {
9279        pub const fn const_default() -> Self {
9280            Self {
9281                objects: Vec::new(),
9282                next_page_token: None,
9283            }
9284        }
9285        #[doc(hidden)]
9286        pub fn default_instance() -> &'static Self {
9287            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9288            &DEFAULT
9289        }
9290        ///Returns the value of `objects`, or the default value if `objects` is unset.
9291        pub fn objects(&self) -> &[super::Object] {
9292            &self.objects
9293        }
9294        ///Returns a mutable reference to `objects`.
9295        ///If the field is unset, it is first initialized with the default value.
9296        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9297            &mut self.objects
9298        }
9299        ///Sets `objects` with the provided value.
9300        pub fn set_objects(&mut self, field: Vec<super::Object>) {
9301            self.objects = field;
9302        }
9303        ///Sets `objects` with the provided value.
9304        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9305            self.set_objects(field);
9306            self
9307        }
9308        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9309        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9310            self.next_page_token.as_ref().map(|field| field as _)
9311        }
9312        ///Sets `next_page_token` with the provided value.
9313        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9314            self.next_page_token = Some(field.into().into());
9315        }
9316        ///Sets `next_page_token` with the provided value.
9317        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9318            mut self,
9319            field: T,
9320        ) -> Self {
9321            self.set_next_page_token(field.into());
9322            self
9323        }
9324    }
9325    impl super::ListPackageVersionsRequest {
9326        pub const fn const_default() -> Self {
9327            Self {
9328                package_id: None,
9329                page_size: None,
9330                page_token: None,
9331            }
9332        }
9333        #[doc(hidden)]
9334        pub fn default_instance() -> &'static Self {
9335            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9336            &DEFAULT
9337        }
9338        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9339        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9340            self.package_id.as_mut().map(|field| field as _)
9341        }
9342        ///Returns a mutable reference to `package_id`.
9343        ///If the field is unset, it is first initialized with the default value.
9344        pub fn package_id_mut(&mut self) -> &mut String {
9345            self.package_id.get_or_insert_default()
9346        }
9347        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9348        pub fn package_id_opt(&self) -> Option<&str> {
9349            self.package_id.as_ref().map(|field| field as _)
9350        }
9351        ///Sets `package_id` with the provided value.
9352        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9353            self.package_id = Some(field.into().into());
9354        }
9355        ///Sets `package_id` with the provided value.
9356        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9357            self.set_package_id(field.into());
9358            self
9359        }
9360        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9361        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9362            self.page_size.as_mut().map(|field| field as _)
9363        }
9364        ///Returns a mutable reference to `page_size`.
9365        ///If the field is unset, it is first initialized with the default value.
9366        pub fn page_size_mut(&mut self) -> &mut u32 {
9367            self.page_size.get_or_insert_default()
9368        }
9369        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9370        pub fn page_size_opt(&self) -> Option<u32> {
9371            self.page_size.as_ref().map(|field| *field)
9372        }
9373        ///Sets `page_size` with the provided value.
9374        pub fn set_page_size(&mut self, field: u32) {
9375            self.page_size = Some(field);
9376        }
9377        ///Sets `page_size` with the provided value.
9378        pub fn with_page_size(mut self, field: u32) -> Self {
9379            self.set_page_size(field);
9380            self
9381        }
9382        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9383        pub fn page_token_opt(&self) -> Option<&[u8]> {
9384            self.page_token.as_ref().map(|field| field as _)
9385        }
9386        ///Sets `page_token` with the provided value.
9387        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9388            self.page_token = Some(field.into().into());
9389        }
9390        ///Sets `page_token` with the provided value.
9391        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9392            mut self,
9393            field: T,
9394        ) -> Self {
9395            self.set_page_token(field.into());
9396            self
9397        }
9398    }
9399    impl super::ListPackageVersionsResponse {
9400        pub const fn const_default() -> Self {
9401            Self {
9402                versions: Vec::new(),
9403                next_page_token: None,
9404            }
9405        }
9406        #[doc(hidden)]
9407        pub fn default_instance() -> &'static Self {
9408            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9409            &DEFAULT
9410        }
9411        ///Returns the value of `versions`, or the default value if `versions` is unset.
9412        pub fn versions(&self) -> &[super::PackageVersion] {
9413            &self.versions
9414        }
9415        ///Returns a mutable reference to `versions`.
9416        ///If the field is unset, it is first initialized with the default value.
9417        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9418            &mut self.versions
9419        }
9420        ///Sets `versions` with the provided value.
9421        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9422            self.versions = field;
9423        }
9424        ///Sets `versions` with the provided value.
9425        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9426            self.set_versions(field);
9427            self
9428        }
9429        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9430        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9431            self.next_page_token.as_ref().map(|field| field as _)
9432        }
9433        ///Sets `next_page_token` with the provided value.
9434        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9435            self.next_page_token = Some(field.into().into());
9436        }
9437        ///Sets `next_page_token` with the provided value.
9438        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9439            mut self,
9440            field: T,
9441        ) -> Self {
9442            self.set_next_page_token(field.into());
9443            self
9444        }
9445    }
9446    impl super::LookupNameRequest {
9447        pub const fn const_default() -> Self {
9448            Self { name: None }
9449        }
9450        #[doc(hidden)]
9451        pub fn default_instance() -> &'static Self {
9452            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9453            &DEFAULT
9454        }
9455        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9456        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9457            self.name.as_mut().map(|field| field as _)
9458        }
9459        ///Returns a mutable reference to `name`.
9460        ///If the field is unset, it is first initialized with the default value.
9461        pub fn name_mut(&mut self) -> &mut String {
9462            self.name.get_or_insert_default()
9463        }
9464        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9465        pub fn name_opt(&self) -> Option<&str> {
9466            self.name.as_ref().map(|field| field as _)
9467        }
9468        ///Sets `name` with the provided value.
9469        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9470            self.name = Some(field.into().into());
9471        }
9472        ///Sets `name` with the provided value.
9473        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9474            self.set_name(field.into());
9475            self
9476        }
9477    }
9478    impl super::LookupNameResponse {
9479        pub const fn const_default() -> Self {
9480            Self { record: None }
9481        }
9482        #[doc(hidden)]
9483        pub fn default_instance() -> &'static Self {
9484            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9485            &DEFAULT
9486        }
9487        ///Returns the value of `record`, or the default value if `record` is unset.
9488        pub fn record(&self) -> &super::NameRecord {
9489            self.record
9490                .as_ref()
9491                .map(|field| field as _)
9492                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9493        }
9494        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9495        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9496            self.record.as_mut().map(|field| field as _)
9497        }
9498        ///Returns a mutable reference to `record`.
9499        ///If the field is unset, it is first initialized with the default value.
9500        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9501            self.record.get_or_insert_default()
9502        }
9503        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9504        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9505            self.record.as_ref().map(|field| field as _)
9506        }
9507        ///Sets `record` with the provided value.
9508        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9509            self.record = Some(field.into().into());
9510        }
9511        ///Sets `record` with the provided value.
9512        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9513            self.set_record(field.into());
9514            self
9515        }
9516    }
9517    impl super::MakeMoveVector {
9518        pub const fn const_default() -> Self {
9519            Self {
9520                element_type: None,
9521                elements: Vec::new(),
9522            }
9523        }
9524        #[doc(hidden)]
9525        pub fn default_instance() -> &'static Self {
9526            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9527            &DEFAULT
9528        }
9529        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9530        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9531            self.element_type.as_mut().map(|field| field as _)
9532        }
9533        ///Returns a mutable reference to `element_type`.
9534        ///If the field is unset, it is first initialized with the default value.
9535        pub fn element_type_mut(&mut self) -> &mut String {
9536            self.element_type.get_or_insert_default()
9537        }
9538        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9539        pub fn element_type_opt(&self) -> Option<&str> {
9540            self.element_type.as_ref().map(|field| field as _)
9541        }
9542        ///Sets `element_type` with the provided value.
9543        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9544            self.element_type = Some(field.into().into());
9545        }
9546        ///Sets `element_type` with the provided value.
9547        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9548            self.set_element_type(field.into());
9549            self
9550        }
9551        ///Returns the value of `elements`, or the default value if `elements` is unset.
9552        pub fn elements(&self) -> &[super::Argument] {
9553            &self.elements
9554        }
9555        ///Returns a mutable reference to `elements`.
9556        ///If the field is unset, it is first initialized with the default value.
9557        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9558            &mut self.elements
9559        }
9560        ///Sets `elements` with the provided value.
9561        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9562            self.elements = field;
9563        }
9564        ///Sets `elements` with the provided value.
9565        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9566            self.set_elements(field);
9567            self
9568        }
9569    }
9570    impl super::MergeCoins {
9571        pub const fn const_default() -> Self {
9572            Self {
9573                coin: None,
9574                coins_to_merge: Vec::new(),
9575            }
9576        }
9577        #[doc(hidden)]
9578        pub fn default_instance() -> &'static Self {
9579            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9580            &DEFAULT
9581        }
9582        ///Returns the value of `coin`, or the default value if `coin` is unset.
9583        pub fn coin(&self) -> &super::Argument {
9584            self.coin
9585                .as_ref()
9586                .map(|field| field as _)
9587                .unwrap_or_else(|| super::Argument::default_instance() as _)
9588        }
9589        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9590        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9591            self.coin.as_mut().map(|field| field as _)
9592        }
9593        ///Returns a mutable reference to `coin`.
9594        ///If the field is unset, it is first initialized with the default value.
9595        pub fn coin_mut(&mut self) -> &mut super::Argument {
9596            self.coin.get_or_insert_default()
9597        }
9598        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9599        pub fn coin_opt(&self) -> Option<&super::Argument> {
9600            self.coin.as_ref().map(|field| field as _)
9601        }
9602        ///Sets `coin` with the provided value.
9603        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9604            self.coin = Some(field.into().into());
9605        }
9606        ///Sets `coin` with the provided value.
9607        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9608            self.set_coin(field.into());
9609            self
9610        }
9611        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9612        pub fn coins_to_merge(&self) -> &[super::Argument] {
9613            &self.coins_to_merge
9614        }
9615        ///Returns a mutable reference to `coins_to_merge`.
9616        ///If the field is unset, it is first initialized with the default value.
9617        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9618            &mut self.coins_to_merge
9619        }
9620        ///Sets `coins_to_merge` with the provided value.
9621        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9622            self.coins_to_merge = field;
9623        }
9624        ///Sets `coins_to_merge` with the provided value.
9625        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9626            self.set_coins_to_merge(field);
9627            self
9628        }
9629    }
9630    impl super::Module {
9631        pub const fn const_default() -> Self {
9632            Self {
9633                name: None,
9634                contents: None,
9635                datatypes: Vec::new(),
9636                functions: Vec::new(),
9637            }
9638        }
9639        #[doc(hidden)]
9640        pub fn default_instance() -> &'static Self {
9641            static DEFAULT: super::Module = super::Module::const_default();
9642            &DEFAULT
9643        }
9644        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9645        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9646            self.name.as_mut().map(|field| field as _)
9647        }
9648        ///Returns a mutable reference to `name`.
9649        ///If the field is unset, it is first initialized with the default value.
9650        pub fn name_mut(&mut self) -> &mut String {
9651            self.name.get_or_insert_default()
9652        }
9653        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9654        pub fn name_opt(&self) -> Option<&str> {
9655            self.name.as_ref().map(|field| field as _)
9656        }
9657        ///Sets `name` with the provided value.
9658        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9659            self.name = Some(field.into().into());
9660        }
9661        ///Sets `name` with the provided value.
9662        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9663            self.set_name(field.into());
9664            self
9665        }
9666        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9667        pub fn contents_opt(&self) -> Option<&[u8]> {
9668            self.contents.as_ref().map(|field| field as _)
9669        }
9670        ///Sets `contents` with the provided value.
9671        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9672            self.contents = Some(field.into().into());
9673        }
9674        ///Sets `contents` with the provided value.
9675        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9676            mut self,
9677            field: T,
9678        ) -> Self {
9679            self.set_contents(field.into());
9680            self
9681        }
9682        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9683        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9684            &self.datatypes
9685        }
9686        ///Returns a mutable reference to `datatypes`.
9687        ///If the field is unset, it is first initialized with the default value.
9688        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9689            &mut self.datatypes
9690        }
9691        ///Sets `datatypes` with the provided value.
9692        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9693            self.datatypes = field;
9694        }
9695        ///Sets `datatypes` with the provided value.
9696        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9697            self.set_datatypes(field);
9698            self
9699        }
9700        ///Returns the value of `functions`, or the default value if `functions` is unset.
9701        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9702            &self.functions
9703        }
9704        ///Returns a mutable reference to `functions`.
9705        ///If the field is unset, it is first initialized with the default value.
9706        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9707            &mut self.functions
9708        }
9709        ///Sets `functions` with the provided value.
9710        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9711            self.functions = field;
9712        }
9713        ///Sets `functions` with the provided value.
9714        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9715            self.set_functions(field);
9716            self
9717        }
9718    }
9719    impl super::MoveAbort {
9720        pub const fn const_default() -> Self {
9721            Self {
9722                abort_code: None,
9723                location: None,
9724                clever_error: None,
9725            }
9726        }
9727        #[doc(hidden)]
9728        pub fn default_instance() -> &'static Self {
9729            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9730            &DEFAULT
9731        }
9732        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9733        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9734            self.abort_code.as_mut().map(|field| field as _)
9735        }
9736        ///Returns a mutable reference to `abort_code`.
9737        ///If the field is unset, it is first initialized with the default value.
9738        pub fn abort_code_mut(&mut self) -> &mut u64 {
9739            self.abort_code.get_or_insert_default()
9740        }
9741        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9742        pub fn abort_code_opt(&self) -> Option<u64> {
9743            self.abort_code.as_ref().map(|field| *field)
9744        }
9745        ///Sets `abort_code` with the provided value.
9746        pub fn set_abort_code(&mut self, field: u64) {
9747            self.abort_code = Some(field);
9748        }
9749        ///Sets `abort_code` with the provided value.
9750        pub fn with_abort_code(mut self, field: u64) -> Self {
9751            self.set_abort_code(field);
9752            self
9753        }
9754        ///Returns the value of `location`, or the default value if `location` is unset.
9755        pub fn location(&self) -> &super::MoveLocation {
9756            self.location
9757                .as_ref()
9758                .map(|field| field as _)
9759                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9760        }
9761        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9762        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9763            self.location.as_mut().map(|field| field as _)
9764        }
9765        ///Returns a mutable reference to `location`.
9766        ///If the field is unset, it is first initialized with the default value.
9767        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9768            self.location.get_or_insert_default()
9769        }
9770        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9771        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9772            self.location.as_ref().map(|field| field as _)
9773        }
9774        ///Sets `location` with the provided value.
9775        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9776            self.location = Some(field.into().into());
9777        }
9778        ///Sets `location` with the provided value.
9779        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9780            self.set_location(field.into());
9781            self
9782        }
9783        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9784        pub fn clever_error(&self) -> &super::CleverError {
9785            self.clever_error
9786                .as_ref()
9787                .map(|field| field as _)
9788                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9789        }
9790        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9791        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9792            self.clever_error.as_mut().map(|field| field as _)
9793        }
9794        ///Returns a mutable reference to `clever_error`.
9795        ///If the field is unset, it is first initialized with the default value.
9796        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9797            self.clever_error.get_or_insert_default()
9798        }
9799        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9800        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9801            self.clever_error.as_ref().map(|field| field as _)
9802        }
9803        ///Sets `clever_error` with the provided value.
9804        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9805            self.clever_error = Some(field.into().into());
9806        }
9807        ///Sets `clever_error` with the provided value.
9808        pub fn with_clever_error<T: Into<super::CleverError>>(
9809            mut self,
9810            field: T,
9811        ) -> Self {
9812            self.set_clever_error(field.into());
9813            self
9814        }
9815    }
9816    impl super::MoveCall {
9817        pub const fn const_default() -> Self {
9818            Self {
9819                package: None,
9820                module: None,
9821                function: None,
9822                type_arguments: Vec::new(),
9823                arguments: Vec::new(),
9824            }
9825        }
9826        #[doc(hidden)]
9827        pub fn default_instance() -> &'static Self {
9828            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9829            &DEFAULT
9830        }
9831        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9832        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9833            self.package.as_mut().map(|field| field as _)
9834        }
9835        ///Returns a mutable reference to `package`.
9836        ///If the field is unset, it is first initialized with the default value.
9837        pub fn package_mut(&mut self) -> &mut String {
9838            self.package.get_or_insert_default()
9839        }
9840        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9841        pub fn package_opt(&self) -> Option<&str> {
9842            self.package.as_ref().map(|field| field as _)
9843        }
9844        ///Sets `package` with the provided value.
9845        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9846            self.package = Some(field.into().into());
9847        }
9848        ///Sets `package` with the provided value.
9849        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9850            self.set_package(field.into());
9851            self
9852        }
9853        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9854        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9855            self.module.as_mut().map(|field| field as _)
9856        }
9857        ///Returns a mutable reference to `module`.
9858        ///If the field is unset, it is first initialized with the default value.
9859        pub fn module_mut(&mut self) -> &mut String {
9860            self.module.get_or_insert_default()
9861        }
9862        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9863        pub fn module_opt(&self) -> Option<&str> {
9864            self.module.as_ref().map(|field| field as _)
9865        }
9866        ///Sets `module` with the provided value.
9867        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9868            self.module = Some(field.into().into());
9869        }
9870        ///Sets `module` with the provided value.
9871        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9872            self.set_module(field.into());
9873            self
9874        }
9875        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9876        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9877            self.function.as_mut().map(|field| field as _)
9878        }
9879        ///Returns a mutable reference to `function`.
9880        ///If the field is unset, it is first initialized with the default value.
9881        pub fn function_mut(&mut self) -> &mut String {
9882            self.function.get_or_insert_default()
9883        }
9884        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9885        pub fn function_opt(&self) -> Option<&str> {
9886            self.function.as_ref().map(|field| field as _)
9887        }
9888        ///Sets `function` with the provided value.
9889        pub fn set_function<T: Into<String>>(&mut self, field: T) {
9890            self.function = Some(field.into().into());
9891        }
9892        ///Sets `function` with the provided value.
9893        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9894            self.set_function(field.into());
9895            self
9896        }
9897        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
9898        pub fn type_arguments(&self) -> &[String] {
9899            &self.type_arguments
9900        }
9901        ///Returns a mutable reference to `type_arguments`.
9902        ///If the field is unset, it is first initialized with the default value.
9903        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9904            &mut self.type_arguments
9905        }
9906        ///Sets `type_arguments` with the provided value.
9907        pub fn set_type_arguments(&mut self, field: Vec<String>) {
9908            self.type_arguments = field;
9909        }
9910        ///Sets `type_arguments` with the provided value.
9911        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9912            self.set_type_arguments(field);
9913            self
9914        }
9915        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
9916        pub fn arguments(&self) -> &[super::Argument] {
9917            &self.arguments
9918        }
9919        ///Returns a mutable reference to `arguments`.
9920        ///If the field is unset, it is first initialized with the default value.
9921        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9922            &mut self.arguments
9923        }
9924        ///Sets `arguments` with the provided value.
9925        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9926            self.arguments = field;
9927        }
9928        ///Sets `arguments` with the provided value.
9929        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9930            self.set_arguments(field);
9931            self
9932        }
9933    }
9934    impl super::MoveLocation {
9935        pub const fn const_default() -> Self {
9936            Self {
9937                package: None,
9938                module: None,
9939                function: None,
9940                instruction: None,
9941                function_name: None,
9942            }
9943        }
9944        #[doc(hidden)]
9945        pub fn default_instance() -> &'static Self {
9946            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9947            &DEFAULT
9948        }
9949        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9950        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9951            self.package.as_mut().map(|field| field as _)
9952        }
9953        ///Returns a mutable reference to `package`.
9954        ///If the field is unset, it is first initialized with the default value.
9955        pub fn package_mut(&mut self) -> &mut String {
9956            self.package.get_or_insert_default()
9957        }
9958        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9959        pub fn package_opt(&self) -> Option<&str> {
9960            self.package.as_ref().map(|field| field as _)
9961        }
9962        ///Sets `package` with the provided value.
9963        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9964            self.package = Some(field.into().into());
9965        }
9966        ///Sets `package` with the provided value.
9967        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9968            self.set_package(field.into());
9969            self
9970        }
9971        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9972        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9973            self.module.as_mut().map(|field| field as _)
9974        }
9975        ///Returns a mutable reference to `module`.
9976        ///If the field is unset, it is first initialized with the default value.
9977        pub fn module_mut(&mut self) -> &mut String {
9978            self.module.get_or_insert_default()
9979        }
9980        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9981        pub fn module_opt(&self) -> Option<&str> {
9982            self.module.as_ref().map(|field| field as _)
9983        }
9984        ///Sets `module` with the provided value.
9985        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9986            self.module = Some(field.into().into());
9987        }
9988        ///Sets `module` with the provided value.
9989        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9990            self.set_module(field.into());
9991            self
9992        }
9993        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9994        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9995            self.function.as_mut().map(|field| field as _)
9996        }
9997        ///Returns a mutable reference to `function`.
9998        ///If the field is unset, it is first initialized with the default value.
9999        pub fn function_mut(&mut self) -> &mut u32 {
10000            self.function.get_or_insert_default()
10001        }
10002        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
10003        pub fn function_opt(&self) -> Option<u32> {
10004            self.function.as_ref().map(|field| *field)
10005        }
10006        ///Sets `function` with the provided value.
10007        pub fn set_function(&mut self, field: u32) {
10008            self.function = Some(field);
10009        }
10010        ///Sets `function` with the provided value.
10011        pub fn with_function(mut self, field: u32) -> Self {
10012            self.set_function(field);
10013            self
10014        }
10015        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10016        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10017            self.instruction.as_mut().map(|field| field as _)
10018        }
10019        ///Returns a mutable reference to `instruction`.
10020        ///If the field is unset, it is first initialized with the default value.
10021        pub fn instruction_mut(&mut self) -> &mut u32 {
10022            self.instruction.get_or_insert_default()
10023        }
10024        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10025        pub fn instruction_opt(&self) -> Option<u32> {
10026            self.instruction.as_ref().map(|field| *field)
10027        }
10028        ///Sets `instruction` with the provided value.
10029        pub fn set_instruction(&mut self, field: u32) {
10030            self.instruction = Some(field);
10031        }
10032        ///Sets `instruction` with the provided value.
10033        pub fn with_instruction(mut self, field: u32) -> Self {
10034            self.set_instruction(field);
10035            self
10036        }
10037        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10038        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10039            self.function_name.as_mut().map(|field| field as _)
10040        }
10041        ///Returns a mutable reference to `function_name`.
10042        ///If the field is unset, it is first initialized with the default value.
10043        pub fn function_name_mut(&mut self) -> &mut String {
10044            self.function_name.get_or_insert_default()
10045        }
10046        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10047        pub fn function_name_opt(&self) -> Option<&str> {
10048            self.function_name.as_ref().map(|field| field as _)
10049        }
10050        ///Sets `function_name` with the provided value.
10051        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10052            self.function_name = Some(field.into().into());
10053        }
10054        ///Sets `function_name` with the provided value.
10055        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10056            self.set_function_name(field.into());
10057            self
10058        }
10059    }
10060    impl super::MoveTable {
10061        pub const fn const_default() -> Self {
10062            Self { id: None, size: None }
10063        }
10064        #[doc(hidden)]
10065        pub fn default_instance() -> &'static Self {
10066            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10067            &DEFAULT
10068        }
10069        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10070        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10071            self.id.as_mut().map(|field| field as _)
10072        }
10073        ///Returns a mutable reference to `id`.
10074        ///If the field is unset, it is first initialized with the default value.
10075        pub fn id_mut(&mut self) -> &mut String {
10076            self.id.get_or_insert_default()
10077        }
10078        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10079        pub fn id_opt(&self) -> Option<&str> {
10080            self.id.as_ref().map(|field| field as _)
10081        }
10082        ///Sets `id` with the provided value.
10083        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10084            self.id = Some(field.into().into());
10085        }
10086        ///Sets `id` with the provided value.
10087        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10088            self.set_id(field.into());
10089            self
10090        }
10091        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10092        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10093            self.size.as_mut().map(|field| field as _)
10094        }
10095        ///Returns a mutable reference to `size`.
10096        ///If the field is unset, it is first initialized with the default value.
10097        pub fn size_mut(&mut self) -> &mut u64 {
10098            self.size.get_or_insert_default()
10099        }
10100        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10101        pub fn size_opt(&self) -> Option<u64> {
10102            self.size.as_ref().map(|field| *field)
10103        }
10104        ///Sets `size` with the provided value.
10105        pub fn set_size(&mut self, field: u64) {
10106            self.size = Some(field);
10107        }
10108        ///Sets `size` with the provided value.
10109        pub fn with_size(mut self, field: u64) -> Self {
10110            self.set_size(field);
10111            self
10112        }
10113    }
10114    impl super::MultisigAggregatedSignature {
10115        pub const fn const_default() -> Self {
10116            Self {
10117                signatures: Vec::new(),
10118                bitmap: None,
10119                legacy_bitmap: None,
10120                committee: None,
10121            }
10122        }
10123        #[doc(hidden)]
10124        pub fn default_instance() -> &'static Self {
10125            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10126            &DEFAULT
10127        }
10128        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
10129        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10130            &self.signatures
10131        }
10132        ///Returns a mutable reference to `signatures`.
10133        ///If the field is unset, it is first initialized with the default value.
10134        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10135            &mut self.signatures
10136        }
10137        ///Sets `signatures` with the provided value.
10138        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10139            self.signatures = field;
10140        }
10141        ///Sets `signatures` with the provided value.
10142        pub fn with_signatures(
10143            mut self,
10144            field: Vec<super::MultisigMemberSignature>,
10145        ) -> Self {
10146            self.set_signatures(field);
10147            self
10148        }
10149        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10150        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10151            self.bitmap.as_mut().map(|field| field as _)
10152        }
10153        ///Returns a mutable reference to `bitmap`.
10154        ///If the field is unset, it is first initialized with the default value.
10155        pub fn bitmap_mut(&mut self) -> &mut u32 {
10156            self.bitmap.get_or_insert_default()
10157        }
10158        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10159        pub fn bitmap_opt(&self) -> Option<u32> {
10160            self.bitmap.as_ref().map(|field| *field)
10161        }
10162        ///Sets `bitmap` with the provided value.
10163        pub fn set_bitmap(&mut self, field: u32) {
10164            self.bitmap = Some(field);
10165        }
10166        ///Sets `bitmap` with the provided value.
10167        pub fn with_bitmap(mut self, field: u32) -> Self {
10168            self.set_bitmap(field);
10169            self
10170        }
10171        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10172        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10173            self.legacy_bitmap.as_ref().map(|field| field as _)
10174        }
10175        ///Sets `legacy_bitmap` with the provided value.
10176        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10177            self.legacy_bitmap = Some(field.into().into());
10178        }
10179        ///Sets `legacy_bitmap` with the provided value.
10180        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10181            mut self,
10182            field: T,
10183        ) -> Self {
10184            self.set_legacy_bitmap(field.into());
10185            self
10186        }
10187        ///Returns the value of `committee`, or the default value if `committee` is unset.
10188        pub fn committee(&self) -> &super::MultisigCommittee {
10189            self.committee
10190                .as_ref()
10191                .map(|field| field as _)
10192                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10193        }
10194        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10195        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10196            self.committee.as_mut().map(|field| field as _)
10197        }
10198        ///Returns a mutable reference to `committee`.
10199        ///If the field is unset, it is first initialized with the default value.
10200        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10201            self.committee.get_or_insert_default()
10202        }
10203        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
10204        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10205            self.committee.as_ref().map(|field| field as _)
10206        }
10207        ///Sets `committee` with the provided value.
10208        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10209            self.committee = Some(field.into().into());
10210        }
10211        ///Sets `committee` with the provided value.
10212        pub fn with_committee<T: Into<super::MultisigCommittee>>(
10213            mut self,
10214            field: T,
10215        ) -> Self {
10216            self.set_committee(field.into());
10217            self
10218        }
10219    }
10220    impl super::MultisigCommittee {
10221        pub const fn const_default() -> Self {
10222            Self {
10223                members: Vec::new(),
10224                threshold: None,
10225            }
10226        }
10227        #[doc(hidden)]
10228        pub fn default_instance() -> &'static Self {
10229            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10230            &DEFAULT
10231        }
10232        ///Returns the value of `members`, or the default value if `members` is unset.
10233        pub fn members(&self) -> &[super::MultisigMember] {
10234            &self.members
10235        }
10236        ///Returns a mutable reference to `members`.
10237        ///If the field is unset, it is first initialized with the default value.
10238        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10239            &mut self.members
10240        }
10241        ///Sets `members` with the provided value.
10242        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10243            self.members = field;
10244        }
10245        ///Sets `members` with the provided value.
10246        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10247            self.set_members(field);
10248            self
10249        }
10250        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10251        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10252            self.threshold.as_mut().map(|field| field as _)
10253        }
10254        ///Returns a mutable reference to `threshold`.
10255        ///If the field is unset, it is first initialized with the default value.
10256        pub fn threshold_mut(&mut self) -> &mut u32 {
10257            self.threshold.get_or_insert_default()
10258        }
10259        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
10260        pub fn threshold_opt(&self) -> Option<u32> {
10261            self.threshold.as_ref().map(|field| *field)
10262        }
10263        ///Sets `threshold` with the provided value.
10264        pub fn set_threshold(&mut self, field: u32) {
10265            self.threshold = Some(field);
10266        }
10267        ///Sets `threshold` with the provided value.
10268        pub fn with_threshold(mut self, field: u32) -> Self {
10269            self.set_threshold(field);
10270            self
10271        }
10272    }
10273    impl super::MultisigMember {
10274        pub const fn const_default() -> Self {
10275            Self {
10276                public_key: None,
10277                weight: None,
10278            }
10279        }
10280        #[doc(hidden)]
10281        pub fn default_instance() -> &'static Self {
10282            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10283            &DEFAULT
10284        }
10285        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
10286        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10287            self.public_key
10288                .as_ref()
10289                .map(|field| field as _)
10290                .unwrap_or_else(|| {
10291                    super::MultisigMemberPublicKey::default_instance() as _
10292                })
10293        }
10294        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10295        pub fn public_key_opt_mut(
10296            &mut self,
10297        ) -> Option<&mut super::MultisigMemberPublicKey> {
10298            self.public_key.as_mut().map(|field| field as _)
10299        }
10300        ///Returns a mutable reference to `public_key`.
10301        ///If the field is unset, it is first initialized with the default value.
10302        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10303            self.public_key.get_or_insert_default()
10304        }
10305        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10306        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10307            self.public_key.as_ref().map(|field| field as _)
10308        }
10309        ///Sets `public_key` with the provided value.
10310        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10311            &mut self,
10312            field: T,
10313        ) {
10314            self.public_key = Some(field.into().into());
10315        }
10316        ///Sets `public_key` with the provided value.
10317        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10318            mut self,
10319            field: T,
10320        ) -> Self {
10321            self.set_public_key(field.into());
10322            self
10323        }
10324        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10325        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10326            self.weight.as_mut().map(|field| field as _)
10327        }
10328        ///Returns a mutable reference to `weight`.
10329        ///If the field is unset, it is first initialized with the default value.
10330        pub fn weight_mut(&mut self) -> &mut u32 {
10331            self.weight.get_or_insert_default()
10332        }
10333        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
10334        pub fn weight_opt(&self) -> Option<u32> {
10335            self.weight.as_ref().map(|field| *field)
10336        }
10337        ///Sets `weight` with the provided value.
10338        pub fn set_weight(&mut self, field: u32) {
10339            self.weight = Some(field);
10340        }
10341        ///Sets `weight` with the provided value.
10342        pub fn with_weight(mut self, field: u32) -> Self {
10343            self.set_weight(field);
10344            self
10345        }
10346    }
10347    impl super::MultisigMemberPublicKey {
10348        pub const fn const_default() -> Self {
10349            Self {
10350                scheme: None,
10351                public_key: None,
10352                zklogin: None,
10353            }
10354        }
10355        #[doc(hidden)]
10356        pub fn default_instance() -> &'static Self {
10357            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10358            &DEFAULT
10359        }
10360        ///Sets `scheme` with the provided value.
10361        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10362            self.set_scheme(field.into());
10363            self
10364        }
10365        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10366        pub fn public_key_opt(&self) -> Option<&[u8]> {
10367            self.public_key.as_ref().map(|field| field as _)
10368        }
10369        ///Sets `public_key` with the provided value.
10370        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10371            self.public_key = Some(field.into().into());
10372        }
10373        ///Sets `public_key` with the provided value.
10374        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10375            mut self,
10376            field: T,
10377        ) -> Self {
10378            self.set_public_key(field.into());
10379            self
10380        }
10381        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10382        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10383            self.zklogin
10384                .as_ref()
10385                .map(|field| field as _)
10386                .unwrap_or_else(|| {
10387                    super::ZkLoginPublicIdentifier::default_instance() as _
10388                })
10389        }
10390        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10391        pub fn zklogin_opt_mut(
10392            &mut self,
10393        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10394            self.zklogin.as_mut().map(|field| field as _)
10395        }
10396        ///Returns a mutable reference to `zklogin`.
10397        ///If the field is unset, it is first initialized with the default value.
10398        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10399            self.zklogin.get_or_insert_default()
10400        }
10401        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10402        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10403            self.zklogin.as_ref().map(|field| field as _)
10404        }
10405        ///Sets `zklogin` with the provided value.
10406        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10407            &mut self,
10408            field: T,
10409        ) {
10410            self.zklogin = Some(field.into().into());
10411        }
10412        ///Sets `zklogin` with the provided value.
10413        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10414            mut self,
10415            field: T,
10416        ) -> Self {
10417            self.set_zklogin(field.into());
10418            self
10419        }
10420    }
10421    impl super::MultisigMemberSignature {
10422        pub const fn const_default() -> Self {
10423            Self {
10424                scheme: None,
10425                signature: None,
10426                zklogin: None,
10427                passkey: None,
10428            }
10429        }
10430        #[doc(hidden)]
10431        pub fn default_instance() -> &'static Self {
10432            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10433            &DEFAULT
10434        }
10435        ///Sets `scheme` with the provided value.
10436        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10437            self.set_scheme(field.into());
10438            self
10439        }
10440        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10441        pub fn signature_opt(&self) -> Option<&[u8]> {
10442            self.signature.as_ref().map(|field| field as _)
10443        }
10444        ///Sets `signature` with the provided value.
10445        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10446            self.signature = Some(field.into().into());
10447        }
10448        ///Sets `signature` with the provided value.
10449        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10450            mut self,
10451            field: T,
10452        ) -> Self {
10453            self.set_signature(field.into());
10454            self
10455        }
10456        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10457        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10458            self.zklogin
10459                .as_ref()
10460                .map(|field| field as _)
10461                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10462        }
10463        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10464        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10465            self.zklogin.as_mut().map(|field| field as _)
10466        }
10467        ///Returns a mutable reference to `zklogin`.
10468        ///If the field is unset, it is first initialized with the default value.
10469        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10470            self.zklogin.get_or_insert_default()
10471        }
10472        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10473        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10474            self.zklogin.as_ref().map(|field| field as _)
10475        }
10476        ///Sets `zklogin` with the provided value.
10477        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10478            self.zklogin = Some(field.into().into());
10479        }
10480        ///Sets `zklogin` with the provided value.
10481        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10482            mut self,
10483            field: T,
10484        ) -> Self {
10485            self.set_zklogin(field.into());
10486            self
10487        }
10488        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10489        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10490            self.passkey
10491                .as_ref()
10492                .map(|field| field as _)
10493                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10494        }
10495        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10496        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10497            self.passkey.as_mut().map(|field| field as _)
10498        }
10499        ///Returns a mutable reference to `passkey`.
10500        ///If the field is unset, it is first initialized with the default value.
10501        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10502            self.passkey.get_or_insert_default()
10503        }
10504        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10505        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10506            self.passkey.as_ref().map(|field| field as _)
10507        }
10508        ///Sets `passkey` with the provided value.
10509        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10510            self.passkey = Some(field.into().into());
10511        }
10512        ///Sets `passkey` with the provided value.
10513        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10514            mut self,
10515            field: T,
10516        ) -> Self {
10517            self.set_passkey(field.into());
10518            self
10519        }
10520    }
10521    impl super::NameRecord {
10522        pub const fn const_default() -> Self {
10523            Self {
10524                id: None,
10525                name: None,
10526                registration_nft_id: None,
10527                expiration_timestamp: None,
10528                target_address: None,
10529                data: std::collections::BTreeMap::new(),
10530            }
10531        }
10532        #[doc(hidden)]
10533        pub fn default_instance() -> &'static Self {
10534            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10535            &DEFAULT
10536        }
10537        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10538        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10539            self.id.as_mut().map(|field| field as _)
10540        }
10541        ///Returns a mutable reference to `id`.
10542        ///If the field is unset, it is first initialized with the default value.
10543        pub fn id_mut(&mut self) -> &mut String {
10544            self.id.get_or_insert_default()
10545        }
10546        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10547        pub fn id_opt(&self) -> Option<&str> {
10548            self.id.as_ref().map(|field| field as _)
10549        }
10550        ///Sets `id` with the provided value.
10551        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10552            self.id = Some(field.into().into());
10553        }
10554        ///Sets `id` with the provided value.
10555        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10556            self.set_id(field.into());
10557            self
10558        }
10559        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10560        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10561            self.name.as_mut().map(|field| field as _)
10562        }
10563        ///Returns a mutable reference to `name`.
10564        ///If the field is unset, it is first initialized with the default value.
10565        pub fn name_mut(&mut self) -> &mut String {
10566            self.name.get_or_insert_default()
10567        }
10568        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10569        pub fn name_opt(&self) -> Option<&str> {
10570            self.name.as_ref().map(|field| field as _)
10571        }
10572        ///Sets `name` with the provided value.
10573        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10574            self.name = Some(field.into().into());
10575        }
10576        ///Sets `name` with the provided value.
10577        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10578            self.set_name(field.into());
10579            self
10580        }
10581        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10582        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10583            self.registration_nft_id.as_mut().map(|field| field as _)
10584        }
10585        ///Returns a mutable reference to `registration_nft_id`.
10586        ///If the field is unset, it is first initialized with the default value.
10587        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10588            self.registration_nft_id.get_or_insert_default()
10589        }
10590        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10591        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10592            self.registration_nft_id.as_ref().map(|field| field as _)
10593        }
10594        ///Sets `registration_nft_id` with the provided value.
10595        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10596            self.registration_nft_id = Some(field.into().into());
10597        }
10598        ///Sets `registration_nft_id` with the provided value.
10599        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10600            self.set_registration_nft_id(field.into());
10601            self
10602        }
10603        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10604        pub fn expiration_timestamp_opt_mut(
10605            &mut self,
10606        ) -> Option<&mut ::prost_types::Timestamp> {
10607            self.expiration_timestamp.as_mut().map(|field| field as _)
10608        }
10609        ///Returns a mutable reference to `expiration_timestamp`.
10610        ///If the field is unset, it is first initialized with the default value.
10611        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10612            self.expiration_timestamp.get_or_insert_default()
10613        }
10614        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10615        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10616            self.expiration_timestamp.as_ref().map(|field| field as _)
10617        }
10618        ///Sets `expiration_timestamp` with the provided value.
10619        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10620            &mut self,
10621            field: T,
10622        ) {
10623            self.expiration_timestamp = Some(field.into().into());
10624        }
10625        ///Sets `expiration_timestamp` with the provided value.
10626        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10627            mut self,
10628            field: T,
10629        ) -> Self {
10630            self.set_expiration_timestamp(field.into());
10631            self
10632        }
10633        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10634        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10635            self.target_address.as_mut().map(|field| field as _)
10636        }
10637        ///Returns a mutable reference to `target_address`.
10638        ///If the field is unset, it is first initialized with the default value.
10639        pub fn target_address_mut(&mut self) -> &mut String {
10640            self.target_address.get_or_insert_default()
10641        }
10642        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10643        pub fn target_address_opt(&self) -> Option<&str> {
10644            self.target_address.as_ref().map(|field| field as _)
10645        }
10646        ///Sets `target_address` with the provided value.
10647        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10648            self.target_address = Some(field.into().into());
10649        }
10650        ///Sets `target_address` with the provided value.
10651        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10652            self.set_target_address(field.into());
10653            self
10654        }
10655        ///Returns the value of `data`, or the default value if `data` is unset.
10656        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10657            &self.data
10658        }
10659        ///Returns a mutable reference to `data`.
10660        ///If the field is unset, it is first initialized with the default value.
10661        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10662            &mut self.data
10663        }
10664        ///Sets `data` with the provided value.
10665        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10666            self.data = field;
10667        }
10668        ///Sets `data` with the provided value.
10669        pub fn with_data(
10670            mut self,
10671            field: ::std::collections::BTreeMap<String, String>,
10672        ) -> Self {
10673            self.set_data(field);
10674            self
10675        }
10676    }
10677    impl super::Object {
10678        pub const fn const_default() -> Self {
10679            Self {
10680                bcs: None,
10681                object_id: None,
10682                version: None,
10683                digest: None,
10684                owner: None,
10685                object_type: None,
10686                has_public_transfer: None,
10687                contents: None,
10688                package: None,
10689                previous_transaction: None,
10690                storage_rebate: None,
10691                json: None,
10692                balance: None,
10693            }
10694        }
10695        #[doc(hidden)]
10696        pub fn default_instance() -> &'static Self {
10697            static DEFAULT: super::Object = super::Object::const_default();
10698            &DEFAULT
10699        }
10700        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10701        pub fn bcs(&self) -> &super::Bcs {
10702            self.bcs
10703                .as_ref()
10704                .map(|field| field as _)
10705                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10706        }
10707        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10708        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10709            self.bcs.as_mut().map(|field| field as _)
10710        }
10711        ///Returns a mutable reference to `bcs`.
10712        ///If the field is unset, it is first initialized with the default value.
10713        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10714            self.bcs.get_or_insert_default()
10715        }
10716        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10717        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10718            self.bcs.as_ref().map(|field| field as _)
10719        }
10720        ///Sets `bcs` with the provided value.
10721        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10722            self.bcs = Some(field.into().into());
10723        }
10724        ///Sets `bcs` with the provided value.
10725        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10726            self.set_bcs(field.into());
10727            self
10728        }
10729        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10730        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10731            self.object_id.as_mut().map(|field| field as _)
10732        }
10733        ///Returns a mutable reference to `object_id`.
10734        ///If the field is unset, it is first initialized with the default value.
10735        pub fn object_id_mut(&mut self) -> &mut String {
10736            self.object_id.get_or_insert_default()
10737        }
10738        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10739        pub fn object_id_opt(&self) -> Option<&str> {
10740            self.object_id.as_ref().map(|field| field as _)
10741        }
10742        ///Sets `object_id` with the provided value.
10743        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10744            self.object_id = Some(field.into().into());
10745        }
10746        ///Sets `object_id` with the provided value.
10747        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10748            self.set_object_id(field.into());
10749            self
10750        }
10751        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10752        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10753            self.version.as_mut().map(|field| field as _)
10754        }
10755        ///Returns a mutable reference to `version`.
10756        ///If the field is unset, it is first initialized with the default value.
10757        pub fn version_mut(&mut self) -> &mut u64 {
10758            self.version.get_or_insert_default()
10759        }
10760        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10761        pub fn version_opt(&self) -> Option<u64> {
10762            self.version.as_ref().map(|field| *field)
10763        }
10764        ///Sets `version` with the provided value.
10765        pub fn set_version(&mut self, field: u64) {
10766            self.version = Some(field);
10767        }
10768        ///Sets `version` with the provided value.
10769        pub fn with_version(mut self, field: u64) -> Self {
10770            self.set_version(field);
10771            self
10772        }
10773        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10774        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10775            self.digest.as_mut().map(|field| field as _)
10776        }
10777        ///Returns a mutable reference to `digest`.
10778        ///If the field is unset, it is first initialized with the default value.
10779        pub fn digest_mut(&mut self) -> &mut String {
10780            self.digest.get_or_insert_default()
10781        }
10782        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10783        pub fn digest_opt(&self) -> Option<&str> {
10784            self.digest.as_ref().map(|field| field as _)
10785        }
10786        ///Sets `digest` with the provided value.
10787        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10788            self.digest = Some(field.into().into());
10789        }
10790        ///Sets `digest` with the provided value.
10791        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10792            self.set_digest(field.into());
10793            self
10794        }
10795        ///Returns the value of `owner`, or the default value if `owner` is unset.
10796        pub fn owner(&self) -> &super::Owner {
10797            self.owner
10798                .as_ref()
10799                .map(|field| field as _)
10800                .unwrap_or_else(|| super::Owner::default_instance() as _)
10801        }
10802        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10803        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10804            self.owner.as_mut().map(|field| field as _)
10805        }
10806        ///Returns a mutable reference to `owner`.
10807        ///If the field is unset, it is first initialized with the default value.
10808        pub fn owner_mut(&mut self) -> &mut super::Owner {
10809            self.owner.get_or_insert_default()
10810        }
10811        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10812        pub fn owner_opt(&self) -> Option<&super::Owner> {
10813            self.owner.as_ref().map(|field| field as _)
10814        }
10815        ///Sets `owner` with the provided value.
10816        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10817            self.owner = Some(field.into().into());
10818        }
10819        ///Sets `owner` with the provided value.
10820        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10821            self.set_owner(field.into());
10822            self
10823        }
10824        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10825        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10826            self.object_type.as_mut().map(|field| field as _)
10827        }
10828        ///Returns a mutable reference to `object_type`.
10829        ///If the field is unset, it is first initialized with the default value.
10830        pub fn object_type_mut(&mut self) -> &mut String {
10831            self.object_type.get_or_insert_default()
10832        }
10833        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10834        pub fn object_type_opt(&self) -> Option<&str> {
10835            self.object_type.as_ref().map(|field| field as _)
10836        }
10837        ///Sets `object_type` with the provided value.
10838        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10839            self.object_type = Some(field.into().into());
10840        }
10841        ///Sets `object_type` with the provided value.
10842        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10843            self.set_object_type(field.into());
10844            self
10845        }
10846        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10847        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10848            self.has_public_transfer.as_mut().map(|field| field as _)
10849        }
10850        ///Returns a mutable reference to `has_public_transfer`.
10851        ///If the field is unset, it is first initialized with the default value.
10852        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10853            self.has_public_transfer.get_or_insert_default()
10854        }
10855        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10856        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10857            self.has_public_transfer.as_ref().map(|field| *field)
10858        }
10859        ///Sets `has_public_transfer` with the provided value.
10860        pub fn set_has_public_transfer(&mut self, field: bool) {
10861            self.has_public_transfer = Some(field);
10862        }
10863        ///Sets `has_public_transfer` with the provided value.
10864        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10865            self.set_has_public_transfer(field);
10866            self
10867        }
10868        ///Returns the value of `contents`, or the default value if `contents` is unset.
10869        pub fn contents(&self) -> &super::Bcs {
10870            self.contents
10871                .as_ref()
10872                .map(|field| field as _)
10873                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10874        }
10875        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10876        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10877            self.contents.as_mut().map(|field| field as _)
10878        }
10879        ///Returns a mutable reference to `contents`.
10880        ///If the field is unset, it is first initialized with the default value.
10881        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10882            self.contents.get_or_insert_default()
10883        }
10884        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10885        pub fn contents_opt(&self) -> Option<&super::Bcs> {
10886            self.contents.as_ref().map(|field| field as _)
10887        }
10888        ///Sets `contents` with the provided value.
10889        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10890            self.contents = Some(field.into().into());
10891        }
10892        ///Sets `contents` with the provided value.
10893        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10894            self.set_contents(field.into());
10895            self
10896        }
10897        ///Returns the value of `package`, or the default value if `package` is unset.
10898        pub fn package(&self) -> &super::Package {
10899            self.package
10900                .as_ref()
10901                .map(|field| field as _)
10902                .unwrap_or_else(|| super::Package::default_instance() as _)
10903        }
10904        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10905        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10906            self.package.as_mut().map(|field| field as _)
10907        }
10908        ///Returns a mutable reference to `package`.
10909        ///If the field is unset, it is first initialized with the default value.
10910        pub fn package_mut(&mut self) -> &mut super::Package {
10911            self.package.get_or_insert_default()
10912        }
10913        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10914        pub fn package_opt(&self) -> Option<&super::Package> {
10915            self.package.as_ref().map(|field| field as _)
10916        }
10917        ///Sets `package` with the provided value.
10918        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10919            self.package = Some(field.into().into());
10920        }
10921        ///Sets `package` with the provided value.
10922        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10923            self.set_package(field.into());
10924            self
10925        }
10926        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10927        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10928            self.previous_transaction.as_mut().map(|field| field as _)
10929        }
10930        ///Returns a mutable reference to `previous_transaction`.
10931        ///If the field is unset, it is first initialized with the default value.
10932        pub fn previous_transaction_mut(&mut self) -> &mut String {
10933            self.previous_transaction.get_or_insert_default()
10934        }
10935        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10936        pub fn previous_transaction_opt(&self) -> Option<&str> {
10937            self.previous_transaction.as_ref().map(|field| field as _)
10938        }
10939        ///Sets `previous_transaction` with the provided value.
10940        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10941            self.previous_transaction = Some(field.into().into());
10942        }
10943        ///Sets `previous_transaction` with the provided value.
10944        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10945            self.set_previous_transaction(field.into());
10946            self
10947        }
10948        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10949        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10950            self.storage_rebate.as_mut().map(|field| field as _)
10951        }
10952        ///Returns a mutable reference to `storage_rebate`.
10953        ///If the field is unset, it is first initialized with the default value.
10954        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10955            self.storage_rebate.get_or_insert_default()
10956        }
10957        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
10958        pub fn storage_rebate_opt(&self) -> Option<u64> {
10959            self.storage_rebate.as_ref().map(|field| *field)
10960        }
10961        ///Sets `storage_rebate` with the provided value.
10962        pub fn set_storage_rebate(&mut self, field: u64) {
10963            self.storage_rebate = Some(field);
10964        }
10965        ///Sets `storage_rebate` with the provided value.
10966        pub fn with_storage_rebate(mut self, field: u64) -> Self {
10967            self.set_storage_rebate(field);
10968            self
10969        }
10970        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10971        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10972            self.json.as_mut().map(|field| field as _)
10973        }
10974        ///Returns a mutable reference to `json`.
10975        ///If the field is unset, it is first initialized with the default value.
10976        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10977            self.json.get_or_insert_default()
10978        }
10979        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
10980        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10981            self.json.as_ref().map(|field| field as _)
10982        }
10983        ///Sets `json` with the provided value.
10984        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10985            self.json = Some(field.into().into());
10986        }
10987        ///Sets `json` with the provided value.
10988        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10989            self.set_json(field.into());
10990            self
10991        }
10992        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10993        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10994            self.balance.as_mut().map(|field| field as _)
10995        }
10996        ///Returns a mutable reference to `balance`.
10997        ///If the field is unset, it is first initialized with the default value.
10998        pub fn balance_mut(&mut self) -> &mut u64 {
10999            self.balance.get_or_insert_default()
11000        }
11001        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
11002        pub fn balance_opt(&self) -> Option<u64> {
11003            self.balance.as_ref().map(|field| *field)
11004        }
11005        ///Sets `balance` with the provided value.
11006        pub fn set_balance(&mut self, field: u64) {
11007            self.balance = Some(field);
11008        }
11009        ///Sets `balance` with the provided value.
11010        pub fn with_balance(mut self, field: u64) -> Self {
11011            self.set_balance(field);
11012            self
11013        }
11014    }
11015    impl super::ObjectReference {
11016        pub const fn const_default() -> Self {
11017            Self {
11018                object_id: None,
11019                version: None,
11020                digest: None,
11021            }
11022        }
11023        #[doc(hidden)]
11024        pub fn default_instance() -> &'static Self {
11025            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11026            &DEFAULT
11027        }
11028        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11029        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11030            self.object_id.as_mut().map(|field| field as _)
11031        }
11032        ///Returns a mutable reference to `object_id`.
11033        ///If the field is unset, it is first initialized with the default value.
11034        pub fn object_id_mut(&mut self) -> &mut String {
11035            self.object_id.get_or_insert_default()
11036        }
11037        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11038        pub fn object_id_opt(&self) -> Option<&str> {
11039            self.object_id.as_ref().map(|field| field as _)
11040        }
11041        ///Sets `object_id` with the provided value.
11042        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11043            self.object_id = Some(field.into().into());
11044        }
11045        ///Sets `object_id` with the provided value.
11046        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11047            self.set_object_id(field.into());
11048            self
11049        }
11050        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11051        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11052            self.version.as_mut().map(|field| field as _)
11053        }
11054        ///Returns a mutable reference to `version`.
11055        ///If the field is unset, it is first initialized with the default value.
11056        pub fn version_mut(&mut self) -> &mut u64 {
11057            self.version.get_or_insert_default()
11058        }
11059        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11060        pub fn version_opt(&self) -> Option<u64> {
11061            self.version.as_ref().map(|field| *field)
11062        }
11063        ///Sets `version` with the provided value.
11064        pub fn set_version(&mut self, field: u64) {
11065            self.version = Some(field);
11066        }
11067        ///Sets `version` with the provided value.
11068        pub fn with_version(mut self, field: u64) -> Self {
11069            self.set_version(field);
11070            self
11071        }
11072        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11073        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11074            self.digest.as_mut().map(|field| field as _)
11075        }
11076        ///Returns a mutable reference to `digest`.
11077        ///If the field is unset, it is first initialized with the default value.
11078        pub fn digest_mut(&mut self) -> &mut String {
11079            self.digest.get_or_insert_default()
11080        }
11081        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11082        pub fn digest_opt(&self) -> Option<&str> {
11083            self.digest.as_ref().map(|field| field as _)
11084        }
11085        ///Sets `digest` with the provided value.
11086        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11087            self.digest = Some(field.into().into());
11088        }
11089        ///Sets `digest` with the provided value.
11090        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11091            self.set_digest(field.into());
11092            self
11093        }
11094    }
11095    impl super::ObjectSet {
11096        pub const fn const_default() -> Self {
11097            Self { objects: Vec::new() }
11098        }
11099        #[doc(hidden)]
11100        pub fn default_instance() -> &'static Self {
11101            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11102            &DEFAULT
11103        }
11104        ///Returns the value of `objects`, or the default value if `objects` is unset.
11105        pub fn objects(&self) -> &[super::Object] {
11106            &self.objects
11107        }
11108        ///Returns a mutable reference to `objects`.
11109        ///If the field is unset, it is first initialized with the default value.
11110        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11111            &mut self.objects
11112        }
11113        ///Sets `objects` with the provided value.
11114        pub fn set_objects(&mut self, field: Vec<super::Object>) {
11115            self.objects = field;
11116        }
11117        ///Sets `objects` with the provided value.
11118        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11119            self.set_objects(field);
11120            self
11121        }
11122    }
11123    impl super::OpenSignature {
11124        pub const fn const_default() -> Self {
11125            Self {
11126                reference: None,
11127                body: None,
11128            }
11129        }
11130        #[doc(hidden)]
11131        pub fn default_instance() -> &'static Self {
11132            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11133            &DEFAULT
11134        }
11135        ///Sets `reference` with the provided value.
11136        pub fn with_reference<T: Into<super::open_signature::Reference>>(
11137            mut self,
11138            field: T,
11139        ) -> Self {
11140            self.set_reference(field.into());
11141            self
11142        }
11143        ///Returns the value of `body`, or the default value if `body` is unset.
11144        pub fn body(&self) -> &super::OpenSignatureBody {
11145            self.body
11146                .as_ref()
11147                .map(|field| field as _)
11148                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11149        }
11150        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11151        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11152            self.body.as_mut().map(|field| field as _)
11153        }
11154        ///Returns a mutable reference to `body`.
11155        ///If the field is unset, it is first initialized with the default value.
11156        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11157            self.body.get_or_insert_default()
11158        }
11159        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
11160        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11161            self.body.as_ref().map(|field| field as _)
11162        }
11163        ///Sets `body` with the provided value.
11164        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11165            self.body = Some(field.into().into());
11166        }
11167        ///Sets `body` with the provided value.
11168        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11169            self.set_body(field.into());
11170            self
11171        }
11172    }
11173    impl super::OpenSignatureBody {
11174        pub const fn const_default() -> Self {
11175            Self {
11176                r#type: None,
11177                type_name: None,
11178                type_parameter_instantiation: Vec::new(),
11179                type_parameter: None,
11180            }
11181        }
11182        #[doc(hidden)]
11183        pub fn default_instance() -> &'static Self {
11184            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11185            &DEFAULT
11186        }
11187        ///Sets `r#type` with the provided value.
11188        pub fn with_type<T: Into<super::open_signature_body::Type>>(
11189            mut self,
11190            field: T,
11191        ) -> Self {
11192            self.set_type(field.into());
11193            self
11194        }
11195        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11196        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11197            self.type_name.as_mut().map(|field| field as _)
11198        }
11199        ///Returns a mutable reference to `type_name`.
11200        ///If the field is unset, it is first initialized with the default value.
11201        pub fn type_name_mut(&mut self) -> &mut String {
11202            self.type_name.get_or_insert_default()
11203        }
11204        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11205        pub fn type_name_opt(&self) -> Option<&str> {
11206            self.type_name.as_ref().map(|field| field as _)
11207        }
11208        ///Sets `type_name` with the provided value.
11209        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11210            self.type_name = Some(field.into().into());
11211        }
11212        ///Sets `type_name` with the provided value.
11213        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11214            self.set_type_name(field.into());
11215            self
11216        }
11217        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
11218        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11219            &self.type_parameter_instantiation
11220        }
11221        ///Returns a mutable reference to `type_parameter_instantiation`.
11222        ///If the field is unset, it is first initialized with the default value.
11223        pub fn type_parameter_instantiation_mut(
11224            &mut self,
11225        ) -> &mut Vec<super::OpenSignatureBody> {
11226            &mut self.type_parameter_instantiation
11227        }
11228        ///Sets `type_parameter_instantiation` with the provided value.
11229        pub fn set_type_parameter_instantiation(
11230            &mut self,
11231            field: Vec<super::OpenSignatureBody>,
11232        ) {
11233            self.type_parameter_instantiation = field;
11234        }
11235        ///Sets `type_parameter_instantiation` with the provided value.
11236        pub fn with_type_parameter_instantiation(
11237            mut self,
11238            field: Vec<super::OpenSignatureBody>,
11239        ) -> Self {
11240            self.set_type_parameter_instantiation(field);
11241            self
11242        }
11243        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11244        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11245            self.type_parameter.as_mut().map(|field| field as _)
11246        }
11247        ///Returns a mutable reference to `type_parameter`.
11248        ///If the field is unset, it is first initialized with the default value.
11249        pub fn type_parameter_mut(&mut self) -> &mut u32 {
11250            self.type_parameter.get_or_insert_default()
11251        }
11252        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
11253        pub fn type_parameter_opt(&self) -> Option<u32> {
11254            self.type_parameter.as_ref().map(|field| *field)
11255        }
11256        ///Sets `type_parameter` with the provided value.
11257        pub fn set_type_parameter(&mut self, field: u32) {
11258            self.type_parameter = Some(field);
11259        }
11260        ///Sets `type_parameter` with the provided value.
11261        pub fn with_type_parameter(mut self, field: u32) -> Self {
11262            self.set_type_parameter(field);
11263            self
11264        }
11265    }
11266    impl super::Owner {
11267        pub const fn const_default() -> Self {
11268            Self {
11269                kind: None,
11270                address: None,
11271                version: None,
11272            }
11273        }
11274        #[doc(hidden)]
11275        pub fn default_instance() -> &'static Self {
11276            static DEFAULT: super::Owner = super::Owner::const_default();
11277            &DEFAULT
11278        }
11279        ///Sets `kind` with the provided value.
11280        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11281            self.set_kind(field.into());
11282            self
11283        }
11284        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11285        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11286            self.address.as_mut().map(|field| field as _)
11287        }
11288        ///Returns a mutable reference to `address`.
11289        ///If the field is unset, it is first initialized with the default value.
11290        pub fn address_mut(&mut self) -> &mut String {
11291            self.address.get_or_insert_default()
11292        }
11293        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11294        pub fn address_opt(&self) -> Option<&str> {
11295            self.address.as_ref().map(|field| field as _)
11296        }
11297        ///Sets `address` with the provided value.
11298        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11299            self.address = Some(field.into().into());
11300        }
11301        ///Sets `address` with the provided value.
11302        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11303            self.set_address(field.into());
11304            self
11305        }
11306        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11307        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11308            self.version.as_mut().map(|field| field as _)
11309        }
11310        ///Returns a mutable reference to `version`.
11311        ///If the field is unset, it is first initialized with the default value.
11312        pub fn version_mut(&mut self) -> &mut u64 {
11313            self.version.get_or_insert_default()
11314        }
11315        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11316        pub fn version_opt(&self) -> Option<u64> {
11317            self.version.as_ref().map(|field| *field)
11318        }
11319        ///Sets `version` with the provided value.
11320        pub fn set_version(&mut self, field: u64) {
11321            self.version = Some(field);
11322        }
11323        ///Sets `version` with the provided value.
11324        pub fn with_version(mut self, field: u64) -> Self {
11325            self.set_version(field);
11326            self
11327        }
11328    }
11329    impl super::Package {
11330        pub const fn const_default() -> Self {
11331            Self {
11332                storage_id: None,
11333                original_id: None,
11334                version: None,
11335                modules: Vec::new(),
11336                type_origins: Vec::new(),
11337                linkage: Vec::new(),
11338            }
11339        }
11340        #[doc(hidden)]
11341        pub fn default_instance() -> &'static Self {
11342            static DEFAULT: super::Package = super::Package::const_default();
11343            &DEFAULT
11344        }
11345        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11346        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11347            self.storage_id.as_mut().map(|field| field as _)
11348        }
11349        ///Returns a mutable reference to `storage_id`.
11350        ///If the field is unset, it is first initialized with the default value.
11351        pub fn storage_id_mut(&mut self) -> &mut String {
11352            self.storage_id.get_or_insert_default()
11353        }
11354        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11355        pub fn storage_id_opt(&self) -> Option<&str> {
11356            self.storage_id.as_ref().map(|field| field as _)
11357        }
11358        ///Sets `storage_id` with the provided value.
11359        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11360            self.storage_id = Some(field.into().into());
11361        }
11362        ///Sets `storage_id` with the provided value.
11363        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11364            self.set_storage_id(field.into());
11365            self
11366        }
11367        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11368        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11369            self.original_id.as_mut().map(|field| field as _)
11370        }
11371        ///Returns a mutable reference to `original_id`.
11372        ///If the field is unset, it is first initialized with the default value.
11373        pub fn original_id_mut(&mut self) -> &mut String {
11374            self.original_id.get_or_insert_default()
11375        }
11376        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11377        pub fn original_id_opt(&self) -> Option<&str> {
11378            self.original_id.as_ref().map(|field| field as _)
11379        }
11380        ///Sets `original_id` with the provided value.
11381        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11382            self.original_id = Some(field.into().into());
11383        }
11384        ///Sets `original_id` with the provided value.
11385        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11386            self.set_original_id(field.into());
11387            self
11388        }
11389        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11390        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11391            self.version.as_mut().map(|field| field as _)
11392        }
11393        ///Returns a mutable reference to `version`.
11394        ///If the field is unset, it is first initialized with the default value.
11395        pub fn version_mut(&mut self) -> &mut u64 {
11396            self.version.get_or_insert_default()
11397        }
11398        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11399        pub fn version_opt(&self) -> Option<u64> {
11400            self.version.as_ref().map(|field| *field)
11401        }
11402        ///Sets `version` with the provided value.
11403        pub fn set_version(&mut self, field: u64) {
11404            self.version = Some(field);
11405        }
11406        ///Sets `version` with the provided value.
11407        pub fn with_version(mut self, field: u64) -> Self {
11408            self.set_version(field);
11409            self
11410        }
11411        ///Returns the value of `modules`, or the default value if `modules` is unset.
11412        pub fn modules(&self) -> &[super::Module] {
11413            &self.modules
11414        }
11415        ///Returns a mutable reference to `modules`.
11416        ///If the field is unset, it is first initialized with the default value.
11417        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11418            &mut self.modules
11419        }
11420        ///Sets `modules` with the provided value.
11421        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11422            self.modules = field;
11423        }
11424        ///Sets `modules` with the provided value.
11425        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11426            self.set_modules(field);
11427            self
11428        }
11429        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11430        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11431            &self.type_origins
11432        }
11433        ///Returns a mutable reference to `type_origins`.
11434        ///If the field is unset, it is first initialized with the default value.
11435        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11436            &mut self.type_origins
11437        }
11438        ///Sets `type_origins` with the provided value.
11439        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11440            self.type_origins = field;
11441        }
11442        ///Sets `type_origins` with the provided value.
11443        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11444            self.set_type_origins(field);
11445            self
11446        }
11447        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11448        pub fn linkage(&self) -> &[super::Linkage] {
11449            &self.linkage
11450        }
11451        ///Returns a mutable reference to `linkage`.
11452        ///If the field is unset, it is first initialized with the default value.
11453        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11454            &mut self.linkage
11455        }
11456        ///Sets `linkage` with the provided value.
11457        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11458            self.linkage = field;
11459        }
11460        ///Sets `linkage` with the provided value.
11461        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11462            self.set_linkage(field);
11463            self
11464        }
11465    }
11466    impl super::PackageUpgradeError {
11467        pub const fn const_default() -> Self {
11468            Self {
11469                kind: None,
11470                package_id: None,
11471                digest: None,
11472                policy: None,
11473                ticket_id: None,
11474            }
11475        }
11476        #[doc(hidden)]
11477        pub fn default_instance() -> &'static Self {
11478            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11479            &DEFAULT
11480        }
11481        ///Sets `kind` with the provided value.
11482        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11483            mut self,
11484            field: T,
11485        ) -> Self {
11486            self.set_kind(field.into());
11487            self
11488        }
11489        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11490        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11491            self.package_id.as_mut().map(|field| field as _)
11492        }
11493        ///Returns a mutable reference to `package_id`.
11494        ///If the field is unset, it is first initialized with the default value.
11495        pub fn package_id_mut(&mut self) -> &mut String {
11496            self.package_id.get_or_insert_default()
11497        }
11498        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11499        pub fn package_id_opt(&self) -> Option<&str> {
11500            self.package_id.as_ref().map(|field| field as _)
11501        }
11502        ///Sets `package_id` with the provided value.
11503        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11504            self.package_id = Some(field.into().into());
11505        }
11506        ///Sets `package_id` with the provided value.
11507        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11508            self.set_package_id(field.into());
11509            self
11510        }
11511        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11512        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11513            self.digest.as_mut().map(|field| field as _)
11514        }
11515        ///Returns a mutable reference to `digest`.
11516        ///If the field is unset, it is first initialized with the default value.
11517        pub fn digest_mut(&mut self) -> &mut String {
11518            self.digest.get_or_insert_default()
11519        }
11520        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11521        pub fn digest_opt(&self) -> Option<&str> {
11522            self.digest.as_ref().map(|field| field as _)
11523        }
11524        ///Sets `digest` with the provided value.
11525        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11526            self.digest = Some(field.into().into());
11527        }
11528        ///Sets `digest` with the provided value.
11529        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11530            self.set_digest(field.into());
11531            self
11532        }
11533        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11534        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11535            self.policy.as_mut().map(|field| field as _)
11536        }
11537        ///Returns a mutable reference to `policy`.
11538        ///If the field is unset, it is first initialized with the default value.
11539        pub fn policy_mut(&mut self) -> &mut u32 {
11540            self.policy.get_or_insert_default()
11541        }
11542        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11543        pub fn policy_opt(&self) -> Option<u32> {
11544            self.policy.as_ref().map(|field| *field)
11545        }
11546        ///Sets `policy` with the provided value.
11547        pub fn set_policy(&mut self, field: u32) {
11548            self.policy = Some(field);
11549        }
11550        ///Sets `policy` with the provided value.
11551        pub fn with_policy(mut self, field: u32) -> Self {
11552            self.set_policy(field);
11553            self
11554        }
11555        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11556        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11557            self.ticket_id.as_mut().map(|field| field as _)
11558        }
11559        ///Returns a mutable reference to `ticket_id`.
11560        ///If the field is unset, it is first initialized with the default value.
11561        pub fn ticket_id_mut(&mut self) -> &mut String {
11562            self.ticket_id.get_or_insert_default()
11563        }
11564        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11565        pub fn ticket_id_opt(&self) -> Option<&str> {
11566            self.ticket_id.as_ref().map(|field| field as _)
11567        }
11568        ///Sets `ticket_id` with the provided value.
11569        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11570            self.ticket_id = Some(field.into().into());
11571        }
11572        ///Sets `ticket_id` with the provided value.
11573        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11574            self.set_ticket_id(field.into());
11575            self
11576        }
11577    }
11578    impl super::PackageVersion {
11579        pub const fn const_default() -> Self {
11580            Self {
11581                package_id: None,
11582                version: None,
11583            }
11584        }
11585        #[doc(hidden)]
11586        pub fn default_instance() -> &'static Self {
11587            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11588            &DEFAULT
11589        }
11590        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11591        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11592            self.package_id.as_mut().map(|field| field as _)
11593        }
11594        ///Returns a mutable reference to `package_id`.
11595        ///If the field is unset, it is first initialized with the default value.
11596        pub fn package_id_mut(&mut self) -> &mut String {
11597            self.package_id.get_or_insert_default()
11598        }
11599        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11600        pub fn package_id_opt(&self) -> Option<&str> {
11601            self.package_id.as_ref().map(|field| field as _)
11602        }
11603        ///Sets `package_id` with the provided value.
11604        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11605            self.package_id = Some(field.into().into());
11606        }
11607        ///Sets `package_id` with the provided value.
11608        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11609            self.set_package_id(field.into());
11610            self
11611        }
11612        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11613        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11614            self.version.as_mut().map(|field| field as _)
11615        }
11616        ///Returns a mutable reference to `version`.
11617        ///If the field is unset, it is first initialized with the default value.
11618        pub fn version_mut(&mut self) -> &mut u64 {
11619            self.version.get_or_insert_default()
11620        }
11621        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11622        pub fn version_opt(&self) -> Option<u64> {
11623            self.version.as_ref().map(|field| *field)
11624        }
11625        ///Sets `version` with the provided value.
11626        pub fn set_version(&mut self, field: u64) {
11627            self.version = Some(field);
11628        }
11629        ///Sets `version` with the provided value.
11630        pub fn with_version(mut self, field: u64) -> Self {
11631            self.set_version(field);
11632            self
11633        }
11634    }
11635    impl super::PasskeyAuthenticator {
11636        pub const fn const_default() -> Self {
11637            Self {
11638                authenticator_data: None,
11639                client_data_json: None,
11640                signature: None,
11641            }
11642        }
11643        #[doc(hidden)]
11644        pub fn default_instance() -> &'static Self {
11645            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11646            &DEFAULT
11647        }
11648        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11649        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11650            self.authenticator_data.as_ref().map(|field| field as _)
11651        }
11652        ///Sets `authenticator_data` with the provided value.
11653        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11654            &mut self,
11655            field: T,
11656        ) {
11657            self.authenticator_data = Some(field.into().into());
11658        }
11659        ///Sets `authenticator_data` with the provided value.
11660        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11661            mut self,
11662            field: T,
11663        ) -> Self {
11664            self.set_authenticator_data(field.into());
11665            self
11666        }
11667        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11668        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11669            self.client_data_json.as_mut().map(|field| field as _)
11670        }
11671        ///Returns a mutable reference to `client_data_json`.
11672        ///If the field is unset, it is first initialized with the default value.
11673        pub fn client_data_json_mut(&mut self) -> &mut String {
11674            self.client_data_json.get_or_insert_default()
11675        }
11676        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11677        pub fn client_data_json_opt(&self) -> Option<&str> {
11678            self.client_data_json.as_ref().map(|field| field as _)
11679        }
11680        ///Sets `client_data_json` with the provided value.
11681        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11682            self.client_data_json = Some(field.into().into());
11683        }
11684        ///Sets `client_data_json` with the provided value.
11685        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11686            self.set_client_data_json(field.into());
11687            self
11688        }
11689        ///Returns the value of `signature`, or the default value if `signature` is unset.
11690        pub fn signature(&self) -> &super::SimpleSignature {
11691            self.signature
11692                .as_ref()
11693                .map(|field| field as _)
11694                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11695        }
11696        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11697        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11698            self.signature.as_mut().map(|field| field as _)
11699        }
11700        ///Returns a mutable reference to `signature`.
11701        ///If the field is unset, it is first initialized with the default value.
11702        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11703            self.signature.get_or_insert_default()
11704        }
11705        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11706        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11707            self.signature.as_ref().map(|field| field as _)
11708        }
11709        ///Sets `signature` with the provided value.
11710        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11711            self.signature = Some(field.into().into());
11712        }
11713        ///Sets `signature` with the provided value.
11714        pub fn with_signature<T: Into<super::SimpleSignature>>(
11715            mut self,
11716            field: T,
11717        ) -> Self {
11718            self.set_signature(field.into());
11719            self
11720        }
11721    }
11722    impl super::ProgrammableTransaction {
11723        pub const fn const_default() -> Self {
11724            Self {
11725                inputs: Vec::new(),
11726                commands: Vec::new(),
11727            }
11728        }
11729        #[doc(hidden)]
11730        pub fn default_instance() -> &'static Self {
11731            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11732            &DEFAULT
11733        }
11734        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11735        pub fn inputs(&self) -> &[super::Input] {
11736            &self.inputs
11737        }
11738        ///Returns a mutable reference to `inputs`.
11739        ///If the field is unset, it is first initialized with the default value.
11740        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11741            &mut self.inputs
11742        }
11743        ///Sets `inputs` with the provided value.
11744        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11745            self.inputs = field;
11746        }
11747        ///Sets `inputs` with the provided value.
11748        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11749            self.set_inputs(field);
11750            self
11751        }
11752        ///Returns the value of `commands`, or the default value if `commands` is unset.
11753        pub fn commands(&self) -> &[super::Command] {
11754            &self.commands
11755        }
11756        ///Returns a mutable reference to `commands`.
11757        ///If the field is unset, it is first initialized with the default value.
11758        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11759            &mut self.commands
11760        }
11761        ///Sets `commands` with the provided value.
11762        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11763            self.commands = field;
11764        }
11765        ///Sets `commands` with the provided value.
11766        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11767            self.set_commands(field);
11768            self
11769        }
11770    }
11771    impl super::ProtocolConfig {
11772        pub const fn const_default() -> Self {
11773            Self {
11774                protocol_version: None,
11775                feature_flags: std::collections::BTreeMap::new(),
11776                attributes: std::collections::BTreeMap::new(),
11777            }
11778        }
11779        #[doc(hidden)]
11780        pub fn default_instance() -> &'static Self {
11781            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11782            &DEFAULT
11783        }
11784        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11785        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11786            self.protocol_version.as_mut().map(|field| field as _)
11787        }
11788        ///Returns a mutable reference to `protocol_version`.
11789        ///If the field is unset, it is first initialized with the default value.
11790        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11791            self.protocol_version.get_or_insert_default()
11792        }
11793        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11794        pub fn protocol_version_opt(&self) -> Option<u64> {
11795            self.protocol_version.as_ref().map(|field| *field)
11796        }
11797        ///Sets `protocol_version` with the provided value.
11798        pub fn set_protocol_version(&mut self, field: u64) {
11799            self.protocol_version = Some(field);
11800        }
11801        ///Sets `protocol_version` with the provided value.
11802        pub fn with_protocol_version(mut self, field: u64) -> Self {
11803            self.set_protocol_version(field);
11804            self
11805        }
11806        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11807        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11808            &self.feature_flags
11809        }
11810        ///Returns a mutable reference to `feature_flags`.
11811        ///If the field is unset, it is first initialized with the default value.
11812        pub fn feature_flags_mut(
11813            &mut self,
11814        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11815            &mut self.feature_flags
11816        }
11817        ///Sets `feature_flags` with the provided value.
11818        pub fn set_feature_flags(
11819            &mut self,
11820            field: ::std::collections::BTreeMap<String, bool>,
11821        ) {
11822            self.feature_flags = field;
11823        }
11824        ///Sets `feature_flags` with the provided value.
11825        pub fn with_feature_flags(
11826            mut self,
11827            field: ::std::collections::BTreeMap<String, bool>,
11828        ) -> Self {
11829            self.set_feature_flags(field);
11830            self
11831        }
11832        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11833        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11834            &self.attributes
11835        }
11836        ///Returns a mutable reference to `attributes`.
11837        ///If the field is unset, it is first initialized with the default value.
11838        pub fn attributes_mut(
11839            &mut self,
11840        ) -> &mut ::std::collections::BTreeMap<String, String> {
11841            &mut self.attributes
11842        }
11843        ///Sets `attributes` with the provided value.
11844        pub fn set_attributes(
11845            &mut self,
11846            field: ::std::collections::BTreeMap<String, String>,
11847        ) {
11848            self.attributes = field;
11849        }
11850        ///Sets `attributes` with the provided value.
11851        pub fn with_attributes(
11852            mut self,
11853            field: ::std::collections::BTreeMap<String, String>,
11854        ) -> Self {
11855            self.set_attributes(field);
11856            self
11857        }
11858    }
11859    impl super::Publish {
11860        pub const fn const_default() -> Self {
11861            Self {
11862                modules: Vec::new(),
11863                dependencies: Vec::new(),
11864            }
11865        }
11866        #[doc(hidden)]
11867        pub fn default_instance() -> &'static Self {
11868            static DEFAULT: super::Publish = super::Publish::const_default();
11869            &DEFAULT
11870        }
11871        ///Returns the value of `modules`, or the default value if `modules` is unset.
11872        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11873            &self.modules
11874        }
11875        ///Returns a mutable reference to `modules`.
11876        ///If the field is unset, it is first initialized with the default value.
11877        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11878            &mut self.modules
11879        }
11880        ///Sets `modules` with the provided value.
11881        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11882            self.modules = field;
11883        }
11884        ///Sets `modules` with the provided value.
11885        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11886            self.set_modules(field);
11887            self
11888        }
11889        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
11890        pub fn dependencies(&self) -> &[String] {
11891            &self.dependencies
11892        }
11893        ///Returns a mutable reference to `dependencies`.
11894        ///If the field is unset, it is first initialized with the default value.
11895        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11896            &mut self.dependencies
11897        }
11898        ///Sets `dependencies` with the provided value.
11899        pub fn set_dependencies(&mut self, field: Vec<String>) {
11900            self.dependencies = field;
11901        }
11902        ///Sets `dependencies` with the provided value.
11903        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11904            self.set_dependencies(field);
11905            self
11906        }
11907    }
11908    impl super::RandomnessStateUpdate {
11909        pub const fn const_default() -> Self {
11910            Self {
11911                epoch: None,
11912                randomness_round: None,
11913                random_bytes: None,
11914                randomness_object_initial_shared_version: None,
11915            }
11916        }
11917        #[doc(hidden)]
11918        pub fn default_instance() -> &'static Self {
11919            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11920            &DEFAULT
11921        }
11922        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11923        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11924            self.epoch.as_mut().map(|field| field as _)
11925        }
11926        ///Returns a mutable reference to `epoch`.
11927        ///If the field is unset, it is first initialized with the default value.
11928        pub fn epoch_mut(&mut self) -> &mut u64 {
11929            self.epoch.get_or_insert_default()
11930        }
11931        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
11932        pub fn epoch_opt(&self) -> Option<u64> {
11933            self.epoch.as_ref().map(|field| *field)
11934        }
11935        ///Sets `epoch` with the provided value.
11936        pub fn set_epoch(&mut self, field: u64) {
11937            self.epoch = Some(field);
11938        }
11939        ///Sets `epoch` with the provided value.
11940        pub fn with_epoch(mut self, field: u64) -> Self {
11941            self.set_epoch(field);
11942            self
11943        }
11944        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11945        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11946            self.randomness_round.as_mut().map(|field| field as _)
11947        }
11948        ///Returns a mutable reference to `randomness_round`.
11949        ///If the field is unset, it is first initialized with the default value.
11950        pub fn randomness_round_mut(&mut self) -> &mut u64 {
11951            self.randomness_round.get_or_insert_default()
11952        }
11953        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
11954        pub fn randomness_round_opt(&self) -> Option<u64> {
11955            self.randomness_round.as_ref().map(|field| *field)
11956        }
11957        ///Sets `randomness_round` with the provided value.
11958        pub fn set_randomness_round(&mut self, field: u64) {
11959            self.randomness_round = Some(field);
11960        }
11961        ///Sets `randomness_round` with the provided value.
11962        pub fn with_randomness_round(mut self, field: u64) -> Self {
11963            self.set_randomness_round(field);
11964            self
11965        }
11966        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
11967        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11968            self.random_bytes.as_ref().map(|field| field as _)
11969        }
11970        ///Sets `random_bytes` with the provided value.
11971        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11972            self.random_bytes = Some(field.into().into());
11973        }
11974        ///Sets `random_bytes` with the provided value.
11975        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11976            mut self,
11977            field: T,
11978        ) -> Self {
11979            self.set_random_bytes(field.into());
11980            self
11981        }
11982        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11983        pub fn randomness_object_initial_shared_version_opt_mut(
11984            &mut self,
11985        ) -> Option<&mut u64> {
11986            self.randomness_object_initial_shared_version
11987                .as_mut()
11988                .map(|field| field as _)
11989        }
11990        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
11991        ///If the field is unset, it is first initialized with the default value.
11992        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11993            self.randomness_object_initial_shared_version.get_or_insert_default()
11994        }
11995        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11996        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11997            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11998        }
11999        ///Sets `randomness_object_initial_shared_version` with the provided value.
12000        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12001            self.randomness_object_initial_shared_version = Some(field);
12002        }
12003        ///Sets `randomness_object_initial_shared_version` with the provided value.
12004        pub fn with_randomness_object_initial_shared_version(
12005            mut self,
12006            field: u64,
12007        ) -> Self {
12008            self.set_randomness_object_initial_shared_version(field);
12009            self
12010        }
12011    }
12012    impl super::RegulatedCoinMetadata {
12013        pub const fn const_default() -> Self {
12014            Self {
12015                id: None,
12016                coin_metadata_object: None,
12017                deny_cap_object: None,
12018                allow_global_pause: None,
12019                variant: None,
12020                coin_regulated_state: None,
12021            }
12022        }
12023        #[doc(hidden)]
12024        pub fn default_instance() -> &'static Self {
12025            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12026            &DEFAULT
12027        }
12028        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12029        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12030            self.id.as_mut().map(|field| field as _)
12031        }
12032        ///Returns a mutable reference to `id`.
12033        ///If the field is unset, it is first initialized with the default value.
12034        pub fn id_mut(&mut self) -> &mut String {
12035            self.id.get_or_insert_default()
12036        }
12037        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12038        pub fn id_opt(&self) -> Option<&str> {
12039            self.id.as_ref().map(|field| field as _)
12040        }
12041        ///Sets `id` with the provided value.
12042        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12043            self.id = Some(field.into().into());
12044        }
12045        ///Sets `id` with the provided value.
12046        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12047            self.set_id(field.into());
12048            self
12049        }
12050        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12051        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12052            self.coin_metadata_object.as_mut().map(|field| field as _)
12053        }
12054        ///Returns a mutable reference to `coin_metadata_object`.
12055        ///If the field is unset, it is first initialized with the default value.
12056        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12057            self.coin_metadata_object.get_or_insert_default()
12058        }
12059        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12060        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12061            self.coin_metadata_object.as_ref().map(|field| field as _)
12062        }
12063        ///Sets `coin_metadata_object` with the provided value.
12064        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12065            self.coin_metadata_object = Some(field.into().into());
12066        }
12067        ///Sets `coin_metadata_object` with the provided value.
12068        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12069            self.set_coin_metadata_object(field.into());
12070            self
12071        }
12072        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12073        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12074            self.deny_cap_object.as_mut().map(|field| field as _)
12075        }
12076        ///Returns a mutable reference to `deny_cap_object`.
12077        ///If the field is unset, it is first initialized with the default value.
12078        pub fn deny_cap_object_mut(&mut self) -> &mut String {
12079            self.deny_cap_object.get_or_insert_default()
12080        }
12081        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12082        pub fn deny_cap_object_opt(&self) -> Option<&str> {
12083            self.deny_cap_object.as_ref().map(|field| field as _)
12084        }
12085        ///Sets `deny_cap_object` with the provided value.
12086        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12087            self.deny_cap_object = Some(field.into().into());
12088        }
12089        ///Sets `deny_cap_object` with the provided value.
12090        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12091            self.set_deny_cap_object(field.into());
12092            self
12093        }
12094        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12095        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12096            self.allow_global_pause.as_mut().map(|field| field as _)
12097        }
12098        ///Returns a mutable reference to `allow_global_pause`.
12099        ///If the field is unset, it is first initialized with the default value.
12100        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12101            self.allow_global_pause.get_or_insert_default()
12102        }
12103        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
12104        pub fn allow_global_pause_opt(&self) -> Option<bool> {
12105            self.allow_global_pause.as_ref().map(|field| *field)
12106        }
12107        ///Sets `allow_global_pause` with the provided value.
12108        pub fn set_allow_global_pause(&mut self, field: bool) {
12109            self.allow_global_pause = Some(field);
12110        }
12111        ///Sets `allow_global_pause` with the provided value.
12112        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12113            self.set_allow_global_pause(field);
12114            self
12115        }
12116        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12117        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12118            self.variant.as_mut().map(|field| field as _)
12119        }
12120        ///Returns a mutable reference to `variant`.
12121        ///If the field is unset, it is first initialized with the default value.
12122        pub fn variant_mut(&mut self) -> &mut u32 {
12123            self.variant.get_or_insert_default()
12124        }
12125        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
12126        pub fn variant_opt(&self) -> Option<u32> {
12127            self.variant.as_ref().map(|field| *field)
12128        }
12129        ///Sets `variant` with the provided value.
12130        pub fn set_variant(&mut self, field: u32) {
12131            self.variant = Some(field);
12132        }
12133        ///Sets `variant` with the provided value.
12134        pub fn with_variant(mut self, field: u32) -> Self {
12135            self.set_variant(field);
12136            self
12137        }
12138        ///Sets `coin_regulated_state` with the provided value.
12139        pub fn with_coin_regulated_state<
12140            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12141        >(mut self, field: T) -> Self {
12142            self.set_coin_regulated_state(field.into());
12143            self
12144        }
12145    }
12146    impl super::ReverseLookupNameRequest {
12147        pub const fn const_default() -> Self {
12148            Self { address: None }
12149        }
12150        #[doc(hidden)]
12151        pub fn default_instance() -> &'static Self {
12152            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12153            &DEFAULT
12154        }
12155        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12156        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12157            self.address.as_mut().map(|field| field as _)
12158        }
12159        ///Returns a mutable reference to `address`.
12160        ///If the field is unset, it is first initialized with the default value.
12161        pub fn address_mut(&mut self) -> &mut String {
12162            self.address.get_or_insert_default()
12163        }
12164        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12165        pub fn address_opt(&self) -> Option<&str> {
12166            self.address.as_ref().map(|field| field as _)
12167        }
12168        ///Sets `address` with the provided value.
12169        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12170            self.address = Some(field.into().into());
12171        }
12172        ///Sets `address` with the provided value.
12173        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12174            self.set_address(field.into());
12175            self
12176        }
12177    }
12178    impl super::ReverseLookupNameResponse {
12179        pub const fn const_default() -> Self {
12180            Self { record: None }
12181        }
12182        #[doc(hidden)]
12183        pub fn default_instance() -> &'static Self {
12184            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12185            &DEFAULT
12186        }
12187        ///Returns the value of `record`, or the default value if `record` is unset.
12188        pub fn record(&self) -> &super::NameRecord {
12189            self.record
12190                .as_ref()
12191                .map(|field| field as _)
12192                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12193        }
12194        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12195        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12196            self.record.as_mut().map(|field| field as _)
12197        }
12198        ///Returns a mutable reference to `record`.
12199        ///If the field is unset, it is first initialized with the default value.
12200        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12201            self.record.get_or_insert_default()
12202        }
12203        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12204        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12205            self.record.as_ref().map(|field| field as _)
12206        }
12207        ///Sets `record` with the provided value.
12208        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12209            self.record = Some(field.into().into());
12210        }
12211        ///Sets `record` with the provided value.
12212        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12213            self.set_record(field.into());
12214            self
12215        }
12216    }
12217    impl super::SimpleSignature {
12218        pub const fn const_default() -> Self {
12219            Self {
12220                scheme: None,
12221                signature: None,
12222                public_key: None,
12223            }
12224        }
12225        #[doc(hidden)]
12226        pub fn default_instance() -> &'static Self {
12227            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12228            &DEFAULT
12229        }
12230        ///Sets `scheme` with the provided value.
12231        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12232            self.set_scheme(field.into());
12233            self
12234        }
12235        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12236        pub fn signature_opt(&self) -> Option<&[u8]> {
12237            self.signature.as_ref().map(|field| field as _)
12238        }
12239        ///Sets `signature` with the provided value.
12240        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12241            self.signature = Some(field.into().into());
12242        }
12243        ///Sets `signature` with the provided value.
12244        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12245            mut self,
12246            field: T,
12247        ) -> Self {
12248            self.set_signature(field.into());
12249            self
12250        }
12251        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12252        pub fn public_key_opt(&self) -> Option<&[u8]> {
12253            self.public_key.as_ref().map(|field| field as _)
12254        }
12255        ///Sets `public_key` with the provided value.
12256        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12257            self.public_key = Some(field.into().into());
12258        }
12259        ///Sets `public_key` with the provided value.
12260        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12261            mut self,
12262            field: T,
12263        ) -> Self {
12264            self.set_public_key(field.into());
12265            self
12266        }
12267    }
12268    impl super::SimulateTransactionRequest {
12269        pub const fn const_default() -> Self {
12270            Self {
12271                transaction: None,
12272                read_mask: None,
12273                checks: None,
12274                do_gas_selection: None,
12275            }
12276        }
12277        #[doc(hidden)]
12278        pub fn default_instance() -> &'static Self {
12279            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12280            &DEFAULT
12281        }
12282        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12283        pub fn transaction(&self) -> &super::Transaction {
12284            self.transaction
12285                .as_ref()
12286                .map(|field| field as _)
12287                .unwrap_or_else(|| super::Transaction::default_instance() as _)
12288        }
12289        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12290        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12291            self.transaction.as_mut().map(|field| field as _)
12292        }
12293        ///Returns a mutable reference to `transaction`.
12294        ///If the field is unset, it is first initialized with the default value.
12295        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12296            self.transaction.get_or_insert_default()
12297        }
12298        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12299        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12300            self.transaction.as_ref().map(|field| field as _)
12301        }
12302        ///Sets `transaction` with the provided value.
12303        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12304            self.transaction = Some(field.into().into());
12305        }
12306        ///Sets `transaction` with the provided value.
12307        pub fn with_transaction<T: Into<super::Transaction>>(
12308            mut self,
12309            field: T,
12310        ) -> Self {
12311            self.set_transaction(field.into());
12312            self
12313        }
12314        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12315        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12316            self.read_mask.as_mut().map(|field| field as _)
12317        }
12318        ///Returns a mutable reference to `read_mask`.
12319        ///If the field is unset, it is first initialized with the default value.
12320        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12321            self.read_mask.get_or_insert_default()
12322        }
12323        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12324        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12325            self.read_mask.as_ref().map(|field| field as _)
12326        }
12327        ///Sets `read_mask` with the provided value.
12328        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12329            self.read_mask = Some(field.into().into());
12330        }
12331        ///Sets `read_mask` with the provided value.
12332        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12333            mut self,
12334            field: T,
12335        ) -> Self {
12336            self.set_read_mask(field.into());
12337            self
12338        }
12339        ///Sets `checks` with the provided value.
12340        pub fn with_checks<
12341            T: Into<super::simulate_transaction_request::TransactionChecks>,
12342        >(mut self, field: T) -> Self {
12343            self.set_checks(field.into());
12344            self
12345        }
12346        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12347        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12348            self.do_gas_selection.as_mut().map(|field| field as _)
12349        }
12350        ///Returns a mutable reference to `do_gas_selection`.
12351        ///If the field is unset, it is first initialized with the default value.
12352        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12353            self.do_gas_selection.get_or_insert_default()
12354        }
12355        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12356        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12357            self.do_gas_selection.as_ref().map(|field| *field)
12358        }
12359        ///Sets `do_gas_selection` with the provided value.
12360        pub fn set_do_gas_selection(&mut self, field: bool) {
12361            self.do_gas_selection = Some(field);
12362        }
12363        ///Sets `do_gas_selection` with the provided value.
12364        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12365            self.set_do_gas_selection(field);
12366            self
12367        }
12368    }
12369    impl super::SimulateTransactionResponse {
12370        pub const fn const_default() -> Self {
12371            Self {
12372                transaction: None,
12373                command_outputs: Vec::new(),
12374            }
12375        }
12376        #[doc(hidden)]
12377        pub fn default_instance() -> &'static Self {
12378            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12379            &DEFAULT
12380        }
12381        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12382        pub fn transaction(&self) -> &super::ExecutedTransaction {
12383            self.transaction
12384                .as_ref()
12385                .map(|field| field as _)
12386                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12387        }
12388        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12389        pub fn transaction_opt_mut(
12390            &mut self,
12391        ) -> Option<&mut super::ExecutedTransaction> {
12392            self.transaction.as_mut().map(|field| field as _)
12393        }
12394        ///Returns a mutable reference to `transaction`.
12395        ///If the field is unset, it is first initialized with the default value.
12396        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12397            self.transaction.get_or_insert_default()
12398        }
12399        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12400        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12401            self.transaction.as_ref().map(|field| field as _)
12402        }
12403        ///Sets `transaction` with the provided value.
12404        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12405            &mut self,
12406            field: T,
12407        ) {
12408            self.transaction = Some(field.into().into());
12409        }
12410        ///Sets `transaction` with the provided value.
12411        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12412            mut self,
12413            field: T,
12414        ) -> Self {
12415            self.set_transaction(field.into());
12416            self
12417        }
12418        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12419        pub fn command_outputs(&self) -> &[super::CommandResult] {
12420            &self.command_outputs
12421        }
12422        ///Returns a mutable reference to `command_outputs`.
12423        ///If the field is unset, it is first initialized with the default value.
12424        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12425            &mut self.command_outputs
12426        }
12427        ///Sets `command_outputs` with the provided value.
12428        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12429            self.command_outputs = field;
12430        }
12431        ///Sets `command_outputs` with the provided value.
12432        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12433            self.set_command_outputs(field);
12434            self
12435        }
12436    }
12437    impl super::SizeError {
12438        pub const fn const_default() -> Self {
12439            Self { size: None, max_size: None }
12440        }
12441        #[doc(hidden)]
12442        pub fn default_instance() -> &'static Self {
12443            static DEFAULT: super::SizeError = super::SizeError::const_default();
12444            &DEFAULT
12445        }
12446        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12447        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12448            self.size.as_mut().map(|field| field as _)
12449        }
12450        ///Returns a mutable reference to `size`.
12451        ///If the field is unset, it is first initialized with the default value.
12452        pub fn size_mut(&mut self) -> &mut u64 {
12453            self.size.get_or_insert_default()
12454        }
12455        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12456        pub fn size_opt(&self) -> Option<u64> {
12457            self.size.as_ref().map(|field| *field)
12458        }
12459        ///Sets `size` with the provided value.
12460        pub fn set_size(&mut self, field: u64) {
12461            self.size = Some(field);
12462        }
12463        ///Sets `size` with the provided value.
12464        pub fn with_size(mut self, field: u64) -> Self {
12465            self.set_size(field);
12466            self
12467        }
12468        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12469        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12470            self.max_size.as_mut().map(|field| field as _)
12471        }
12472        ///Returns a mutable reference to `max_size`.
12473        ///If the field is unset, it is first initialized with the default value.
12474        pub fn max_size_mut(&mut self) -> &mut u64 {
12475            self.max_size.get_or_insert_default()
12476        }
12477        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12478        pub fn max_size_opt(&self) -> Option<u64> {
12479            self.max_size.as_ref().map(|field| *field)
12480        }
12481        ///Sets `max_size` with the provided value.
12482        pub fn set_max_size(&mut self, field: u64) {
12483            self.max_size = Some(field);
12484        }
12485        ///Sets `max_size` with the provided value.
12486        pub fn with_max_size(mut self, field: u64) -> Self {
12487            self.set_max_size(field);
12488            self
12489        }
12490    }
12491    impl super::SplitCoins {
12492        pub const fn const_default() -> Self {
12493            Self {
12494                coin: None,
12495                amounts: Vec::new(),
12496            }
12497        }
12498        #[doc(hidden)]
12499        pub fn default_instance() -> &'static Self {
12500            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12501            &DEFAULT
12502        }
12503        ///Returns the value of `coin`, or the default value if `coin` is unset.
12504        pub fn coin(&self) -> &super::Argument {
12505            self.coin
12506                .as_ref()
12507                .map(|field| field as _)
12508                .unwrap_or_else(|| super::Argument::default_instance() as _)
12509        }
12510        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12511        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12512            self.coin.as_mut().map(|field| field as _)
12513        }
12514        ///Returns a mutable reference to `coin`.
12515        ///If the field is unset, it is first initialized with the default value.
12516        pub fn coin_mut(&mut self) -> &mut super::Argument {
12517            self.coin.get_or_insert_default()
12518        }
12519        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12520        pub fn coin_opt(&self) -> Option<&super::Argument> {
12521            self.coin.as_ref().map(|field| field as _)
12522        }
12523        ///Sets `coin` with the provided value.
12524        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12525            self.coin = Some(field.into().into());
12526        }
12527        ///Sets `coin` with the provided value.
12528        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12529            self.set_coin(field.into());
12530            self
12531        }
12532        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12533        pub fn amounts(&self) -> &[super::Argument] {
12534            &self.amounts
12535        }
12536        ///Returns a mutable reference to `amounts`.
12537        ///If the field is unset, it is first initialized with the default value.
12538        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12539            &mut self.amounts
12540        }
12541        ///Sets `amounts` with the provided value.
12542        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12543            self.amounts = field;
12544        }
12545        ///Sets `amounts` with the provided value.
12546        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12547            self.set_amounts(field);
12548            self
12549        }
12550    }
12551    impl super::StakeSubsidy {
12552        pub const fn const_default() -> Self {
12553            Self {
12554                balance: None,
12555                distribution_counter: None,
12556                current_distribution_amount: None,
12557                stake_subsidy_period_length: None,
12558                stake_subsidy_decrease_rate: None,
12559                extra_fields: None,
12560            }
12561        }
12562        #[doc(hidden)]
12563        pub fn default_instance() -> &'static Self {
12564            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12565            &DEFAULT
12566        }
12567        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12568        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12569            self.balance.as_mut().map(|field| field as _)
12570        }
12571        ///Returns a mutable reference to `balance`.
12572        ///If the field is unset, it is first initialized with the default value.
12573        pub fn balance_mut(&mut self) -> &mut u64 {
12574            self.balance.get_or_insert_default()
12575        }
12576        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12577        pub fn balance_opt(&self) -> Option<u64> {
12578            self.balance.as_ref().map(|field| *field)
12579        }
12580        ///Sets `balance` with the provided value.
12581        pub fn set_balance(&mut self, field: u64) {
12582            self.balance = Some(field);
12583        }
12584        ///Sets `balance` with the provided value.
12585        pub fn with_balance(mut self, field: u64) -> Self {
12586            self.set_balance(field);
12587            self
12588        }
12589        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12590        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12591            self.distribution_counter.as_mut().map(|field| field as _)
12592        }
12593        ///Returns a mutable reference to `distribution_counter`.
12594        ///If the field is unset, it is first initialized with the default value.
12595        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12596            self.distribution_counter.get_or_insert_default()
12597        }
12598        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12599        pub fn distribution_counter_opt(&self) -> Option<u64> {
12600            self.distribution_counter.as_ref().map(|field| *field)
12601        }
12602        ///Sets `distribution_counter` with the provided value.
12603        pub fn set_distribution_counter(&mut self, field: u64) {
12604            self.distribution_counter = Some(field);
12605        }
12606        ///Sets `distribution_counter` with the provided value.
12607        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12608            self.set_distribution_counter(field);
12609            self
12610        }
12611        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12612        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12613            self.current_distribution_amount.as_mut().map(|field| field as _)
12614        }
12615        ///Returns a mutable reference to `current_distribution_amount`.
12616        ///If the field is unset, it is first initialized with the default value.
12617        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12618            self.current_distribution_amount.get_or_insert_default()
12619        }
12620        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12621        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12622            self.current_distribution_amount.as_ref().map(|field| *field)
12623        }
12624        ///Sets `current_distribution_amount` with the provided value.
12625        pub fn set_current_distribution_amount(&mut self, field: u64) {
12626            self.current_distribution_amount = Some(field);
12627        }
12628        ///Sets `current_distribution_amount` with the provided value.
12629        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12630            self.set_current_distribution_amount(field);
12631            self
12632        }
12633        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12634        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12635            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12636        }
12637        ///Returns a mutable reference to `stake_subsidy_period_length`.
12638        ///If the field is unset, it is first initialized with the default value.
12639        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12640            self.stake_subsidy_period_length.get_or_insert_default()
12641        }
12642        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12643        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12644            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12645        }
12646        ///Sets `stake_subsidy_period_length` with the provided value.
12647        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12648            self.stake_subsidy_period_length = Some(field);
12649        }
12650        ///Sets `stake_subsidy_period_length` with the provided value.
12651        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12652            self.set_stake_subsidy_period_length(field);
12653            self
12654        }
12655        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12656        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12657            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12658        }
12659        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12660        ///If the field is unset, it is first initialized with the default value.
12661        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12662            self.stake_subsidy_decrease_rate.get_or_insert_default()
12663        }
12664        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12665        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12666            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12667        }
12668        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12669        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12670            self.stake_subsidy_decrease_rate = Some(field);
12671        }
12672        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12673        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12674            self.set_stake_subsidy_decrease_rate(field);
12675            self
12676        }
12677        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12678        pub fn extra_fields(&self) -> &super::MoveTable {
12679            self.extra_fields
12680                .as_ref()
12681                .map(|field| field as _)
12682                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12683        }
12684        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12685        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12686            self.extra_fields.as_mut().map(|field| field as _)
12687        }
12688        ///Returns a mutable reference to `extra_fields`.
12689        ///If the field is unset, it is first initialized with the default value.
12690        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12691            self.extra_fields.get_or_insert_default()
12692        }
12693        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12694        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12695            self.extra_fields.as_ref().map(|field| field as _)
12696        }
12697        ///Sets `extra_fields` with the provided value.
12698        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12699            self.extra_fields = Some(field.into().into());
12700        }
12701        ///Sets `extra_fields` with the provided value.
12702        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12703            self.set_extra_fields(field.into());
12704            self
12705        }
12706    }
12707    impl super::StakingPool {
12708        pub const fn const_default() -> Self {
12709            Self {
12710                id: None,
12711                activation_epoch: None,
12712                deactivation_epoch: None,
12713                sui_balance: None,
12714                rewards_pool: None,
12715                pool_token_balance: None,
12716                exchange_rates: None,
12717                pending_stake: None,
12718                pending_total_sui_withdraw: None,
12719                pending_pool_token_withdraw: None,
12720                extra_fields: None,
12721            }
12722        }
12723        #[doc(hidden)]
12724        pub fn default_instance() -> &'static Self {
12725            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12726            &DEFAULT
12727        }
12728        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12729        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12730            self.id.as_mut().map(|field| field as _)
12731        }
12732        ///Returns a mutable reference to `id`.
12733        ///If the field is unset, it is first initialized with the default value.
12734        pub fn id_mut(&mut self) -> &mut String {
12735            self.id.get_or_insert_default()
12736        }
12737        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12738        pub fn id_opt(&self) -> Option<&str> {
12739            self.id.as_ref().map(|field| field as _)
12740        }
12741        ///Sets `id` with the provided value.
12742        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12743            self.id = Some(field.into().into());
12744        }
12745        ///Sets `id` with the provided value.
12746        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12747            self.set_id(field.into());
12748            self
12749        }
12750        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12751        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12752            self.activation_epoch.as_mut().map(|field| field as _)
12753        }
12754        ///Returns a mutable reference to `activation_epoch`.
12755        ///If the field is unset, it is first initialized with the default value.
12756        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12757            self.activation_epoch.get_or_insert_default()
12758        }
12759        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12760        pub fn activation_epoch_opt(&self) -> Option<u64> {
12761            self.activation_epoch.as_ref().map(|field| *field)
12762        }
12763        ///Sets `activation_epoch` with the provided value.
12764        pub fn set_activation_epoch(&mut self, field: u64) {
12765            self.activation_epoch = Some(field);
12766        }
12767        ///Sets `activation_epoch` with the provided value.
12768        pub fn with_activation_epoch(mut self, field: u64) -> Self {
12769            self.set_activation_epoch(field);
12770            self
12771        }
12772        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12773        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12774            self.deactivation_epoch.as_mut().map(|field| field as _)
12775        }
12776        ///Returns a mutable reference to `deactivation_epoch`.
12777        ///If the field is unset, it is first initialized with the default value.
12778        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12779            self.deactivation_epoch.get_or_insert_default()
12780        }
12781        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12782        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12783            self.deactivation_epoch.as_ref().map(|field| *field)
12784        }
12785        ///Sets `deactivation_epoch` with the provided value.
12786        pub fn set_deactivation_epoch(&mut self, field: u64) {
12787            self.deactivation_epoch = Some(field);
12788        }
12789        ///Sets `deactivation_epoch` with the provided value.
12790        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12791            self.set_deactivation_epoch(field);
12792            self
12793        }
12794        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12795        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12796            self.sui_balance.as_mut().map(|field| field as _)
12797        }
12798        ///Returns a mutable reference to `sui_balance`.
12799        ///If the field is unset, it is first initialized with the default value.
12800        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12801            self.sui_balance.get_or_insert_default()
12802        }
12803        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12804        pub fn sui_balance_opt(&self) -> Option<u64> {
12805            self.sui_balance.as_ref().map(|field| *field)
12806        }
12807        ///Sets `sui_balance` with the provided value.
12808        pub fn set_sui_balance(&mut self, field: u64) {
12809            self.sui_balance = Some(field);
12810        }
12811        ///Sets `sui_balance` with the provided value.
12812        pub fn with_sui_balance(mut self, field: u64) -> Self {
12813            self.set_sui_balance(field);
12814            self
12815        }
12816        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12817        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12818            self.rewards_pool.as_mut().map(|field| field as _)
12819        }
12820        ///Returns a mutable reference to `rewards_pool`.
12821        ///If the field is unset, it is first initialized with the default value.
12822        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12823            self.rewards_pool.get_or_insert_default()
12824        }
12825        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12826        pub fn rewards_pool_opt(&self) -> Option<u64> {
12827            self.rewards_pool.as_ref().map(|field| *field)
12828        }
12829        ///Sets `rewards_pool` with the provided value.
12830        pub fn set_rewards_pool(&mut self, field: u64) {
12831            self.rewards_pool = Some(field);
12832        }
12833        ///Sets `rewards_pool` with the provided value.
12834        pub fn with_rewards_pool(mut self, field: u64) -> Self {
12835            self.set_rewards_pool(field);
12836            self
12837        }
12838        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12839        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12840            self.pool_token_balance.as_mut().map(|field| field as _)
12841        }
12842        ///Returns a mutable reference to `pool_token_balance`.
12843        ///If the field is unset, it is first initialized with the default value.
12844        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12845            self.pool_token_balance.get_or_insert_default()
12846        }
12847        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12848        pub fn pool_token_balance_opt(&self) -> Option<u64> {
12849            self.pool_token_balance.as_ref().map(|field| *field)
12850        }
12851        ///Sets `pool_token_balance` with the provided value.
12852        pub fn set_pool_token_balance(&mut self, field: u64) {
12853            self.pool_token_balance = Some(field);
12854        }
12855        ///Sets `pool_token_balance` with the provided value.
12856        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12857            self.set_pool_token_balance(field);
12858            self
12859        }
12860        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
12861        pub fn exchange_rates(&self) -> &super::MoveTable {
12862            self.exchange_rates
12863                .as_ref()
12864                .map(|field| field as _)
12865                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12866        }
12867        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12868        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12869            self.exchange_rates.as_mut().map(|field| field as _)
12870        }
12871        ///Returns a mutable reference to `exchange_rates`.
12872        ///If the field is unset, it is first initialized with the default value.
12873        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12874            self.exchange_rates.get_or_insert_default()
12875        }
12876        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12877        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12878            self.exchange_rates.as_ref().map(|field| field as _)
12879        }
12880        ///Sets `exchange_rates` with the provided value.
12881        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12882            self.exchange_rates = Some(field.into().into());
12883        }
12884        ///Sets `exchange_rates` with the provided value.
12885        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12886            mut self,
12887            field: T,
12888        ) -> Self {
12889            self.set_exchange_rates(field.into());
12890            self
12891        }
12892        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12893        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12894            self.pending_stake.as_mut().map(|field| field as _)
12895        }
12896        ///Returns a mutable reference to `pending_stake`.
12897        ///If the field is unset, it is first initialized with the default value.
12898        pub fn pending_stake_mut(&mut self) -> &mut u64 {
12899            self.pending_stake.get_or_insert_default()
12900        }
12901        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12902        pub fn pending_stake_opt(&self) -> Option<u64> {
12903            self.pending_stake.as_ref().map(|field| *field)
12904        }
12905        ///Sets `pending_stake` with the provided value.
12906        pub fn set_pending_stake(&mut self, field: u64) {
12907            self.pending_stake = Some(field);
12908        }
12909        ///Sets `pending_stake` with the provided value.
12910        pub fn with_pending_stake(mut self, field: u64) -> Self {
12911            self.set_pending_stake(field);
12912            self
12913        }
12914        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12915        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12916            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12917        }
12918        ///Returns a mutable reference to `pending_total_sui_withdraw`.
12919        ///If the field is unset, it is first initialized with the default value.
12920        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12921            self.pending_total_sui_withdraw.get_or_insert_default()
12922        }
12923        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12924        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12925            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12926        }
12927        ///Sets `pending_total_sui_withdraw` with the provided value.
12928        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12929            self.pending_total_sui_withdraw = Some(field);
12930        }
12931        ///Sets `pending_total_sui_withdraw` with the provided value.
12932        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12933            self.set_pending_total_sui_withdraw(field);
12934            self
12935        }
12936        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12937        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12938            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12939        }
12940        ///Returns a mutable reference to `pending_pool_token_withdraw`.
12941        ///If the field is unset, it is first initialized with the default value.
12942        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12943            self.pending_pool_token_withdraw.get_or_insert_default()
12944        }
12945        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12946        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12947            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12948        }
12949        ///Sets `pending_pool_token_withdraw` with the provided value.
12950        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
12951            self.pending_pool_token_withdraw = Some(field);
12952        }
12953        ///Sets `pending_pool_token_withdraw` with the provided value.
12954        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
12955            self.set_pending_pool_token_withdraw(field);
12956            self
12957        }
12958        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12959        pub fn extra_fields(&self) -> &super::MoveTable {
12960            self.extra_fields
12961                .as_ref()
12962                .map(|field| field as _)
12963                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12964        }
12965        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12966        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12967            self.extra_fields.as_mut().map(|field| field as _)
12968        }
12969        ///Returns a mutable reference to `extra_fields`.
12970        ///If the field is unset, it is first initialized with the default value.
12971        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12972            self.extra_fields.get_or_insert_default()
12973        }
12974        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12975        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12976            self.extra_fields.as_ref().map(|field| field as _)
12977        }
12978        ///Sets `extra_fields` with the provided value.
12979        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12980            self.extra_fields = Some(field.into().into());
12981        }
12982        ///Sets `extra_fields` with the provided value.
12983        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12984            self.set_extra_fields(field.into());
12985            self
12986        }
12987    }
12988    impl super::StorageFund {
12989        pub const fn const_default() -> Self {
12990            Self {
12991                total_object_storage_rebates: None,
12992                non_refundable_balance: None,
12993            }
12994        }
12995        #[doc(hidden)]
12996        pub fn default_instance() -> &'static Self {
12997            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12998            &DEFAULT
12999        }
13000        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13001        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13002            self.total_object_storage_rebates.as_mut().map(|field| field as _)
13003        }
13004        ///Returns a mutable reference to `total_object_storage_rebates`.
13005        ///If the field is unset, it is first initialized with the default value.
13006        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13007            self.total_object_storage_rebates.get_or_insert_default()
13008        }
13009        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13010        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13011            self.total_object_storage_rebates.as_ref().map(|field| *field)
13012        }
13013        ///Sets `total_object_storage_rebates` with the provided value.
13014        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13015            self.total_object_storage_rebates = Some(field);
13016        }
13017        ///Sets `total_object_storage_rebates` with the provided value.
13018        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13019            self.set_total_object_storage_rebates(field);
13020            self
13021        }
13022        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13023        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13024            self.non_refundable_balance.as_mut().map(|field| field as _)
13025        }
13026        ///Returns a mutable reference to `non_refundable_balance`.
13027        ///If the field is unset, it is first initialized with the default value.
13028        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13029            self.non_refundable_balance.get_or_insert_default()
13030        }
13031        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13032        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13033            self.non_refundable_balance.as_ref().map(|field| *field)
13034        }
13035        ///Sets `non_refundable_balance` with the provided value.
13036        pub fn set_non_refundable_balance(&mut self, field: u64) {
13037            self.non_refundable_balance = Some(field);
13038        }
13039        ///Sets `non_refundable_balance` with the provided value.
13040        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13041            self.set_non_refundable_balance(field);
13042            self
13043        }
13044    }
13045    impl super::SubscribeCheckpointsRequest {
13046        pub const fn const_default() -> Self {
13047            Self { read_mask: None }
13048        }
13049        #[doc(hidden)]
13050        pub fn default_instance() -> &'static Self {
13051            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13052            &DEFAULT
13053        }
13054        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13055        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13056            self.read_mask.as_mut().map(|field| field as _)
13057        }
13058        ///Returns a mutable reference to `read_mask`.
13059        ///If the field is unset, it is first initialized with the default value.
13060        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13061            self.read_mask.get_or_insert_default()
13062        }
13063        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
13064        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13065            self.read_mask.as_ref().map(|field| field as _)
13066        }
13067        ///Sets `read_mask` with the provided value.
13068        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13069            self.read_mask = Some(field.into().into());
13070        }
13071        ///Sets `read_mask` with the provided value.
13072        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13073            mut self,
13074            field: T,
13075        ) -> Self {
13076            self.set_read_mask(field.into());
13077            self
13078        }
13079    }
13080    impl super::SubscribeCheckpointsResponse {
13081        pub const fn const_default() -> Self {
13082            Self {
13083                cursor: None,
13084                checkpoint: None,
13085            }
13086        }
13087        #[doc(hidden)]
13088        pub fn default_instance() -> &'static Self {
13089            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13090            &DEFAULT
13091        }
13092        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13093        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13094            self.cursor.as_mut().map(|field| field as _)
13095        }
13096        ///Returns a mutable reference to `cursor`.
13097        ///If the field is unset, it is first initialized with the default value.
13098        pub fn cursor_mut(&mut self) -> &mut u64 {
13099            self.cursor.get_or_insert_default()
13100        }
13101        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
13102        pub fn cursor_opt(&self) -> Option<u64> {
13103            self.cursor.as_ref().map(|field| *field)
13104        }
13105        ///Sets `cursor` with the provided value.
13106        pub fn set_cursor(&mut self, field: u64) {
13107            self.cursor = Some(field);
13108        }
13109        ///Sets `cursor` with the provided value.
13110        pub fn with_cursor(mut self, field: u64) -> Self {
13111            self.set_cursor(field);
13112            self
13113        }
13114        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
13115        pub fn checkpoint(&self) -> &super::Checkpoint {
13116            self.checkpoint
13117                .as_ref()
13118                .map(|field| field as _)
13119                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13120        }
13121        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13122        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13123            self.checkpoint.as_mut().map(|field| field as _)
13124        }
13125        ///Returns a mutable reference to `checkpoint`.
13126        ///If the field is unset, it is first initialized with the default value.
13127        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13128            self.checkpoint.get_or_insert_default()
13129        }
13130        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
13131        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13132            self.checkpoint.as_ref().map(|field| field as _)
13133        }
13134        ///Sets `checkpoint` with the provided value.
13135        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13136            self.checkpoint = Some(field.into().into());
13137        }
13138        ///Sets `checkpoint` with the provided value.
13139        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13140            self.set_checkpoint(field.into());
13141            self
13142        }
13143    }
13144    impl super::SystemPackage {
13145        pub const fn const_default() -> Self {
13146            Self {
13147                version: None,
13148                modules: Vec::new(),
13149                dependencies: Vec::new(),
13150            }
13151        }
13152        #[doc(hidden)]
13153        pub fn default_instance() -> &'static Self {
13154            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13155            &DEFAULT
13156        }
13157        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13158        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13159            self.version.as_mut().map(|field| field as _)
13160        }
13161        ///Returns a mutable reference to `version`.
13162        ///If the field is unset, it is first initialized with the default value.
13163        pub fn version_mut(&mut self) -> &mut u64 {
13164            self.version.get_or_insert_default()
13165        }
13166        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13167        pub fn version_opt(&self) -> Option<u64> {
13168            self.version.as_ref().map(|field| *field)
13169        }
13170        ///Sets `version` with the provided value.
13171        pub fn set_version(&mut self, field: u64) {
13172            self.version = Some(field);
13173        }
13174        ///Sets `version` with the provided value.
13175        pub fn with_version(mut self, field: u64) -> Self {
13176            self.set_version(field);
13177            self
13178        }
13179        ///Returns the value of `modules`, or the default value if `modules` is unset.
13180        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13181            &self.modules
13182        }
13183        ///Returns a mutable reference to `modules`.
13184        ///If the field is unset, it is first initialized with the default value.
13185        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13186            &mut self.modules
13187        }
13188        ///Sets `modules` with the provided value.
13189        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13190            self.modules = field;
13191        }
13192        ///Sets `modules` with the provided value.
13193        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13194            self.set_modules(field);
13195            self
13196        }
13197        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13198        pub fn dependencies(&self) -> &[String] {
13199            &self.dependencies
13200        }
13201        ///Returns a mutable reference to `dependencies`.
13202        ///If the field is unset, it is first initialized with the default value.
13203        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13204            &mut self.dependencies
13205        }
13206        ///Sets `dependencies` with the provided value.
13207        pub fn set_dependencies(&mut self, field: Vec<String>) {
13208            self.dependencies = field;
13209        }
13210        ///Sets `dependencies` with the provided value.
13211        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13212            self.set_dependencies(field);
13213            self
13214        }
13215    }
13216    impl super::SystemParameters {
13217        pub const fn const_default() -> Self {
13218            Self {
13219                epoch_duration_ms: None,
13220                stake_subsidy_start_epoch: None,
13221                min_validator_count: None,
13222                max_validator_count: None,
13223                min_validator_joining_stake: None,
13224                validator_low_stake_threshold: None,
13225                validator_very_low_stake_threshold: None,
13226                validator_low_stake_grace_period: None,
13227                extra_fields: None,
13228            }
13229        }
13230        #[doc(hidden)]
13231        pub fn default_instance() -> &'static Self {
13232            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13233            &DEFAULT
13234        }
13235        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13236        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13237            self.epoch_duration_ms.as_mut().map(|field| field as _)
13238        }
13239        ///Returns a mutable reference to `epoch_duration_ms`.
13240        ///If the field is unset, it is first initialized with the default value.
13241        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13242            self.epoch_duration_ms.get_or_insert_default()
13243        }
13244        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13245        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13246            self.epoch_duration_ms.as_ref().map(|field| *field)
13247        }
13248        ///Sets `epoch_duration_ms` with the provided value.
13249        pub fn set_epoch_duration_ms(&mut self, field: u64) {
13250            self.epoch_duration_ms = Some(field);
13251        }
13252        ///Sets `epoch_duration_ms` with the provided value.
13253        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13254            self.set_epoch_duration_ms(field);
13255            self
13256        }
13257        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13258        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13259            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13260        }
13261        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
13262        ///If the field is unset, it is first initialized with the default value.
13263        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13264            self.stake_subsidy_start_epoch.get_or_insert_default()
13265        }
13266        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13267        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13268            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13269        }
13270        ///Sets `stake_subsidy_start_epoch` with the provided value.
13271        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13272            self.stake_subsidy_start_epoch = Some(field);
13273        }
13274        ///Sets `stake_subsidy_start_epoch` with the provided value.
13275        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13276            self.set_stake_subsidy_start_epoch(field);
13277            self
13278        }
13279        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13280        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13281            self.min_validator_count.as_mut().map(|field| field as _)
13282        }
13283        ///Returns a mutable reference to `min_validator_count`.
13284        ///If the field is unset, it is first initialized with the default value.
13285        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13286            self.min_validator_count.get_or_insert_default()
13287        }
13288        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13289        pub fn min_validator_count_opt(&self) -> Option<u64> {
13290            self.min_validator_count.as_ref().map(|field| *field)
13291        }
13292        ///Sets `min_validator_count` with the provided value.
13293        pub fn set_min_validator_count(&mut self, field: u64) {
13294            self.min_validator_count = Some(field);
13295        }
13296        ///Sets `min_validator_count` with the provided value.
13297        pub fn with_min_validator_count(mut self, field: u64) -> Self {
13298            self.set_min_validator_count(field);
13299            self
13300        }
13301        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13302        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13303            self.max_validator_count.as_mut().map(|field| field as _)
13304        }
13305        ///Returns a mutable reference to `max_validator_count`.
13306        ///If the field is unset, it is first initialized with the default value.
13307        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13308            self.max_validator_count.get_or_insert_default()
13309        }
13310        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13311        pub fn max_validator_count_opt(&self) -> Option<u64> {
13312            self.max_validator_count.as_ref().map(|field| *field)
13313        }
13314        ///Sets `max_validator_count` with the provided value.
13315        pub fn set_max_validator_count(&mut self, field: u64) {
13316            self.max_validator_count = Some(field);
13317        }
13318        ///Sets `max_validator_count` with the provided value.
13319        pub fn with_max_validator_count(mut self, field: u64) -> Self {
13320            self.set_max_validator_count(field);
13321            self
13322        }
13323        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13324        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13325            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13326        }
13327        ///Returns a mutable reference to `min_validator_joining_stake`.
13328        ///If the field is unset, it is first initialized with the default value.
13329        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13330            self.min_validator_joining_stake.get_or_insert_default()
13331        }
13332        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13333        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13334            self.min_validator_joining_stake.as_ref().map(|field| *field)
13335        }
13336        ///Sets `min_validator_joining_stake` with the provided value.
13337        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13338            self.min_validator_joining_stake = Some(field);
13339        }
13340        ///Sets `min_validator_joining_stake` with the provided value.
13341        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13342            self.set_min_validator_joining_stake(field);
13343            self
13344        }
13345        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13346        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13347            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13348        }
13349        ///Returns a mutable reference to `validator_low_stake_threshold`.
13350        ///If the field is unset, it is first initialized with the default value.
13351        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13352            self.validator_low_stake_threshold.get_or_insert_default()
13353        }
13354        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13355        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13356            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13357        }
13358        ///Sets `validator_low_stake_threshold` with the provided value.
13359        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13360            self.validator_low_stake_threshold = Some(field);
13361        }
13362        ///Sets `validator_low_stake_threshold` with the provided value.
13363        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13364            self.set_validator_low_stake_threshold(field);
13365            self
13366        }
13367        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13368        pub fn validator_very_low_stake_threshold_opt_mut(
13369            &mut self,
13370        ) -> Option<&mut u64> {
13371            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13372        }
13373        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13374        ///If the field is unset, it is first initialized with the default value.
13375        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13376            self.validator_very_low_stake_threshold.get_or_insert_default()
13377        }
13378        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13379        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13380            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13381        }
13382        ///Sets `validator_very_low_stake_threshold` with the provided value.
13383        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13384            self.validator_very_low_stake_threshold = Some(field);
13385        }
13386        ///Sets `validator_very_low_stake_threshold` with the provided value.
13387        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13388            self.set_validator_very_low_stake_threshold(field);
13389            self
13390        }
13391        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13392        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13393            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13394        }
13395        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13396        ///If the field is unset, it is first initialized with the default value.
13397        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13398            self.validator_low_stake_grace_period.get_or_insert_default()
13399        }
13400        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13401        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13402            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13403        }
13404        ///Sets `validator_low_stake_grace_period` with the provided value.
13405        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13406            self.validator_low_stake_grace_period = Some(field);
13407        }
13408        ///Sets `validator_low_stake_grace_period` with the provided value.
13409        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13410            self.set_validator_low_stake_grace_period(field);
13411            self
13412        }
13413        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13414        pub fn extra_fields(&self) -> &super::MoveTable {
13415            self.extra_fields
13416                .as_ref()
13417                .map(|field| field as _)
13418                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13419        }
13420        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13421        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13422            self.extra_fields.as_mut().map(|field| field as _)
13423        }
13424        ///Returns a mutable reference to `extra_fields`.
13425        ///If the field is unset, it is first initialized with the default value.
13426        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13427            self.extra_fields.get_or_insert_default()
13428        }
13429        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13430        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13431            self.extra_fields.as_ref().map(|field| field as _)
13432        }
13433        ///Sets `extra_fields` with the provided value.
13434        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13435            self.extra_fields = Some(field.into().into());
13436        }
13437        ///Sets `extra_fields` with the provided value.
13438        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13439            self.set_extra_fields(field.into());
13440            self
13441        }
13442    }
13443    impl super::SystemState {
13444        pub const fn const_default() -> Self {
13445            Self {
13446                version: None,
13447                epoch: None,
13448                protocol_version: None,
13449                validators: None,
13450                storage_fund: None,
13451                parameters: None,
13452                reference_gas_price: None,
13453                validator_report_records: Vec::new(),
13454                stake_subsidy: None,
13455                safe_mode: None,
13456                safe_mode_storage_rewards: None,
13457                safe_mode_computation_rewards: None,
13458                safe_mode_storage_rebates: None,
13459                safe_mode_non_refundable_storage_fee: None,
13460                epoch_start_timestamp_ms: None,
13461                extra_fields: None,
13462            }
13463        }
13464        #[doc(hidden)]
13465        pub fn default_instance() -> &'static Self {
13466            static DEFAULT: super::SystemState = super::SystemState::const_default();
13467            &DEFAULT
13468        }
13469        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13470        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13471            self.version.as_mut().map(|field| field as _)
13472        }
13473        ///Returns a mutable reference to `version`.
13474        ///If the field is unset, it is first initialized with the default value.
13475        pub fn version_mut(&mut self) -> &mut u64 {
13476            self.version.get_or_insert_default()
13477        }
13478        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13479        pub fn version_opt(&self) -> Option<u64> {
13480            self.version.as_ref().map(|field| *field)
13481        }
13482        ///Sets `version` with the provided value.
13483        pub fn set_version(&mut self, field: u64) {
13484            self.version = Some(field);
13485        }
13486        ///Sets `version` with the provided value.
13487        pub fn with_version(mut self, field: u64) -> Self {
13488            self.set_version(field);
13489            self
13490        }
13491        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13492        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13493            self.epoch.as_mut().map(|field| field as _)
13494        }
13495        ///Returns a mutable reference to `epoch`.
13496        ///If the field is unset, it is first initialized with the default value.
13497        pub fn epoch_mut(&mut self) -> &mut u64 {
13498            self.epoch.get_or_insert_default()
13499        }
13500        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13501        pub fn epoch_opt(&self) -> Option<u64> {
13502            self.epoch.as_ref().map(|field| *field)
13503        }
13504        ///Sets `epoch` with the provided value.
13505        pub fn set_epoch(&mut self, field: u64) {
13506            self.epoch = Some(field);
13507        }
13508        ///Sets `epoch` with the provided value.
13509        pub fn with_epoch(mut self, field: u64) -> Self {
13510            self.set_epoch(field);
13511            self
13512        }
13513        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13514        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13515            self.protocol_version.as_mut().map(|field| field as _)
13516        }
13517        ///Returns a mutable reference to `protocol_version`.
13518        ///If the field is unset, it is first initialized with the default value.
13519        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13520            self.protocol_version.get_or_insert_default()
13521        }
13522        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13523        pub fn protocol_version_opt(&self) -> Option<u64> {
13524            self.protocol_version.as_ref().map(|field| *field)
13525        }
13526        ///Sets `protocol_version` with the provided value.
13527        pub fn set_protocol_version(&mut self, field: u64) {
13528            self.protocol_version = Some(field);
13529        }
13530        ///Sets `protocol_version` with the provided value.
13531        pub fn with_protocol_version(mut self, field: u64) -> Self {
13532            self.set_protocol_version(field);
13533            self
13534        }
13535        ///Returns the value of `validators`, or the default value if `validators` is unset.
13536        pub fn validators(&self) -> &super::ValidatorSet {
13537            self.validators
13538                .as_ref()
13539                .map(|field| field as _)
13540                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13541        }
13542        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13543        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13544            self.validators.as_mut().map(|field| field as _)
13545        }
13546        ///Returns a mutable reference to `validators`.
13547        ///If the field is unset, it is first initialized with the default value.
13548        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13549            self.validators.get_or_insert_default()
13550        }
13551        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13552        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13553            self.validators.as_ref().map(|field| field as _)
13554        }
13555        ///Sets `validators` with the provided value.
13556        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13557            self.validators = Some(field.into().into());
13558        }
13559        ///Sets `validators` with the provided value.
13560        pub fn with_validators<T: Into<super::ValidatorSet>>(
13561            mut self,
13562            field: T,
13563        ) -> Self {
13564            self.set_validators(field.into());
13565            self
13566        }
13567        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13568        pub fn storage_fund(&self) -> &super::StorageFund {
13569            self.storage_fund
13570                .as_ref()
13571                .map(|field| field as _)
13572                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13573        }
13574        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13575        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13576            self.storage_fund.as_mut().map(|field| field as _)
13577        }
13578        ///Returns a mutable reference to `storage_fund`.
13579        ///If the field is unset, it is first initialized with the default value.
13580        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13581            self.storage_fund.get_or_insert_default()
13582        }
13583        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13584        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13585            self.storage_fund.as_ref().map(|field| field as _)
13586        }
13587        ///Sets `storage_fund` with the provided value.
13588        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13589            self.storage_fund = Some(field.into().into());
13590        }
13591        ///Sets `storage_fund` with the provided value.
13592        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13593            mut self,
13594            field: T,
13595        ) -> Self {
13596            self.set_storage_fund(field.into());
13597            self
13598        }
13599        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13600        pub fn parameters(&self) -> &super::SystemParameters {
13601            self.parameters
13602                .as_ref()
13603                .map(|field| field as _)
13604                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13605        }
13606        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13607        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13608            self.parameters.as_mut().map(|field| field as _)
13609        }
13610        ///Returns a mutable reference to `parameters`.
13611        ///If the field is unset, it is first initialized with the default value.
13612        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13613            self.parameters.get_or_insert_default()
13614        }
13615        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13616        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13617            self.parameters.as_ref().map(|field| field as _)
13618        }
13619        ///Sets `parameters` with the provided value.
13620        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13621            self.parameters = Some(field.into().into());
13622        }
13623        ///Sets `parameters` with the provided value.
13624        pub fn with_parameters<T: Into<super::SystemParameters>>(
13625            mut self,
13626            field: T,
13627        ) -> Self {
13628            self.set_parameters(field.into());
13629            self
13630        }
13631        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13632        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13633            self.reference_gas_price.as_mut().map(|field| field as _)
13634        }
13635        ///Returns a mutable reference to `reference_gas_price`.
13636        ///If the field is unset, it is first initialized with the default value.
13637        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13638            self.reference_gas_price.get_or_insert_default()
13639        }
13640        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13641        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13642            self.reference_gas_price.as_ref().map(|field| *field)
13643        }
13644        ///Sets `reference_gas_price` with the provided value.
13645        pub fn set_reference_gas_price(&mut self, field: u64) {
13646            self.reference_gas_price = Some(field);
13647        }
13648        ///Sets `reference_gas_price` with the provided value.
13649        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13650            self.set_reference_gas_price(field);
13651            self
13652        }
13653        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13654        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13655            &self.validator_report_records
13656        }
13657        ///Returns a mutable reference to `validator_report_records`.
13658        ///If the field is unset, it is first initialized with the default value.
13659        pub fn validator_report_records_mut(
13660            &mut self,
13661        ) -> &mut Vec<super::ValidatorReportRecord> {
13662            &mut self.validator_report_records
13663        }
13664        ///Sets `validator_report_records` with the provided value.
13665        pub fn set_validator_report_records(
13666            &mut self,
13667            field: Vec<super::ValidatorReportRecord>,
13668        ) {
13669            self.validator_report_records = field;
13670        }
13671        ///Sets `validator_report_records` with the provided value.
13672        pub fn with_validator_report_records(
13673            mut self,
13674            field: Vec<super::ValidatorReportRecord>,
13675        ) -> Self {
13676            self.set_validator_report_records(field);
13677            self
13678        }
13679        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13680        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13681            self.stake_subsidy
13682                .as_ref()
13683                .map(|field| field as _)
13684                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13685        }
13686        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13687        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13688            self.stake_subsidy.as_mut().map(|field| field as _)
13689        }
13690        ///Returns a mutable reference to `stake_subsidy`.
13691        ///If the field is unset, it is first initialized with the default value.
13692        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13693            self.stake_subsidy.get_or_insert_default()
13694        }
13695        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13696        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13697            self.stake_subsidy.as_ref().map(|field| field as _)
13698        }
13699        ///Sets `stake_subsidy` with the provided value.
13700        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13701            self.stake_subsidy = Some(field.into().into());
13702        }
13703        ///Sets `stake_subsidy` with the provided value.
13704        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13705            mut self,
13706            field: T,
13707        ) -> Self {
13708            self.set_stake_subsidy(field.into());
13709            self
13710        }
13711        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13712        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13713            self.safe_mode.as_mut().map(|field| field as _)
13714        }
13715        ///Returns a mutable reference to `safe_mode`.
13716        ///If the field is unset, it is first initialized with the default value.
13717        pub fn safe_mode_mut(&mut self) -> &mut bool {
13718            self.safe_mode.get_or_insert_default()
13719        }
13720        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13721        pub fn safe_mode_opt(&self) -> Option<bool> {
13722            self.safe_mode.as_ref().map(|field| *field)
13723        }
13724        ///Sets `safe_mode` with the provided value.
13725        pub fn set_safe_mode(&mut self, field: bool) {
13726            self.safe_mode = Some(field);
13727        }
13728        ///Sets `safe_mode` with the provided value.
13729        pub fn with_safe_mode(mut self, field: bool) -> Self {
13730            self.set_safe_mode(field);
13731            self
13732        }
13733        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13734        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13735            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13736        }
13737        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13738        ///If the field is unset, it is first initialized with the default value.
13739        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13740            self.safe_mode_storage_rewards.get_or_insert_default()
13741        }
13742        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13743        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13744            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13745        }
13746        ///Sets `safe_mode_storage_rewards` with the provided value.
13747        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13748            self.safe_mode_storage_rewards = Some(field);
13749        }
13750        ///Sets `safe_mode_storage_rewards` with the provided value.
13751        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13752            self.set_safe_mode_storage_rewards(field);
13753            self
13754        }
13755        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13756        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13757            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13758        }
13759        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13760        ///If the field is unset, it is first initialized with the default value.
13761        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13762            self.safe_mode_computation_rewards.get_or_insert_default()
13763        }
13764        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13765        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13766            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13767        }
13768        ///Sets `safe_mode_computation_rewards` with the provided value.
13769        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13770            self.safe_mode_computation_rewards = Some(field);
13771        }
13772        ///Sets `safe_mode_computation_rewards` with the provided value.
13773        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13774            self.set_safe_mode_computation_rewards(field);
13775            self
13776        }
13777        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13778        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13779            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13780        }
13781        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13782        ///If the field is unset, it is first initialized with the default value.
13783        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13784            self.safe_mode_storage_rebates.get_or_insert_default()
13785        }
13786        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13787        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13788            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13789        }
13790        ///Sets `safe_mode_storage_rebates` with the provided value.
13791        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13792            self.safe_mode_storage_rebates = Some(field);
13793        }
13794        ///Sets `safe_mode_storage_rebates` with the provided value.
13795        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13796            self.set_safe_mode_storage_rebates(field);
13797            self
13798        }
13799        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13800        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13801            &mut self,
13802        ) -> Option<&mut u64> {
13803            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13804        }
13805        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13806        ///If the field is unset, it is first initialized with the default value.
13807        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13808            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13809        }
13810        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13811        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13812            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13813        }
13814        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13815        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13816            self.safe_mode_non_refundable_storage_fee = Some(field);
13817        }
13818        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13819        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13820            self.set_safe_mode_non_refundable_storage_fee(field);
13821            self
13822        }
13823        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13824        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13825            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13826        }
13827        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13828        ///If the field is unset, it is first initialized with the default value.
13829        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13830            self.epoch_start_timestamp_ms.get_or_insert_default()
13831        }
13832        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13833        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13834            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13835        }
13836        ///Sets `epoch_start_timestamp_ms` with the provided value.
13837        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13838            self.epoch_start_timestamp_ms = Some(field);
13839        }
13840        ///Sets `epoch_start_timestamp_ms` with the provided value.
13841        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13842            self.set_epoch_start_timestamp_ms(field);
13843            self
13844        }
13845        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13846        pub fn extra_fields(&self) -> &super::MoveTable {
13847            self.extra_fields
13848                .as_ref()
13849                .map(|field| field as _)
13850                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13851        }
13852        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13853        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13854            self.extra_fields.as_mut().map(|field| field as _)
13855        }
13856        ///Returns a mutable reference to `extra_fields`.
13857        ///If the field is unset, it is first initialized with the default value.
13858        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13859            self.extra_fields.get_or_insert_default()
13860        }
13861        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13862        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13863            self.extra_fields.as_ref().map(|field| field as _)
13864        }
13865        ///Sets `extra_fields` with the provided value.
13866        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13867            self.extra_fields = Some(field.into().into());
13868        }
13869        ///Sets `extra_fields` with the provided value.
13870        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13871            self.set_extra_fields(field.into());
13872            self
13873        }
13874    }
13875    impl super::Transaction {
13876        pub const fn const_default() -> Self {
13877            Self {
13878                bcs: None,
13879                digest: None,
13880                version: None,
13881                kind: None,
13882                sender: None,
13883                gas_payment: None,
13884                expiration: None,
13885            }
13886        }
13887        #[doc(hidden)]
13888        pub fn default_instance() -> &'static Self {
13889            static DEFAULT: super::Transaction = super::Transaction::const_default();
13890            &DEFAULT
13891        }
13892        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13893        pub fn bcs(&self) -> &super::Bcs {
13894            self.bcs
13895                .as_ref()
13896                .map(|field| field as _)
13897                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13898        }
13899        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13900        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13901            self.bcs.as_mut().map(|field| field as _)
13902        }
13903        ///Returns a mutable reference to `bcs`.
13904        ///If the field is unset, it is first initialized with the default value.
13905        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13906            self.bcs.get_or_insert_default()
13907        }
13908        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13909        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13910            self.bcs.as_ref().map(|field| field as _)
13911        }
13912        ///Sets `bcs` with the provided value.
13913        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13914            self.bcs = Some(field.into().into());
13915        }
13916        ///Sets `bcs` with the provided value.
13917        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13918            self.set_bcs(field.into());
13919            self
13920        }
13921        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13922        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13923            self.digest.as_mut().map(|field| field as _)
13924        }
13925        ///Returns a mutable reference to `digest`.
13926        ///If the field is unset, it is first initialized with the default value.
13927        pub fn digest_mut(&mut self) -> &mut String {
13928            self.digest.get_or_insert_default()
13929        }
13930        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13931        pub fn digest_opt(&self) -> Option<&str> {
13932            self.digest.as_ref().map(|field| field as _)
13933        }
13934        ///Sets `digest` with the provided value.
13935        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13936            self.digest = Some(field.into().into());
13937        }
13938        ///Sets `digest` with the provided value.
13939        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13940            self.set_digest(field.into());
13941            self
13942        }
13943        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13944        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13945            self.version.as_mut().map(|field| field as _)
13946        }
13947        ///Returns a mutable reference to `version`.
13948        ///If the field is unset, it is first initialized with the default value.
13949        pub fn version_mut(&mut self) -> &mut i32 {
13950            self.version.get_or_insert_default()
13951        }
13952        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13953        pub fn version_opt(&self) -> Option<i32> {
13954            self.version.as_ref().map(|field| *field)
13955        }
13956        ///Sets `version` with the provided value.
13957        pub fn set_version(&mut self, field: i32) {
13958            self.version = Some(field);
13959        }
13960        ///Sets `version` with the provided value.
13961        pub fn with_version(mut self, field: i32) -> Self {
13962            self.set_version(field);
13963            self
13964        }
13965        ///Returns the value of `kind`, or the default value if `kind` is unset.
13966        pub fn kind(&self) -> &super::TransactionKind {
13967            self.kind
13968                .as_ref()
13969                .map(|field| field as _)
13970                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13971        }
13972        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13973        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13974            self.kind.as_mut().map(|field| field as _)
13975        }
13976        ///Returns a mutable reference to `kind`.
13977        ///If the field is unset, it is first initialized with the default value.
13978        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13979            self.kind.get_or_insert_default()
13980        }
13981        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
13982        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13983            self.kind.as_ref().map(|field| field as _)
13984        }
13985        ///Sets `kind` with the provided value.
13986        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13987            self.kind = Some(field.into().into());
13988        }
13989        ///Sets `kind` with the provided value.
13990        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13991            self.set_kind(field.into());
13992            self
13993        }
13994        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13995        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13996            self.sender.as_mut().map(|field| field as _)
13997        }
13998        ///Returns a mutable reference to `sender`.
13999        ///If the field is unset, it is first initialized with the default value.
14000        pub fn sender_mut(&mut self) -> &mut String {
14001            self.sender.get_or_insert_default()
14002        }
14003        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
14004        pub fn sender_opt(&self) -> Option<&str> {
14005            self.sender.as_ref().map(|field| field as _)
14006        }
14007        ///Sets `sender` with the provided value.
14008        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14009            self.sender = Some(field.into().into());
14010        }
14011        ///Sets `sender` with the provided value.
14012        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14013            self.set_sender(field.into());
14014            self
14015        }
14016        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
14017        pub fn gas_payment(&self) -> &super::GasPayment {
14018            self.gas_payment
14019                .as_ref()
14020                .map(|field| field as _)
14021                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14022        }
14023        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14024        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14025            self.gas_payment.as_mut().map(|field| field as _)
14026        }
14027        ///Returns a mutable reference to `gas_payment`.
14028        ///If the field is unset, it is first initialized with the default value.
14029        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14030            self.gas_payment.get_or_insert_default()
14031        }
14032        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
14033        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14034            self.gas_payment.as_ref().map(|field| field as _)
14035        }
14036        ///Sets `gas_payment` with the provided value.
14037        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14038            self.gas_payment = Some(field.into().into());
14039        }
14040        ///Sets `gas_payment` with the provided value.
14041        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14042            self.set_gas_payment(field.into());
14043            self
14044        }
14045        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
14046        pub fn expiration(&self) -> &super::TransactionExpiration {
14047            self.expiration
14048                .as_ref()
14049                .map(|field| field as _)
14050                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14051        }
14052        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14053        pub fn expiration_opt_mut(
14054            &mut self,
14055        ) -> Option<&mut super::TransactionExpiration> {
14056            self.expiration.as_mut().map(|field| field as _)
14057        }
14058        ///Returns a mutable reference to `expiration`.
14059        ///If the field is unset, it is first initialized with the default value.
14060        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14061            self.expiration.get_or_insert_default()
14062        }
14063        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
14064        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14065            self.expiration.as_ref().map(|field| field as _)
14066        }
14067        ///Sets `expiration` with the provided value.
14068        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14069            &mut self,
14070            field: T,
14071        ) {
14072            self.expiration = Some(field.into().into());
14073        }
14074        ///Sets `expiration` with the provided value.
14075        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14076            mut self,
14077            field: T,
14078        ) -> Self {
14079            self.set_expiration(field.into());
14080            self
14081        }
14082    }
14083    impl super::TransactionEffects {
14084        pub const fn const_default() -> Self {
14085            Self {
14086                bcs: None,
14087                digest: None,
14088                version: None,
14089                status: None,
14090                epoch: None,
14091                gas_used: None,
14092                transaction_digest: None,
14093                gas_object: None,
14094                events_digest: None,
14095                dependencies: Vec::new(),
14096                lamport_version: None,
14097                changed_objects: Vec::new(),
14098                unchanged_consensus_objects: Vec::new(),
14099                auxiliary_data_digest: None,
14100                unchanged_loaded_runtime_objects: Vec::new(),
14101            }
14102        }
14103        #[doc(hidden)]
14104        pub fn default_instance() -> &'static Self {
14105            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14106            &DEFAULT
14107        }
14108        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14109        pub fn bcs(&self) -> &super::Bcs {
14110            self.bcs
14111                .as_ref()
14112                .map(|field| field as _)
14113                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14114        }
14115        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14116        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14117            self.bcs.as_mut().map(|field| field as _)
14118        }
14119        ///Returns a mutable reference to `bcs`.
14120        ///If the field is unset, it is first initialized with the default value.
14121        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14122            self.bcs.get_or_insert_default()
14123        }
14124        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14125        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14126            self.bcs.as_ref().map(|field| field as _)
14127        }
14128        ///Sets `bcs` with the provided value.
14129        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14130            self.bcs = Some(field.into().into());
14131        }
14132        ///Sets `bcs` with the provided value.
14133        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14134            self.set_bcs(field.into());
14135            self
14136        }
14137        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14138        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14139            self.digest.as_mut().map(|field| field as _)
14140        }
14141        ///Returns a mutable reference to `digest`.
14142        ///If the field is unset, it is first initialized with the default value.
14143        pub fn digest_mut(&mut self) -> &mut String {
14144            self.digest.get_or_insert_default()
14145        }
14146        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14147        pub fn digest_opt(&self) -> Option<&str> {
14148            self.digest.as_ref().map(|field| field as _)
14149        }
14150        ///Sets `digest` with the provided value.
14151        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14152            self.digest = Some(field.into().into());
14153        }
14154        ///Sets `digest` with the provided value.
14155        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14156            self.set_digest(field.into());
14157            self
14158        }
14159        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14160        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14161            self.version.as_mut().map(|field| field as _)
14162        }
14163        ///Returns a mutable reference to `version`.
14164        ///If the field is unset, it is first initialized with the default value.
14165        pub fn version_mut(&mut self) -> &mut i32 {
14166            self.version.get_or_insert_default()
14167        }
14168        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14169        pub fn version_opt(&self) -> Option<i32> {
14170            self.version.as_ref().map(|field| *field)
14171        }
14172        ///Sets `version` with the provided value.
14173        pub fn set_version(&mut self, field: i32) {
14174            self.version = Some(field);
14175        }
14176        ///Sets `version` with the provided value.
14177        pub fn with_version(mut self, field: i32) -> Self {
14178            self.set_version(field);
14179            self
14180        }
14181        ///Returns the value of `status`, or the default value if `status` is unset.
14182        pub fn status(&self) -> &super::ExecutionStatus {
14183            self.status
14184                .as_ref()
14185                .map(|field| field as _)
14186                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14187        }
14188        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14189        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14190            self.status.as_mut().map(|field| field as _)
14191        }
14192        ///Returns a mutable reference to `status`.
14193        ///If the field is unset, it is first initialized with the default value.
14194        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14195            self.status.get_or_insert_default()
14196        }
14197        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
14198        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14199            self.status.as_ref().map(|field| field as _)
14200        }
14201        ///Sets `status` with the provided value.
14202        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14203            self.status = Some(field.into().into());
14204        }
14205        ///Sets `status` with the provided value.
14206        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14207            self.set_status(field.into());
14208            self
14209        }
14210        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14211        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14212            self.epoch.as_mut().map(|field| field as _)
14213        }
14214        ///Returns a mutable reference to `epoch`.
14215        ///If the field is unset, it is first initialized with the default value.
14216        pub fn epoch_mut(&mut self) -> &mut u64 {
14217            self.epoch.get_or_insert_default()
14218        }
14219        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14220        pub fn epoch_opt(&self) -> Option<u64> {
14221            self.epoch.as_ref().map(|field| *field)
14222        }
14223        ///Sets `epoch` with the provided value.
14224        pub fn set_epoch(&mut self, field: u64) {
14225            self.epoch = Some(field);
14226        }
14227        ///Sets `epoch` with the provided value.
14228        pub fn with_epoch(mut self, field: u64) -> Self {
14229            self.set_epoch(field);
14230            self
14231        }
14232        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
14233        pub fn gas_used(&self) -> &super::GasCostSummary {
14234            self.gas_used
14235                .as_ref()
14236                .map(|field| field as _)
14237                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14238        }
14239        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14240        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14241            self.gas_used.as_mut().map(|field| field as _)
14242        }
14243        ///Returns a mutable reference to `gas_used`.
14244        ///If the field is unset, it is first initialized with the default value.
14245        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14246            self.gas_used.get_or_insert_default()
14247        }
14248        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
14249        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14250            self.gas_used.as_ref().map(|field| field as _)
14251        }
14252        ///Sets `gas_used` with the provided value.
14253        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14254            self.gas_used = Some(field.into().into());
14255        }
14256        ///Sets `gas_used` with the provided value.
14257        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14258            mut self,
14259            field: T,
14260        ) -> Self {
14261            self.set_gas_used(field.into());
14262            self
14263        }
14264        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14265        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14266            self.transaction_digest.as_mut().map(|field| field as _)
14267        }
14268        ///Returns a mutable reference to `transaction_digest`.
14269        ///If the field is unset, it is first initialized with the default value.
14270        pub fn transaction_digest_mut(&mut self) -> &mut String {
14271            self.transaction_digest.get_or_insert_default()
14272        }
14273        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14274        pub fn transaction_digest_opt(&self) -> Option<&str> {
14275            self.transaction_digest.as_ref().map(|field| field as _)
14276        }
14277        ///Sets `transaction_digest` with the provided value.
14278        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14279            self.transaction_digest = Some(field.into().into());
14280        }
14281        ///Sets `transaction_digest` with the provided value.
14282        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14283            self.set_transaction_digest(field.into());
14284            self
14285        }
14286        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14287        pub fn gas_object(&self) -> &super::ChangedObject {
14288            self.gas_object
14289                .as_ref()
14290                .map(|field| field as _)
14291                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14292        }
14293        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14294        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14295            self.gas_object.as_mut().map(|field| field as _)
14296        }
14297        ///Returns a mutable reference to `gas_object`.
14298        ///If the field is unset, it is first initialized with the default value.
14299        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14300            self.gas_object.get_or_insert_default()
14301        }
14302        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14303        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14304            self.gas_object.as_ref().map(|field| field as _)
14305        }
14306        ///Sets `gas_object` with the provided value.
14307        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14308            self.gas_object = Some(field.into().into());
14309        }
14310        ///Sets `gas_object` with the provided value.
14311        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14312            mut self,
14313            field: T,
14314        ) -> Self {
14315            self.set_gas_object(field.into());
14316            self
14317        }
14318        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14319        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14320            self.events_digest.as_mut().map(|field| field as _)
14321        }
14322        ///Returns a mutable reference to `events_digest`.
14323        ///If the field is unset, it is first initialized with the default value.
14324        pub fn events_digest_mut(&mut self) -> &mut String {
14325            self.events_digest.get_or_insert_default()
14326        }
14327        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14328        pub fn events_digest_opt(&self) -> Option<&str> {
14329            self.events_digest.as_ref().map(|field| field as _)
14330        }
14331        ///Sets `events_digest` with the provided value.
14332        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14333            self.events_digest = Some(field.into().into());
14334        }
14335        ///Sets `events_digest` with the provided value.
14336        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14337            self.set_events_digest(field.into());
14338            self
14339        }
14340        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14341        pub fn dependencies(&self) -> &[String] {
14342            &self.dependencies
14343        }
14344        ///Returns a mutable reference to `dependencies`.
14345        ///If the field is unset, it is first initialized with the default value.
14346        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14347            &mut self.dependencies
14348        }
14349        ///Sets `dependencies` with the provided value.
14350        pub fn set_dependencies(&mut self, field: Vec<String>) {
14351            self.dependencies = field;
14352        }
14353        ///Sets `dependencies` with the provided value.
14354        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14355            self.set_dependencies(field);
14356            self
14357        }
14358        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14359        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14360            self.lamport_version.as_mut().map(|field| field as _)
14361        }
14362        ///Returns a mutable reference to `lamport_version`.
14363        ///If the field is unset, it is first initialized with the default value.
14364        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14365            self.lamport_version.get_or_insert_default()
14366        }
14367        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14368        pub fn lamport_version_opt(&self) -> Option<u64> {
14369            self.lamport_version.as_ref().map(|field| *field)
14370        }
14371        ///Sets `lamport_version` with the provided value.
14372        pub fn set_lamport_version(&mut self, field: u64) {
14373            self.lamport_version = Some(field);
14374        }
14375        ///Sets `lamport_version` with the provided value.
14376        pub fn with_lamport_version(mut self, field: u64) -> Self {
14377            self.set_lamport_version(field);
14378            self
14379        }
14380        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14381        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14382            &self.changed_objects
14383        }
14384        ///Returns a mutable reference to `changed_objects`.
14385        ///If the field is unset, it is first initialized with the default value.
14386        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14387            &mut self.changed_objects
14388        }
14389        ///Sets `changed_objects` with the provided value.
14390        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14391            self.changed_objects = field;
14392        }
14393        ///Sets `changed_objects` with the provided value.
14394        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14395            self.set_changed_objects(field);
14396            self
14397        }
14398        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14399        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14400            &self.unchanged_consensus_objects
14401        }
14402        ///Returns a mutable reference to `unchanged_consensus_objects`.
14403        ///If the field is unset, it is first initialized with the default value.
14404        pub fn unchanged_consensus_objects_mut(
14405            &mut self,
14406        ) -> &mut Vec<super::UnchangedConsensusObject> {
14407            &mut self.unchanged_consensus_objects
14408        }
14409        ///Sets `unchanged_consensus_objects` with the provided value.
14410        pub fn set_unchanged_consensus_objects(
14411            &mut self,
14412            field: Vec<super::UnchangedConsensusObject>,
14413        ) {
14414            self.unchanged_consensus_objects = field;
14415        }
14416        ///Sets `unchanged_consensus_objects` with the provided value.
14417        pub fn with_unchanged_consensus_objects(
14418            mut self,
14419            field: Vec<super::UnchangedConsensusObject>,
14420        ) -> Self {
14421            self.set_unchanged_consensus_objects(field);
14422            self
14423        }
14424        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14425        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14426            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14427        }
14428        ///Returns a mutable reference to `auxiliary_data_digest`.
14429        ///If the field is unset, it is first initialized with the default value.
14430        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14431            self.auxiliary_data_digest.get_or_insert_default()
14432        }
14433        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14434        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14435            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14436        }
14437        ///Sets `auxiliary_data_digest` with the provided value.
14438        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14439            self.auxiliary_data_digest = Some(field.into().into());
14440        }
14441        ///Sets `auxiliary_data_digest` with the provided value.
14442        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14443            self.set_auxiliary_data_digest(field.into());
14444            self
14445        }
14446        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14447        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14448            &self.unchanged_loaded_runtime_objects
14449        }
14450        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14451        ///If the field is unset, it is first initialized with the default value.
14452        pub fn unchanged_loaded_runtime_objects_mut(
14453            &mut self,
14454        ) -> &mut Vec<super::ObjectReference> {
14455            &mut self.unchanged_loaded_runtime_objects
14456        }
14457        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14458        pub fn set_unchanged_loaded_runtime_objects(
14459            &mut self,
14460            field: Vec<super::ObjectReference>,
14461        ) {
14462            self.unchanged_loaded_runtime_objects = field;
14463        }
14464        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14465        pub fn with_unchanged_loaded_runtime_objects(
14466            mut self,
14467            field: Vec<super::ObjectReference>,
14468        ) -> Self {
14469            self.set_unchanged_loaded_runtime_objects(field);
14470            self
14471        }
14472    }
14473    impl super::TransactionEvents {
14474        pub const fn const_default() -> Self {
14475            Self {
14476                bcs: None,
14477                digest: None,
14478                events: Vec::new(),
14479            }
14480        }
14481        #[doc(hidden)]
14482        pub fn default_instance() -> &'static Self {
14483            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14484            &DEFAULT
14485        }
14486        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14487        pub fn bcs(&self) -> &super::Bcs {
14488            self.bcs
14489                .as_ref()
14490                .map(|field| field as _)
14491                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14492        }
14493        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14494        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14495            self.bcs.as_mut().map(|field| field as _)
14496        }
14497        ///Returns a mutable reference to `bcs`.
14498        ///If the field is unset, it is first initialized with the default value.
14499        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14500            self.bcs.get_or_insert_default()
14501        }
14502        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14503        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14504            self.bcs.as_ref().map(|field| field as _)
14505        }
14506        ///Sets `bcs` with the provided value.
14507        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14508            self.bcs = Some(field.into().into());
14509        }
14510        ///Sets `bcs` with the provided value.
14511        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14512            self.set_bcs(field.into());
14513            self
14514        }
14515        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14516        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14517            self.digest.as_mut().map(|field| field as _)
14518        }
14519        ///Returns a mutable reference to `digest`.
14520        ///If the field is unset, it is first initialized with the default value.
14521        pub fn digest_mut(&mut self) -> &mut String {
14522            self.digest.get_or_insert_default()
14523        }
14524        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14525        pub fn digest_opt(&self) -> Option<&str> {
14526            self.digest.as_ref().map(|field| field as _)
14527        }
14528        ///Sets `digest` with the provided value.
14529        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14530            self.digest = Some(field.into().into());
14531        }
14532        ///Sets `digest` with the provided value.
14533        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14534            self.set_digest(field.into());
14535            self
14536        }
14537        ///Returns the value of `events`, or the default value if `events` is unset.
14538        pub fn events(&self) -> &[super::Event] {
14539            &self.events
14540        }
14541        ///Returns a mutable reference to `events`.
14542        ///If the field is unset, it is first initialized with the default value.
14543        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14544            &mut self.events
14545        }
14546        ///Sets `events` with the provided value.
14547        pub fn set_events(&mut self, field: Vec<super::Event>) {
14548            self.events = field;
14549        }
14550        ///Sets `events` with the provided value.
14551        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14552            self.set_events(field);
14553            self
14554        }
14555    }
14556    impl super::TransactionExpiration {
14557        pub const fn const_default() -> Self {
14558            Self {
14559                kind: None,
14560                epoch: None,
14561                min_epoch: None,
14562                min_timestamp: None,
14563                max_timestamp: None,
14564                chain: None,
14565                nonce: None,
14566            }
14567        }
14568        #[doc(hidden)]
14569        pub fn default_instance() -> &'static Self {
14570            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14571            &DEFAULT
14572        }
14573        ///Sets `kind` with the provided value.
14574        pub fn with_kind<
14575            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14576        >(mut self, field: T) -> Self {
14577            self.set_kind(field.into());
14578            self
14579        }
14580        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14581        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14582            self.epoch.as_mut().map(|field| field as _)
14583        }
14584        ///Returns a mutable reference to `epoch`.
14585        ///If the field is unset, it is first initialized with the default value.
14586        pub fn epoch_mut(&mut self) -> &mut u64 {
14587            self.epoch.get_or_insert_default()
14588        }
14589        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14590        pub fn epoch_opt(&self) -> Option<u64> {
14591            self.epoch.as_ref().map(|field| *field)
14592        }
14593        ///Sets `epoch` with the provided value.
14594        pub fn set_epoch(&mut self, field: u64) {
14595            self.epoch = Some(field);
14596        }
14597        ///Sets `epoch` with the provided value.
14598        pub fn with_epoch(mut self, field: u64) -> Self {
14599            self.set_epoch(field);
14600            self
14601        }
14602        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14603        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14604            self.min_epoch.as_mut().map(|field| field as _)
14605        }
14606        ///Returns a mutable reference to `min_epoch`.
14607        ///If the field is unset, it is first initialized with the default value.
14608        pub fn min_epoch_mut(&mut self) -> &mut u64 {
14609            self.min_epoch.get_or_insert_default()
14610        }
14611        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14612        pub fn min_epoch_opt(&self) -> Option<u64> {
14613            self.min_epoch.as_ref().map(|field| *field)
14614        }
14615        ///Sets `min_epoch` with the provided value.
14616        pub fn set_min_epoch(&mut self, field: u64) {
14617            self.min_epoch = Some(field);
14618        }
14619        ///Sets `min_epoch` with the provided value.
14620        pub fn with_min_epoch(mut self, field: u64) -> Self {
14621            self.set_min_epoch(field);
14622            self
14623        }
14624        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14625        pub fn min_timestamp_opt_mut(
14626            &mut self,
14627        ) -> Option<&mut ::prost_types::Timestamp> {
14628            self.min_timestamp.as_mut().map(|field| field as _)
14629        }
14630        ///Returns a mutable reference to `min_timestamp`.
14631        ///If the field is unset, it is first initialized with the default value.
14632        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14633            self.min_timestamp.get_or_insert_default()
14634        }
14635        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14636        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14637            self.min_timestamp.as_ref().map(|field| field as _)
14638        }
14639        ///Sets `min_timestamp` with the provided value.
14640        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14641            &mut self,
14642            field: T,
14643        ) {
14644            self.min_timestamp = Some(field.into().into());
14645        }
14646        ///Sets `min_timestamp` with the provided value.
14647        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14648            mut self,
14649            field: T,
14650        ) -> Self {
14651            self.set_min_timestamp(field.into());
14652            self
14653        }
14654        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14655        pub fn max_timestamp_opt_mut(
14656            &mut self,
14657        ) -> Option<&mut ::prost_types::Timestamp> {
14658            self.max_timestamp.as_mut().map(|field| field as _)
14659        }
14660        ///Returns a mutable reference to `max_timestamp`.
14661        ///If the field is unset, it is first initialized with the default value.
14662        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14663            self.max_timestamp.get_or_insert_default()
14664        }
14665        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14666        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14667            self.max_timestamp.as_ref().map(|field| field as _)
14668        }
14669        ///Sets `max_timestamp` with the provided value.
14670        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14671            &mut self,
14672            field: T,
14673        ) {
14674            self.max_timestamp = Some(field.into().into());
14675        }
14676        ///Sets `max_timestamp` with the provided value.
14677        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14678            mut self,
14679            field: T,
14680        ) -> Self {
14681            self.set_max_timestamp(field.into());
14682            self
14683        }
14684        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14685        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14686            self.chain.as_mut().map(|field| field as _)
14687        }
14688        ///Returns a mutable reference to `chain`.
14689        ///If the field is unset, it is first initialized with the default value.
14690        pub fn chain_mut(&mut self) -> &mut String {
14691            self.chain.get_or_insert_default()
14692        }
14693        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
14694        pub fn chain_opt(&self) -> Option<&str> {
14695            self.chain.as_ref().map(|field| field as _)
14696        }
14697        ///Sets `chain` with the provided value.
14698        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14699            self.chain = Some(field.into().into());
14700        }
14701        ///Sets `chain` with the provided value.
14702        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14703            self.set_chain(field.into());
14704            self
14705        }
14706        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14707        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14708            self.nonce.as_mut().map(|field| field as _)
14709        }
14710        ///Returns a mutable reference to `nonce`.
14711        ///If the field is unset, it is first initialized with the default value.
14712        pub fn nonce_mut(&mut self) -> &mut u32 {
14713            self.nonce.get_or_insert_default()
14714        }
14715        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
14716        pub fn nonce_opt(&self) -> Option<u32> {
14717            self.nonce.as_ref().map(|field| *field)
14718        }
14719        ///Sets `nonce` with the provided value.
14720        pub fn set_nonce(&mut self, field: u32) {
14721            self.nonce = Some(field);
14722        }
14723        ///Sets `nonce` with the provided value.
14724        pub fn with_nonce(mut self, field: u32) -> Self {
14725            self.set_nonce(field);
14726            self
14727        }
14728    }
14729    impl super::TransactionKind {
14730        pub const fn const_default() -> Self {
14731            Self { kind: None, data: None }
14732        }
14733        #[doc(hidden)]
14734        pub fn default_instance() -> &'static Self {
14735            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14736            &DEFAULT
14737        }
14738        ///Sets `kind` with the provided value.
14739        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14740            mut self,
14741            field: T,
14742        ) -> Self {
14743            self.set_kind(field.into());
14744            self
14745        }
14746        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14747        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14748            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14749                .data
14750            {
14751                field as _
14752            } else {
14753                super::ProgrammableTransaction::default_instance() as _
14754            }
14755        }
14756        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14757        pub fn programmable_transaction_opt(
14758            &self,
14759        ) -> Option<&super::ProgrammableTransaction> {
14760            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14761                .data
14762            {
14763                Some(field as _)
14764            } else {
14765                None
14766            }
14767        }
14768        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14769        pub fn programmable_transaction_opt_mut(
14770            &mut self,
14771        ) -> Option<&mut super::ProgrammableTransaction> {
14772            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14773                .data
14774            {
14775                Some(field as _)
14776            } else {
14777                None
14778            }
14779        }
14780        ///Returns a mutable reference to `programmable_transaction`.
14781        ///If the field is unset, it is first initialized with the default value.
14782        ///If any other oneof field in the same oneof is set, it will be cleared.
14783        pub fn programmable_transaction_mut(
14784            &mut self,
14785        ) -> &mut super::ProgrammableTransaction {
14786            if self.programmable_transaction_opt_mut().is_none() {
14787                self.data = Some(
14788                    super::transaction_kind::Data::ProgrammableTransaction(
14789                        super::ProgrammableTransaction::default(),
14790                    ),
14791                );
14792            }
14793            self.programmable_transaction_opt_mut().unwrap()
14794        }
14795        ///Sets `programmable_transaction` with the provided value.
14796        ///If any other oneof field in the same oneof is set, it will be cleared.
14797        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14798            &mut self,
14799            field: T,
14800        ) {
14801            self.data = Some(
14802                super::transaction_kind::Data::ProgrammableTransaction(
14803                    field.into().into(),
14804                ),
14805            );
14806        }
14807        ///Sets `programmable_transaction` with the provided value.
14808        ///If any other oneof field in the same oneof is set, it will be cleared.
14809        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14810            mut self,
14811            field: T,
14812        ) -> Self {
14813            self.set_programmable_transaction(field.into());
14814            self
14815        }
14816        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14817        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14818            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14819                field as _
14820            } else {
14821                super::ChangeEpoch::default_instance() as _
14822            }
14823        }
14824        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14825        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14826            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14827                Some(field as _)
14828            } else {
14829                None
14830            }
14831        }
14832        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14833        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14834            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14835                .data
14836            {
14837                Some(field as _)
14838            } else {
14839                None
14840            }
14841        }
14842        ///Returns a mutable reference to `change_epoch`.
14843        ///If the field is unset, it is first initialized with the default value.
14844        ///If any other oneof field in the same oneof is set, it will be cleared.
14845        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14846            if self.change_epoch_opt_mut().is_none() {
14847                self.data = Some(
14848                    super::transaction_kind::Data::ChangeEpoch(
14849                        super::ChangeEpoch::default(),
14850                    ),
14851                );
14852            }
14853            self.change_epoch_opt_mut().unwrap()
14854        }
14855        ///Sets `change_epoch` with the provided value.
14856        ///If any other oneof field in the same oneof is set, it will be cleared.
14857        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14858            self.data = Some(
14859                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14860            );
14861        }
14862        ///Sets `change_epoch` with the provided value.
14863        ///If any other oneof field in the same oneof is set, it will be cleared.
14864        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14865            mut self,
14866            field: T,
14867        ) -> Self {
14868            self.set_change_epoch(field.into());
14869            self
14870        }
14871        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
14872        pub fn genesis(&self) -> &super::GenesisTransaction {
14873            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14874                field as _
14875            } else {
14876                super::GenesisTransaction::default_instance() as _
14877            }
14878        }
14879        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
14880        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14881            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14882                Some(field as _)
14883            } else {
14884                None
14885            }
14886        }
14887        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14888        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14889            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14890                Some(field as _)
14891            } else {
14892                None
14893            }
14894        }
14895        ///Returns a mutable reference to `genesis`.
14896        ///If the field is unset, it is first initialized with the default value.
14897        ///If any other oneof field in the same oneof is set, it will be cleared.
14898        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14899            if self.genesis_opt_mut().is_none() {
14900                self.data = Some(
14901                    super::transaction_kind::Data::Genesis(
14902                        super::GenesisTransaction::default(),
14903                    ),
14904                );
14905            }
14906            self.genesis_opt_mut().unwrap()
14907        }
14908        ///Sets `genesis` with the provided value.
14909        ///If any other oneof field in the same oneof is set, it will be cleared.
14910        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14911            self.data = Some(
14912                super::transaction_kind::Data::Genesis(field.into().into()),
14913            );
14914        }
14915        ///Sets `genesis` with the provided value.
14916        ///If any other oneof field in the same oneof is set, it will be cleared.
14917        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14918            mut self,
14919            field: T,
14920        ) -> Self {
14921            self.set_genesis(field.into());
14922            self
14923        }
14924        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
14925        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14926            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14927                .data
14928            {
14929                field as _
14930            } else {
14931                super::ConsensusCommitPrologue::default_instance() as _
14932            }
14933        }
14934        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
14935        pub fn consensus_commit_prologue_opt(
14936            &self,
14937        ) -> Option<&super::ConsensusCommitPrologue> {
14938            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14939                .data
14940            {
14941                Some(field as _)
14942            } else {
14943                None
14944            }
14945        }
14946        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14947        pub fn consensus_commit_prologue_opt_mut(
14948            &mut self,
14949        ) -> Option<&mut super::ConsensusCommitPrologue> {
14950            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14951                .data
14952            {
14953                Some(field as _)
14954            } else {
14955                None
14956            }
14957        }
14958        ///Returns a mutable reference to `consensus_commit_prologue`.
14959        ///If the field is unset, it is first initialized with the default value.
14960        ///If any other oneof field in the same oneof is set, it will be cleared.
14961        pub fn consensus_commit_prologue_mut(
14962            &mut self,
14963        ) -> &mut super::ConsensusCommitPrologue {
14964            if self.consensus_commit_prologue_opt_mut().is_none() {
14965                self.data = Some(
14966                    super::transaction_kind::Data::ConsensusCommitPrologue(
14967                        super::ConsensusCommitPrologue::default(),
14968                    ),
14969                );
14970            }
14971            self.consensus_commit_prologue_opt_mut().unwrap()
14972        }
14973        ///Sets `consensus_commit_prologue` with the provided value.
14974        ///If any other oneof field in the same oneof is set, it will be cleared.
14975        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14976            &mut self,
14977            field: T,
14978        ) {
14979            self.data = Some(
14980                super::transaction_kind::Data::ConsensusCommitPrologue(
14981                    field.into().into(),
14982                ),
14983            );
14984        }
14985        ///Sets `consensus_commit_prologue` with the provided value.
14986        ///If any other oneof field in the same oneof is set, it will be cleared.
14987        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14988            mut self,
14989            field: T,
14990        ) -> Self {
14991            self.set_consensus_commit_prologue(field.into());
14992            self
14993        }
14994        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
14995        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14996            if let Some(
14997                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14998            ) = &self.data
14999            {
15000                field as _
15001            } else {
15002                super::AuthenticatorStateUpdate::default_instance() as _
15003            }
15004        }
15005        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15006        pub fn authenticator_state_update_opt(
15007            &self,
15008        ) -> Option<&super::AuthenticatorStateUpdate> {
15009            if let Some(
15010                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15011            ) = &self.data
15012            {
15013                Some(field as _)
15014            } else {
15015                None
15016            }
15017        }
15018        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15019        pub fn authenticator_state_update_opt_mut(
15020            &mut self,
15021        ) -> Option<&mut super::AuthenticatorStateUpdate> {
15022            if let Some(
15023                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15024            ) = &mut self.data
15025            {
15026                Some(field as _)
15027            } else {
15028                None
15029            }
15030        }
15031        ///Returns a mutable reference to `authenticator_state_update`.
15032        ///If the field is unset, it is first initialized with the default value.
15033        ///If any other oneof field in the same oneof is set, it will be cleared.
15034        pub fn authenticator_state_update_mut(
15035            &mut self,
15036        ) -> &mut super::AuthenticatorStateUpdate {
15037            if self.authenticator_state_update_opt_mut().is_none() {
15038                self.data = Some(
15039                    super::transaction_kind::Data::AuthenticatorStateUpdate(
15040                        super::AuthenticatorStateUpdate::default(),
15041                    ),
15042                );
15043            }
15044            self.authenticator_state_update_opt_mut().unwrap()
15045        }
15046        ///Sets `authenticator_state_update` with the provided value.
15047        ///If any other oneof field in the same oneof is set, it will be cleared.
15048        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15049            &mut self,
15050            field: T,
15051        ) {
15052            self.data = Some(
15053                super::transaction_kind::Data::AuthenticatorStateUpdate(
15054                    field.into().into(),
15055                ),
15056            );
15057        }
15058        ///Sets `authenticator_state_update` with the provided value.
15059        ///If any other oneof field in the same oneof is set, it will be cleared.
15060        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15061            mut self,
15062            field: T,
15063        ) -> Self {
15064            self.set_authenticator_state_update(field.into());
15065            self
15066        }
15067        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
15068        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15069            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15070                field as _
15071            } else {
15072                super::EndOfEpochTransaction::default_instance() as _
15073            }
15074        }
15075        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15076        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15077            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15078                Some(field as _)
15079            } else {
15080                None
15081            }
15082        }
15083        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15084        pub fn end_of_epoch_opt_mut(
15085            &mut self,
15086        ) -> Option<&mut super::EndOfEpochTransaction> {
15087            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15088                .data
15089            {
15090                Some(field as _)
15091            } else {
15092                None
15093            }
15094        }
15095        ///Returns a mutable reference to `end_of_epoch`.
15096        ///If the field is unset, it is first initialized with the default value.
15097        ///If any other oneof field in the same oneof is set, it will be cleared.
15098        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15099            if self.end_of_epoch_opt_mut().is_none() {
15100                self.data = Some(
15101                    super::transaction_kind::Data::EndOfEpoch(
15102                        super::EndOfEpochTransaction::default(),
15103                    ),
15104                );
15105            }
15106            self.end_of_epoch_opt_mut().unwrap()
15107        }
15108        ///Sets `end_of_epoch` with the provided value.
15109        ///If any other oneof field in the same oneof is set, it will be cleared.
15110        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15111            &mut self,
15112            field: T,
15113        ) {
15114            self.data = Some(
15115                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15116            );
15117        }
15118        ///Sets `end_of_epoch` with the provided value.
15119        ///If any other oneof field in the same oneof is set, it will be cleared.
15120        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15121            mut self,
15122            field: T,
15123        ) -> Self {
15124            self.set_end_of_epoch(field.into());
15125            self
15126        }
15127        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
15128        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15129            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15130                .data
15131            {
15132                field as _
15133            } else {
15134                super::RandomnessStateUpdate::default_instance() as _
15135            }
15136        }
15137        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15138        pub fn randomness_state_update_opt(
15139            &self,
15140        ) -> Option<&super::RandomnessStateUpdate> {
15141            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15142                .data
15143            {
15144                Some(field as _)
15145            } else {
15146                None
15147            }
15148        }
15149        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15150        pub fn randomness_state_update_opt_mut(
15151            &mut self,
15152        ) -> Option<&mut super::RandomnessStateUpdate> {
15153            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15154                .data
15155            {
15156                Some(field as _)
15157            } else {
15158                None
15159            }
15160        }
15161        ///Returns a mutable reference to `randomness_state_update`.
15162        ///If the field is unset, it is first initialized with the default value.
15163        ///If any other oneof field in the same oneof is set, it will be cleared.
15164        pub fn randomness_state_update_mut(
15165            &mut self,
15166        ) -> &mut super::RandomnessStateUpdate {
15167            if self.randomness_state_update_opt_mut().is_none() {
15168                self.data = Some(
15169                    super::transaction_kind::Data::RandomnessStateUpdate(
15170                        super::RandomnessStateUpdate::default(),
15171                    ),
15172                );
15173            }
15174            self.randomness_state_update_opt_mut().unwrap()
15175        }
15176        ///Sets `randomness_state_update` with the provided value.
15177        ///If any other oneof field in the same oneof is set, it will be cleared.
15178        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15179            &mut self,
15180            field: T,
15181        ) {
15182            self.data = Some(
15183                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15184            );
15185        }
15186        ///Sets `randomness_state_update` with the provided value.
15187        ///If any other oneof field in the same oneof is set, it will be cleared.
15188        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15189            mut self,
15190            field: T,
15191        ) -> Self {
15192            self.set_randomness_state_update(field.into());
15193            self
15194        }
15195    }
15196    impl super::TransferObjects {
15197        pub const fn const_default() -> Self {
15198            Self {
15199                objects: Vec::new(),
15200                address: None,
15201            }
15202        }
15203        #[doc(hidden)]
15204        pub fn default_instance() -> &'static Self {
15205            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15206            &DEFAULT
15207        }
15208        ///Returns the value of `objects`, or the default value if `objects` is unset.
15209        pub fn objects(&self) -> &[super::Argument] {
15210            &self.objects
15211        }
15212        ///Returns a mutable reference to `objects`.
15213        ///If the field is unset, it is first initialized with the default value.
15214        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15215            &mut self.objects
15216        }
15217        ///Sets `objects` with the provided value.
15218        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15219            self.objects = field;
15220        }
15221        ///Sets `objects` with the provided value.
15222        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15223            self.set_objects(field);
15224            self
15225        }
15226        ///Returns the value of `address`, or the default value if `address` is unset.
15227        pub fn address(&self) -> &super::Argument {
15228            self.address
15229                .as_ref()
15230                .map(|field| field as _)
15231                .unwrap_or_else(|| super::Argument::default_instance() as _)
15232        }
15233        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15234        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15235            self.address.as_mut().map(|field| field as _)
15236        }
15237        ///Returns a mutable reference to `address`.
15238        ///If the field is unset, it is first initialized with the default value.
15239        pub fn address_mut(&mut self) -> &mut super::Argument {
15240            self.address.get_or_insert_default()
15241        }
15242        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15243        pub fn address_opt(&self) -> Option<&super::Argument> {
15244            self.address.as_ref().map(|field| field as _)
15245        }
15246        ///Sets `address` with the provided value.
15247        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15248            self.address = Some(field.into().into());
15249        }
15250        ///Sets `address` with the provided value.
15251        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15252            self.set_address(field.into());
15253            self
15254        }
15255    }
15256    impl super::TypeArgumentError {
15257        pub const fn const_default() -> Self {
15258            Self {
15259                type_argument: None,
15260                kind: None,
15261            }
15262        }
15263        #[doc(hidden)]
15264        pub fn default_instance() -> &'static Self {
15265            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15266            &DEFAULT
15267        }
15268        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15269        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15270            self.type_argument.as_mut().map(|field| field as _)
15271        }
15272        ///Returns a mutable reference to `type_argument`.
15273        ///If the field is unset, it is first initialized with the default value.
15274        pub fn type_argument_mut(&mut self) -> &mut u32 {
15275            self.type_argument.get_or_insert_default()
15276        }
15277        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15278        pub fn type_argument_opt(&self) -> Option<u32> {
15279            self.type_argument.as_ref().map(|field| *field)
15280        }
15281        ///Sets `type_argument` with the provided value.
15282        pub fn set_type_argument(&mut self, field: u32) {
15283            self.type_argument = Some(field);
15284        }
15285        ///Sets `type_argument` with the provided value.
15286        pub fn with_type_argument(mut self, field: u32) -> Self {
15287            self.set_type_argument(field);
15288            self
15289        }
15290        ///Sets `kind` with the provided value.
15291        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15292            mut self,
15293            field: T,
15294        ) -> Self {
15295            self.set_kind(field.into());
15296            self
15297        }
15298    }
15299    impl super::TypeOrigin {
15300        pub const fn const_default() -> Self {
15301            Self {
15302                module_name: None,
15303                datatype_name: None,
15304                package_id: None,
15305            }
15306        }
15307        #[doc(hidden)]
15308        pub fn default_instance() -> &'static Self {
15309            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15310            &DEFAULT
15311        }
15312        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15313        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15314            self.module_name.as_mut().map(|field| field as _)
15315        }
15316        ///Returns a mutable reference to `module_name`.
15317        ///If the field is unset, it is first initialized with the default value.
15318        pub fn module_name_mut(&mut self) -> &mut String {
15319            self.module_name.get_or_insert_default()
15320        }
15321        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15322        pub fn module_name_opt(&self) -> Option<&str> {
15323            self.module_name.as_ref().map(|field| field as _)
15324        }
15325        ///Sets `module_name` with the provided value.
15326        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15327            self.module_name = Some(field.into().into());
15328        }
15329        ///Sets `module_name` with the provided value.
15330        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15331            self.set_module_name(field.into());
15332            self
15333        }
15334        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15335        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15336            self.datatype_name.as_mut().map(|field| field as _)
15337        }
15338        ///Returns a mutable reference to `datatype_name`.
15339        ///If the field is unset, it is first initialized with the default value.
15340        pub fn datatype_name_mut(&mut self) -> &mut String {
15341            self.datatype_name.get_or_insert_default()
15342        }
15343        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15344        pub fn datatype_name_opt(&self) -> Option<&str> {
15345            self.datatype_name.as_ref().map(|field| field as _)
15346        }
15347        ///Sets `datatype_name` with the provided value.
15348        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15349            self.datatype_name = Some(field.into().into());
15350        }
15351        ///Sets `datatype_name` with the provided value.
15352        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15353            self.set_datatype_name(field.into());
15354            self
15355        }
15356        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15357        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15358            self.package_id.as_mut().map(|field| field as _)
15359        }
15360        ///Returns a mutable reference to `package_id`.
15361        ///If the field is unset, it is first initialized with the default value.
15362        pub fn package_id_mut(&mut self) -> &mut String {
15363            self.package_id.get_or_insert_default()
15364        }
15365        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15366        pub fn package_id_opt(&self) -> Option<&str> {
15367            self.package_id.as_ref().map(|field| field as _)
15368        }
15369        ///Sets `package_id` with the provided value.
15370        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15371            self.package_id = Some(field.into().into());
15372        }
15373        ///Sets `package_id` with the provided value.
15374        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15375            self.set_package_id(field.into());
15376            self
15377        }
15378    }
15379    impl super::TypeParameter {
15380        pub const fn const_default() -> Self {
15381            Self {
15382                constraints: Vec::new(),
15383                is_phantom: None,
15384            }
15385        }
15386        #[doc(hidden)]
15387        pub fn default_instance() -> &'static Self {
15388            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15389            &DEFAULT
15390        }
15391        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15392        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15393            self.is_phantom.as_mut().map(|field| field as _)
15394        }
15395        ///Returns a mutable reference to `is_phantom`.
15396        ///If the field is unset, it is first initialized with the default value.
15397        pub fn is_phantom_mut(&mut self) -> &mut bool {
15398            self.is_phantom.get_or_insert_default()
15399        }
15400        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15401        pub fn is_phantom_opt(&self) -> Option<bool> {
15402            self.is_phantom.as_ref().map(|field| *field)
15403        }
15404        ///Sets `is_phantom` with the provided value.
15405        pub fn set_is_phantom(&mut self, field: bool) {
15406            self.is_phantom = Some(field);
15407        }
15408        ///Sets `is_phantom` with the provided value.
15409        pub fn with_is_phantom(mut self, field: bool) -> Self {
15410            self.set_is_phantom(field);
15411            self
15412        }
15413    }
15414    impl super::UnchangedConsensusObject {
15415        pub const fn const_default() -> Self {
15416            Self {
15417                kind: None,
15418                object_id: None,
15419                version: None,
15420                digest: None,
15421                object_type: None,
15422            }
15423        }
15424        #[doc(hidden)]
15425        pub fn default_instance() -> &'static Self {
15426            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15427            &DEFAULT
15428        }
15429        ///Sets `kind` with the provided value.
15430        pub fn with_kind<
15431            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15432        >(mut self, field: T) -> Self {
15433            self.set_kind(field.into());
15434            self
15435        }
15436        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15437        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15438            self.object_id.as_mut().map(|field| field as _)
15439        }
15440        ///Returns a mutable reference to `object_id`.
15441        ///If the field is unset, it is first initialized with the default value.
15442        pub fn object_id_mut(&mut self) -> &mut String {
15443            self.object_id.get_or_insert_default()
15444        }
15445        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15446        pub fn object_id_opt(&self) -> Option<&str> {
15447            self.object_id.as_ref().map(|field| field as _)
15448        }
15449        ///Sets `object_id` with the provided value.
15450        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15451            self.object_id = Some(field.into().into());
15452        }
15453        ///Sets `object_id` with the provided value.
15454        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15455            self.set_object_id(field.into());
15456            self
15457        }
15458        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15459        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15460            self.version.as_mut().map(|field| field as _)
15461        }
15462        ///Returns a mutable reference to `version`.
15463        ///If the field is unset, it is first initialized with the default value.
15464        pub fn version_mut(&mut self) -> &mut u64 {
15465            self.version.get_or_insert_default()
15466        }
15467        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15468        pub fn version_opt(&self) -> Option<u64> {
15469            self.version.as_ref().map(|field| *field)
15470        }
15471        ///Sets `version` with the provided value.
15472        pub fn set_version(&mut self, field: u64) {
15473            self.version = Some(field);
15474        }
15475        ///Sets `version` with the provided value.
15476        pub fn with_version(mut self, field: u64) -> Self {
15477            self.set_version(field);
15478            self
15479        }
15480        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15481        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15482            self.digest.as_mut().map(|field| field as _)
15483        }
15484        ///Returns a mutable reference to `digest`.
15485        ///If the field is unset, it is first initialized with the default value.
15486        pub fn digest_mut(&mut self) -> &mut String {
15487            self.digest.get_or_insert_default()
15488        }
15489        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15490        pub fn digest_opt(&self) -> Option<&str> {
15491            self.digest.as_ref().map(|field| field as _)
15492        }
15493        ///Sets `digest` with the provided value.
15494        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15495            self.digest = Some(field.into().into());
15496        }
15497        ///Sets `digest` with the provided value.
15498        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15499            self.set_digest(field.into());
15500            self
15501        }
15502        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15503        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15504            self.object_type.as_mut().map(|field| field as _)
15505        }
15506        ///Returns a mutable reference to `object_type`.
15507        ///If the field is unset, it is first initialized with the default value.
15508        pub fn object_type_mut(&mut self) -> &mut String {
15509            self.object_type.get_or_insert_default()
15510        }
15511        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15512        pub fn object_type_opt(&self) -> Option<&str> {
15513            self.object_type.as_ref().map(|field| field as _)
15514        }
15515        ///Sets `object_type` with the provided value.
15516        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15517            self.object_type = Some(field.into().into());
15518        }
15519        ///Sets `object_type` with the provided value.
15520        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15521            self.set_object_type(field.into());
15522            self
15523        }
15524    }
15525    impl super::Upgrade {
15526        pub const fn const_default() -> Self {
15527            Self {
15528                modules: Vec::new(),
15529                dependencies: Vec::new(),
15530                package: None,
15531                ticket: None,
15532            }
15533        }
15534        #[doc(hidden)]
15535        pub fn default_instance() -> &'static Self {
15536            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15537            &DEFAULT
15538        }
15539        ///Returns the value of `modules`, or the default value if `modules` is unset.
15540        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15541            &self.modules
15542        }
15543        ///Returns a mutable reference to `modules`.
15544        ///If the field is unset, it is first initialized with the default value.
15545        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15546            &mut self.modules
15547        }
15548        ///Sets `modules` with the provided value.
15549        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15550            self.modules = field;
15551        }
15552        ///Sets `modules` with the provided value.
15553        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15554            self.set_modules(field);
15555            self
15556        }
15557        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15558        pub fn dependencies(&self) -> &[String] {
15559            &self.dependencies
15560        }
15561        ///Returns a mutable reference to `dependencies`.
15562        ///If the field is unset, it is first initialized with the default value.
15563        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15564            &mut self.dependencies
15565        }
15566        ///Sets `dependencies` with the provided value.
15567        pub fn set_dependencies(&mut self, field: Vec<String>) {
15568            self.dependencies = field;
15569        }
15570        ///Sets `dependencies` with the provided value.
15571        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15572            self.set_dependencies(field);
15573            self
15574        }
15575        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15576        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15577            self.package.as_mut().map(|field| field as _)
15578        }
15579        ///Returns a mutable reference to `package`.
15580        ///If the field is unset, it is first initialized with the default value.
15581        pub fn package_mut(&mut self) -> &mut String {
15582            self.package.get_or_insert_default()
15583        }
15584        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15585        pub fn package_opt(&self) -> Option<&str> {
15586            self.package.as_ref().map(|field| field as _)
15587        }
15588        ///Sets `package` with the provided value.
15589        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15590            self.package = Some(field.into().into());
15591        }
15592        ///Sets `package` with the provided value.
15593        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15594            self.set_package(field.into());
15595            self
15596        }
15597        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15598        pub fn ticket(&self) -> &super::Argument {
15599            self.ticket
15600                .as_ref()
15601                .map(|field| field as _)
15602                .unwrap_or_else(|| super::Argument::default_instance() as _)
15603        }
15604        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15605        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15606            self.ticket.as_mut().map(|field| field as _)
15607        }
15608        ///Returns a mutable reference to `ticket`.
15609        ///If the field is unset, it is first initialized with the default value.
15610        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15611            self.ticket.get_or_insert_default()
15612        }
15613        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15614        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15615            self.ticket.as_ref().map(|field| field as _)
15616        }
15617        ///Sets `ticket` with the provided value.
15618        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15619            self.ticket = Some(field.into().into());
15620        }
15621        ///Sets `ticket` with the provided value.
15622        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15623            self.set_ticket(field.into());
15624            self
15625        }
15626    }
15627    impl super::UserSignature {
15628        pub const fn const_default() -> Self {
15629            Self {
15630                bcs: None,
15631                scheme: None,
15632                signature: None,
15633            }
15634        }
15635        #[doc(hidden)]
15636        pub fn default_instance() -> &'static Self {
15637            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15638            &DEFAULT
15639        }
15640        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15641        pub fn bcs(&self) -> &super::Bcs {
15642            self.bcs
15643                .as_ref()
15644                .map(|field| field as _)
15645                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15646        }
15647        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15648        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15649            self.bcs.as_mut().map(|field| field as _)
15650        }
15651        ///Returns a mutable reference to `bcs`.
15652        ///If the field is unset, it is first initialized with the default value.
15653        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15654            self.bcs.get_or_insert_default()
15655        }
15656        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15657        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15658            self.bcs.as_ref().map(|field| field as _)
15659        }
15660        ///Sets `bcs` with the provided value.
15661        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15662            self.bcs = Some(field.into().into());
15663        }
15664        ///Sets `bcs` with the provided value.
15665        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15666            self.set_bcs(field.into());
15667            self
15668        }
15669        ///Sets `scheme` with the provided value.
15670        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15671            self.set_scheme(field.into());
15672            self
15673        }
15674        ///Returns the value of `simple`, or the default value if `simple` is unset.
15675        pub fn simple(&self) -> &super::SimpleSignature {
15676            if let Some(super::user_signature::Signature::Simple(field)) = &self
15677                .signature
15678            {
15679                field as _
15680            } else {
15681                super::SimpleSignature::default_instance() as _
15682            }
15683        }
15684        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15685        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15686            if let Some(super::user_signature::Signature::Simple(field)) = &self
15687                .signature
15688            {
15689                Some(field as _)
15690            } else {
15691                None
15692            }
15693        }
15694        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15695        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15696            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15697                .signature
15698            {
15699                Some(field as _)
15700            } else {
15701                None
15702            }
15703        }
15704        ///Returns a mutable reference to `simple`.
15705        ///If the field is unset, it is first initialized with the default value.
15706        ///If any other oneof field in the same oneof is set, it will be cleared.
15707        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15708            if self.simple_opt_mut().is_none() {
15709                self.signature = Some(
15710                    super::user_signature::Signature::Simple(
15711                        super::SimpleSignature::default(),
15712                    ),
15713                );
15714            }
15715            self.simple_opt_mut().unwrap()
15716        }
15717        ///Sets `simple` with the provided value.
15718        ///If any other oneof field in the same oneof is set, it will be cleared.
15719        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15720            self.signature = Some(
15721                super::user_signature::Signature::Simple(field.into().into()),
15722            );
15723        }
15724        ///Sets `simple` with the provided value.
15725        ///If any other oneof field in the same oneof is set, it will be cleared.
15726        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15727            self.set_simple(field.into());
15728            self
15729        }
15730        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15731        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15732            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15733                .signature
15734            {
15735                field as _
15736            } else {
15737                super::MultisigAggregatedSignature::default_instance() as _
15738            }
15739        }
15740        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15741        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15742            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15743                .signature
15744            {
15745                Some(field as _)
15746            } else {
15747                None
15748            }
15749        }
15750        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15751        pub fn multisig_opt_mut(
15752            &mut self,
15753        ) -> Option<&mut super::MultisigAggregatedSignature> {
15754            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15755                .signature
15756            {
15757                Some(field as _)
15758            } else {
15759                None
15760            }
15761        }
15762        ///Returns a mutable reference to `multisig`.
15763        ///If the field is unset, it is first initialized with the default value.
15764        ///If any other oneof field in the same oneof is set, it will be cleared.
15765        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15766            if self.multisig_opt_mut().is_none() {
15767                self.signature = Some(
15768                    super::user_signature::Signature::Multisig(
15769                        super::MultisigAggregatedSignature::default(),
15770                    ),
15771                );
15772            }
15773            self.multisig_opt_mut().unwrap()
15774        }
15775        ///Sets `multisig` with the provided value.
15776        ///If any other oneof field in the same oneof is set, it will be cleared.
15777        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15778            &mut self,
15779            field: T,
15780        ) {
15781            self.signature = Some(
15782                super::user_signature::Signature::Multisig(field.into().into()),
15783            );
15784        }
15785        ///Sets `multisig` with the provided value.
15786        ///If any other oneof field in the same oneof is set, it will be cleared.
15787        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15788            mut self,
15789            field: T,
15790        ) -> Self {
15791            self.set_multisig(field.into());
15792            self
15793        }
15794        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15795        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15796            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15797                .signature
15798            {
15799                field as _
15800            } else {
15801                super::ZkLoginAuthenticator::default_instance() as _
15802            }
15803        }
15804        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15805        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15806            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15807                .signature
15808            {
15809                Some(field as _)
15810            } else {
15811                None
15812            }
15813        }
15814        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15815        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15816            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15817                .signature
15818            {
15819                Some(field as _)
15820            } else {
15821                None
15822            }
15823        }
15824        ///Returns a mutable reference to `zklogin`.
15825        ///If the field is unset, it is first initialized with the default value.
15826        ///If any other oneof field in the same oneof is set, it will be cleared.
15827        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15828            if self.zklogin_opt_mut().is_none() {
15829                self.signature = Some(
15830                    super::user_signature::Signature::Zklogin(
15831                        super::ZkLoginAuthenticator::default(),
15832                    ),
15833                );
15834            }
15835            self.zklogin_opt_mut().unwrap()
15836        }
15837        ///Sets `zklogin` with the provided value.
15838        ///If any other oneof field in the same oneof is set, it will be cleared.
15839        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15840            self.signature = Some(
15841                super::user_signature::Signature::Zklogin(field.into().into()),
15842            );
15843        }
15844        ///Sets `zklogin` with the provided value.
15845        ///If any other oneof field in the same oneof is set, it will be cleared.
15846        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15847            mut self,
15848            field: T,
15849        ) -> Self {
15850            self.set_zklogin(field.into());
15851            self
15852        }
15853        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
15854        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15855            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15856                .signature
15857            {
15858                field as _
15859            } else {
15860                super::PasskeyAuthenticator::default_instance() as _
15861            }
15862        }
15863        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
15864        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15865            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15866                .signature
15867            {
15868                Some(field as _)
15869            } else {
15870                None
15871            }
15872        }
15873        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15874        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15875            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15876                .signature
15877            {
15878                Some(field as _)
15879            } else {
15880                None
15881            }
15882        }
15883        ///Returns a mutable reference to `passkey`.
15884        ///If the field is unset, it is first initialized with the default value.
15885        ///If any other oneof field in the same oneof is set, it will be cleared.
15886        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15887            if self.passkey_opt_mut().is_none() {
15888                self.signature = Some(
15889                    super::user_signature::Signature::Passkey(
15890                        super::PasskeyAuthenticator::default(),
15891                    ),
15892                );
15893            }
15894            self.passkey_opt_mut().unwrap()
15895        }
15896        ///Sets `passkey` with the provided value.
15897        ///If any other oneof field in the same oneof is set, it will be cleared.
15898        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15899            self.signature = Some(
15900                super::user_signature::Signature::Passkey(field.into().into()),
15901            );
15902        }
15903        ///Sets `passkey` with the provided value.
15904        ///If any other oneof field in the same oneof is set, it will be cleared.
15905        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15906            mut self,
15907            field: T,
15908        ) -> Self {
15909            self.set_passkey(field.into());
15910            self
15911        }
15912    }
15913    impl super::Validator {
15914        pub const fn const_default() -> Self {
15915            Self {
15916                name: None,
15917                address: None,
15918                description: None,
15919                image_url: None,
15920                project_url: None,
15921                protocol_public_key: None,
15922                proof_of_possession: None,
15923                network_public_key: None,
15924                worker_public_key: None,
15925                network_address: None,
15926                p2p_address: None,
15927                primary_address: None,
15928                worker_address: None,
15929                next_epoch_protocol_public_key: None,
15930                next_epoch_proof_of_possession: None,
15931                next_epoch_network_public_key: None,
15932                next_epoch_worker_public_key: None,
15933                next_epoch_network_address: None,
15934                next_epoch_p2p_address: None,
15935                next_epoch_primary_address: None,
15936                next_epoch_worker_address: None,
15937                metadata_extra_fields: None,
15938                voting_power: None,
15939                operation_cap_id: None,
15940                gas_price: None,
15941                staking_pool: None,
15942                commission_rate: None,
15943                next_epoch_stake: None,
15944                next_epoch_gas_price: None,
15945                next_epoch_commission_rate: None,
15946                extra_fields: None,
15947            }
15948        }
15949        #[doc(hidden)]
15950        pub fn default_instance() -> &'static Self {
15951            static DEFAULT: super::Validator = super::Validator::const_default();
15952            &DEFAULT
15953        }
15954        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15955        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15956            self.name.as_mut().map(|field| field as _)
15957        }
15958        ///Returns a mutable reference to `name`.
15959        ///If the field is unset, it is first initialized with the default value.
15960        pub fn name_mut(&mut self) -> &mut String {
15961            self.name.get_or_insert_default()
15962        }
15963        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15964        pub fn name_opt(&self) -> Option<&str> {
15965            self.name.as_ref().map(|field| field as _)
15966        }
15967        ///Sets `name` with the provided value.
15968        pub fn set_name<T: Into<String>>(&mut self, field: T) {
15969            self.name = Some(field.into().into());
15970        }
15971        ///Sets `name` with the provided value.
15972        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15973            self.set_name(field.into());
15974            self
15975        }
15976        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15977        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15978            self.address.as_mut().map(|field| field as _)
15979        }
15980        ///Returns a mutable reference to `address`.
15981        ///If the field is unset, it is first initialized with the default value.
15982        pub fn address_mut(&mut self) -> &mut String {
15983            self.address.get_or_insert_default()
15984        }
15985        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15986        pub fn address_opt(&self) -> Option<&str> {
15987            self.address.as_ref().map(|field| field as _)
15988        }
15989        ///Sets `address` with the provided value.
15990        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15991            self.address = Some(field.into().into());
15992        }
15993        ///Sets `address` with the provided value.
15994        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15995            self.set_address(field.into());
15996            self
15997        }
15998        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15999        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16000            self.description.as_mut().map(|field| field as _)
16001        }
16002        ///Returns a mutable reference to `description`.
16003        ///If the field is unset, it is first initialized with the default value.
16004        pub fn description_mut(&mut self) -> &mut String {
16005            self.description.get_or_insert_default()
16006        }
16007        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
16008        pub fn description_opt(&self) -> Option<&str> {
16009            self.description.as_ref().map(|field| field as _)
16010        }
16011        ///Sets `description` with the provided value.
16012        pub fn set_description<T: Into<String>>(&mut self, field: T) {
16013            self.description = Some(field.into().into());
16014        }
16015        ///Sets `description` with the provided value.
16016        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16017            self.set_description(field.into());
16018            self
16019        }
16020        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16021        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16022            self.image_url.as_mut().map(|field| field as _)
16023        }
16024        ///Returns a mutable reference to `image_url`.
16025        ///If the field is unset, it is first initialized with the default value.
16026        pub fn image_url_mut(&mut self) -> &mut String {
16027            self.image_url.get_or_insert_default()
16028        }
16029        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16030        pub fn image_url_opt(&self) -> Option<&str> {
16031            self.image_url.as_ref().map(|field| field as _)
16032        }
16033        ///Sets `image_url` with the provided value.
16034        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16035            self.image_url = Some(field.into().into());
16036        }
16037        ///Sets `image_url` with the provided value.
16038        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16039            self.set_image_url(field.into());
16040            self
16041        }
16042        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16043        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16044            self.project_url.as_mut().map(|field| field as _)
16045        }
16046        ///Returns a mutable reference to `project_url`.
16047        ///If the field is unset, it is first initialized with the default value.
16048        pub fn project_url_mut(&mut self) -> &mut String {
16049            self.project_url.get_or_insert_default()
16050        }
16051        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16052        pub fn project_url_opt(&self) -> Option<&str> {
16053            self.project_url.as_ref().map(|field| field as _)
16054        }
16055        ///Sets `project_url` with the provided value.
16056        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16057            self.project_url = Some(field.into().into());
16058        }
16059        ///Sets `project_url` with the provided value.
16060        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16061            self.set_project_url(field.into());
16062            self
16063        }
16064        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16065        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16066            self.protocol_public_key.as_ref().map(|field| field as _)
16067        }
16068        ///Sets `protocol_public_key` with the provided value.
16069        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16070            &mut self,
16071            field: T,
16072        ) {
16073            self.protocol_public_key = Some(field.into().into());
16074        }
16075        ///Sets `protocol_public_key` with the provided value.
16076        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16077            mut self,
16078            field: T,
16079        ) -> Self {
16080            self.set_protocol_public_key(field.into());
16081            self
16082        }
16083        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16084        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16085            self.proof_of_possession.as_ref().map(|field| field as _)
16086        }
16087        ///Sets `proof_of_possession` with the provided value.
16088        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16089            &mut self,
16090            field: T,
16091        ) {
16092            self.proof_of_possession = Some(field.into().into());
16093        }
16094        ///Sets `proof_of_possession` with the provided value.
16095        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16096            mut self,
16097            field: T,
16098        ) -> Self {
16099            self.set_proof_of_possession(field.into());
16100            self
16101        }
16102        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16103        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16104            self.network_public_key.as_ref().map(|field| field as _)
16105        }
16106        ///Sets `network_public_key` with the provided value.
16107        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16108            &mut self,
16109            field: T,
16110        ) {
16111            self.network_public_key = Some(field.into().into());
16112        }
16113        ///Sets `network_public_key` with the provided value.
16114        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16115            mut self,
16116            field: T,
16117        ) -> Self {
16118            self.set_network_public_key(field.into());
16119            self
16120        }
16121        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16122        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16123            self.worker_public_key.as_ref().map(|field| field as _)
16124        }
16125        ///Sets `worker_public_key` with the provided value.
16126        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16127            &mut self,
16128            field: T,
16129        ) {
16130            self.worker_public_key = Some(field.into().into());
16131        }
16132        ///Sets `worker_public_key` with the provided value.
16133        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16134            mut self,
16135            field: T,
16136        ) -> Self {
16137            self.set_worker_public_key(field.into());
16138            self
16139        }
16140        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16141        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16142            self.network_address.as_mut().map(|field| field as _)
16143        }
16144        ///Returns a mutable reference to `network_address`.
16145        ///If the field is unset, it is first initialized with the default value.
16146        pub fn network_address_mut(&mut self) -> &mut String {
16147            self.network_address.get_or_insert_default()
16148        }
16149        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16150        pub fn network_address_opt(&self) -> Option<&str> {
16151            self.network_address.as_ref().map(|field| field as _)
16152        }
16153        ///Sets `network_address` with the provided value.
16154        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16155            self.network_address = Some(field.into().into());
16156        }
16157        ///Sets `network_address` with the provided value.
16158        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16159            self.set_network_address(field.into());
16160            self
16161        }
16162        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16163        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16164            self.p2p_address.as_mut().map(|field| field as _)
16165        }
16166        ///Returns a mutable reference to `p2p_address`.
16167        ///If the field is unset, it is first initialized with the default value.
16168        pub fn p2p_address_mut(&mut self) -> &mut String {
16169            self.p2p_address.get_or_insert_default()
16170        }
16171        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16172        pub fn p2p_address_opt(&self) -> Option<&str> {
16173            self.p2p_address.as_ref().map(|field| field as _)
16174        }
16175        ///Sets `p2p_address` with the provided value.
16176        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16177            self.p2p_address = Some(field.into().into());
16178        }
16179        ///Sets `p2p_address` with the provided value.
16180        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16181            self.set_p2p_address(field.into());
16182            self
16183        }
16184        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16185        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16186            self.primary_address.as_mut().map(|field| field as _)
16187        }
16188        ///Returns a mutable reference to `primary_address`.
16189        ///If the field is unset, it is first initialized with the default value.
16190        pub fn primary_address_mut(&mut self) -> &mut String {
16191            self.primary_address.get_or_insert_default()
16192        }
16193        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16194        pub fn primary_address_opt(&self) -> Option<&str> {
16195            self.primary_address.as_ref().map(|field| field as _)
16196        }
16197        ///Sets `primary_address` with the provided value.
16198        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16199            self.primary_address = Some(field.into().into());
16200        }
16201        ///Sets `primary_address` with the provided value.
16202        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16203            self.set_primary_address(field.into());
16204            self
16205        }
16206        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16207        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16208            self.worker_address.as_mut().map(|field| field as _)
16209        }
16210        ///Returns a mutable reference to `worker_address`.
16211        ///If the field is unset, it is first initialized with the default value.
16212        pub fn worker_address_mut(&mut self) -> &mut String {
16213            self.worker_address.get_or_insert_default()
16214        }
16215        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16216        pub fn worker_address_opt(&self) -> Option<&str> {
16217            self.worker_address.as_ref().map(|field| field as _)
16218        }
16219        ///Sets `worker_address` with the provided value.
16220        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16221            self.worker_address = Some(field.into().into());
16222        }
16223        ///Sets `worker_address` with the provided value.
16224        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16225            self.set_worker_address(field.into());
16226            self
16227        }
16228        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16229        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16230            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16231        }
16232        ///Sets `next_epoch_protocol_public_key` with the provided value.
16233        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16234            &mut self,
16235            field: T,
16236        ) {
16237            self.next_epoch_protocol_public_key = Some(field.into().into());
16238        }
16239        ///Sets `next_epoch_protocol_public_key` with the provided value.
16240        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16241            mut self,
16242            field: T,
16243        ) -> Self {
16244            self.set_next_epoch_protocol_public_key(field.into());
16245            self
16246        }
16247        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16248        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16249            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16250        }
16251        ///Sets `next_epoch_proof_of_possession` with the provided value.
16252        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16253            &mut self,
16254            field: T,
16255        ) {
16256            self.next_epoch_proof_of_possession = Some(field.into().into());
16257        }
16258        ///Sets `next_epoch_proof_of_possession` with the provided value.
16259        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16260            mut self,
16261            field: T,
16262        ) -> Self {
16263            self.set_next_epoch_proof_of_possession(field.into());
16264            self
16265        }
16266        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16267        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16268            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16269        }
16270        ///Sets `next_epoch_network_public_key` with the provided value.
16271        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16272            &mut self,
16273            field: T,
16274        ) {
16275            self.next_epoch_network_public_key = Some(field.into().into());
16276        }
16277        ///Sets `next_epoch_network_public_key` with the provided value.
16278        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16279            mut self,
16280            field: T,
16281        ) -> Self {
16282            self.set_next_epoch_network_public_key(field.into());
16283            self
16284        }
16285        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16286        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16287            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16288        }
16289        ///Sets `next_epoch_worker_public_key` with the provided value.
16290        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16291            &mut self,
16292            field: T,
16293        ) {
16294            self.next_epoch_worker_public_key = Some(field.into().into());
16295        }
16296        ///Sets `next_epoch_worker_public_key` with the provided value.
16297        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16298            mut self,
16299            field: T,
16300        ) -> Self {
16301            self.set_next_epoch_worker_public_key(field.into());
16302            self
16303        }
16304        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16305        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16306            self.next_epoch_network_address.as_mut().map(|field| field as _)
16307        }
16308        ///Returns a mutable reference to `next_epoch_network_address`.
16309        ///If the field is unset, it is first initialized with the default value.
16310        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16311            self.next_epoch_network_address.get_or_insert_default()
16312        }
16313        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16314        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16315            self.next_epoch_network_address.as_ref().map(|field| field as _)
16316        }
16317        ///Sets `next_epoch_network_address` with the provided value.
16318        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16319            self.next_epoch_network_address = Some(field.into().into());
16320        }
16321        ///Sets `next_epoch_network_address` with the provided value.
16322        pub fn with_next_epoch_network_address<T: Into<String>>(
16323            mut self,
16324            field: T,
16325        ) -> Self {
16326            self.set_next_epoch_network_address(field.into());
16327            self
16328        }
16329        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16330        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16331            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16332        }
16333        ///Returns a mutable reference to `next_epoch_p2p_address`.
16334        ///If the field is unset, it is first initialized with the default value.
16335        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16336            self.next_epoch_p2p_address.get_or_insert_default()
16337        }
16338        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16339        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16340            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16341        }
16342        ///Sets `next_epoch_p2p_address` with the provided value.
16343        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16344            self.next_epoch_p2p_address = Some(field.into().into());
16345        }
16346        ///Sets `next_epoch_p2p_address` with the provided value.
16347        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16348            self.set_next_epoch_p2p_address(field.into());
16349            self
16350        }
16351        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16352        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16353            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16354        }
16355        ///Returns a mutable reference to `next_epoch_primary_address`.
16356        ///If the field is unset, it is first initialized with the default value.
16357        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16358            self.next_epoch_primary_address.get_or_insert_default()
16359        }
16360        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16361        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16362            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16363        }
16364        ///Sets `next_epoch_primary_address` with the provided value.
16365        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16366            self.next_epoch_primary_address = Some(field.into().into());
16367        }
16368        ///Sets `next_epoch_primary_address` with the provided value.
16369        pub fn with_next_epoch_primary_address<T: Into<String>>(
16370            mut self,
16371            field: T,
16372        ) -> Self {
16373            self.set_next_epoch_primary_address(field.into());
16374            self
16375        }
16376        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16377        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16378            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16379        }
16380        ///Returns a mutable reference to `next_epoch_worker_address`.
16381        ///If the field is unset, it is first initialized with the default value.
16382        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16383            self.next_epoch_worker_address.get_or_insert_default()
16384        }
16385        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16386        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16387            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16388        }
16389        ///Sets `next_epoch_worker_address` with the provided value.
16390        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16391            self.next_epoch_worker_address = Some(field.into().into());
16392        }
16393        ///Sets `next_epoch_worker_address` with the provided value.
16394        pub fn with_next_epoch_worker_address<T: Into<String>>(
16395            mut self,
16396            field: T,
16397        ) -> Self {
16398            self.set_next_epoch_worker_address(field.into());
16399            self
16400        }
16401        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16402        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16403            self.metadata_extra_fields
16404                .as_ref()
16405                .map(|field| field as _)
16406                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16407        }
16408        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16409        pub fn metadata_extra_fields_opt_mut(
16410            &mut self,
16411        ) -> Option<&mut super::MoveTable> {
16412            self.metadata_extra_fields.as_mut().map(|field| field as _)
16413        }
16414        ///Returns a mutable reference to `metadata_extra_fields`.
16415        ///If the field is unset, it is first initialized with the default value.
16416        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16417            self.metadata_extra_fields.get_or_insert_default()
16418        }
16419        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16420        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16421            self.metadata_extra_fields.as_ref().map(|field| field as _)
16422        }
16423        ///Sets `metadata_extra_fields` with the provided value.
16424        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16425            &mut self,
16426            field: T,
16427        ) {
16428            self.metadata_extra_fields = Some(field.into().into());
16429        }
16430        ///Sets `metadata_extra_fields` with the provided value.
16431        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16432            mut self,
16433            field: T,
16434        ) -> Self {
16435            self.set_metadata_extra_fields(field.into());
16436            self
16437        }
16438        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16439        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16440            self.voting_power.as_mut().map(|field| field as _)
16441        }
16442        ///Returns a mutable reference to `voting_power`.
16443        ///If the field is unset, it is first initialized with the default value.
16444        pub fn voting_power_mut(&mut self) -> &mut u64 {
16445            self.voting_power.get_or_insert_default()
16446        }
16447        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16448        pub fn voting_power_opt(&self) -> Option<u64> {
16449            self.voting_power.as_ref().map(|field| *field)
16450        }
16451        ///Sets `voting_power` with the provided value.
16452        pub fn set_voting_power(&mut self, field: u64) {
16453            self.voting_power = Some(field);
16454        }
16455        ///Sets `voting_power` with the provided value.
16456        pub fn with_voting_power(mut self, field: u64) -> Self {
16457            self.set_voting_power(field);
16458            self
16459        }
16460        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16461        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16462            self.operation_cap_id.as_mut().map(|field| field as _)
16463        }
16464        ///Returns a mutable reference to `operation_cap_id`.
16465        ///If the field is unset, it is first initialized with the default value.
16466        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16467            self.operation_cap_id.get_or_insert_default()
16468        }
16469        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16470        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16471            self.operation_cap_id.as_ref().map(|field| field as _)
16472        }
16473        ///Sets `operation_cap_id` with the provided value.
16474        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16475            self.operation_cap_id = Some(field.into().into());
16476        }
16477        ///Sets `operation_cap_id` with the provided value.
16478        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16479            self.set_operation_cap_id(field.into());
16480            self
16481        }
16482        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16483        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16484            self.gas_price.as_mut().map(|field| field as _)
16485        }
16486        ///Returns a mutable reference to `gas_price`.
16487        ///If the field is unset, it is first initialized with the default value.
16488        pub fn gas_price_mut(&mut self) -> &mut u64 {
16489            self.gas_price.get_or_insert_default()
16490        }
16491        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16492        pub fn gas_price_opt(&self) -> Option<u64> {
16493            self.gas_price.as_ref().map(|field| *field)
16494        }
16495        ///Sets `gas_price` with the provided value.
16496        pub fn set_gas_price(&mut self, field: u64) {
16497            self.gas_price = Some(field);
16498        }
16499        ///Sets `gas_price` with the provided value.
16500        pub fn with_gas_price(mut self, field: u64) -> Self {
16501            self.set_gas_price(field);
16502            self
16503        }
16504        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16505        pub fn staking_pool(&self) -> &super::StakingPool {
16506            self.staking_pool
16507                .as_ref()
16508                .map(|field| field as _)
16509                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16510        }
16511        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16512        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16513            self.staking_pool.as_mut().map(|field| field as _)
16514        }
16515        ///Returns a mutable reference to `staking_pool`.
16516        ///If the field is unset, it is first initialized with the default value.
16517        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16518            self.staking_pool.get_or_insert_default()
16519        }
16520        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16521        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16522            self.staking_pool.as_ref().map(|field| field as _)
16523        }
16524        ///Sets `staking_pool` with the provided value.
16525        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16526            self.staking_pool = Some(field.into().into());
16527        }
16528        ///Sets `staking_pool` with the provided value.
16529        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16530            mut self,
16531            field: T,
16532        ) -> Self {
16533            self.set_staking_pool(field.into());
16534            self
16535        }
16536        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16537        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16538            self.commission_rate.as_mut().map(|field| field as _)
16539        }
16540        ///Returns a mutable reference to `commission_rate`.
16541        ///If the field is unset, it is first initialized with the default value.
16542        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16543            self.commission_rate.get_or_insert_default()
16544        }
16545        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16546        pub fn commission_rate_opt(&self) -> Option<u64> {
16547            self.commission_rate.as_ref().map(|field| *field)
16548        }
16549        ///Sets `commission_rate` with the provided value.
16550        pub fn set_commission_rate(&mut self, field: u64) {
16551            self.commission_rate = Some(field);
16552        }
16553        ///Sets `commission_rate` with the provided value.
16554        pub fn with_commission_rate(mut self, field: u64) -> Self {
16555            self.set_commission_rate(field);
16556            self
16557        }
16558        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16559        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16560            self.next_epoch_stake.as_mut().map(|field| field as _)
16561        }
16562        ///Returns a mutable reference to `next_epoch_stake`.
16563        ///If the field is unset, it is first initialized with the default value.
16564        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16565            self.next_epoch_stake.get_or_insert_default()
16566        }
16567        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16568        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16569            self.next_epoch_stake.as_ref().map(|field| *field)
16570        }
16571        ///Sets `next_epoch_stake` with the provided value.
16572        pub fn set_next_epoch_stake(&mut self, field: u64) {
16573            self.next_epoch_stake = Some(field);
16574        }
16575        ///Sets `next_epoch_stake` with the provided value.
16576        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16577            self.set_next_epoch_stake(field);
16578            self
16579        }
16580        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16581        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16582            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16583        }
16584        ///Returns a mutable reference to `next_epoch_gas_price`.
16585        ///If the field is unset, it is first initialized with the default value.
16586        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16587            self.next_epoch_gas_price.get_or_insert_default()
16588        }
16589        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16590        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16591            self.next_epoch_gas_price.as_ref().map(|field| *field)
16592        }
16593        ///Sets `next_epoch_gas_price` with the provided value.
16594        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16595            self.next_epoch_gas_price = Some(field);
16596        }
16597        ///Sets `next_epoch_gas_price` with the provided value.
16598        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16599            self.set_next_epoch_gas_price(field);
16600            self
16601        }
16602        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16603        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16604            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16605        }
16606        ///Returns a mutable reference to `next_epoch_commission_rate`.
16607        ///If the field is unset, it is first initialized with the default value.
16608        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16609            self.next_epoch_commission_rate.get_or_insert_default()
16610        }
16611        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16612        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16613            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16614        }
16615        ///Sets `next_epoch_commission_rate` with the provided value.
16616        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16617            self.next_epoch_commission_rate = Some(field);
16618        }
16619        ///Sets `next_epoch_commission_rate` with the provided value.
16620        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16621            self.set_next_epoch_commission_rate(field);
16622            self
16623        }
16624        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16625        pub fn extra_fields(&self) -> &super::MoveTable {
16626            self.extra_fields
16627                .as_ref()
16628                .map(|field| field as _)
16629                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16630        }
16631        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16632        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16633            self.extra_fields.as_mut().map(|field| field as _)
16634        }
16635        ///Returns a mutable reference to `extra_fields`.
16636        ///If the field is unset, it is first initialized with the default value.
16637        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16638            self.extra_fields.get_or_insert_default()
16639        }
16640        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16641        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16642            self.extra_fields.as_ref().map(|field| field as _)
16643        }
16644        ///Sets `extra_fields` with the provided value.
16645        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16646            self.extra_fields = Some(field.into().into());
16647        }
16648        ///Sets `extra_fields` with the provided value.
16649        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16650            self.set_extra_fields(field.into());
16651            self
16652        }
16653    }
16654    impl super::ValidatorAggregatedSignature {
16655        pub const fn const_default() -> Self {
16656            Self {
16657                epoch: None,
16658                signature: None,
16659                bitmap: None,
16660            }
16661        }
16662        #[doc(hidden)]
16663        pub fn default_instance() -> &'static Self {
16664            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16665            &DEFAULT
16666        }
16667        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16668        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16669            self.epoch.as_mut().map(|field| field as _)
16670        }
16671        ///Returns a mutable reference to `epoch`.
16672        ///If the field is unset, it is first initialized with the default value.
16673        pub fn epoch_mut(&mut self) -> &mut u64 {
16674            self.epoch.get_or_insert_default()
16675        }
16676        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16677        pub fn epoch_opt(&self) -> Option<u64> {
16678            self.epoch.as_ref().map(|field| *field)
16679        }
16680        ///Sets `epoch` with the provided value.
16681        pub fn set_epoch(&mut self, field: u64) {
16682            self.epoch = Some(field);
16683        }
16684        ///Sets `epoch` with the provided value.
16685        pub fn with_epoch(mut self, field: u64) -> Self {
16686            self.set_epoch(field);
16687            self
16688        }
16689        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16690        pub fn signature_opt(&self) -> Option<&[u8]> {
16691            self.signature.as_ref().map(|field| field as _)
16692        }
16693        ///Sets `signature` with the provided value.
16694        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16695            self.signature = Some(field.into().into());
16696        }
16697        ///Sets `signature` with the provided value.
16698        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16699            mut self,
16700            field: T,
16701        ) -> Self {
16702            self.set_signature(field.into());
16703            self
16704        }
16705        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16706        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16707            self.bitmap.as_ref().map(|field| field as _)
16708        }
16709        ///Sets `bitmap` with the provided value.
16710        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16711            self.bitmap = Some(field.into().into());
16712        }
16713        ///Sets `bitmap` with the provided value.
16714        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16715            self.set_bitmap(field.into());
16716            self
16717        }
16718    }
16719    impl super::ValidatorCommittee {
16720        pub const fn const_default() -> Self {
16721            Self {
16722                epoch: None,
16723                members: Vec::new(),
16724            }
16725        }
16726        #[doc(hidden)]
16727        pub fn default_instance() -> &'static Self {
16728            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16729            &DEFAULT
16730        }
16731        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16732        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16733            self.epoch.as_mut().map(|field| field as _)
16734        }
16735        ///Returns a mutable reference to `epoch`.
16736        ///If the field is unset, it is first initialized with the default value.
16737        pub fn epoch_mut(&mut self) -> &mut u64 {
16738            self.epoch.get_or_insert_default()
16739        }
16740        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16741        pub fn epoch_opt(&self) -> Option<u64> {
16742            self.epoch.as_ref().map(|field| *field)
16743        }
16744        ///Sets `epoch` with the provided value.
16745        pub fn set_epoch(&mut self, field: u64) {
16746            self.epoch = Some(field);
16747        }
16748        ///Sets `epoch` with the provided value.
16749        pub fn with_epoch(mut self, field: u64) -> Self {
16750            self.set_epoch(field);
16751            self
16752        }
16753        ///Returns the value of `members`, or the default value if `members` is unset.
16754        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16755            &self.members
16756        }
16757        ///Returns a mutable reference to `members`.
16758        ///If the field is unset, it is first initialized with the default value.
16759        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16760            &mut self.members
16761        }
16762        ///Sets `members` with the provided value.
16763        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16764            self.members = field;
16765        }
16766        ///Sets `members` with the provided value.
16767        pub fn with_members(
16768            mut self,
16769            field: Vec<super::ValidatorCommitteeMember>,
16770        ) -> Self {
16771            self.set_members(field);
16772            self
16773        }
16774    }
16775    impl super::ValidatorCommitteeMember {
16776        pub const fn const_default() -> Self {
16777            Self {
16778                public_key: None,
16779                weight: None,
16780            }
16781        }
16782        #[doc(hidden)]
16783        pub fn default_instance() -> &'static Self {
16784            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16785            &DEFAULT
16786        }
16787        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16788        pub fn public_key_opt(&self) -> Option<&[u8]> {
16789            self.public_key.as_ref().map(|field| field as _)
16790        }
16791        ///Sets `public_key` with the provided value.
16792        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16793            self.public_key = Some(field.into().into());
16794        }
16795        ///Sets `public_key` with the provided value.
16796        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16797            mut self,
16798            field: T,
16799        ) -> Self {
16800            self.set_public_key(field.into());
16801            self
16802        }
16803        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16804        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16805            self.weight.as_mut().map(|field| field as _)
16806        }
16807        ///Returns a mutable reference to `weight`.
16808        ///If the field is unset, it is first initialized with the default value.
16809        pub fn weight_mut(&mut self) -> &mut u64 {
16810            self.weight.get_or_insert_default()
16811        }
16812        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16813        pub fn weight_opt(&self) -> Option<u64> {
16814            self.weight.as_ref().map(|field| *field)
16815        }
16816        ///Sets `weight` with the provided value.
16817        pub fn set_weight(&mut self, field: u64) {
16818            self.weight = Some(field);
16819        }
16820        ///Sets `weight` with the provided value.
16821        pub fn with_weight(mut self, field: u64) -> Self {
16822            self.set_weight(field);
16823            self
16824        }
16825    }
16826    impl super::ValidatorExecutionTimeObservation {
16827        pub const fn const_default() -> Self {
16828            Self {
16829                validator: None,
16830                duration: None,
16831            }
16832        }
16833        #[doc(hidden)]
16834        pub fn default_instance() -> &'static Self {
16835            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16836            &DEFAULT
16837        }
16838        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
16839        pub fn validator_opt(&self) -> Option<&[u8]> {
16840            self.validator.as_ref().map(|field| field as _)
16841        }
16842        ///Sets `validator` with the provided value.
16843        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16844            self.validator = Some(field.into().into());
16845        }
16846        ///Sets `validator` with the provided value.
16847        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16848            mut self,
16849            field: T,
16850        ) -> Self {
16851            self.set_validator(field.into());
16852            self
16853        }
16854        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16855        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16856            self.duration.as_mut().map(|field| field as _)
16857        }
16858        ///Returns a mutable reference to `duration`.
16859        ///If the field is unset, it is first initialized with the default value.
16860        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16861            self.duration.get_or_insert_default()
16862        }
16863        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16864        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16865            self.duration.as_ref().map(|field| field as _)
16866        }
16867        ///Sets `duration` with the provided value.
16868        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16869            self.duration = Some(field.into().into());
16870        }
16871        ///Sets `duration` with the provided value.
16872        pub fn with_duration<T: Into<::prost_types::Duration>>(
16873            mut self,
16874            field: T,
16875        ) -> Self {
16876            self.set_duration(field.into());
16877            self
16878        }
16879    }
16880    impl super::ValidatorReportRecord {
16881        pub const fn const_default() -> Self {
16882            Self {
16883                reported: None,
16884                reporters: Vec::new(),
16885            }
16886        }
16887        #[doc(hidden)]
16888        pub fn default_instance() -> &'static Self {
16889            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16890            &DEFAULT
16891        }
16892        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16893        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16894            self.reported.as_mut().map(|field| field as _)
16895        }
16896        ///Returns a mutable reference to `reported`.
16897        ///If the field is unset, it is first initialized with the default value.
16898        pub fn reported_mut(&mut self) -> &mut String {
16899            self.reported.get_or_insert_default()
16900        }
16901        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
16902        pub fn reported_opt(&self) -> Option<&str> {
16903            self.reported.as_ref().map(|field| field as _)
16904        }
16905        ///Sets `reported` with the provided value.
16906        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16907            self.reported = Some(field.into().into());
16908        }
16909        ///Sets `reported` with the provided value.
16910        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16911            self.set_reported(field.into());
16912            self
16913        }
16914        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
16915        pub fn reporters(&self) -> &[String] {
16916            &self.reporters
16917        }
16918        ///Returns a mutable reference to `reporters`.
16919        ///If the field is unset, it is first initialized with the default value.
16920        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16921            &mut self.reporters
16922        }
16923        ///Sets `reporters` with the provided value.
16924        pub fn set_reporters(&mut self, field: Vec<String>) {
16925            self.reporters = field;
16926        }
16927        ///Sets `reporters` with the provided value.
16928        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16929            self.set_reporters(field);
16930            self
16931        }
16932    }
16933    impl super::ValidatorSet {
16934        pub const fn const_default() -> Self {
16935            Self {
16936                total_stake: None,
16937                active_validators: Vec::new(),
16938                pending_active_validators: None,
16939                pending_removals: Vec::new(),
16940                staking_pool_mappings: None,
16941                inactive_validators: None,
16942                validator_candidates: None,
16943                at_risk_validators: std::collections::BTreeMap::new(),
16944                extra_fields: None,
16945            }
16946        }
16947        #[doc(hidden)]
16948        pub fn default_instance() -> &'static Self {
16949            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16950            &DEFAULT
16951        }
16952        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16953        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16954            self.total_stake.as_mut().map(|field| field as _)
16955        }
16956        ///Returns a mutable reference to `total_stake`.
16957        ///If the field is unset, it is first initialized with the default value.
16958        pub fn total_stake_mut(&mut self) -> &mut u64 {
16959            self.total_stake.get_or_insert_default()
16960        }
16961        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16962        pub fn total_stake_opt(&self) -> Option<u64> {
16963            self.total_stake.as_ref().map(|field| *field)
16964        }
16965        ///Sets `total_stake` with the provided value.
16966        pub fn set_total_stake(&mut self, field: u64) {
16967            self.total_stake = Some(field);
16968        }
16969        ///Sets `total_stake` with the provided value.
16970        pub fn with_total_stake(mut self, field: u64) -> Self {
16971            self.set_total_stake(field);
16972            self
16973        }
16974        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
16975        pub fn active_validators(&self) -> &[super::Validator] {
16976            &self.active_validators
16977        }
16978        ///Returns a mutable reference to `active_validators`.
16979        ///If the field is unset, it is first initialized with the default value.
16980        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16981            &mut self.active_validators
16982        }
16983        ///Sets `active_validators` with the provided value.
16984        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16985            self.active_validators = field;
16986        }
16987        ///Sets `active_validators` with the provided value.
16988        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16989            self.set_active_validators(field);
16990            self
16991        }
16992        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
16993        pub fn pending_active_validators(&self) -> &super::MoveTable {
16994            self.pending_active_validators
16995                .as_ref()
16996                .map(|field| field as _)
16997                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16998        }
16999        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17000        pub fn pending_active_validators_opt_mut(
17001            &mut self,
17002        ) -> Option<&mut super::MoveTable> {
17003            self.pending_active_validators.as_mut().map(|field| field as _)
17004        }
17005        ///Returns a mutable reference to `pending_active_validators`.
17006        ///If the field is unset, it is first initialized with the default value.
17007        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17008            self.pending_active_validators.get_or_insert_default()
17009        }
17010        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17011        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17012            self.pending_active_validators.as_ref().map(|field| field as _)
17013        }
17014        ///Sets `pending_active_validators` with the provided value.
17015        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17016            &mut self,
17017            field: T,
17018        ) {
17019            self.pending_active_validators = Some(field.into().into());
17020        }
17021        ///Sets `pending_active_validators` with the provided value.
17022        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17023            mut self,
17024            field: T,
17025        ) -> Self {
17026            self.set_pending_active_validators(field.into());
17027            self
17028        }
17029        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
17030        pub fn pending_removals(&self) -> &[u64] {
17031            &self.pending_removals
17032        }
17033        ///Returns a mutable reference to `pending_removals`.
17034        ///If the field is unset, it is first initialized with the default value.
17035        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17036            &mut self.pending_removals
17037        }
17038        ///Sets `pending_removals` with the provided value.
17039        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17040            self.pending_removals = field;
17041        }
17042        ///Sets `pending_removals` with the provided value.
17043        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17044            self.set_pending_removals(field);
17045            self
17046        }
17047        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
17048        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17049            self.staking_pool_mappings
17050                .as_ref()
17051                .map(|field| field as _)
17052                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17053        }
17054        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17055        pub fn staking_pool_mappings_opt_mut(
17056            &mut self,
17057        ) -> Option<&mut super::MoveTable> {
17058            self.staking_pool_mappings.as_mut().map(|field| field as _)
17059        }
17060        ///Returns a mutable reference to `staking_pool_mappings`.
17061        ///If the field is unset, it is first initialized with the default value.
17062        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17063            self.staking_pool_mappings.get_or_insert_default()
17064        }
17065        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
17066        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17067            self.staking_pool_mappings.as_ref().map(|field| field as _)
17068        }
17069        ///Sets `staking_pool_mappings` with the provided value.
17070        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17071            &mut self,
17072            field: T,
17073        ) {
17074            self.staking_pool_mappings = Some(field.into().into());
17075        }
17076        ///Sets `staking_pool_mappings` with the provided value.
17077        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17078            mut self,
17079            field: T,
17080        ) -> Self {
17081            self.set_staking_pool_mappings(field.into());
17082            self
17083        }
17084        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17085        pub fn inactive_validators(&self) -> &super::MoveTable {
17086            self.inactive_validators
17087                .as_ref()
17088                .map(|field| field as _)
17089                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17090        }
17091        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17092        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17093            self.inactive_validators.as_mut().map(|field| field as _)
17094        }
17095        ///Returns a mutable reference to `inactive_validators`.
17096        ///If the field is unset, it is first initialized with the default value.
17097        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17098            self.inactive_validators.get_or_insert_default()
17099        }
17100        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17101        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17102            self.inactive_validators.as_ref().map(|field| field as _)
17103        }
17104        ///Sets `inactive_validators` with the provided value.
17105        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17106            self.inactive_validators = Some(field.into().into());
17107        }
17108        ///Sets `inactive_validators` with the provided value.
17109        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17110            mut self,
17111            field: T,
17112        ) -> Self {
17113            self.set_inactive_validators(field.into());
17114            self
17115        }
17116        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17117        pub fn validator_candidates(&self) -> &super::MoveTable {
17118            self.validator_candidates
17119                .as_ref()
17120                .map(|field| field as _)
17121                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17122        }
17123        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17124        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17125            self.validator_candidates.as_mut().map(|field| field as _)
17126        }
17127        ///Returns a mutable reference to `validator_candidates`.
17128        ///If the field is unset, it is first initialized with the default value.
17129        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17130            self.validator_candidates.get_or_insert_default()
17131        }
17132        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17133        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17134            self.validator_candidates.as_ref().map(|field| field as _)
17135        }
17136        ///Sets `validator_candidates` with the provided value.
17137        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17138            self.validator_candidates = Some(field.into().into());
17139        }
17140        ///Sets `validator_candidates` with the provided value.
17141        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17142            mut self,
17143            field: T,
17144        ) -> Self {
17145            self.set_validator_candidates(field.into());
17146            self
17147        }
17148        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17149        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17150            &self.at_risk_validators
17151        }
17152        ///Returns a mutable reference to `at_risk_validators`.
17153        ///If the field is unset, it is first initialized with the default value.
17154        pub fn at_risk_validators_mut(
17155            &mut self,
17156        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17157            &mut self.at_risk_validators
17158        }
17159        ///Sets `at_risk_validators` with the provided value.
17160        pub fn set_at_risk_validators(
17161            &mut self,
17162            field: ::std::collections::BTreeMap<String, u64>,
17163        ) {
17164            self.at_risk_validators = field;
17165        }
17166        ///Sets `at_risk_validators` with the provided value.
17167        pub fn with_at_risk_validators(
17168            mut self,
17169            field: ::std::collections::BTreeMap<String, u64>,
17170        ) -> Self {
17171            self.set_at_risk_validators(field);
17172            self
17173        }
17174        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17175        pub fn extra_fields(&self) -> &super::MoveTable {
17176            self.extra_fields
17177                .as_ref()
17178                .map(|field| field as _)
17179                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17180        }
17181        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17182        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17183            self.extra_fields.as_mut().map(|field| field as _)
17184        }
17185        ///Returns a mutable reference to `extra_fields`.
17186        ///If the field is unset, it is first initialized with the default value.
17187        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17188            self.extra_fields.get_or_insert_default()
17189        }
17190        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17191        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17192            self.extra_fields.as_ref().map(|field| field as _)
17193        }
17194        ///Sets `extra_fields` with the provided value.
17195        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17196            self.extra_fields = Some(field.into().into());
17197        }
17198        ///Sets `extra_fields` with the provided value.
17199        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17200            self.set_extra_fields(field.into());
17201            self
17202        }
17203    }
17204    impl super::VariantDescriptor {
17205        pub const fn const_default() -> Self {
17206            Self {
17207                name: None,
17208                position: None,
17209                fields: Vec::new(),
17210            }
17211        }
17212        #[doc(hidden)]
17213        pub fn default_instance() -> &'static Self {
17214            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17215            &DEFAULT
17216        }
17217        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17218        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17219            self.name.as_mut().map(|field| field as _)
17220        }
17221        ///Returns a mutable reference to `name`.
17222        ///If the field is unset, it is first initialized with the default value.
17223        pub fn name_mut(&mut self) -> &mut String {
17224            self.name.get_or_insert_default()
17225        }
17226        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17227        pub fn name_opt(&self) -> Option<&str> {
17228            self.name.as_ref().map(|field| field as _)
17229        }
17230        ///Sets `name` with the provided value.
17231        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17232            self.name = Some(field.into().into());
17233        }
17234        ///Sets `name` with the provided value.
17235        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17236            self.set_name(field.into());
17237            self
17238        }
17239        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17240        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17241            self.position.as_mut().map(|field| field as _)
17242        }
17243        ///Returns a mutable reference to `position`.
17244        ///If the field is unset, it is first initialized with the default value.
17245        pub fn position_mut(&mut self) -> &mut u32 {
17246            self.position.get_or_insert_default()
17247        }
17248        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17249        pub fn position_opt(&self) -> Option<u32> {
17250            self.position.as_ref().map(|field| *field)
17251        }
17252        ///Sets `position` with the provided value.
17253        pub fn set_position(&mut self, field: u32) {
17254            self.position = Some(field);
17255        }
17256        ///Sets `position` with the provided value.
17257        pub fn with_position(mut self, field: u32) -> Self {
17258            self.set_position(field);
17259            self
17260        }
17261        ///Returns the value of `fields`, or the default value if `fields` is unset.
17262        pub fn fields(&self) -> &[super::FieldDescriptor] {
17263            &self.fields
17264        }
17265        ///Returns a mutable reference to `fields`.
17266        ///If the field is unset, it is first initialized with the default value.
17267        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17268            &mut self.fields
17269        }
17270        ///Sets `fields` with the provided value.
17271        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17272            self.fields = field;
17273        }
17274        ///Sets `fields` with the provided value.
17275        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17276            self.set_fields(field);
17277            self
17278        }
17279    }
17280    impl super::VerifySignatureRequest {
17281        pub const fn const_default() -> Self {
17282            Self {
17283                message: None,
17284                signature: None,
17285                address: None,
17286                jwks: Vec::new(),
17287            }
17288        }
17289        #[doc(hidden)]
17290        pub fn default_instance() -> &'static Self {
17291            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17292            &DEFAULT
17293        }
17294        ///Returns the value of `message`, or the default value if `message` is unset.
17295        pub fn message(&self) -> &super::Bcs {
17296            self.message
17297                .as_ref()
17298                .map(|field| field as _)
17299                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17300        }
17301        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17302        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17303            self.message.as_mut().map(|field| field as _)
17304        }
17305        ///Returns a mutable reference to `message`.
17306        ///If the field is unset, it is first initialized with the default value.
17307        pub fn message_mut(&mut self) -> &mut super::Bcs {
17308            self.message.get_or_insert_default()
17309        }
17310        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17311        pub fn message_opt(&self) -> Option<&super::Bcs> {
17312            self.message.as_ref().map(|field| field as _)
17313        }
17314        ///Sets `message` with the provided value.
17315        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17316            self.message = Some(field.into().into());
17317        }
17318        ///Sets `message` with the provided value.
17319        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17320            self.set_message(field.into());
17321            self
17322        }
17323        ///Returns the value of `signature`, or the default value if `signature` is unset.
17324        pub fn signature(&self) -> &super::UserSignature {
17325            self.signature
17326                .as_ref()
17327                .map(|field| field as _)
17328                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17329        }
17330        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17331        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17332            self.signature.as_mut().map(|field| field as _)
17333        }
17334        ///Returns a mutable reference to `signature`.
17335        ///If the field is unset, it is first initialized with the default value.
17336        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17337            self.signature.get_or_insert_default()
17338        }
17339        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17340        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17341            self.signature.as_ref().map(|field| field as _)
17342        }
17343        ///Sets `signature` with the provided value.
17344        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17345            self.signature = Some(field.into().into());
17346        }
17347        ///Sets `signature` with the provided value.
17348        pub fn with_signature<T: Into<super::UserSignature>>(
17349            mut self,
17350            field: T,
17351        ) -> Self {
17352            self.set_signature(field.into());
17353            self
17354        }
17355        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17356        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17357            self.address.as_mut().map(|field| field as _)
17358        }
17359        ///Returns a mutable reference to `address`.
17360        ///If the field is unset, it is first initialized with the default value.
17361        pub fn address_mut(&mut self) -> &mut String {
17362            self.address.get_or_insert_default()
17363        }
17364        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17365        pub fn address_opt(&self) -> Option<&str> {
17366            self.address.as_ref().map(|field| field as _)
17367        }
17368        ///Sets `address` with the provided value.
17369        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17370            self.address = Some(field.into().into());
17371        }
17372        ///Sets `address` with the provided value.
17373        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17374            self.set_address(field.into());
17375            self
17376        }
17377        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17378        pub fn jwks(&self) -> &[super::ActiveJwk] {
17379            &self.jwks
17380        }
17381        ///Returns a mutable reference to `jwks`.
17382        ///If the field is unset, it is first initialized with the default value.
17383        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17384            &mut self.jwks
17385        }
17386        ///Sets `jwks` with the provided value.
17387        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17388            self.jwks = field;
17389        }
17390        ///Sets `jwks` with the provided value.
17391        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17392            self.set_jwks(field);
17393            self
17394        }
17395    }
17396    impl super::VerifySignatureResponse {
17397        pub const fn const_default() -> Self {
17398            Self {
17399                is_valid: None,
17400                reason: None,
17401            }
17402        }
17403        #[doc(hidden)]
17404        pub fn default_instance() -> &'static Self {
17405            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17406            &DEFAULT
17407        }
17408        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17409        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17410            self.is_valid.as_mut().map(|field| field as _)
17411        }
17412        ///Returns a mutable reference to `is_valid`.
17413        ///If the field is unset, it is first initialized with the default value.
17414        pub fn is_valid_mut(&mut self) -> &mut bool {
17415            self.is_valid.get_or_insert_default()
17416        }
17417        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17418        pub fn is_valid_opt(&self) -> Option<bool> {
17419            self.is_valid.as_ref().map(|field| *field)
17420        }
17421        ///Sets `is_valid` with the provided value.
17422        pub fn set_is_valid(&mut self, field: bool) {
17423            self.is_valid = Some(field);
17424        }
17425        ///Sets `is_valid` with the provided value.
17426        pub fn with_is_valid(mut self, field: bool) -> Self {
17427            self.set_is_valid(field);
17428            self
17429        }
17430        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17431        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17432            self.reason.as_mut().map(|field| field as _)
17433        }
17434        ///Returns a mutable reference to `reason`.
17435        ///If the field is unset, it is first initialized with the default value.
17436        pub fn reason_mut(&mut self) -> &mut String {
17437            self.reason.get_or_insert_default()
17438        }
17439        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17440        pub fn reason_opt(&self) -> Option<&str> {
17441            self.reason.as_ref().map(|field| field as _)
17442        }
17443        ///Sets `reason` with the provided value.
17444        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17445            self.reason = Some(field.into().into());
17446        }
17447        ///Sets `reason` with the provided value.
17448        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17449            self.set_reason(field.into());
17450            self
17451        }
17452    }
17453    impl super::VersionAssignment {
17454        pub const fn const_default() -> Self {
17455            Self {
17456                object_id: None,
17457                start_version: None,
17458                version: None,
17459            }
17460        }
17461        #[doc(hidden)]
17462        pub fn default_instance() -> &'static Self {
17463            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17464            &DEFAULT
17465        }
17466        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17467        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17468            self.object_id.as_mut().map(|field| field as _)
17469        }
17470        ///Returns a mutable reference to `object_id`.
17471        ///If the field is unset, it is first initialized with the default value.
17472        pub fn object_id_mut(&mut self) -> &mut String {
17473            self.object_id.get_or_insert_default()
17474        }
17475        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17476        pub fn object_id_opt(&self) -> Option<&str> {
17477            self.object_id.as_ref().map(|field| field as _)
17478        }
17479        ///Sets `object_id` with the provided value.
17480        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17481            self.object_id = Some(field.into().into());
17482        }
17483        ///Sets `object_id` with the provided value.
17484        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17485            self.set_object_id(field.into());
17486            self
17487        }
17488        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17489        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17490            self.start_version.as_mut().map(|field| field as _)
17491        }
17492        ///Returns a mutable reference to `start_version`.
17493        ///If the field is unset, it is first initialized with the default value.
17494        pub fn start_version_mut(&mut self) -> &mut u64 {
17495            self.start_version.get_or_insert_default()
17496        }
17497        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17498        pub fn start_version_opt(&self) -> Option<u64> {
17499            self.start_version.as_ref().map(|field| *field)
17500        }
17501        ///Sets `start_version` with the provided value.
17502        pub fn set_start_version(&mut self, field: u64) {
17503            self.start_version = Some(field);
17504        }
17505        ///Sets `start_version` with the provided value.
17506        pub fn with_start_version(mut self, field: u64) -> Self {
17507            self.set_start_version(field);
17508            self
17509        }
17510        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17511        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17512            self.version.as_mut().map(|field| field as _)
17513        }
17514        ///Returns a mutable reference to `version`.
17515        ///If the field is unset, it is first initialized with the default value.
17516        pub fn version_mut(&mut self) -> &mut u64 {
17517            self.version.get_or_insert_default()
17518        }
17519        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17520        pub fn version_opt(&self) -> Option<u64> {
17521            self.version.as_ref().map(|field| *field)
17522        }
17523        ///Sets `version` with the provided value.
17524        pub fn set_version(&mut self, field: u64) {
17525            self.version = Some(field);
17526        }
17527        ///Sets `version` with the provided value.
17528        pub fn with_version(mut self, field: u64) -> Self {
17529            self.set_version(field);
17530            self
17531        }
17532    }
17533    impl super::ZkLoginAuthenticator {
17534        pub const fn const_default() -> Self {
17535            Self {
17536                inputs: None,
17537                max_epoch: None,
17538                signature: None,
17539                public_identifier: None,
17540                jwk_id: None,
17541            }
17542        }
17543        #[doc(hidden)]
17544        pub fn default_instance() -> &'static Self {
17545            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17546            &DEFAULT
17547        }
17548        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17549        pub fn inputs(&self) -> &super::ZkLoginInputs {
17550            self.inputs
17551                .as_ref()
17552                .map(|field| field as _)
17553                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17554        }
17555        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17556        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17557            self.inputs.as_mut().map(|field| field as _)
17558        }
17559        ///Returns a mutable reference to `inputs`.
17560        ///If the field is unset, it is first initialized with the default value.
17561        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17562            self.inputs.get_or_insert_default()
17563        }
17564        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17565        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17566            self.inputs.as_ref().map(|field| field as _)
17567        }
17568        ///Sets `inputs` with the provided value.
17569        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17570            self.inputs = Some(field.into().into());
17571        }
17572        ///Sets `inputs` with the provided value.
17573        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17574            self.set_inputs(field.into());
17575            self
17576        }
17577        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17578        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17579            self.max_epoch.as_mut().map(|field| field as _)
17580        }
17581        ///Returns a mutable reference to `max_epoch`.
17582        ///If the field is unset, it is first initialized with the default value.
17583        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17584            self.max_epoch.get_or_insert_default()
17585        }
17586        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17587        pub fn max_epoch_opt(&self) -> Option<u64> {
17588            self.max_epoch.as_ref().map(|field| *field)
17589        }
17590        ///Sets `max_epoch` with the provided value.
17591        pub fn set_max_epoch(&mut self, field: u64) {
17592            self.max_epoch = Some(field);
17593        }
17594        ///Sets `max_epoch` with the provided value.
17595        pub fn with_max_epoch(mut self, field: u64) -> Self {
17596            self.set_max_epoch(field);
17597            self
17598        }
17599        ///Returns the value of `signature`, or the default value if `signature` is unset.
17600        pub fn signature(&self) -> &super::SimpleSignature {
17601            self.signature
17602                .as_ref()
17603                .map(|field| field as _)
17604                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17605        }
17606        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17607        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17608            self.signature.as_mut().map(|field| field as _)
17609        }
17610        ///Returns a mutable reference to `signature`.
17611        ///If the field is unset, it is first initialized with the default value.
17612        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17613            self.signature.get_or_insert_default()
17614        }
17615        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17616        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17617            self.signature.as_ref().map(|field| field as _)
17618        }
17619        ///Sets `signature` with the provided value.
17620        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17621            self.signature = Some(field.into().into());
17622        }
17623        ///Sets `signature` with the provided value.
17624        pub fn with_signature<T: Into<super::SimpleSignature>>(
17625            mut self,
17626            field: T,
17627        ) -> Self {
17628            self.set_signature(field.into());
17629            self
17630        }
17631        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17632        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17633            self.public_identifier
17634                .as_ref()
17635                .map(|field| field as _)
17636                .unwrap_or_else(|| {
17637                    super::ZkLoginPublicIdentifier::default_instance() as _
17638                })
17639        }
17640        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17641        pub fn public_identifier_opt_mut(
17642            &mut self,
17643        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17644            self.public_identifier.as_mut().map(|field| field as _)
17645        }
17646        ///Returns a mutable reference to `public_identifier`.
17647        ///If the field is unset, it is first initialized with the default value.
17648        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17649            self.public_identifier.get_or_insert_default()
17650        }
17651        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17652        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17653            self.public_identifier.as_ref().map(|field| field as _)
17654        }
17655        ///Sets `public_identifier` with the provided value.
17656        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17657            &mut self,
17658            field: T,
17659        ) {
17660            self.public_identifier = Some(field.into().into());
17661        }
17662        ///Sets `public_identifier` with the provided value.
17663        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17664            mut self,
17665            field: T,
17666        ) -> Self {
17667            self.set_public_identifier(field.into());
17668            self
17669        }
17670        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17671        pub fn jwk_id(&self) -> &super::JwkId {
17672            self.jwk_id
17673                .as_ref()
17674                .map(|field| field as _)
17675                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17676        }
17677        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17678        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17679            self.jwk_id.as_mut().map(|field| field as _)
17680        }
17681        ///Returns a mutable reference to `jwk_id`.
17682        ///If the field is unset, it is first initialized with the default value.
17683        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17684            self.jwk_id.get_or_insert_default()
17685        }
17686        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17687        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17688            self.jwk_id.as_ref().map(|field| field as _)
17689        }
17690        ///Sets `jwk_id` with the provided value.
17691        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17692            self.jwk_id = Some(field.into().into());
17693        }
17694        ///Sets `jwk_id` with the provided value.
17695        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17696            self.set_jwk_id(field.into());
17697            self
17698        }
17699    }
17700    impl super::ZkLoginClaim {
17701        pub const fn const_default() -> Self {
17702            Self {
17703                value: None,
17704                index_mod_4: None,
17705            }
17706        }
17707        #[doc(hidden)]
17708        pub fn default_instance() -> &'static Self {
17709            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17710            &DEFAULT
17711        }
17712        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17713        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17714            self.value.as_mut().map(|field| field as _)
17715        }
17716        ///Returns a mutable reference to `value`.
17717        ///If the field is unset, it is first initialized with the default value.
17718        pub fn value_mut(&mut self) -> &mut String {
17719            self.value.get_or_insert_default()
17720        }
17721        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17722        pub fn value_opt(&self) -> Option<&str> {
17723            self.value.as_ref().map(|field| field as _)
17724        }
17725        ///Sets `value` with the provided value.
17726        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17727            self.value = Some(field.into().into());
17728        }
17729        ///Sets `value` with the provided value.
17730        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17731            self.set_value(field.into());
17732            self
17733        }
17734        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17735        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17736            self.index_mod_4.as_mut().map(|field| field as _)
17737        }
17738        ///Returns a mutable reference to `index_mod_4`.
17739        ///If the field is unset, it is first initialized with the default value.
17740        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17741            self.index_mod_4.get_or_insert_default()
17742        }
17743        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17744        pub fn index_mod_4_opt(&self) -> Option<u32> {
17745            self.index_mod_4.as_ref().map(|field| *field)
17746        }
17747        ///Sets `index_mod_4` with the provided value.
17748        pub fn set_index_mod_4(&mut self, field: u32) {
17749            self.index_mod_4 = Some(field);
17750        }
17751        ///Sets `index_mod_4` with the provided value.
17752        pub fn with_index_mod_4(mut self, field: u32) -> Self {
17753            self.set_index_mod_4(field);
17754            self
17755        }
17756    }
17757    impl super::ZkLoginInputs {
17758        pub const fn const_default() -> Self {
17759            Self {
17760                proof_points: None,
17761                iss_base64_details: None,
17762                header_base64: None,
17763                address_seed: None,
17764            }
17765        }
17766        #[doc(hidden)]
17767        pub fn default_instance() -> &'static Self {
17768            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17769            &DEFAULT
17770        }
17771        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17772        pub fn proof_points(&self) -> &super::ZkLoginProof {
17773            self.proof_points
17774                .as_ref()
17775                .map(|field| field as _)
17776                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17777        }
17778        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17779        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17780            self.proof_points.as_mut().map(|field| field as _)
17781        }
17782        ///Returns a mutable reference to `proof_points`.
17783        ///If the field is unset, it is first initialized with the default value.
17784        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17785            self.proof_points.get_or_insert_default()
17786        }
17787        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17788        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17789            self.proof_points.as_ref().map(|field| field as _)
17790        }
17791        ///Sets `proof_points` with the provided value.
17792        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17793            self.proof_points = Some(field.into().into());
17794        }
17795        ///Sets `proof_points` with the provided value.
17796        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17797            mut self,
17798            field: T,
17799        ) -> Self {
17800            self.set_proof_points(field.into());
17801            self
17802        }
17803        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17804        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17805            self.iss_base64_details
17806                .as_ref()
17807                .map(|field| field as _)
17808                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17809        }
17810        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17811        pub fn iss_base64_details_opt_mut(
17812            &mut self,
17813        ) -> Option<&mut super::ZkLoginClaim> {
17814            self.iss_base64_details.as_mut().map(|field| field as _)
17815        }
17816        ///Returns a mutable reference to `iss_base64_details`.
17817        ///If the field is unset, it is first initialized with the default value.
17818        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17819            self.iss_base64_details.get_or_insert_default()
17820        }
17821        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17822        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17823            self.iss_base64_details.as_ref().map(|field| field as _)
17824        }
17825        ///Sets `iss_base64_details` with the provided value.
17826        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17827            &mut self,
17828            field: T,
17829        ) {
17830            self.iss_base64_details = Some(field.into().into());
17831        }
17832        ///Sets `iss_base64_details` with the provided value.
17833        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17834            mut self,
17835            field: T,
17836        ) -> Self {
17837            self.set_iss_base64_details(field.into());
17838            self
17839        }
17840        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17841        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17842            self.header_base64.as_mut().map(|field| field as _)
17843        }
17844        ///Returns a mutable reference to `header_base64`.
17845        ///If the field is unset, it is first initialized with the default value.
17846        pub fn header_base64_mut(&mut self) -> &mut String {
17847            self.header_base64.get_or_insert_default()
17848        }
17849        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
17850        pub fn header_base64_opt(&self) -> Option<&str> {
17851            self.header_base64.as_ref().map(|field| field as _)
17852        }
17853        ///Sets `header_base64` with the provided value.
17854        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17855            self.header_base64 = Some(field.into().into());
17856        }
17857        ///Sets `header_base64` with the provided value.
17858        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17859            self.set_header_base64(field.into());
17860            self
17861        }
17862        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17863        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17864            self.address_seed.as_mut().map(|field| field as _)
17865        }
17866        ///Returns a mutable reference to `address_seed`.
17867        ///If the field is unset, it is first initialized with the default value.
17868        pub fn address_seed_mut(&mut self) -> &mut String {
17869            self.address_seed.get_or_insert_default()
17870        }
17871        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17872        pub fn address_seed_opt(&self) -> Option<&str> {
17873            self.address_seed.as_ref().map(|field| field as _)
17874        }
17875        ///Sets `address_seed` with the provided value.
17876        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17877            self.address_seed = Some(field.into().into());
17878        }
17879        ///Sets `address_seed` with the provided value.
17880        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17881            self.set_address_seed(field.into());
17882            self
17883        }
17884    }
17885    impl super::ZkLoginProof {
17886        pub const fn const_default() -> Self {
17887            Self { a: None, b: None, c: None }
17888        }
17889        #[doc(hidden)]
17890        pub fn default_instance() -> &'static Self {
17891            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17892            &DEFAULT
17893        }
17894        ///Returns the value of `a`, or the default value if `a` is unset.
17895        pub fn a(&self) -> &super::CircomG1 {
17896            self.a
17897                .as_ref()
17898                .map(|field| field as _)
17899                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17900        }
17901        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17902        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17903            self.a.as_mut().map(|field| field as _)
17904        }
17905        ///Returns a mutable reference to `a`.
17906        ///If the field is unset, it is first initialized with the default value.
17907        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17908            self.a.get_or_insert_default()
17909        }
17910        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
17911        pub fn a_opt(&self) -> Option<&super::CircomG1> {
17912            self.a.as_ref().map(|field| field as _)
17913        }
17914        ///Sets `a` with the provided value.
17915        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17916            self.a = Some(field.into().into());
17917        }
17918        ///Sets `a` with the provided value.
17919        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17920            self.set_a(field.into());
17921            self
17922        }
17923        ///Returns the value of `b`, or the default value if `b` is unset.
17924        pub fn b(&self) -> &super::CircomG2 {
17925            self.b
17926                .as_ref()
17927                .map(|field| field as _)
17928                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17929        }
17930        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17931        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17932            self.b.as_mut().map(|field| field as _)
17933        }
17934        ///Returns a mutable reference to `b`.
17935        ///If the field is unset, it is first initialized with the default value.
17936        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17937            self.b.get_or_insert_default()
17938        }
17939        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
17940        pub fn b_opt(&self) -> Option<&super::CircomG2> {
17941            self.b.as_ref().map(|field| field as _)
17942        }
17943        ///Sets `b` with the provided value.
17944        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17945            self.b = Some(field.into().into());
17946        }
17947        ///Sets `b` with the provided value.
17948        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17949            self.set_b(field.into());
17950            self
17951        }
17952        ///Returns the value of `c`, or the default value if `c` is unset.
17953        pub fn c(&self) -> &super::CircomG1 {
17954            self.c
17955                .as_ref()
17956                .map(|field| field as _)
17957                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17958        }
17959        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17960        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17961            self.c.as_mut().map(|field| field as _)
17962        }
17963        ///Returns a mutable reference to `c`.
17964        ///If the field is unset, it is first initialized with the default value.
17965        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17966            self.c.get_or_insert_default()
17967        }
17968        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
17969        pub fn c_opt(&self) -> Option<&super::CircomG1> {
17970            self.c.as_ref().map(|field| field as _)
17971        }
17972        ///Sets `c` with the provided value.
17973        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17974            self.c = Some(field.into().into());
17975        }
17976        ///Sets `c` with the provided value.
17977        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17978            self.set_c(field.into());
17979            self
17980        }
17981    }
17982    impl super::ZkLoginPublicIdentifier {
17983        pub const fn const_default() -> Self {
17984            Self {
17985                iss: None,
17986                address_seed: None,
17987            }
17988        }
17989        #[doc(hidden)]
17990        pub fn default_instance() -> &'static Self {
17991            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17992            &DEFAULT
17993        }
17994        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17995        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17996            self.iss.as_mut().map(|field| field as _)
17997        }
17998        ///Returns a mutable reference to `iss`.
17999        ///If the field is unset, it is first initialized with the default value.
18000        pub fn iss_mut(&mut self) -> &mut String {
18001            self.iss.get_or_insert_default()
18002        }
18003        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
18004        pub fn iss_opt(&self) -> Option<&str> {
18005            self.iss.as_ref().map(|field| field as _)
18006        }
18007        ///Sets `iss` with the provided value.
18008        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18009            self.iss = Some(field.into().into());
18010        }
18011        ///Sets `iss` with the provided value.
18012        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18013            self.set_iss(field.into());
18014            self
18015        }
18016        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18017        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18018            self.address_seed.as_mut().map(|field| field as _)
18019        }
18020        ///Returns a mutable reference to `address_seed`.
18021        ///If the field is unset, it is first initialized with the default value.
18022        pub fn address_seed_mut(&mut self) -> &mut String {
18023            self.address_seed.get_or_insert_default()
18024        }
18025        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18026        pub fn address_seed_opt(&self) -> Option<&str> {
18027            self.address_seed.as_ref().map(|field| field as _)
18028        }
18029        ///Sets `address_seed` with the provided value.
18030        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18031            self.address_seed = Some(field.into().into());
18032        }
18033        ///Sets `address_seed` with the provided value.
18034        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18035            self.set_address_seed(field.into());
18036            self
18037        }
18038    }
18039}