Skip to main content

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_kind: None,
10                integer_value: None,
11                integer_tuple: Vec::new(),
12                event_digest_value: Vec::new(),
13            }
14        }
15        #[doc(hidden)]
16        pub fn default_instance() -> &'static Self {
17            static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
18            &DEFAULT
19        }
20        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
22            self.address.as_mut().map(|field| field as _)
23        }
24        ///Returns a mutable reference to `address`.
25        ///If the field is unset, it is first initialized with the default value.
26        pub fn address_mut(&mut self) -> &mut String {
27            self.address.get_or_insert_default()
28        }
29        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
30        pub fn address_opt(&self) -> Option<&str> {
31            self.address.as_ref().map(|field| field as _)
32        }
33        ///Sets `address` with the provided value.
34        pub fn set_address<T: Into<String>>(&mut self, field: T) {
35            self.address = Some(field.into().into());
36        }
37        ///Sets `address` with the provided value.
38        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
39            self.set_address(field.into());
40            self
41        }
42        ///If `accumulator_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
43        pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
44            self.accumulator_type.as_mut().map(|field| field as _)
45        }
46        ///Returns a mutable reference to `accumulator_type`.
47        ///If the field is unset, it is first initialized with the default value.
48        pub fn accumulator_type_mut(&mut self) -> &mut String {
49            self.accumulator_type.get_or_insert_default()
50        }
51        ///If `accumulator_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
52        pub fn accumulator_type_opt(&self) -> Option<&str> {
53            self.accumulator_type.as_ref().map(|field| field as _)
54        }
55        ///Sets `accumulator_type` with the provided value.
56        pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
57            self.accumulator_type = Some(field.into().into());
58        }
59        ///Sets `accumulator_type` with the provided value.
60        pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
61            self.set_accumulator_type(field.into());
62            self
63        }
64        ///Sets `operation` with the provided value.
65        pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
66            mut self,
67            field: T,
68        ) -> Self {
69            self.set_operation(field.into());
70            self
71        }
72        ///Sets `value_kind` with the provided value.
73        pub fn with_value_kind<T: Into<super::accumulator_write::AccumulatorValue>>(
74            mut self,
75            field: T,
76        ) -> Self {
77            self.set_value_kind(field.into());
78            self
79        }
80        ///If `integer_value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
81        pub fn integer_value_opt_mut(&mut self) -> Option<&mut u64> {
82            self.integer_value.as_mut().map(|field| field as _)
83        }
84        ///Returns a mutable reference to `integer_value`.
85        ///If the field is unset, it is first initialized with the default value.
86        pub fn integer_value_mut(&mut self) -> &mut u64 {
87            self.integer_value.get_or_insert_default()
88        }
89        ///If `integer_value` is set, returns [`Some`] with the value; otherwise returns [`None`].
90        pub fn integer_value_opt(&self) -> Option<u64> {
91            self.integer_value.as_ref().map(|field| *field)
92        }
93        ///Sets `integer_value` with the provided value.
94        pub fn set_integer_value(&mut self, field: u64) {
95            self.integer_value = Some(field);
96        }
97        ///Sets `integer_value` with the provided value.
98        pub fn with_integer_value(mut self, field: u64) -> Self {
99            self.set_integer_value(field);
100            self
101        }
102        ///Returns the value of `integer_tuple`, or the default value if `integer_tuple` is unset.
103        pub fn integer_tuple(&self) -> &[u64] {
104            &self.integer_tuple
105        }
106        ///Returns a mutable reference to `integer_tuple`.
107        ///If the field is unset, it is first initialized with the default value.
108        pub fn integer_tuple_mut(&mut self) -> &mut Vec<u64> {
109            &mut self.integer_tuple
110        }
111        ///Sets `integer_tuple` with the provided value.
112        pub fn set_integer_tuple(&mut self, field: Vec<u64>) {
113            self.integer_tuple = field;
114        }
115        ///Sets `integer_tuple` with the provided value.
116        pub fn with_integer_tuple(mut self, field: Vec<u64>) -> Self {
117            self.set_integer_tuple(field);
118            self
119        }
120        ///Returns the value of `event_digest_value`, or the default value if `event_digest_value` is unset.
121        pub fn event_digest_value(&self) -> &[super::EventDigestEntry] {
122            &self.event_digest_value
123        }
124        ///Returns a mutable reference to `event_digest_value`.
125        ///If the field is unset, it is first initialized with the default value.
126        pub fn event_digest_value_mut(&mut self) -> &mut Vec<super::EventDigestEntry> {
127            &mut self.event_digest_value
128        }
129        ///Sets `event_digest_value` with the provided value.
130        pub fn set_event_digest_value(&mut self, field: Vec<super::EventDigestEntry>) {
131            self.event_digest_value = field;
132        }
133        ///Sets `event_digest_value` with the provided value.
134        pub fn with_event_digest_value(
135            mut self,
136            field: Vec<super::EventDigestEntry>,
137        ) -> Self {
138            self.set_event_digest_value(field);
139            self
140        }
141    }
142    impl super::ActiveJwk {
143        pub const fn const_default() -> Self {
144            Self {
145                id: None,
146                jwk: None,
147                epoch: None,
148            }
149        }
150        #[doc(hidden)]
151        pub fn default_instance() -> &'static Self {
152            static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
153            &DEFAULT
154        }
155        ///Returns the value of `id`, or the default value if `id` is unset.
156        pub fn id(&self) -> &super::JwkId {
157            self.id
158                .as_ref()
159                .map(|field| field as _)
160                .unwrap_or_else(|| super::JwkId::default_instance() as _)
161        }
162        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
163        pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
164            self.id.as_mut().map(|field| field as _)
165        }
166        ///Returns a mutable reference to `id`.
167        ///If the field is unset, it is first initialized with the default value.
168        pub fn id_mut(&mut self) -> &mut super::JwkId {
169            self.id.get_or_insert_default()
170        }
171        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
172        pub fn id_opt(&self) -> Option<&super::JwkId> {
173            self.id.as_ref().map(|field| field as _)
174        }
175        ///Sets `id` with the provided value.
176        pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
177            self.id = Some(field.into().into());
178        }
179        ///Sets `id` with the provided value.
180        pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
181            self.set_id(field.into());
182            self
183        }
184        ///Returns the value of `jwk`, or the default value if `jwk` is unset.
185        pub fn jwk(&self) -> &super::Jwk {
186            self.jwk
187                .as_ref()
188                .map(|field| field as _)
189                .unwrap_or_else(|| super::Jwk::default_instance() as _)
190        }
191        ///If `jwk` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
192        pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
193            self.jwk.as_mut().map(|field| field as _)
194        }
195        ///Returns a mutable reference to `jwk`.
196        ///If the field is unset, it is first initialized with the default value.
197        pub fn jwk_mut(&mut self) -> &mut super::Jwk {
198            self.jwk.get_or_insert_default()
199        }
200        ///If `jwk` is set, returns [`Some`] with the value; otherwise returns [`None`].
201        pub fn jwk_opt(&self) -> Option<&super::Jwk> {
202            self.jwk.as_ref().map(|field| field as _)
203        }
204        ///Sets `jwk` with the provided value.
205        pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
206            self.jwk = Some(field.into().into());
207        }
208        ///Sets `jwk` with the provided value.
209        pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
210            self.set_jwk(field.into());
211            self
212        }
213        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
214        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
215            self.epoch.as_mut().map(|field| field as _)
216        }
217        ///Returns a mutable reference to `epoch`.
218        ///If the field is unset, it is first initialized with the default value.
219        pub fn epoch_mut(&mut self) -> &mut u64 {
220            self.epoch.get_or_insert_default()
221        }
222        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
223        pub fn epoch_opt(&self) -> Option<u64> {
224            self.epoch.as_ref().map(|field| *field)
225        }
226        ///Sets `epoch` with the provided value.
227        pub fn set_epoch(&mut self, field: u64) {
228            self.epoch = Some(field);
229        }
230        ///Sets `epoch` with the provided value.
231        pub fn with_epoch(mut self, field: u64) -> Self {
232            self.set_epoch(field);
233            self
234        }
235    }
236    impl super::AddressAliasesVersion {
237        pub const fn const_default() -> Self {
238            Self { version: None }
239        }
240        #[doc(hidden)]
241        pub fn default_instance() -> &'static Self {
242            static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
243            &DEFAULT
244        }
245        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
246        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
247            self.version.as_mut().map(|field| field as _)
248        }
249        ///Returns a mutable reference to `version`.
250        ///If the field is unset, it is first initialized with the default value.
251        pub fn version_mut(&mut self) -> &mut u64 {
252            self.version.get_or_insert_default()
253        }
254        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
255        pub fn version_opt(&self) -> Option<u64> {
256            self.version.as_ref().map(|field| *field)
257        }
258        ///Sets `version` with the provided value.
259        pub fn set_version(&mut self, field: u64) {
260            self.version = Some(field);
261        }
262        ///Sets `version` with the provided value.
263        pub fn with_version(mut self, field: u64) -> Self {
264            self.set_version(field);
265            self
266        }
267    }
268    impl super::Argument {
269        pub const fn const_default() -> Self {
270            Self {
271                kind: None,
272                input: None,
273                result: None,
274                subresult: None,
275            }
276        }
277        #[doc(hidden)]
278        pub fn default_instance() -> &'static Self {
279            static DEFAULT: super::Argument = super::Argument::const_default();
280            &DEFAULT
281        }
282        ///Sets `kind` with the provided value.
283        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
284            mut self,
285            field: T,
286        ) -> Self {
287            self.set_kind(field.into());
288            self
289        }
290        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
291        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
292            self.input.as_mut().map(|field| field as _)
293        }
294        ///Returns a mutable reference to `input`.
295        ///If the field is unset, it is first initialized with the default value.
296        pub fn input_mut(&mut self) -> &mut u32 {
297            self.input.get_or_insert_default()
298        }
299        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
300        pub fn input_opt(&self) -> Option<u32> {
301            self.input.as_ref().map(|field| *field)
302        }
303        ///Sets `input` with the provided value.
304        pub fn set_input(&mut self, field: u32) {
305            self.input = Some(field);
306        }
307        ///Sets `input` with the provided value.
308        pub fn with_input(mut self, field: u32) -> Self {
309            self.set_input(field);
310            self
311        }
312        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
313        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
314            self.result.as_mut().map(|field| field as _)
315        }
316        ///Returns a mutable reference to `result`.
317        ///If the field is unset, it is first initialized with the default value.
318        pub fn result_mut(&mut self) -> &mut u32 {
319            self.result.get_or_insert_default()
320        }
321        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
322        pub fn result_opt(&self) -> Option<u32> {
323            self.result.as_ref().map(|field| *field)
324        }
325        ///Sets `result` with the provided value.
326        pub fn set_result(&mut self, field: u32) {
327            self.result = Some(field);
328        }
329        ///Sets `result` with the provided value.
330        pub fn with_result(mut self, field: u32) -> Self {
331            self.set_result(field);
332            self
333        }
334        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
335        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
336            self.subresult.as_mut().map(|field| field as _)
337        }
338        ///Returns a mutable reference to `subresult`.
339        ///If the field is unset, it is first initialized with the default value.
340        pub fn subresult_mut(&mut self) -> &mut u32 {
341            self.subresult.get_or_insert_default()
342        }
343        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
344        pub fn subresult_opt(&self) -> Option<u32> {
345            self.subresult.as_ref().map(|field| *field)
346        }
347        ///Sets `subresult` with the provided value.
348        pub fn set_subresult(&mut self, field: u32) {
349            self.subresult = Some(field);
350        }
351        ///Sets `subresult` with the provided value.
352        pub fn with_subresult(mut self, field: u32) -> Self {
353            self.set_subresult(field);
354            self
355        }
356    }
357    impl super::AuthenticatorStateExpire {
358        pub const fn const_default() -> Self {
359            Self {
360                min_epoch: None,
361                authenticator_object_initial_shared_version: None,
362            }
363        }
364        #[doc(hidden)]
365        pub fn default_instance() -> &'static Self {
366            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
367            &DEFAULT
368        }
369        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
370        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
371            self.min_epoch.as_mut().map(|field| field as _)
372        }
373        ///Returns a mutable reference to `min_epoch`.
374        ///If the field is unset, it is first initialized with the default value.
375        pub fn min_epoch_mut(&mut self) -> &mut u64 {
376            self.min_epoch.get_or_insert_default()
377        }
378        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
379        pub fn min_epoch_opt(&self) -> Option<u64> {
380            self.min_epoch.as_ref().map(|field| *field)
381        }
382        ///Sets `min_epoch` with the provided value.
383        pub fn set_min_epoch(&mut self, field: u64) {
384            self.min_epoch = Some(field);
385        }
386        ///Sets `min_epoch` with the provided value.
387        pub fn with_min_epoch(mut self, field: u64) -> Self {
388            self.set_min_epoch(field);
389            self
390        }
391        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
392        pub fn authenticator_object_initial_shared_version_opt_mut(
393            &mut self,
394        ) -> Option<&mut u64> {
395            self.authenticator_object_initial_shared_version
396                .as_mut()
397                .map(|field| field as _)
398        }
399        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
400        ///If the field is unset, it is first initialized with the default value.
401        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
402            self.authenticator_object_initial_shared_version.get_or_insert_default()
403        }
404        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
405        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
406            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
407        }
408        ///Sets `authenticator_object_initial_shared_version` with the provided value.
409        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
410            self.authenticator_object_initial_shared_version = Some(field);
411        }
412        ///Sets `authenticator_object_initial_shared_version` with the provided value.
413        pub fn with_authenticator_object_initial_shared_version(
414            mut self,
415            field: u64,
416        ) -> Self {
417            self.set_authenticator_object_initial_shared_version(field);
418            self
419        }
420    }
421    impl super::AuthenticatorStateUpdate {
422        pub const fn const_default() -> Self {
423            Self {
424                epoch: None,
425                round: None,
426                new_active_jwks: Vec::new(),
427                authenticator_object_initial_shared_version: None,
428            }
429        }
430        #[doc(hidden)]
431        pub fn default_instance() -> &'static Self {
432            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
433            &DEFAULT
434        }
435        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
436        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
437            self.epoch.as_mut().map(|field| field as _)
438        }
439        ///Returns a mutable reference to `epoch`.
440        ///If the field is unset, it is first initialized with the default value.
441        pub fn epoch_mut(&mut self) -> &mut u64 {
442            self.epoch.get_or_insert_default()
443        }
444        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
445        pub fn epoch_opt(&self) -> Option<u64> {
446            self.epoch.as_ref().map(|field| *field)
447        }
448        ///Sets `epoch` with the provided value.
449        pub fn set_epoch(&mut self, field: u64) {
450            self.epoch = Some(field);
451        }
452        ///Sets `epoch` with the provided value.
453        pub fn with_epoch(mut self, field: u64) -> Self {
454            self.set_epoch(field);
455            self
456        }
457        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
458        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
459            self.round.as_mut().map(|field| field as _)
460        }
461        ///Returns a mutable reference to `round`.
462        ///If the field is unset, it is first initialized with the default value.
463        pub fn round_mut(&mut self) -> &mut u64 {
464            self.round.get_or_insert_default()
465        }
466        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
467        pub fn round_opt(&self) -> Option<u64> {
468            self.round.as_ref().map(|field| *field)
469        }
470        ///Sets `round` with the provided value.
471        pub fn set_round(&mut self, field: u64) {
472            self.round = Some(field);
473        }
474        ///Sets `round` with the provided value.
475        pub fn with_round(mut self, field: u64) -> Self {
476            self.set_round(field);
477            self
478        }
479        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
480        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
481            &self.new_active_jwks
482        }
483        ///Returns a mutable reference to `new_active_jwks`.
484        ///If the field is unset, it is first initialized with the default value.
485        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
486            &mut self.new_active_jwks
487        }
488        ///Sets `new_active_jwks` with the provided value.
489        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
490            self.new_active_jwks = field;
491        }
492        ///Sets `new_active_jwks` with the provided value.
493        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
494            self.set_new_active_jwks(field);
495            self
496        }
497        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
498        pub fn authenticator_object_initial_shared_version_opt_mut(
499            &mut self,
500        ) -> Option<&mut u64> {
501            self.authenticator_object_initial_shared_version
502                .as_mut()
503                .map(|field| field as _)
504        }
505        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
506        ///If the field is unset, it is first initialized with the default value.
507        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
508            self.authenticator_object_initial_shared_version.get_or_insert_default()
509        }
510        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
511        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
512            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
513        }
514        ///Sets `authenticator_object_initial_shared_version` with the provided value.
515        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
516            self.authenticator_object_initial_shared_version = Some(field);
517        }
518        ///Sets `authenticator_object_initial_shared_version` with the provided value.
519        pub fn with_authenticator_object_initial_shared_version(
520            mut self,
521            field: u64,
522        ) -> Self {
523            self.set_authenticator_object_initial_shared_version(field);
524            self
525        }
526    }
527    impl super::Balance {
528        pub const fn const_default() -> Self {
529            Self {
530                coin_type: None,
531                balance: None,
532                address_balance: None,
533                coin_balance: None,
534            }
535        }
536        #[doc(hidden)]
537        pub fn default_instance() -> &'static Self {
538            static DEFAULT: super::Balance = super::Balance::const_default();
539            &DEFAULT
540        }
541        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
542        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
543            self.coin_type.as_mut().map(|field| field as _)
544        }
545        ///Returns a mutable reference to `coin_type`.
546        ///If the field is unset, it is first initialized with the default value.
547        pub fn coin_type_mut(&mut self) -> &mut String {
548            self.coin_type.get_or_insert_default()
549        }
550        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
551        pub fn coin_type_opt(&self) -> Option<&str> {
552            self.coin_type.as_ref().map(|field| field as _)
553        }
554        ///Sets `coin_type` with the provided value.
555        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
556            self.coin_type = Some(field.into().into());
557        }
558        ///Sets `coin_type` with the provided value.
559        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
560            self.set_coin_type(field.into());
561            self
562        }
563        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
564        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
565            self.balance.as_mut().map(|field| field as _)
566        }
567        ///Returns a mutable reference to `balance`.
568        ///If the field is unset, it is first initialized with the default value.
569        pub fn balance_mut(&mut self) -> &mut u64 {
570            self.balance.get_or_insert_default()
571        }
572        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
573        pub fn balance_opt(&self) -> Option<u64> {
574            self.balance.as_ref().map(|field| *field)
575        }
576        ///Sets `balance` with the provided value.
577        pub fn set_balance(&mut self, field: u64) {
578            self.balance = Some(field);
579        }
580        ///Sets `balance` with the provided value.
581        pub fn with_balance(mut self, field: u64) -> Self {
582            self.set_balance(field);
583            self
584        }
585        ///If `address_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
586        pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
587            self.address_balance.as_mut().map(|field| field as _)
588        }
589        ///Returns a mutable reference to `address_balance`.
590        ///If the field is unset, it is first initialized with the default value.
591        pub fn address_balance_mut(&mut self) -> &mut u64 {
592            self.address_balance.get_or_insert_default()
593        }
594        ///If `address_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
595        pub fn address_balance_opt(&self) -> Option<u64> {
596            self.address_balance.as_ref().map(|field| *field)
597        }
598        ///Sets `address_balance` with the provided value.
599        pub fn set_address_balance(&mut self, field: u64) {
600            self.address_balance = Some(field);
601        }
602        ///Sets `address_balance` with the provided value.
603        pub fn with_address_balance(mut self, field: u64) -> Self {
604            self.set_address_balance(field);
605            self
606        }
607        ///If `coin_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
608        pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
609            self.coin_balance.as_mut().map(|field| field as _)
610        }
611        ///Returns a mutable reference to `coin_balance`.
612        ///If the field is unset, it is first initialized with the default value.
613        pub fn coin_balance_mut(&mut self) -> &mut u64 {
614            self.coin_balance.get_or_insert_default()
615        }
616        ///If `coin_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
617        pub fn coin_balance_opt(&self) -> Option<u64> {
618            self.coin_balance.as_ref().map(|field| *field)
619        }
620        ///Sets `coin_balance` with the provided value.
621        pub fn set_coin_balance(&mut self, field: u64) {
622            self.coin_balance = Some(field);
623        }
624        ///Sets `coin_balance` with the provided value.
625        pub fn with_coin_balance(mut self, field: u64) -> Self {
626            self.set_coin_balance(field);
627            self
628        }
629    }
630    impl super::BalanceChange {
631        pub const fn const_default() -> Self {
632            Self {
633                address: None,
634                coin_type: None,
635                amount: None,
636            }
637        }
638        #[doc(hidden)]
639        pub fn default_instance() -> &'static Self {
640            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
641            &DEFAULT
642        }
643        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
644        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
645            self.address.as_mut().map(|field| field as _)
646        }
647        ///Returns a mutable reference to `address`.
648        ///If the field is unset, it is first initialized with the default value.
649        pub fn address_mut(&mut self) -> &mut String {
650            self.address.get_or_insert_default()
651        }
652        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
653        pub fn address_opt(&self) -> Option<&str> {
654            self.address.as_ref().map(|field| field as _)
655        }
656        ///Sets `address` with the provided value.
657        pub fn set_address<T: Into<String>>(&mut self, field: T) {
658            self.address = Some(field.into().into());
659        }
660        ///Sets `address` with the provided value.
661        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
662            self.set_address(field.into());
663            self
664        }
665        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
666        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
667            self.coin_type.as_mut().map(|field| field as _)
668        }
669        ///Returns a mutable reference to `coin_type`.
670        ///If the field is unset, it is first initialized with the default value.
671        pub fn coin_type_mut(&mut self) -> &mut String {
672            self.coin_type.get_or_insert_default()
673        }
674        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
675        pub fn coin_type_opt(&self) -> Option<&str> {
676            self.coin_type.as_ref().map(|field| field as _)
677        }
678        ///Sets `coin_type` with the provided value.
679        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
680            self.coin_type = Some(field.into().into());
681        }
682        ///Sets `coin_type` with the provided value.
683        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
684            self.set_coin_type(field.into());
685            self
686        }
687        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
688        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
689            self.amount.as_mut().map(|field| field as _)
690        }
691        ///Returns a mutable reference to `amount`.
692        ///If the field is unset, it is first initialized with the default value.
693        pub fn amount_mut(&mut self) -> &mut String {
694            self.amount.get_or_insert_default()
695        }
696        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
697        pub fn amount_opt(&self) -> Option<&str> {
698            self.amount.as_ref().map(|field| field as _)
699        }
700        ///Sets `amount` with the provided value.
701        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
702            self.amount = Some(field.into().into());
703        }
704        ///Sets `amount` with the provided value.
705        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
706            self.set_amount(field.into());
707            self
708        }
709    }
710    impl super::BatchGetObjectsRequest {
711        pub const fn const_default() -> Self {
712            Self {
713                requests: Vec::new(),
714                read_mask: None,
715            }
716        }
717        #[doc(hidden)]
718        pub fn default_instance() -> &'static Self {
719            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
720            &DEFAULT
721        }
722        ///Returns the value of `requests`, or the default value if `requests` is unset.
723        pub fn requests(&self) -> &[super::GetObjectRequest] {
724            &self.requests
725        }
726        ///Returns a mutable reference to `requests`.
727        ///If the field is unset, it is first initialized with the default value.
728        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
729            &mut self.requests
730        }
731        ///Sets `requests` with the provided value.
732        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
733            self.requests = field;
734        }
735        ///Sets `requests` with the provided value.
736        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
737            self.set_requests(field);
738            self
739        }
740        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
741        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
742            self.read_mask.as_mut().map(|field| field as _)
743        }
744        ///Returns a mutable reference to `read_mask`.
745        ///If the field is unset, it is first initialized with the default value.
746        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
747            self.read_mask.get_or_insert_default()
748        }
749        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
750        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
751            self.read_mask.as_ref().map(|field| field as _)
752        }
753        ///Sets `read_mask` with the provided value.
754        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
755            self.read_mask = Some(field.into().into());
756        }
757        ///Sets `read_mask` with the provided value.
758        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
759            mut self,
760            field: T,
761        ) -> Self {
762            self.set_read_mask(field.into());
763            self
764        }
765    }
766    impl super::BatchGetObjectsResponse {
767        pub const fn const_default() -> Self {
768            Self { objects: Vec::new() }
769        }
770        #[doc(hidden)]
771        pub fn default_instance() -> &'static Self {
772            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
773            &DEFAULT
774        }
775        ///Returns the value of `objects`, or the default value if `objects` is unset.
776        pub fn objects(&self) -> &[super::GetObjectResult] {
777            &self.objects
778        }
779        ///Returns a mutable reference to `objects`.
780        ///If the field is unset, it is first initialized with the default value.
781        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
782            &mut self.objects
783        }
784        ///Sets `objects` with the provided value.
785        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
786            self.objects = field;
787        }
788        ///Sets `objects` with the provided value.
789        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
790            self.set_objects(field);
791            self
792        }
793    }
794    impl super::BatchGetTransactionsRequest {
795        pub const fn const_default() -> Self {
796            Self {
797                digests: Vec::new(),
798                read_mask: None,
799            }
800        }
801        #[doc(hidden)]
802        pub fn default_instance() -> &'static Self {
803            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
804            &DEFAULT
805        }
806        ///Returns the value of `digests`, or the default value if `digests` is unset.
807        pub fn digests(&self) -> &[String] {
808            &self.digests
809        }
810        ///Returns a mutable reference to `digests`.
811        ///If the field is unset, it is first initialized with the default value.
812        pub fn digests_mut(&mut self) -> &mut Vec<String> {
813            &mut self.digests
814        }
815        ///Sets `digests` with the provided value.
816        pub fn set_digests(&mut self, field: Vec<String>) {
817            self.digests = field;
818        }
819        ///Sets `digests` with the provided value.
820        pub fn with_digests(mut self, field: Vec<String>) -> Self {
821            self.set_digests(field);
822            self
823        }
824        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
825        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
826            self.read_mask.as_mut().map(|field| field as _)
827        }
828        ///Returns a mutable reference to `read_mask`.
829        ///If the field is unset, it is first initialized with the default value.
830        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
831            self.read_mask.get_or_insert_default()
832        }
833        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
834        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
835            self.read_mask.as_ref().map(|field| field as _)
836        }
837        ///Sets `read_mask` with the provided value.
838        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
839            self.read_mask = Some(field.into().into());
840        }
841        ///Sets `read_mask` with the provided value.
842        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
843            mut self,
844            field: T,
845        ) -> Self {
846            self.set_read_mask(field.into());
847            self
848        }
849    }
850    impl super::BatchGetTransactionsResponse {
851        pub const fn const_default() -> Self {
852            Self { transactions: Vec::new() }
853        }
854        #[doc(hidden)]
855        pub fn default_instance() -> &'static Self {
856            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
857            &DEFAULT
858        }
859        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
860        pub fn transactions(&self) -> &[super::GetTransactionResult] {
861            &self.transactions
862        }
863        ///Returns a mutable reference to `transactions`.
864        ///If the field is unset, it is first initialized with the default value.
865        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
866            &mut self.transactions
867        }
868        ///Sets `transactions` with the provided value.
869        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
870            self.transactions = field;
871        }
872        ///Sets `transactions` with the provided value.
873        pub fn with_transactions(
874            mut self,
875            field: Vec<super::GetTransactionResult>,
876        ) -> Self {
877            self.set_transactions(field);
878            self
879        }
880    }
881    impl super::Bcs {
882        pub const fn const_default() -> Self {
883            Self { name: None, value: None }
884        }
885        #[doc(hidden)]
886        pub fn default_instance() -> &'static Self {
887            static DEFAULT: super::Bcs = super::Bcs::const_default();
888            &DEFAULT
889        }
890        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
891        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
892            self.name.as_mut().map(|field| field as _)
893        }
894        ///Returns a mutable reference to `name`.
895        ///If the field is unset, it is first initialized with the default value.
896        pub fn name_mut(&mut self) -> &mut String {
897            self.name.get_or_insert_default()
898        }
899        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
900        pub fn name_opt(&self) -> Option<&str> {
901            self.name.as_ref().map(|field| field as _)
902        }
903        ///Sets `name` with the provided value.
904        pub fn set_name<T: Into<String>>(&mut self, field: T) {
905            self.name = Some(field.into().into());
906        }
907        ///Sets `name` with the provided value.
908        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
909            self.set_name(field.into());
910            self
911        }
912        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
913        pub fn value_opt(&self) -> Option<&[u8]> {
914            self.value.as_ref().map(|field| field as _)
915        }
916        ///Sets `value` with the provided value.
917        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
918            self.value = Some(field.into().into());
919        }
920        ///Sets `value` with the provided value.
921        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
922            self.set_value(field.into());
923            self
924        }
925    }
926    impl super::CanceledTransaction {
927        pub const fn const_default() -> Self {
928            Self {
929                digest: None,
930                version_assignments: Vec::new(),
931            }
932        }
933        #[doc(hidden)]
934        pub fn default_instance() -> &'static Self {
935            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
936            &DEFAULT
937        }
938        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
939        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
940            self.digest.as_mut().map(|field| field as _)
941        }
942        ///Returns a mutable reference to `digest`.
943        ///If the field is unset, it is first initialized with the default value.
944        pub fn digest_mut(&mut self) -> &mut String {
945            self.digest.get_or_insert_default()
946        }
947        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
948        pub fn digest_opt(&self) -> Option<&str> {
949            self.digest.as_ref().map(|field| field as _)
950        }
951        ///Sets `digest` with the provided value.
952        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
953            self.digest = Some(field.into().into());
954        }
955        ///Sets `digest` with the provided value.
956        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
957            self.set_digest(field.into());
958            self
959        }
960        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
961        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
962            &self.version_assignments
963        }
964        ///Returns a mutable reference to `version_assignments`.
965        ///If the field is unset, it is first initialized with the default value.
966        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
967            &mut self.version_assignments
968        }
969        ///Sets `version_assignments` with the provided value.
970        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
971            self.version_assignments = field;
972        }
973        ///Sets `version_assignments` with the provided value.
974        pub fn with_version_assignments(
975            mut self,
976            field: Vec<super::VersionAssignment>,
977        ) -> Self {
978            self.set_version_assignments(field);
979            self
980        }
981    }
982    impl super::ChangeEpoch {
983        pub const fn const_default() -> Self {
984            Self {
985                epoch: None,
986                protocol_version: None,
987                storage_charge: None,
988                computation_charge: None,
989                storage_rebate: None,
990                non_refundable_storage_fee: None,
991                epoch_start_timestamp: None,
992                system_packages: Vec::new(),
993            }
994        }
995        #[doc(hidden)]
996        pub fn default_instance() -> &'static Self {
997            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
998            &DEFAULT
999        }
1000        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1001        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1002            self.epoch.as_mut().map(|field| field as _)
1003        }
1004        ///Returns a mutable reference to `epoch`.
1005        ///If the field is unset, it is first initialized with the default value.
1006        pub fn epoch_mut(&mut self) -> &mut u64 {
1007            self.epoch.get_or_insert_default()
1008        }
1009        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1010        pub fn epoch_opt(&self) -> Option<u64> {
1011            self.epoch.as_ref().map(|field| *field)
1012        }
1013        ///Sets `epoch` with the provided value.
1014        pub fn set_epoch(&mut self, field: u64) {
1015            self.epoch = Some(field);
1016        }
1017        ///Sets `epoch` with the provided value.
1018        pub fn with_epoch(mut self, field: u64) -> Self {
1019            self.set_epoch(field);
1020            self
1021        }
1022        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1023        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1024            self.protocol_version.as_mut().map(|field| field as _)
1025        }
1026        ///Returns a mutable reference to `protocol_version`.
1027        ///If the field is unset, it is first initialized with the default value.
1028        pub fn protocol_version_mut(&mut self) -> &mut u64 {
1029            self.protocol_version.get_or_insert_default()
1030        }
1031        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1032        pub fn protocol_version_opt(&self) -> Option<u64> {
1033            self.protocol_version.as_ref().map(|field| *field)
1034        }
1035        ///Sets `protocol_version` with the provided value.
1036        pub fn set_protocol_version(&mut self, field: u64) {
1037            self.protocol_version = Some(field);
1038        }
1039        ///Sets `protocol_version` with the provided value.
1040        pub fn with_protocol_version(mut self, field: u64) -> Self {
1041            self.set_protocol_version(field);
1042            self
1043        }
1044        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1045        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1046            self.storage_charge.as_mut().map(|field| field as _)
1047        }
1048        ///Returns a mutable reference to `storage_charge`.
1049        ///If the field is unset, it is first initialized with the default value.
1050        pub fn storage_charge_mut(&mut self) -> &mut u64 {
1051            self.storage_charge.get_or_insert_default()
1052        }
1053        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1054        pub fn storage_charge_opt(&self) -> Option<u64> {
1055            self.storage_charge.as_ref().map(|field| *field)
1056        }
1057        ///Sets `storage_charge` with the provided value.
1058        pub fn set_storage_charge(&mut self, field: u64) {
1059            self.storage_charge = Some(field);
1060        }
1061        ///Sets `storage_charge` with the provided value.
1062        pub fn with_storage_charge(mut self, field: u64) -> Self {
1063            self.set_storage_charge(field);
1064            self
1065        }
1066        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1067        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1068            self.computation_charge.as_mut().map(|field| field as _)
1069        }
1070        ///Returns a mutable reference to `computation_charge`.
1071        ///If the field is unset, it is first initialized with the default value.
1072        pub fn computation_charge_mut(&mut self) -> &mut u64 {
1073            self.computation_charge.get_or_insert_default()
1074        }
1075        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1076        pub fn computation_charge_opt(&self) -> Option<u64> {
1077            self.computation_charge.as_ref().map(|field| *field)
1078        }
1079        ///Sets `computation_charge` with the provided value.
1080        pub fn set_computation_charge(&mut self, field: u64) {
1081            self.computation_charge = Some(field);
1082        }
1083        ///Sets `computation_charge` with the provided value.
1084        pub fn with_computation_charge(mut self, field: u64) -> Self {
1085            self.set_computation_charge(field);
1086            self
1087        }
1088        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1089        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1090            self.storage_rebate.as_mut().map(|field| field as _)
1091        }
1092        ///Returns a mutable reference to `storage_rebate`.
1093        ///If the field is unset, it is first initialized with the default value.
1094        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1095            self.storage_rebate.get_or_insert_default()
1096        }
1097        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
1098        pub fn storage_rebate_opt(&self) -> Option<u64> {
1099            self.storage_rebate.as_ref().map(|field| *field)
1100        }
1101        ///Sets `storage_rebate` with the provided value.
1102        pub fn set_storage_rebate(&mut self, field: u64) {
1103            self.storage_rebate = Some(field);
1104        }
1105        ///Sets `storage_rebate` with the provided value.
1106        pub fn with_storage_rebate(mut self, field: u64) -> Self {
1107            self.set_storage_rebate(field);
1108            self
1109        }
1110        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1111        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1112            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1113        }
1114        ///Returns a mutable reference to `non_refundable_storage_fee`.
1115        ///If the field is unset, it is first initialized with the default value.
1116        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1117            self.non_refundable_storage_fee.get_or_insert_default()
1118        }
1119        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
1120        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1121            self.non_refundable_storage_fee.as_ref().map(|field| *field)
1122        }
1123        ///Sets `non_refundable_storage_fee` with the provided value.
1124        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1125            self.non_refundable_storage_fee = Some(field);
1126        }
1127        ///Sets `non_refundable_storage_fee` with the provided value.
1128        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1129            self.set_non_refundable_storage_fee(field);
1130            self
1131        }
1132        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1133        pub fn epoch_start_timestamp_opt_mut(
1134            &mut self,
1135        ) -> Option<&mut ::prost_types::Timestamp> {
1136            self.epoch_start_timestamp.as_mut().map(|field| field as _)
1137        }
1138        ///Returns a mutable reference to `epoch_start_timestamp`.
1139        ///If the field is unset, it is first initialized with the default value.
1140        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1141            self.epoch_start_timestamp.get_or_insert_default()
1142        }
1143        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1144        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1145            self.epoch_start_timestamp.as_ref().map(|field| field as _)
1146        }
1147        ///Sets `epoch_start_timestamp` with the provided value.
1148        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1149            &mut self,
1150            field: T,
1151        ) {
1152            self.epoch_start_timestamp = Some(field.into().into());
1153        }
1154        ///Sets `epoch_start_timestamp` with the provided value.
1155        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1156            mut self,
1157            field: T,
1158        ) -> Self {
1159            self.set_epoch_start_timestamp(field.into());
1160            self
1161        }
1162        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
1163        pub fn system_packages(&self) -> &[super::SystemPackage] {
1164            &self.system_packages
1165        }
1166        ///Returns a mutable reference to `system_packages`.
1167        ///If the field is unset, it is first initialized with the default value.
1168        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1169            &mut self.system_packages
1170        }
1171        ///Sets `system_packages` with the provided value.
1172        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1173            self.system_packages = field;
1174        }
1175        ///Sets `system_packages` with the provided value.
1176        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1177            self.set_system_packages(field);
1178            self
1179        }
1180    }
1181    impl super::ChangedObject {
1182        pub const fn const_default() -> Self {
1183            Self {
1184                object_id: None,
1185                input_state: None,
1186                input_version: None,
1187                input_digest: None,
1188                input_owner: None,
1189                output_state: None,
1190                output_version: None,
1191                output_digest: None,
1192                output_owner: None,
1193                accumulator_write: None,
1194                id_operation: None,
1195                object_type: None,
1196            }
1197        }
1198        #[doc(hidden)]
1199        pub fn default_instance() -> &'static Self {
1200            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1201            &DEFAULT
1202        }
1203        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1204        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1205            self.object_id.as_mut().map(|field| field as _)
1206        }
1207        ///Returns a mutable reference to `object_id`.
1208        ///If the field is unset, it is first initialized with the default value.
1209        pub fn object_id_mut(&mut self) -> &mut String {
1210            self.object_id.get_or_insert_default()
1211        }
1212        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1213        pub fn object_id_opt(&self) -> Option<&str> {
1214            self.object_id.as_ref().map(|field| field as _)
1215        }
1216        ///Sets `object_id` with the provided value.
1217        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1218            self.object_id = Some(field.into().into());
1219        }
1220        ///Sets `object_id` with the provided value.
1221        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1222            self.set_object_id(field.into());
1223            self
1224        }
1225        ///Sets `input_state` with the provided value.
1226        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1227            mut self,
1228            field: T,
1229        ) -> Self {
1230            self.set_input_state(field.into());
1231            self
1232        }
1233        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1234        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1235            self.input_version.as_mut().map(|field| field as _)
1236        }
1237        ///Returns a mutable reference to `input_version`.
1238        ///If the field is unset, it is first initialized with the default value.
1239        pub fn input_version_mut(&mut self) -> &mut u64 {
1240            self.input_version.get_or_insert_default()
1241        }
1242        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1243        pub fn input_version_opt(&self) -> Option<u64> {
1244            self.input_version.as_ref().map(|field| *field)
1245        }
1246        ///Sets `input_version` with the provided value.
1247        pub fn set_input_version(&mut self, field: u64) {
1248            self.input_version = Some(field);
1249        }
1250        ///Sets `input_version` with the provided value.
1251        pub fn with_input_version(mut self, field: u64) -> Self {
1252            self.set_input_version(field);
1253            self
1254        }
1255        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1256        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1257            self.input_digest.as_mut().map(|field| field as _)
1258        }
1259        ///Returns a mutable reference to `input_digest`.
1260        ///If the field is unset, it is first initialized with the default value.
1261        pub fn input_digest_mut(&mut self) -> &mut String {
1262            self.input_digest.get_or_insert_default()
1263        }
1264        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1265        pub fn input_digest_opt(&self) -> Option<&str> {
1266            self.input_digest.as_ref().map(|field| field as _)
1267        }
1268        ///Sets `input_digest` with the provided value.
1269        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1270            self.input_digest = Some(field.into().into());
1271        }
1272        ///Sets `input_digest` with the provided value.
1273        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1274            self.set_input_digest(field.into());
1275            self
1276        }
1277        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1278        pub fn input_owner(&self) -> &super::Owner {
1279            self.input_owner
1280                .as_ref()
1281                .map(|field| field as _)
1282                .unwrap_or_else(|| super::Owner::default_instance() as _)
1283        }
1284        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1285        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1286            self.input_owner.as_mut().map(|field| field as _)
1287        }
1288        ///Returns a mutable reference to `input_owner`.
1289        ///If the field is unset, it is first initialized with the default value.
1290        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1291            self.input_owner.get_or_insert_default()
1292        }
1293        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1294        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1295            self.input_owner.as_ref().map(|field| field as _)
1296        }
1297        ///Sets `input_owner` with the provided value.
1298        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1299            self.input_owner = Some(field.into().into());
1300        }
1301        ///Sets `input_owner` with the provided value.
1302        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1303            self.set_input_owner(field.into());
1304            self
1305        }
1306        ///Sets `output_state` with the provided value.
1307        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1308            mut self,
1309            field: T,
1310        ) -> Self {
1311            self.set_output_state(field.into());
1312            self
1313        }
1314        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1315        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1316            self.output_version.as_mut().map(|field| field as _)
1317        }
1318        ///Returns a mutable reference to `output_version`.
1319        ///If the field is unset, it is first initialized with the default value.
1320        pub fn output_version_mut(&mut self) -> &mut u64 {
1321            self.output_version.get_or_insert_default()
1322        }
1323        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1324        pub fn output_version_opt(&self) -> Option<u64> {
1325            self.output_version.as_ref().map(|field| *field)
1326        }
1327        ///Sets `output_version` with the provided value.
1328        pub fn set_output_version(&mut self, field: u64) {
1329            self.output_version = Some(field);
1330        }
1331        ///Sets `output_version` with the provided value.
1332        pub fn with_output_version(mut self, field: u64) -> Self {
1333            self.set_output_version(field);
1334            self
1335        }
1336        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1337        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1338            self.output_digest.as_mut().map(|field| field as _)
1339        }
1340        ///Returns a mutable reference to `output_digest`.
1341        ///If the field is unset, it is first initialized with the default value.
1342        pub fn output_digest_mut(&mut self) -> &mut String {
1343            self.output_digest.get_or_insert_default()
1344        }
1345        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1346        pub fn output_digest_opt(&self) -> Option<&str> {
1347            self.output_digest.as_ref().map(|field| field as _)
1348        }
1349        ///Sets `output_digest` with the provided value.
1350        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1351            self.output_digest = Some(field.into().into());
1352        }
1353        ///Sets `output_digest` with the provided value.
1354        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1355            self.set_output_digest(field.into());
1356            self
1357        }
1358        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1359        pub fn output_owner(&self) -> &super::Owner {
1360            self.output_owner
1361                .as_ref()
1362                .map(|field| field as _)
1363                .unwrap_or_else(|| super::Owner::default_instance() as _)
1364        }
1365        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1366        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1367            self.output_owner.as_mut().map(|field| field as _)
1368        }
1369        ///Returns a mutable reference to `output_owner`.
1370        ///If the field is unset, it is first initialized with the default value.
1371        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1372            self.output_owner.get_or_insert_default()
1373        }
1374        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1375        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1376            self.output_owner.as_ref().map(|field| field as _)
1377        }
1378        ///Sets `output_owner` with the provided value.
1379        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1380            self.output_owner = Some(field.into().into());
1381        }
1382        ///Sets `output_owner` with the provided value.
1383        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1384            self.set_output_owner(field.into());
1385            self
1386        }
1387        ///Returns the value of `accumulator_write`, or the default value if `accumulator_write` is unset.
1388        pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1389            self.accumulator_write
1390                .as_ref()
1391                .map(|field| field as _)
1392                .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1393        }
1394        ///If `accumulator_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1395        pub fn accumulator_write_opt_mut(
1396            &mut self,
1397        ) -> Option<&mut super::AccumulatorWrite> {
1398            self.accumulator_write.as_mut().map(|field| field as _)
1399        }
1400        ///Returns a mutable reference to `accumulator_write`.
1401        ///If the field is unset, it is first initialized with the default value.
1402        pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1403            self.accumulator_write.get_or_insert_default()
1404        }
1405        ///If `accumulator_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
1406        pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1407            self.accumulator_write.as_ref().map(|field| field as _)
1408        }
1409        ///Sets `accumulator_write` with the provided value.
1410        pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1411            &mut self,
1412            field: T,
1413        ) {
1414            self.accumulator_write = Some(field.into().into());
1415        }
1416        ///Sets `accumulator_write` with the provided value.
1417        pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1418            mut self,
1419            field: T,
1420        ) -> Self {
1421            self.set_accumulator_write(field.into());
1422            self
1423        }
1424        ///Sets `id_operation` with the provided value.
1425        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1426            mut self,
1427            field: T,
1428        ) -> Self {
1429            self.set_id_operation(field.into());
1430            self
1431        }
1432        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1433        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1434            self.object_type.as_mut().map(|field| field as _)
1435        }
1436        ///Returns a mutable reference to `object_type`.
1437        ///If the field is unset, it is first initialized with the default value.
1438        pub fn object_type_mut(&mut self) -> &mut String {
1439            self.object_type.get_or_insert_default()
1440        }
1441        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1442        pub fn object_type_opt(&self) -> Option<&str> {
1443            self.object_type.as_ref().map(|field| field as _)
1444        }
1445        ///Sets `object_type` with the provided value.
1446        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1447            self.object_type = Some(field.into().into());
1448        }
1449        ///Sets `object_type` with the provided value.
1450        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1451            self.set_object_type(field.into());
1452            self
1453        }
1454    }
1455    impl super::Checkpoint {
1456        pub const fn const_default() -> Self {
1457            Self {
1458                sequence_number: None,
1459                digest: None,
1460                summary: None,
1461                signature: None,
1462                contents: None,
1463                transactions: Vec::new(),
1464                objects: None,
1465            }
1466        }
1467        #[doc(hidden)]
1468        pub fn default_instance() -> &'static Self {
1469            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1470            &DEFAULT
1471        }
1472        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1473        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1474            self.sequence_number.as_mut().map(|field| field as _)
1475        }
1476        ///Returns a mutable reference to `sequence_number`.
1477        ///If the field is unset, it is first initialized with the default value.
1478        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1479            self.sequence_number.get_or_insert_default()
1480        }
1481        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1482        pub fn sequence_number_opt(&self) -> Option<u64> {
1483            self.sequence_number.as_ref().map(|field| *field)
1484        }
1485        ///Sets `sequence_number` with the provided value.
1486        pub fn set_sequence_number(&mut self, field: u64) {
1487            self.sequence_number = Some(field);
1488        }
1489        ///Sets `sequence_number` with the provided value.
1490        pub fn with_sequence_number(mut self, field: u64) -> Self {
1491            self.set_sequence_number(field);
1492            self
1493        }
1494        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1495        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1496            self.digest.as_mut().map(|field| field as _)
1497        }
1498        ///Returns a mutable reference to `digest`.
1499        ///If the field is unset, it is first initialized with the default value.
1500        pub fn digest_mut(&mut self) -> &mut String {
1501            self.digest.get_or_insert_default()
1502        }
1503        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1504        pub fn digest_opt(&self) -> Option<&str> {
1505            self.digest.as_ref().map(|field| field as _)
1506        }
1507        ///Sets `digest` with the provided value.
1508        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1509            self.digest = Some(field.into().into());
1510        }
1511        ///Sets `digest` with the provided value.
1512        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1513            self.set_digest(field.into());
1514            self
1515        }
1516        ///Returns the value of `summary`, or the default value if `summary` is unset.
1517        pub fn summary(&self) -> &super::CheckpointSummary {
1518            self.summary
1519                .as_ref()
1520                .map(|field| field as _)
1521                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1522        }
1523        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1524        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1525            self.summary.as_mut().map(|field| field as _)
1526        }
1527        ///Returns a mutable reference to `summary`.
1528        ///If the field is unset, it is first initialized with the default value.
1529        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1530            self.summary.get_or_insert_default()
1531        }
1532        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1533        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1534            self.summary.as_ref().map(|field| field as _)
1535        }
1536        ///Sets `summary` with the provided value.
1537        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1538            self.summary = Some(field.into().into());
1539        }
1540        ///Sets `summary` with the provided value.
1541        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1542            mut self,
1543            field: T,
1544        ) -> Self {
1545            self.set_summary(field.into());
1546            self
1547        }
1548        ///Returns the value of `signature`, or the default value if `signature` is unset.
1549        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1550            self.signature
1551                .as_ref()
1552                .map(|field| field as _)
1553                .unwrap_or_else(|| {
1554                    super::ValidatorAggregatedSignature::default_instance() as _
1555                })
1556        }
1557        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1558        pub fn signature_opt_mut(
1559            &mut self,
1560        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1561            self.signature.as_mut().map(|field| field as _)
1562        }
1563        ///Returns a mutable reference to `signature`.
1564        ///If the field is unset, it is first initialized with the default value.
1565        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1566            self.signature.get_or_insert_default()
1567        }
1568        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1569        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1570            self.signature.as_ref().map(|field| field as _)
1571        }
1572        ///Sets `signature` with the provided value.
1573        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1574            &mut self,
1575            field: T,
1576        ) {
1577            self.signature = Some(field.into().into());
1578        }
1579        ///Sets `signature` with the provided value.
1580        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1581            mut self,
1582            field: T,
1583        ) -> Self {
1584            self.set_signature(field.into());
1585            self
1586        }
1587        ///Returns the value of `contents`, or the default value if `contents` is unset.
1588        pub fn contents(&self) -> &super::CheckpointContents {
1589            self.contents
1590                .as_ref()
1591                .map(|field| field as _)
1592                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1593        }
1594        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1595        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1596            self.contents.as_mut().map(|field| field as _)
1597        }
1598        ///Returns a mutable reference to `contents`.
1599        ///If the field is unset, it is first initialized with the default value.
1600        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1601            self.contents.get_or_insert_default()
1602        }
1603        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1604        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1605            self.contents.as_ref().map(|field| field as _)
1606        }
1607        ///Sets `contents` with the provided value.
1608        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1609            self.contents = Some(field.into().into());
1610        }
1611        ///Sets `contents` with the provided value.
1612        pub fn with_contents<T: Into<super::CheckpointContents>>(
1613            mut self,
1614            field: T,
1615        ) -> Self {
1616            self.set_contents(field.into());
1617            self
1618        }
1619        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1620        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1621            &self.transactions
1622        }
1623        ///Returns a mutable reference to `transactions`.
1624        ///If the field is unset, it is first initialized with the default value.
1625        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1626            &mut self.transactions
1627        }
1628        ///Sets `transactions` with the provided value.
1629        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1630            self.transactions = field;
1631        }
1632        ///Sets `transactions` with the provided value.
1633        pub fn with_transactions(
1634            mut self,
1635            field: Vec<super::ExecutedTransaction>,
1636        ) -> Self {
1637            self.set_transactions(field);
1638            self
1639        }
1640        ///Returns the value of `objects`, or the default value if `objects` is unset.
1641        pub fn objects(&self) -> &super::ObjectSet {
1642            self.objects
1643                .as_ref()
1644                .map(|field| field as _)
1645                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1646        }
1647        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1648        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1649            self.objects.as_mut().map(|field| field as _)
1650        }
1651        ///Returns a mutable reference to `objects`.
1652        ///If the field is unset, it is first initialized with the default value.
1653        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1654            self.objects.get_or_insert_default()
1655        }
1656        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1657        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1658            self.objects.as_ref().map(|field| field as _)
1659        }
1660        ///Sets `objects` with the provided value.
1661        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1662            self.objects = Some(field.into().into());
1663        }
1664        ///Sets `objects` with the provided value.
1665        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1666            self.set_objects(field.into());
1667            self
1668        }
1669    }
1670    impl super::CheckpointCommitment {
1671        pub const fn const_default() -> Self {
1672            Self { kind: None, digest: None }
1673        }
1674        #[doc(hidden)]
1675        pub fn default_instance() -> &'static Self {
1676            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1677            &DEFAULT
1678        }
1679        ///Sets `kind` with the provided value.
1680        pub fn with_kind<
1681            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1682        >(mut self, field: T) -> Self {
1683            self.set_kind(field.into());
1684            self
1685        }
1686        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1687        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1688            self.digest.as_mut().map(|field| field as _)
1689        }
1690        ///Returns a mutable reference to `digest`.
1691        ///If the field is unset, it is first initialized with the default value.
1692        pub fn digest_mut(&mut self) -> &mut String {
1693            self.digest.get_or_insert_default()
1694        }
1695        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1696        pub fn digest_opt(&self) -> Option<&str> {
1697            self.digest.as_ref().map(|field| field as _)
1698        }
1699        ///Sets `digest` with the provided value.
1700        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1701            self.digest = Some(field.into().into());
1702        }
1703        ///Sets `digest` with the provided value.
1704        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1705            self.set_digest(field.into());
1706            self
1707        }
1708    }
1709    impl super::CheckpointContents {
1710        pub const fn const_default() -> Self {
1711            Self {
1712                bcs: None,
1713                digest: None,
1714                version: None,
1715                transactions: Vec::new(),
1716            }
1717        }
1718        #[doc(hidden)]
1719        pub fn default_instance() -> &'static Self {
1720            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1721            &DEFAULT
1722        }
1723        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1724        pub fn bcs(&self) -> &super::Bcs {
1725            self.bcs
1726                .as_ref()
1727                .map(|field| field as _)
1728                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1729        }
1730        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1731        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1732            self.bcs.as_mut().map(|field| field as _)
1733        }
1734        ///Returns a mutable reference to `bcs`.
1735        ///If the field is unset, it is first initialized with the default value.
1736        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1737            self.bcs.get_or_insert_default()
1738        }
1739        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1740        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1741            self.bcs.as_ref().map(|field| field as _)
1742        }
1743        ///Sets `bcs` with the provided value.
1744        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1745            self.bcs = Some(field.into().into());
1746        }
1747        ///Sets `bcs` with the provided value.
1748        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1749            self.set_bcs(field.into());
1750            self
1751        }
1752        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1753        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1754            self.digest.as_mut().map(|field| field as _)
1755        }
1756        ///Returns a mutable reference to `digest`.
1757        ///If the field is unset, it is first initialized with the default value.
1758        pub fn digest_mut(&mut self) -> &mut String {
1759            self.digest.get_or_insert_default()
1760        }
1761        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1762        pub fn digest_opt(&self) -> Option<&str> {
1763            self.digest.as_ref().map(|field| field as _)
1764        }
1765        ///Sets `digest` with the provided value.
1766        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1767            self.digest = Some(field.into().into());
1768        }
1769        ///Sets `digest` with the provided value.
1770        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1771            self.set_digest(field.into());
1772            self
1773        }
1774        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1775        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1776            self.version.as_mut().map(|field| field as _)
1777        }
1778        ///Returns a mutable reference to `version`.
1779        ///If the field is unset, it is first initialized with the default value.
1780        pub fn version_mut(&mut self) -> &mut i32 {
1781            self.version.get_or_insert_default()
1782        }
1783        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1784        pub fn version_opt(&self) -> Option<i32> {
1785            self.version.as_ref().map(|field| *field)
1786        }
1787        ///Sets `version` with the provided value.
1788        pub fn set_version(&mut self, field: i32) {
1789            self.version = Some(field);
1790        }
1791        ///Sets `version` with the provided value.
1792        pub fn with_version(mut self, field: i32) -> Self {
1793            self.set_version(field);
1794            self
1795        }
1796        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1797        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1798            &self.transactions
1799        }
1800        ///Returns a mutable reference to `transactions`.
1801        ///If the field is unset, it is first initialized with the default value.
1802        pub fn transactions_mut(
1803            &mut self,
1804        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1805            &mut self.transactions
1806        }
1807        ///Sets `transactions` with the provided value.
1808        pub fn set_transactions(
1809            &mut self,
1810            field: Vec<super::CheckpointedTransactionInfo>,
1811        ) {
1812            self.transactions = field;
1813        }
1814        ///Sets `transactions` with the provided value.
1815        pub fn with_transactions(
1816            mut self,
1817            field: Vec<super::CheckpointedTransactionInfo>,
1818        ) -> Self {
1819            self.set_transactions(field);
1820            self
1821        }
1822    }
1823    impl super::CheckpointSummary {
1824        pub const fn const_default() -> Self {
1825            Self {
1826                bcs: None,
1827                digest: None,
1828                epoch: None,
1829                sequence_number: None,
1830                total_network_transactions: None,
1831                content_digest: None,
1832                previous_digest: None,
1833                epoch_rolling_gas_cost_summary: None,
1834                timestamp: None,
1835                commitments: Vec::new(),
1836                end_of_epoch_data: None,
1837                version_specific_data: None,
1838            }
1839        }
1840        #[doc(hidden)]
1841        pub fn default_instance() -> &'static Self {
1842            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1843            &DEFAULT
1844        }
1845        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1846        pub fn bcs(&self) -> &super::Bcs {
1847            self.bcs
1848                .as_ref()
1849                .map(|field| field as _)
1850                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1851        }
1852        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1853        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1854            self.bcs.as_mut().map(|field| field as _)
1855        }
1856        ///Returns a mutable reference to `bcs`.
1857        ///If the field is unset, it is first initialized with the default value.
1858        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1859            self.bcs.get_or_insert_default()
1860        }
1861        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1862        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1863            self.bcs.as_ref().map(|field| field as _)
1864        }
1865        ///Sets `bcs` with the provided value.
1866        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1867            self.bcs = Some(field.into().into());
1868        }
1869        ///Sets `bcs` with the provided value.
1870        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1871            self.set_bcs(field.into());
1872            self
1873        }
1874        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1875        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1876            self.digest.as_mut().map(|field| field as _)
1877        }
1878        ///Returns a mutable reference to `digest`.
1879        ///If the field is unset, it is first initialized with the default value.
1880        pub fn digest_mut(&mut self) -> &mut String {
1881            self.digest.get_or_insert_default()
1882        }
1883        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1884        pub fn digest_opt(&self) -> Option<&str> {
1885            self.digest.as_ref().map(|field| field as _)
1886        }
1887        ///Sets `digest` with the provided value.
1888        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1889            self.digest = Some(field.into().into());
1890        }
1891        ///Sets `digest` with the provided value.
1892        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1893            self.set_digest(field.into());
1894            self
1895        }
1896        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1897        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1898            self.epoch.as_mut().map(|field| field as _)
1899        }
1900        ///Returns a mutable reference to `epoch`.
1901        ///If the field is unset, it is first initialized with the default value.
1902        pub fn epoch_mut(&mut self) -> &mut u64 {
1903            self.epoch.get_or_insert_default()
1904        }
1905        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1906        pub fn epoch_opt(&self) -> Option<u64> {
1907            self.epoch.as_ref().map(|field| *field)
1908        }
1909        ///Sets `epoch` with the provided value.
1910        pub fn set_epoch(&mut self, field: u64) {
1911            self.epoch = Some(field);
1912        }
1913        ///Sets `epoch` with the provided value.
1914        pub fn with_epoch(mut self, field: u64) -> Self {
1915            self.set_epoch(field);
1916            self
1917        }
1918        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1919        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1920            self.sequence_number.as_mut().map(|field| field as _)
1921        }
1922        ///Returns a mutable reference to `sequence_number`.
1923        ///If the field is unset, it is first initialized with the default value.
1924        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1925            self.sequence_number.get_or_insert_default()
1926        }
1927        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1928        pub fn sequence_number_opt(&self) -> Option<u64> {
1929            self.sequence_number.as_ref().map(|field| *field)
1930        }
1931        ///Sets `sequence_number` with the provided value.
1932        pub fn set_sequence_number(&mut self, field: u64) {
1933            self.sequence_number = Some(field);
1934        }
1935        ///Sets `sequence_number` with the provided value.
1936        pub fn with_sequence_number(mut self, field: u64) -> Self {
1937            self.set_sequence_number(field);
1938            self
1939        }
1940        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1941        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1942            self.total_network_transactions.as_mut().map(|field| field as _)
1943        }
1944        ///Returns a mutable reference to `total_network_transactions`.
1945        ///If the field is unset, it is first initialized with the default value.
1946        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1947            self.total_network_transactions.get_or_insert_default()
1948        }
1949        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1950        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1951            self.total_network_transactions.as_ref().map(|field| *field)
1952        }
1953        ///Sets `total_network_transactions` with the provided value.
1954        pub fn set_total_network_transactions(&mut self, field: u64) {
1955            self.total_network_transactions = Some(field);
1956        }
1957        ///Sets `total_network_transactions` with the provided value.
1958        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1959            self.set_total_network_transactions(field);
1960            self
1961        }
1962        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1963        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1964            self.content_digest.as_mut().map(|field| field as _)
1965        }
1966        ///Returns a mutable reference to `content_digest`.
1967        ///If the field is unset, it is first initialized with the default value.
1968        pub fn content_digest_mut(&mut self) -> &mut String {
1969            self.content_digest.get_or_insert_default()
1970        }
1971        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1972        pub fn content_digest_opt(&self) -> Option<&str> {
1973            self.content_digest.as_ref().map(|field| field as _)
1974        }
1975        ///Sets `content_digest` with the provided value.
1976        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1977            self.content_digest = Some(field.into().into());
1978        }
1979        ///Sets `content_digest` with the provided value.
1980        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1981            self.set_content_digest(field.into());
1982            self
1983        }
1984        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1985        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1986            self.previous_digest.as_mut().map(|field| field as _)
1987        }
1988        ///Returns a mutable reference to `previous_digest`.
1989        ///If the field is unset, it is first initialized with the default value.
1990        pub fn previous_digest_mut(&mut self) -> &mut String {
1991            self.previous_digest.get_or_insert_default()
1992        }
1993        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1994        pub fn previous_digest_opt(&self) -> Option<&str> {
1995            self.previous_digest.as_ref().map(|field| field as _)
1996        }
1997        ///Sets `previous_digest` with the provided value.
1998        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1999            self.previous_digest = Some(field.into().into());
2000        }
2001        ///Sets `previous_digest` with the provided value.
2002        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2003            self.set_previous_digest(field.into());
2004            self
2005        }
2006        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
2007        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2008            self.epoch_rolling_gas_cost_summary
2009                .as_ref()
2010                .map(|field| field as _)
2011                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2012        }
2013        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2014        pub fn epoch_rolling_gas_cost_summary_opt_mut(
2015            &mut self,
2016        ) -> Option<&mut super::GasCostSummary> {
2017            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2018        }
2019        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
2020        ///If the field is unset, it is first initialized with the default value.
2021        pub fn epoch_rolling_gas_cost_summary_mut(
2022            &mut self,
2023        ) -> &mut super::GasCostSummary {
2024            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2025        }
2026        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
2027        pub fn epoch_rolling_gas_cost_summary_opt(
2028            &self,
2029        ) -> Option<&super::GasCostSummary> {
2030            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2031        }
2032        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
2033        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2034            &mut self,
2035            field: T,
2036        ) {
2037            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2038        }
2039        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
2040        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2041            mut self,
2042            field: T,
2043        ) -> Self {
2044            self.set_epoch_rolling_gas_cost_summary(field.into());
2045            self
2046        }
2047        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2048        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2049            self.timestamp.as_mut().map(|field| field as _)
2050        }
2051        ///Returns a mutable reference to `timestamp`.
2052        ///If the field is unset, it is first initialized with the default value.
2053        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2054            self.timestamp.get_or_insert_default()
2055        }
2056        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
2057        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2058            self.timestamp.as_ref().map(|field| field as _)
2059        }
2060        ///Sets `timestamp` with the provided value.
2061        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2062            self.timestamp = Some(field.into().into());
2063        }
2064        ///Sets `timestamp` with the provided value.
2065        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2066            mut self,
2067            field: T,
2068        ) -> Self {
2069            self.set_timestamp(field.into());
2070            self
2071        }
2072        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
2073        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2074            &self.commitments
2075        }
2076        ///Returns a mutable reference to `commitments`.
2077        ///If the field is unset, it is first initialized with the default value.
2078        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2079            &mut self.commitments
2080        }
2081        ///Sets `commitments` with the provided value.
2082        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2083            self.commitments = field;
2084        }
2085        ///Sets `commitments` with the provided value.
2086        pub fn with_commitments(
2087            mut self,
2088            field: Vec<super::CheckpointCommitment>,
2089        ) -> Self {
2090            self.set_commitments(field);
2091            self
2092        }
2093        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
2094        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2095            self.end_of_epoch_data
2096                .as_ref()
2097                .map(|field| field as _)
2098                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2099        }
2100        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2101        pub fn end_of_epoch_data_opt_mut(
2102            &mut self,
2103        ) -> Option<&mut super::EndOfEpochData> {
2104            self.end_of_epoch_data.as_mut().map(|field| field as _)
2105        }
2106        ///Returns a mutable reference to `end_of_epoch_data`.
2107        ///If the field is unset, it is first initialized with the default value.
2108        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2109            self.end_of_epoch_data.get_or_insert_default()
2110        }
2111        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2112        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2113            self.end_of_epoch_data.as_ref().map(|field| field as _)
2114        }
2115        ///Sets `end_of_epoch_data` with the provided value.
2116        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2117            &mut self,
2118            field: T,
2119        ) {
2120            self.end_of_epoch_data = Some(field.into().into());
2121        }
2122        ///Sets `end_of_epoch_data` with the provided value.
2123        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2124            mut self,
2125            field: T,
2126        ) -> Self {
2127            self.set_end_of_epoch_data(field.into());
2128            self
2129        }
2130        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2131        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2132            self.version_specific_data.as_ref().map(|field| field as _)
2133        }
2134        ///Sets `version_specific_data` with the provided value.
2135        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2136            &mut self,
2137            field: T,
2138        ) {
2139            self.version_specific_data = Some(field.into().into());
2140        }
2141        ///Sets `version_specific_data` with the provided value.
2142        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2143            mut self,
2144            field: T,
2145        ) -> Self {
2146            self.set_version_specific_data(field.into());
2147            self
2148        }
2149    }
2150    impl super::CheckpointedTransactionInfo {
2151        pub const fn const_default() -> Self {
2152            Self {
2153                transaction: None,
2154                effects: None,
2155                signatures: Vec::new(),
2156                address_aliases_versions: Vec::new(),
2157            }
2158        }
2159        #[doc(hidden)]
2160        pub fn default_instance() -> &'static Self {
2161            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2162            &DEFAULT
2163        }
2164        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2165        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2166            self.transaction.as_mut().map(|field| field as _)
2167        }
2168        ///Returns a mutable reference to `transaction`.
2169        ///If the field is unset, it is first initialized with the default value.
2170        pub fn transaction_mut(&mut self) -> &mut String {
2171            self.transaction.get_or_insert_default()
2172        }
2173        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2174        pub fn transaction_opt(&self) -> Option<&str> {
2175            self.transaction.as_ref().map(|field| field as _)
2176        }
2177        ///Sets `transaction` with the provided value.
2178        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2179            self.transaction = Some(field.into().into());
2180        }
2181        ///Sets `transaction` with the provided value.
2182        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2183            self.set_transaction(field.into());
2184            self
2185        }
2186        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2187        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2188            self.effects.as_mut().map(|field| field as _)
2189        }
2190        ///Returns a mutable reference to `effects`.
2191        ///If the field is unset, it is first initialized with the default value.
2192        pub fn effects_mut(&mut self) -> &mut String {
2193            self.effects.get_or_insert_default()
2194        }
2195        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2196        pub fn effects_opt(&self) -> Option<&str> {
2197            self.effects.as_ref().map(|field| field as _)
2198        }
2199        ///Sets `effects` with the provided value.
2200        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2201            self.effects = Some(field.into().into());
2202        }
2203        ///Sets `effects` with the provided value.
2204        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2205            self.set_effects(field.into());
2206            self
2207        }
2208        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
2209        pub fn signatures(&self) -> &[super::UserSignature] {
2210            &self.signatures
2211        }
2212        ///Returns a mutable reference to `signatures`.
2213        ///If the field is unset, it is first initialized with the default value.
2214        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2215            &mut self.signatures
2216        }
2217        ///Sets `signatures` with the provided value.
2218        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2219            self.signatures = field;
2220        }
2221        ///Sets `signatures` with the provided value.
2222        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2223            self.set_signatures(field);
2224            self
2225        }
2226        ///Returns the value of `address_aliases_versions`, or the default value if `address_aliases_versions` is unset.
2227        pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2228            &self.address_aliases_versions
2229        }
2230        ///Returns a mutable reference to `address_aliases_versions`.
2231        ///If the field is unset, it is first initialized with the default value.
2232        pub fn address_aliases_versions_mut(
2233            &mut self,
2234        ) -> &mut Vec<super::AddressAliasesVersion> {
2235            &mut self.address_aliases_versions
2236        }
2237        ///Sets `address_aliases_versions` with the provided value.
2238        pub fn set_address_aliases_versions(
2239            &mut self,
2240            field: Vec<super::AddressAliasesVersion>,
2241        ) {
2242            self.address_aliases_versions = field;
2243        }
2244        ///Sets `address_aliases_versions` with the provided value.
2245        pub fn with_address_aliases_versions(
2246            mut self,
2247            field: Vec<super::AddressAliasesVersion>,
2248        ) -> Self {
2249            self.set_address_aliases_versions(field);
2250            self
2251        }
2252    }
2253    impl super::CircomG1 {
2254        pub const fn const_default() -> Self {
2255            Self {
2256                e0: None,
2257                e1: None,
2258                e2: None,
2259            }
2260        }
2261        #[doc(hidden)]
2262        pub fn default_instance() -> &'static Self {
2263            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2264            &DEFAULT
2265        }
2266        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2267        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2268            self.e0.as_mut().map(|field| field as _)
2269        }
2270        ///Returns a mutable reference to `e0`.
2271        ///If the field is unset, it is first initialized with the default value.
2272        pub fn e0_mut(&mut self) -> &mut String {
2273            self.e0.get_or_insert_default()
2274        }
2275        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2276        pub fn e0_opt(&self) -> Option<&str> {
2277            self.e0.as_ref().map(|field| field as _)
2278        }
2279        ///Sets `e0` with the provided value.
2280        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2281            self.e0 = Some(field.into().into());
2282        }
2283        ///Sets `e0` with the provided value.
2284        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2285            self.set_e0(field.into());
2286            self
2287        }
2288        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2289        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2290            self.e1.as_mut().map(|field| field as _)
2291        }
2292        ///Returns a mutable reference to `e1`.
2293        ///If the field is unset, it is first initialized with the default value.
2294        pub fn e1_mut(&mut self) -> &mut String {
2295            self.e1.get_or_insert_default()
2296        }
2297        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2298        pub fn e1_opt(&self) -> Option<&str> {
2299            self.e1.as_ref().map(|field| field as _)
2300        }
2301        ///Sets `e1` with the provided value.
2302        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2303            self.e1 = Some(field.into().into());
2304        }
2305        ///Sets `e1` with the provided value.
2306        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2307            self.set_e1(field.into());
2308            self
2309        }
2310        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2311        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2312            self.e2.as_mut().map(|field| field as _)
2313        }
2314        ///Returns a mutable reference to `e2`.
2315        ///If the field is unset, it is first initialized with the default value.
2316        pub fn e2_mut(&mut self) -> &mut String {
2317            self.e2.get_or_insert_default()
2318        }
2319        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2320        pub fn e2_opt(&self) -> Option<&str> {
2321            self.e2.as_ref().map(|field| field as _)
2322        }
2323        ///Sets `e2` with the provided value.
2324        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2325            self.e2 = Some(field.into().into());
2326        }
2327        ///Sets `e2` with the provided value.
2328        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2329            self.set_e2(field.into());
2330            self
2331        }
2332    }
2333    impl super::CircomG2 {
2334        pub const fn const_default() -> Self {
2335            Self {
2336                e00: None,
2337                e01: None,
2338                e10: None,
2339                e11: None,
2340                e20: None,
2341                e21: None,
2342            }
2343        }
2344        #[doc(hidden)]
2345        pub fn default_instance() -> &'static Self {
2346            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2347            &DEFAULT
2348        }
2349        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2350        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2351            self.e00.as_mut().map(|field| field as _)
2352        }
2353        ///Returns a mutable reference to `e00`.
2354        ///If the field is unset, it is first initialized with the default value.
2355        pub fn e00_mut(&mut self) -> &mut String {
2356            self.e00.get_or_insert_default()
2357        }
2358        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2359        pub fn e00_opt(&self) -> Option<&str> {
2360            self.e00.as_ref().map(|field| field as _)
2361        }
2362        ///Sets `e00` with the provided value.
2363        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2364            self.e00 = Some(field.into().into());
2365        }
2366        ///Sets `e00` with the provided value.
2367        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2368            self.set_e00(field.into());
2369            self
2370        }
2371        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2372        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2373            self.e01.as_mut().map(|field| field as _)
2374        }
2375        ///Returns a mutable reference to `e01`.
2376        ///If the field is unset, it is first initialized with the default value.
2377        pub fn e01_mut(&mut self) -> &mut String {
2378            self.e01.get_or_insert_default()
2379        }
2380        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2381        pub fn e01_opt(&self) -> Option<&str> {
2382            self.e01.as_ref().map(|field| field as _)
2383        }
2384        ///Sets `e01` with the provided value.
2385        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2386            self.e01 = Some(field.into().into());
2387        }
2388        ///Sets `e01` with the provided value.
2389        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2390            self.set_e01(field.into());
2391            self
2392        }
2393        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2394        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2395            self.e10.as_mut().map(|field| field as _)
2396        }
2397        ///Returns a mutable reference to `e10`.
2398        ///If the field is unset, it is first initialized with the default value.
2399        pub fn e10_mut(&mut self) -> &mut String {
2400            self.e10.get_or_insert_default()
2401        }
2402        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2403        pub fn e10_opt(&self) -> Option<&str> {
2404            self.e10.as_ref().map(|field| field as _)
2405        }
2406        ///Sets `e10` with the provided value.
2407        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2408            self.e10 = Some(field.into().into());
2409        }
2410        ///Sets `e10` with the provided value.
2411        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2412            self.set_e10(field.into());
2413            self
2414        }
2415        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2416        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2417            self.e11.as_mut().map(|field| field as _)
2418        }
2419        ///Returns a mutable reference to `e11`.
2420        ///If the field is unset, it is first initialized with the default value.
2421        pub fn e11_mut(&mut self) -> &mut String {
2422            self.e11.get_or_insert_default()
2423        }
2424        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2425        pub fn e11_opt(&self) -> Option<&str> {
2426            self.e11.as_ref().map(|field| field as _)
2427        }
2428        ///Sets `e11` with the provided value.
2429        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2430            self.e11 = Some(field.into().into());
2431        }
2432        ///Sets `e11` with the provided value.
2433        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2434            self.set_e11(field.into());
2435            self
2436        }
2437        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2438        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2439            self.e20.as_mut().map(|field| field as _)
2440        }
2441        ///Returns a mutable reference to `e20`.
2442        ///If the field is unset, it is first initialized with the default value.
2443        pub fn e20_mut(&mut self) -> &mut String {
2444            self.e20.get_or_insert_default()
2445        }
2446        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2447        pub fn e20_opt(&self) -> Option<&str> {
2448            self.e20.as_ref().map(|field| field as _)
2449        }
2450        ///Sets `e20` with the provided value.
2451        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2452            self.e20 = Some(field.into().into());
2453        }
2454        ///Sets `e20` with the provided value.
2455        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2456            self.set_e20(field.into());
2457            self
2458        }
2459        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2460        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2461            self.e21.as_mut().map(|field| field as _)
2462        }
2463        ///Returns a mutable reference to `e21`.
2464        ///If the field is unset, it is first initialized with the default value.
2465        pub fn e21_mut(&mut self) -> &mut String {
2466            self.e21.get_or_insert_default()
2467        }
2468        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2469        pub fn e21_opt(&self) -> Option<&str> {
2470            self.e21.as_ref().map(|field| field as _)
2471        }
2472        ///Sets `e21` with the provided value.
2473        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2474            self.e21 = Some(field.into().into());
2475        }
2476        ///Sets `e21` with the provided value.
2477        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2478            self.set_e21(field.into());
2479            self
2480        }
2481    }
2482    impl super::CleverError {
2483        pub const fn const_default() -> Self {
2484            Self {
2485                error_code: None,
2486                line_number: None,
2487                constant_name: None,
2488                constant_type: None,
2489                value: None,
2490            }
2491        }
2492        #[doc(hidden)]
2493        pub fn default_instance() -> &'static Self {
2494            static DEFAULT: super::CleverError = super::CleverError::const_default();
2495            &DEFAULT
2496        }
2497        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2498        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2499            self.error_code.as_mut().map(|field| field as _)
2500        }
2501        ///Returns a mutable reference to `error_code`.
2502        ///If the field is unset, it is first initialized with the default value.
2503        pub fn error_code_mut(&mut self) -> &mut u64 {
2504            self.error_code.get_or_insert_default()
2505        }
2506        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2507        pub fn error_code_opt(&self) -> Option<u64> {
2508            self.error_code.as_ref().map(|field| *field)
2509        }
2510        ///Sets `error_code` with the provided value.
2511        pub fn set_error_code(&mut self, field: u64) {
2512            self.error_code = Some(field);
2513        }
2514        ///Sets `error_code` with the provided value.
2515        pub fn with_error_code(mut self, field: u64) -> Self {
2516            self.set_error_code(field);
2517            self
2518        }
2519        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2520        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2521            self.line_number.as_mut().map(|field| field as _)
2522        }
2523        ///Returns a mutable reference to `line_number`.
2524        ///If the field is unset, it is first initialized with the default value.
2525        pub fn line_number_mut(&mut self) -> &mut u64 {
2526            self.line_number.get_or_insert_default()
2527        }
2528        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2529        pub fn line_number_opt(&self) -> Option<u64> {
2530            self.line_number.as_ref().map(|field| *field)
2531        }
2532        ///Sets `line_number` with the provided value.
2533        pub fn set_line_number(&mut self, field: u64) {
2534            self.line_number = Some(field);
2535        }
2536        ///Sets `line_number` with the provided value.
2537        pub fn with_line_number(mut self, field: u64) -> Self {
2538            self.set_line_number(field);
2539            self
2540        }
2541        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2542        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2543            self.constant_name.as_mut().map(|field| field as _)
2544        }
2545        ///Returns a mutable reference to `constant_name`.
2546        ///If the field is unset, it is first initialized with the default value.
2547        pub fn constant_name_mut(&mut self) -> &mut String {
2548            self.constant_name.get_or_insert_default()
2549        }
2550        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2551        pub fn constant_name_opt(&self) -> Option<&str> {
2552            self.constant_name.as_ref().map(|field| field as _)
2553        }
2554        ///Sets `constant_name` with the provided value.
2555        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2556            self.constant_name = Some(field.into().into());
2557        }
2558        ///Sets `constant_name` with the provided value.
2559        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2560            self.set_constant_name(field.into());
2561            self
2562        }
2563        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2564        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2565            self.constant_type.as_mut().map(|field| field as _)
2566        }
2567        ///Returns a mutable reference to `constant_type`.
2568        ///If the field is unset, it is first initialized with the default value.
2569        pub fn constant_type_mut(&mut self) -> &mut String {
2570            self.constant_type.get_or_insert_default()
2571        }
2572        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2573        pub fn constant_type_opt(&self) -> Option<&str> {
2574            self.constant_type.as_ref().map(|field| field as _)
2575        }
2576        ///Sets `constant_type` with the provided value.
2577        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2578            self.constant_type = Some(field.into().into());
2579        }
2580        ///Sets `constant_type` with the provided value.
2581        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2582            self.set_constant_type(field.into());
2583            self
2584        }
2585        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2586        pub fn rendered(&self) -> &str {
2587            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2588                field as _
2589            } else {
2590                ""
2591            }
2592        }
2593        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2594        pub fn rendered_opt(&self) -> Option<&str> {
2595            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2596                Some(field as _)
2597            } else {
2598                None
2599            }
2600        }
2601        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2602        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2603            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2604                Some(field as _)
2605            } else {
2606                None
2607            }
2608        }
2609        ///Returns a mutable reference to `rendered`.
2610        ///If the field is unset, it is first initialized with the default value.
2611        ///If any other oneof field in the same oneof is set, it will be cleared.
2612        pub fn rendered_mut(&mut self) -> &mut String {
2613            if self.rendered_opt_mut().is_none() {
2614                self.value = Some(
2615                    super::clever_error::Value::Rendered(String::default()),
2616                );
2617            }
2618            self.rendered_opt_mut().unwrap()
2619        }
2620        ///Sets `rendered` with the provided value.
2621        ///If any other oneof field in the same oneof is set, it will be cleared.
2622        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2623            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2624        }
2625        ///Sets `rendered` with the provided value.
2626        ///If any other oneof field in the same oneof is set, it will be cleared.
2627        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2628            self.set_rendered(field.into());
2629            self
2630        }
2631        ///Returns the value of `raw`, or the default value if `raw` is unset.
2632        pub fn raw(&self) -> &[u8] {
2633            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2634                field as _
2635            } else {
2636                &[]
2637            }
2638        }
2639        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2640        pub fn raw_opt(&self) -> Option<&[u8]> {
2641            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2642                Some(field as _)
2643            } else {
2644                None
2645            }
2646        }
2647        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2648        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2649            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2650                Some(field as _)
2651            } else {
2652                None
2653            }
2654        }
2655        ///Returns a mutable reference to `raw`.
2656        ///If the field is unset, it is first initialized with the default value.
2657        ///If any other oneof field in the same oneof is set, it will be cleared.
2658        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2659            if self.raw_opt_mut().is_none() {
2660                self.value = Some(
2661                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2662                );
2663            }
2664            self.raw_opt_mut().unwrap()
2665        }
2666        ///Sets `raw` with the provided value.
2667        ///If any other oneof field in the same oneof is set, it will be cleared.
2668        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2669            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2670        }
2671        ///Sets `raw` with the provided value.
2672        ///If any other oneof field in the same oneof is set, it will be cleared.
2673        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2674            self.set_raw(field.into());
2675            self
2676        }
2677    }
2678    impl super::CoinDenyListError {
2679        pub const fn const_default() -> Self {
2680            Self {
2681                address: None,
2682                coin_type: None,
2683            }
2684        }
2685        #[doc(hidden)]
2686        pub fn default_instance() -> &'static Self {
2687            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2688            &DEFAULT
2689        }
2690        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2691        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2692            self.address.as_mut().map(|field| field as _)
2693        }
2694        ///Returns a mutable reference to `address`.
2695        ///If the field is unset, it is first initialized with the default value.
2696        pub fn address_mut(&mut self) -> &mut String {
2697            self.address.get_or_insert_default()
2698        }
2699        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2700        pub fn address_opt(&self) -> Option<&str> {
2701            self.address.as_ref().map(|field| field as _)
2702        }
2703        ///Sets `address` with the provided value.
2704        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2705            self.address = Some(field.into().into());
2706        }
2707        ///Sets `address` with the provided value.
2708        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2709            self.set_address(field.into());
2710            self
2711        }
2712        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2713        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2714            self.coin_type.as_mut().map(|field| field as _)
2715        }
2716        ///Returns a mutable reference to `coin_type`.
2717        ///If the field is unset, it is first initialized with the default value.
2718        pub fn coin_type_mut(&mut self) -> &mut String {
2719            self.coin_type.get_or_insert_default()
2720        }
2721        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2722        pub fn coin_type_opt(&self) -> Option<&str> {
2723            self.coin_type.as_ref().map(|field| field as _)
2724        }
2725        ///Sets `coin_type` with the provided value.
2726        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2727            self.coin_type = Some(field.into().into());
2728        }
2729        ///Sets `coin_type` with the provided value.
2730        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2731            self.set_coin_type(field.into());
2732            self
2733        }
2734    }
2735    impl super::CoinMetadata {
2736        pub const fn const_default() -> Self {
2737            Self {
2738                id: None,
2739                decimals: None,
2740                name: None,
2741                symbol: None,
2742                description: None,
2743                icon_url: None,
2744                metadata_cap_id: None,
2745                metadata_cap_state: None,
2746            }
2747        }
2748        #[doc(hidden)]
2749        pub fn default_instance() -> &'static Self {
2750            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2751            &DEFAULT
2752        }
2753        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2754        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2755            self.id.as_mut().map(|field| field as _)
2756        }
2757        ///Returns a mutable reference to `id`.
2758        ///If the field is unset, it is first initialized with the default value.
2759        pub fn id_mut(&mut self) -> &mut String {
2760            self.id.get_or_insert_default()
2761        }
2762        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2763        pub fn id_opt(&self) -> Option<&str> {
2764            self.id.as_ref().map(|field| field as _)
2765        }
2766        ///Sets `id` with the provided value.
2767        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2768            self.id = Some(field.into().into());
2769        }
2770        ///Sets `id` with the provided value.
2771        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2772            self.set_id(field.into());
2773            self
2774        }
2775        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2776        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2777            self.decimals.as_mut().map(|field| field as _)
2778        }
2779        ///Returns a mutable reference to `decimals`.
2780        ///If the field is unset, it is first initialized with the default value.
2781        pub fn decimals_mut(&mut self) -> &mut u32 {
2782            self.decimals.get_or_insert_default()
2783        }
2784        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2785        pub fn decimals_opt(&self) -> Option<u32> {
2786            self.decimals.as_ref().map(|field| *field)
2787        }
2788        ///Sets `decimals` with the provided value.
2789        pub fn set_decimals(&mut self, field: u32) {
2790            self.decimals = Some(field);
2791        }
2792        ///Sets `decimals` with the provided value.
2793        pub fn with_decimals(mut self, field: u32) -> Self {
2794            self.set_decimals(field);
2795            self
2796        }
2797        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2798        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2799            self.name.as_mut().map(|field| field as _)
2800        }
2801        ///Returns a mutable reference to `name`.
2802        ///If the field is unset, it is first initialized with the default value.
2803        pub fn name_mut(&mut self) -> &mut String {
2804            self.name.get_or_insert_default()
2805        }
2806        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2807        pub fn name_opt(&self) -> Option<&str> {
2808            self.name.as_ref().map(|field| field as _)
2809        }
2810        ///Sets `name` with the provided value.
2811        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2812            self.name = Some(field.into().into());
2813        }
2814        ///Sets `name` with the provided value.
2815        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2816            self.set_name(field.into());
2817            self
2818        }
2819        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2820        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2821            self.symbol.as_mut().map(|field| field as _)
2822        }
2823        ///Returns a mutable reference to `symbol`.
2824        ///If the field is unset, it is first initialized with the default value.
2825        pub fn symbol_mut(&mut self) -> &mut String {
2826            self.symbol.get_or_insert_default()
2827        }
2828        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2829        pub fn symbol_opt(&self) -> Option<&str> {
2830            self.symbol.as_ref().map(|field| field as _)
2831        }
2832        ///Sets `symbol` with the provided value.
2833        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2834            self.symbol = Some(field.into().into());
2835        }
2836        ///Sets `symbol` with the provided value.
2837        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2838            self.set_symbol(field.into());
2839            self
2840        }
2841        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2842        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2843            self.description.as_mut().map(|field| field as _)
2844        }
2845        ///Returns a mutable reference to `description`.
2846        ///If the field is unset, it is first initialized with the default value.
2847        pub fn description_mut(&mut self) -> &mut String {
2848            self.description.get_or_insert_default()
2849        }
2850        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2851        pub fn description_opt(&self) -> Option<&str> {
2852            self.description.as_ref().map(|field| field as _)
2853        }
2854        ///Sets `description` with the provided value.
2855        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2856            self.description = Some(field.into().into());
2857        }
2858        ///Sets `description` with the provided value.
2859        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2860            self.set_description(field.into());
2861            self
2862        }
2863        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2864        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2865            self.icon_url.as_mut().map(|field| field as _)
2866        }
2867        ///Returns a mutable reference to `icon_url`.
2868        ///If the field is unset, it is first initialized with the default value.
2869        pub fn icon_url_mut(&mut self) -> &mut String {
2870            self.icon_url.get_or_insert_default()
2871        }
2872        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2873        pub fn icon_url_opt(&self) -> Option<&str> {
2874            self.icon_url.as_ref().map(|field| field as _)
2875        }
2876        ///Sets `icon_url` with the provided value.
2877        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2878            self.icon_url = Some(field.into().into());
2879        }
2880        ///Sets `icon_url` with the provided value.
2881        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2882            self.set_icon_url(field.into());
2883            self
2884        }
2885        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2886        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2887            self.metadata_cap_id.as_mut().map(|field| field as _)
2888        }
2889        ///Returns a mutable reference to `metadata_cap_id`.
2890        ///If the field is unset, it is first initialized with the default value.
2891        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2892            self.metadata_cap_id.get_or_insert_default()
2893        }
2894        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2895        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2896            self.metadata_cap_id.as_ref().map(|field| field as _)
2897        }
2898        ///Sets `metadata_cap_id` with the provided value.
2899        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2900            self.metadata_cap_id = Some(field.into().into());
2901        }
2902        ///Sets `metadata_cap_id` with the provided value.
2903        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2904            self.set_metadata_cap_id(field.into());
2905            self
2906        }
2907        ///Sets `metadata_cap_state` with the provided value.
2908        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2909            mut self,
2910            field: T,
2911        ) -> Self {
2912            self.set_metadata_cap_state(field.into());
2913            self
2914        }
2915    }
2916    impl super::CoinTreasury {
2917        pub const fn const_default() -> Self {
2918            Self {
2919                id: None,
2920                total_supply: None,
2921                supply_state: None,
2922            }
2923        }
2924        #[doc(hidden)]
2925        pub fn default_instance() -> &'static Self {
2926            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2927            &DEFAULT
2928        }
2929        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2930        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2931            self.id.as_mut().map(|field| field as _)
2932        }
2933        ///Returns a mutable reference to `id`.
2934        ///If the field is unset, it is first initialized with the default value.
2935        pub fn id_mut(&mut self) -> &mut String {
2936            self.id.get_or_insert_default()
2937        }
2938        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2939        pub fn id_opt(&self) -> Option<&str> {
2940            self.id.as_ref().map(|field| field as _)
2941        }
2942        ///Sets `id` with the provided value.
2943        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2944            self.id = Some(field.into().into());
2945        }
2946        ///Sets `id` with the provided value.
2947        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2948            self.set_id(field.into());
2949            self
2950        }
2951        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2952        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2953            self.total_supply.as_mut().map(|field| field as _)
2954        }
2955        ///Returns a mutable reference to `total_supply`.
2956        ///If the field is unset, it is first initialized with the default value.
2957        pub fn total_supply_mut(&mut self) -> &mut u64 {
2958            self.total_supply.get_or_insert_default()
2959        }
2960        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2961        pub fn total_supply_opt(&self) -> Option<u64> {
2962            self.total_supply.as_ref().map(|field| *field)
2963        }
2964        ///Sets `total_supply` with the provided value.
2965        pub fn set_total_supply(&mut self, field: u64) {
2966            self.total_supply = Some(field);
2967        }
2968        ///Sets `total_supply` with the provided value.
2969        pub fn with_total_supply(mut self, field: u64) -> Self {
2970            self.set_total_supply(field);
2971            self
2972        }
2973        ///Sets `supply_state` with the provided value.
2974        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2975            mut self,
2976            field: T,
2977        ) -> Self {
2978            self.set_supply_state(field.into());
2979            self
2980        }
2981    }
2982    impl super::Command {
2983        pub const fn const_default() -> Self {
2984            Self { command: None }
2985        }
2986        #[doc(hidden)]
2987        pub fn default_instance() -> &'static Self {
2988            static DEFAULT: super::Command = super::Command::const_default();
2989            &DEFAULT
2990        }
2991        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2992        pub fn move_call(&self) -> &super::MoveCall {
2993            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2994                field as _
2995            } else {
2996                super::MoveCall::default_instance() as _
2997            }
2998        }
2999        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
3000        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3001            if let Some(super::command::Command::MoveCall(field)) = &self.command {
3002                Some(field as _)
3003            } else {
3004                None
3005            }
3006        }
3007        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3008        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3009            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3010                Some(field as _)
3011            } else {
3012                None
3013            }
3014        }
3015        ///Returns a mutable reference to `move_call`.
3016        ///If the field is unset, it is first initialized with the default value.
3017        ///If any other oneof field in the same oneof is set, it will be cleared.
3018        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3019            if self.move_call_opt_mut().is_none() {
3020                self.command = Some(
3021                    super::command::Command::MoveCall(super::MoveCall::default()),
3022                );
3023            }
3024            self.move_call_opt_mut().unwrap()
3025        }
3026        ///Sets `move_call` with the provided value.
3027        ///If any other oneof field in the same oneof is set, it will be cleared.
3028        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3029            self.command = Some(super::command::Command::MoveCall(field.into().into()));
3030        }
3031        ///Sets `move_call` with the provided value.
3032        ///If any other oneof field in the same oneof is set, it will be cleared.
3033        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3034            self.set_move_call(field.into());
3035            self
3036        }
3037        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
3038        pub fn transfer_objects(&self) -> &super::TransferObjects {
3039            if let Some(super::command::Command::TransferObjects(field)) = &self.command
3040            {
3041                field as _
3042            } else {
3043                super::TransferObjects::default_instance() as _
3044            }
3045        }
3046        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
3047        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3048            if let Some(super::command::Command::TransferObjects(field)) = &self.command
3049            {
3050                Some(field as _)
3051            } else {
3052                None
3053            }
3054        }
3055        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3056        pub fn transfer_objects_opt_mut(
3057            &mut self,
3058        ) -> Option<&mut super::TransferObjects> {
3059            if let Some(super::command::Command::TransferObjects(field)) = &mut self
3060                .command
3061            {
3062                Some(field as _)
3063            } else {
3064                None
3065            }
3066        }
3067        ///Returns a mutable reference to `transfer_objects`.
3068        ///If the field is unset, it is first initialized with the default value.
3069        ///If any other oneof field in the same oneof is set, it will be cleared.
3070        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3071            if self.transfer_objects_opt_mut().is_none() {
3072                self.command = Some(
3073                    super::command::Command::TransferObjects(
3074                        super::TransferObjects::default(),
3075                    ),
3076                );
3077            }
3078            self.transfer_objects_opt_mut().unwrap()
3079        }
3080        ///Sets `transfer_objects` with the provided value.
3081        ///If any other oneof field in the same oneof is set, it will be cleared.
3082        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3083            &mut self,
3084            field: T,
3085        ) {
3086            self.command = Some(
3087                super::command::Command::TransferObjects(field.into().into()),
3088            );
3089        }
3090        ///Sets `transfer_objects` with the provided value.
3091        ///If any other oneof field in the same oneof is set, it will be cleared.
3092        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3093            mut self,
3094            field: T,
3095        ) -> Self {
3096            self.set_transfer_objects(field.into());
3097            self
3098        }
3099        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
3100        pub fn split_coins(&self) -> &super::SplitCoins {
3101            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3102                field as _
3103            } else {
3104                super::SplitCoins::default_instance() as _
3105            }
3106        }
3107        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3108        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3109            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3110                Some(field as _)
3111            } else {
3112                None
3113            }
3114        }
3115        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3116        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3117            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3118                Some(field as _)
3119            } else {
3120                None
3121            }
3122        }
3123        ///Returns a mutable reference to `split_coins`.
3124        ///If the field is unset, it is first initialized with the default value.
3125        ///If any other oneof field in the same oneof is set, it will be cleared.
3126        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3127            if self.split_coins_opt_mut().is_none() {
3128                self.command = Some(
3129                    super::command::Command::SplitCoins(super::SplitCoins::default()),
3130                );
3131            }
3132            self.split_coins_opt_mut().unwrap()
3133        }
3134        ///Sets `split_coins` with the provided value.
3135        ///If any other oneof field in the same oneof is set, it will be cleared.
3136        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3137            self.command = Some(
3138                super::command::Command::SplitCoins(field.into().into()),
3139            );
3140        }
3141        ///Sets `split_coins` with the provided value.
3142        ///If any other oneof field in the same oneof is set, it will be cleared.
3143        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3144            self.set_split_coins(field.into());
3145            self
3146        }
3147        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
3148        pub fn merge_coins(&self) -> &super::MergeCoins {
3149            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3150                field as _
3151            } else {
3152                super::MergeCoins::default_instance() as _
3153            }
3154        }
3155        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3156        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3157            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3158                Some(field as _)
3159            } else {
3160                None
3161            }
3162        }
3163        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3164        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3165            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3166                Some(field as _)
3167            } else {
3168                None
3169            }
3170        }
3171        ///Returns a mutable reference to `merge_coins`.
3172        ///If the field is unset, it is first initialized with the default value.
3173        ///If any other oneof field in the same oneof is set, it will be cleared.
3174        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3175            if self.merge_coins_opt_mut().is_none() {
3176                self.command = Some(
3177                    super::command::Command::MergeCoins(super::MergeCoins::default()),
3178                );
3179            }
3180            self.merge_coins_opt_mut().unwrap()
3181        }
3182        ///Sets `merge_coins` with the provided value.
3183        ///If any other oneof field in the same oneof is set, it will be cleared.
3184        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3185            self.command = Some(
3186                super::command::Command::MergeCoins(field.into().into()),
3187            );
3188        }
3189        ///Sets `merge_coins` with the provided value.
3190        ///If any other oneof field in the same oneof is set, it will be cleared.
3191        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3192            self.set_merge_coins(field.into());
3193            self
3194        }
3195        ///Returns the value of `publish`, or the default value if `publish` is unset.
3196        pub fn publish(&self) -> &super::Publish {
3197            if let Some(super::command::Command::Publish(field)) = &self.command {
3198                field as _
3199            } else {
3200                super::Publish::default_instance() as _
3201            }
3202        }
3203        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
3204        pub fn publish_opt(&self) -> Option<&super::Publish> {
3205            if let Some(super::command::Command::Publish(field)) = &self.command {
3206                Some(field as _)
3207            } else {
3208                None
3209            }
3210        }
3211        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3212        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3213            if let Some(super::command::Command::Publish(field)) = &mut self.command {
3214                Some(field as _)
3215            } else {
3216                None
3217            }
3218        }
3219        ///Returns a mutable reference to `publish`.
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 publish_mut(&mut self) -> &mut super::Publish {
3223            if self.publish_opt_mut().is_none() {
3224                self.command = Some(
3225                    super::command::Command::Publish(super::Publish::default()),
3226                );
3227            }
3228            self.publish_opt_mut().unwrap()
3229        }
3230        ///Sets `publish` with the provided value.
3231        ///If any other oneof field in the same oneof is set, it will be cleared.
3232        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3233            self.command = Some(super::command::Command::Publish(field.into().into()));
3234        }
3235        ///Sets `publish` with the provided value.
3236        ///If any other oneof field in the same oneof is set, it will be cleared.
3237        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3238            self.set_publish(field.into());
3239            self
3240        }
3241        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
3242        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3243            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3244                field as _
3245            } else {
3246                super::MakeMoveVector::default_instance() as _
3247            }
3248        }
3249        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
3250        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3251            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3252                Some(field as _)
3253            } else {
3254                None
3255            }
3256        }
3257        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3258        pub fn make_move_vector_opt_mut(
3259            &mut self,
3260        ) -> Option<&mut super::MakeMoveVector> {
3261            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3262                .command
3263            {
3264                Some(field as _)
3265            } else {
3266                None
3267            }
3268        }
3269        ///Returns a mutable reference to `make_move_vector`.
3270        ///If the field is unset, it is first initialized with the default value.
3271        ///If any other oneof field in the same oneof is set, it will be cleared.
3272        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3273            if self.make_move_vector_opt_mut().is_none() {
3274                self.command = Some(
3275                    super::command::Command::MakeMoveVector(
3276                        super::MakeMoveVector::default(),
3277                    ),
3278                );
3279            }
3280            self.make_move_vector_opt_mut().unwrap()
3281        }
3282        ///Sets `make_move_vector` with the provided value.
3283        ///If any other oneof field in the same oneof is set, it will be cleared.
3284        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3285            &mut self,
3286            field: T,
3287        ) {
3288            self.command = Some(
3289                super::command::Command::MakeMoveVector(field.into().into()),
3290            );
3291        }
3292        ///Sets `make_move_vector` with the provided value.
3293        ///If any other oneof field in the same oneof is set, it will be cleared.
3294        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3295            mut self,
3296            field: T,
3297        ) -> Self {
3298            self.set_make_move_vector(field.into());
3299            self
3300        }
3301        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3302        pub fn upgrade(&self) -> &super::Upgrade {
3303            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3304                field as _
3305            } else {
3306                super::Upgrade::default_instance() as _
3307            }
3308        }
3309        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3310        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3311            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3312                Some(field as _)
3313            } else {
3314                None
3315            }
3316        }
3317        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3318        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3319            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3320                Some(field as _)
3321            } else {
3322                None
3323            }
3324        }
3325        ///Returns a mutable reference to `upgrade`.
3326        ///If the field is unset, it is first initialized with the default value.
3327        ///If any other oneof field in the same oneof is set, it will be cleared.
3328        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3329            if self.upgrade_opt_mut().is_none() {
3330                self.command = Some(
3331                    super::command::Command::Upgrade(super::Upgrade::default()),
3332                );
3333            }
3334            self.upgrade_opt_mut().unwrap()
3335        }
3336        ///Sets `upgrade` with the provided value.
3337        ///If any other oneof field in the same oneof is set, it will be cleared.
3338        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3339            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3340        }
3341        ///Sets `upgrade` with the provided value.
3342        ///If any other oneof field in the same oneof is set, it will be cleared.
3343        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3344            self.set_upgrade(field.into());
3345            self
3346        }
3347    }
3348    impl super::CommandArgumentError {
3349        pub const fn const_default() -> Self {
3350            Self {
3351                argument: None,
3352                kind: None,
3353                index_error: None,
3354            }
3355        }
3356        #[doc(hidden)]
3357        pub fn default_instance() -> &'static Self {
3358            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3359            &DEFAULT
3360        }
3361        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3362        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3363            self.argument.as_mut().map(|field| field as _)
3364        }
3365        ///Returns a mutable reference to `argument`.
3366        ///If the field is unset, it is first initialized with the default value.
3367        pub fn argument_mut(&mut self) -> &mut u32 {
3368            self.argument.get_or_insert_default()
3369        }
3370        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3371        pub fn argument_opt(&self) -> Option<u32> {
3372            self.argument.as_ref().map(|field| *field)
3373        }
3374        ///Sets `argument` with the provided value.
3375        pub fn set_argument(&mut self, field: u32) {
3376            self.argument = Some(field);
3377        }
3378        ///Sets `argument` with the provided value.
3379        pub fn with_argument(mut self, field: u32) -> Self {
3380            self.set_argument(field);
3381            self
3382        }
3383        ///Sets `kind` with the provided value.
3384        pub fn with_kind<
3385            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3386        >(mut self, field: T) -> Self {
3387            self.set_kind(field.into());
3388            self
3389        }
3390        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3391        pub fn index_error(&self) -> &super::IndexError {
3392            self.index_error
3393                .as_ref()
3394                .map(|field| field as _)
3395                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3396        }
3397        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3398        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3399            self.index_error.as_mut().map(|field| field as _)
3400        }
3401        ///Returns a mutable reference to `index_error`.
3402        ///If the field is unset, it is first initialized with the default value.
3403        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3404            self.index_error.get_or_insert_default()
3405        }
3406        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3407        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3408            self.index_error.as_ref().map(|field| field as _)
3409        }
3410        ///Sets `index_error` with the provided value.
3411        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3412            self.index_error = Some(field.into().into());
3413        }
3414        ///Sets `index_error` with the provided value.
3415        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3416            self.set_index_error(field.into());
3417            self
3418        }
3419    }
3420    impl super::CommandOutput {
3421        pub const fn const_default() -> Self {
3422            Self {
3423                argument: None,
3424                value: None,
3425                json: None,
3426            }
3427        }
3428        #[doc(hidden)]
3429        pub fn default_instance() -> &'static Self {
3430            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3431            &DEFAULT
3432        }
3433        ///Returns the value of `argument`, or the default value if `argument` is unset.
3434        pub fn argument(&self) -> &super::Argument {
3435            self.argument
3436                .as_ref()
3437                .map(|field| field as _)
3438                .unwrap_or_else(|| super::Argument::default_instance() as _)
3439        }
3440        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3441        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3442            self.argument.as_mut().map(|field| field as _)
3443        }
3444        ///Returns a mutable reference to `argument`.
3445        ///If the field is unset, it is first initialized with the default value.
3446        pub fn argument_mut(&mut self) -> &mut super::Argument {
3447            self.argument.get_or_insert_default()
3448        }
3449        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3450        pub fn argument_opt(&self) -> Option<&super::Argument> {
3451            self.argument.as_ref().map(|field| field as _)
3452        }
3453        ///Sets `argument` with the provided value.
3454        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3455            self.argument = Some(field.into().into());
3456        }
3457        ///Sets `argument` with the provided value.
3458        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3459            self.set_argument(field.into());
3460            self
3461        }
3462        ///Returns the value of `value`, or the default value if `value` is unset.
3463        pub fn value(&self) -> &super::Bcs {
3464            self.value
3465                .as_ref()
3466                .map(|field| field as _)
3467                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3468        }
3469        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3470        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3471            self.value.as_mut().map(|field| field as _)
3472        }
3473        ///Returns a mutable reference to `value`.
3474        ///If the field is unset, it is first initialized with the default value.
3475        pub fn value_mut(&mut self) -> &mut super::Bcs {
3476            self.value.get_or_insert_default()
3477        }
3478        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3479        pub fn value_opt(&self) -> Option<&super::Bcs> {
3480            self.value.as_ref().map(|field| field as _)
3481        }
3482        ///Sets `value` with the provided value.
3483        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3484            self.value = Some(field.into().into());
3485        }
3486        ///Sets `value` with the provided value.
3487        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3488            self.set_value(field.into());
3489            self
3490        }
3491        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3492        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3493            self.json.as_mut().map(|field| field as _)
3494        }
3495        ///Returns a mutable reference to `json`.
3496        ///If the field is unset, it is first initialized with the default value.
3497        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3498            self.json.get_or_insert_default()
3499        }
3500        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3501        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3502            self.json.as_ref().map(|field| field as _)
3503        }
3504        ///Sets `json` with the provided value.
3505        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3506            self.json = Some(field.into().into());
3507        }
3508        ///Sets `json` with the provided value.
3509        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3510            self.set_json(field.into());
3511            self
3512        }
3513    }
3514    impl super::CommandResult {
3515        pub const fn const_default() -> Self {
3516            Self {
3517                return_values: Vec::new(),
3518                mutated_by_ref: Vec::new(),
3519            }
3520        }
3521        #[doc(hidden)]
3522        pub fn default_instance() -> &'static Self {
3523            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3524            &DEFAULT
3525        }
3526        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3527        pub fn return_values(&self) -> &[super::CommandOutput] {
3528            &self.return_values
3529        }
3530        ///Returns a mutable reference to `return_values`.
3531        ///If the field is unset, it is first initialized with the default value.
3532        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3533            &mut self.return_values
3534        }
3535        ///Sets `return_values` with the provided value.
3536        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3537            self.return_values = field;
3538        }
3539        ///Sets `return_values` with the provided value.
3540        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3541            self.set_return_values(field);
3542            self
3543        }
3544        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3545        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3546            &self.mutated_by_ref
3547        }
3548        ///Returns a mutable reference to `mutated_by_ref`.
3549        ///If the field is unset, it is first initialized with the default value.
3550        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3551            &mut self.mutated_by_ref
3552        }
3553        ///Sets `mutated_by_ref` with the provided value.
3554        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3555            self.mutated_by_ref = field;
3556        }
3557        ///Sets `mutated_by_ref` with the provided value.
3558        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3559            self.set_mutated_by_ref(field);
3560            self
3561        }
3562    }
3563    impl super::CongestedObjects {
3564        pub const fn const_default() -> Self {
3565            Self { objects: Vec::new() }
3566        }
3567        #[doc(hidden)]
3568        pub fn default_instance() -> &'static Self {
3569            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3570            &DEFAULT
3571        }
3572        ///Returns the value of `objects`, or the default value if `objects` is unset.
3573        pub fn objects(&self) -> &[String] {
3574            &self.objects
3575        }
3576        ///Returns a mutable reference to `objects`.
3577        ///If the field is unset, it is first initialized with the default value.
3578        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3579            &mut self.objects
3580        }
3581        ///Sets `objects` with the provided value.
3582        pub fn set_objects(&mut self, field: Vec<String>) {
3583            self.objects = field;
3584        }
3585        ///Sets `objects` with the provided value.
3586        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3587            self.set_objects(field);
3588            self
3589        }
3590    }
3591    impl super::ConsensusCommitPrologue {
3592        pub const fn const_default() -> Self {
3593            Self {
3594                epoch: None,
3595                round: None,
3596                commit_timestamp: None,
3597                consensus_commit_digest: None,
3598                sub_dag_index: None,
3599                consensus_determined_version_assignments: None,
3600                additional_state_digest: None,
3601            }
3602        }
3603        #[doc(hidden)]
3604        pub fn default_instance() -> &'static Self {
3605            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3606            &DEFAULT
3607        }
3608        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3609        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3610            self.epoch.as_mut().map(|field| field as _)
3611        }
3612        ///Returns a mutable reference to `epoch`.
3613        ///If the field is unset, it is first initialized with the default value.
3614        pub fn epoch_mut(&mut self) -> &mut u64 {
3615            self.epoch.get_or_insert_default()
3616        }
3617        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3618        pub fn epoch_opt(&self) -> Option<u64> {
3619            self.epoch.as_ref().map(|field| *field)
3620        }
3621        ///Sets `epoch` with the provided value.
3622        pub fn set_epoch(&mut self, field: u64) {
3623            self.epoch = Some(field);
3624        }
3625        ///Sets `epoch` with the provided value.
3626        pub fn with_epoch(mut self, field: u64) -> Self {
3627            self.set_epoch(field);
3628            self
3629        }
3630        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3631        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3632            self.round.as_mut().map(|field| field as _)
3633        }
3634        ///Returns a mutable reference to `round`.
3635        ///If the field is unset, it is first initialized with the default value.
3636        pub fn round_mut(&mut self) -> &mut u64 {
3637            self.round.get_or_insert_default()
3638        }
3639        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3640        pub fn round_opt(&self) -> Option<u64> {
3641            self.round.as_ref().map(|field| *field)
3642        }
3643        ///Sets `round` with the provided value.
3644        pub fn set_round(&mut self, field: u64) {
3645            self.round = Some(field);
3646        }
3647        ///Sets `round` with the provided value.
3648        pub fn with_round(mut self, field: u64) -> Self {
3649            self.set_round(field);
3650            self
3651        }
3652        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3653        pub fn commit_timestamp_opt_mut(
3654            &mut self,
3655        ) -> Option<&mut ::prost_types::Timestamp> {
3656            self.commit_timestamp.as_mut().map(|field| field as _)
3657        }
3658        ///Returns a mutable reference to `commit_timestamp`.
3659        ///If the field is unset, it is first initialized with the default value.
3660        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3661            self.commit_timestamp.get_or_insert_default()
3662        }
3663        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3664        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3665            self.commit_timestamp.as_ref().map(|field| field as _)
3666        }
3667        ///Sets `commit_timestamp` with the provided value.
3668        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3669            &mut self,
3670            field: T,
3671        ) {
3672            self.commit_timestamp = Some(field.into().into());
3673        }
3674        ///Sets `commit_timestamp` with the provided value.
3675        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3676            mut self,
3677            field: T,
3678        ) -> Self {
3679            self.set_commit_timestamp(field.into());
3680            self
3681        }
3682        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3683        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3684            self.consensus_commit_digest.as_mut().map(|field| field as _)
3685        }
3686        ///Returns a mutable reference to `consensus_commit_digest`.
3687        ///If the field is unset, it is first initialized with the default value.
3688        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3689            self.consensus_commit_digest.get_or_insert_default()
3690        }
3691        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3692        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3693            self.consensus_commit_digest.as_ref().map(|field| field as _)
3694        }
3695        ///Sets `consensus_commit_digest` with the provided value.
3696        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3697            self.consensus_commit_digest = Some(field.into().into());
3698        }
3699        ///Sets `consensus_commit_digest` with the provided value.
3700        pub fn with_consensus_commit_digest<T: Into<String>>(
3701            mut self,
3702            field: T,
3703        ) -> Self {
3704            self.set_consensus_commit_digest(field.into());
3705            self
3706        }
3707        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3708        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3709            self.sub_dag_index.as_mut().map(|field| field as _)
3710        }
3711        ///Returns a mutable reference to `sub_dag_index`.
3712        ///If the field is unset, it is first initialized with the default value.
3713        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3714            self.sub_dag_index.get_or_insert_default()
3715        }
3716        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3717        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3718            self.sub_dag_index.as_ref().map(|field| *field)
3719        }
3720        ///Sets `sub_dag_index` with the provided value.
3721        pub fn set_sub_dag_index(&mut self, field: u64) {
3722            self.sub_dag_index = Some(field);
3723        }
3724        ///Sets `sub_dag_index` with the provided value.
3725        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3726            self.set_sub_dag_index(field);
3727            self
3728        }
3729        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3730        pub fn consensus_determined_version_assignments(
3731            &self,
3732        ) -> &super::ConsensusDeterminedVersionAssignments {
3733            self.consensus_determined_version_assignments
3734                .as_ref()
3735                .map(|field| field as _)
3736                .unwrap_or_else(|| {
3737                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3738                })
3739        }
3740        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3741        pub fn consensus_determined_version_assignments_opt_mut(
3742            &mut self,
3743        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3744            self.consensus_determined_version_assignments
3745                .as_mut()
3746                .map(|field| field as _)
3747        }
3748        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3749        ///If the field is unset, it is first initialized with the default value.
3750        pub fn consensus_determined_version_assignments_mut(
3751            &mut self,
3752        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3753            self.consensus_determined_version_assignments.get_or_insert_default()
3754        }
3755        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3756        pub fn consensus_determined_version_assignments_opt(
3757            &self,
3758        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3759            self.consensus_determined_version_assignments
3760                .as_ref()
3761                .map(|field| field as _)
3762        }
3763        ///Sets `consensus_determined_version_assignments` with the provided value.
3764        pub fn set_consensus_determined_version_assignments<
3765            T: Into<super::ConsensusDeterminedVersionAssignments>,
3766        >(&mut self, field: T) {
3767            self.consensus_determined_version_assignments = Some(field.into().into());
3768        }
3769        ///Sets `consensus_determined_version_assignments` with the provided value.
3770        pub fn with_consensus_determined_version_assignments<
3771            T: Into<super::ConsensusDeterminedVersionAssignments>,
3772        >(mut self, field: T) -> Self {
3773            self.set_consensus_determined_version_assignments(field.into());
3774            self
3775        }
3776        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3777        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3778            self.additional_state_digest.as_mut().map(|field| field as _)
3779        }
3780        ///Returns a mutable reference to `additional_state_digest`.
3781        ///If the field is unset, it is first initialized with the default value.
3782        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3783            self.additional_state_digest.get_or_insert_default()
3784        }
3785        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3786        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3787            self.additional_state_digest.as_ref().map(|field| field as _)
3788        }
3789        ///Sets `additional_state_digest` with the provided value.
3790        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3791            self.additional_state_digest = Some(field.into().into());
3792        }
3793        ///Sets `additional_state_digest` with the provided value.
3794        pub fn with_additional_state_digest<T: Into<String>>(
3795            mut self,
3796            field: T,
3797        ) -> Self {
3798            self.set_additional_state_digest(field.into());
3799            self
3800        }
3801    }
3802    impl super::ConsensusDeterminedVersionAssignments {
3803        pub const fn const_default() -> Self {
3804            Self {
3805                version: None,
3806                canceled_transactions: Vec::new(),
3807            }
3808        }
3809        #[doc(hidden)]
3810        pub fn default_instance() -> &'static Self {
3811            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3812            &DEFAULT
3813        }
3814        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3815        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3816            self.version.as_mut().map(|field| field as _)
3817        }
3818        ///Returns a mutable reference to `version`.
3819        ///If the field is unset, it is first initialized with the default value.
3820        pub fn version_mut(&mut self) -> &mut i32 {
3821            self.version.get_or_insert_default()
3822        }
3823        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3824        pub fn version_opt(&self) -> Option<i32> {
3825            self.version.as_ref().map(|field| *field)
3826        }
3827        ///Sets `version` with the provided value.
3828        pub fn set_version(&mut self, field: i32) {
3829            self.version = Some(field);
3830        }
3831        ///Sets `version` with the provided value.
3832        pub fn with_version(mut self, field: i32) -> Self {
3833            self.set_version(field);
3834            self
3835        }
3836        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3837        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3838            &self.canceled_transactions
3839        }
3840        ///Returns a mutable reference to `canceled_transactions`.
3841        ///If the field is unset, it is first initialized with the default value.
3842        pub fn canceled_transactions_mut(
3843            &mut self,
3844        ) -> &mut Vec<super::CanceledTransaction> {
3845            &mut self.canceled_transactions
3846        }
3847        ///Sets `canceled_transactions` with the provided value.
3848        pub fn set_canceled_transactions(
3849            &mut self,
3850            field: Vec<super::CanceledTransaction>,
3851        ) {
3852            self.canceled_transactions = field;
3853        }
3854        ///Sets `canceled_transactions` with the provided value.
3855        pub fn with_canceled_transactions(
3856            mut self,
3857            field: Vec<super::CanceledTransaction>,
3858        ) -> Self {
3859            self.set_canceled_transactions(field);
3860            self
3861        }
3862    }
3863    impl super::DatatypeDescriptor {
3864        pub const fn const_default() -> Self {
3865            Self {
3866                type_name: None,
3867                defining_id: None,
3868                module: None,
3869                name: None,
3870                abilities: Vec::new(),
3871                type_parameters: Vec::new(),
3872                kind: None,
3873                fields: Vec::new(),
3874                variants: Vec::new(),
3875            }
3876        }
3877        #[doc(hidden)]
3878        pub fn default_instance() -> &'static Self {
3879            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3880            &DEFAULT
3881        }
3882        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3883        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3884            self.type_name.as_mut().map(|field| field as _)
3885        }
3886        ///Returns a mutable reference to `type_name`.
3887        ///If the field is unset, it is first initialized with the default value.
3888        pub fn type_name_mut(&mut self) -> &mut String {
3889            self.type_name.get_or_insert_default()
3890        }
3891        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3892        pub fn type_name_opt(&self) -> Option<&str> {
3893            self.type_name.as_ref().map(|field| field as _)
3894        }
3895        ///Sets `type_name` with the provided value.
3896        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3897            self.type_name = Some(field.into().into());
3898        }
3899        ///Sets `type_name` with the provided value.
3900        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3901            self.set_type_name(field.into());
3902            self
3903        }
3904        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3905        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3906            self.defining_id.as_mut().map(|field| field as _)
3907        }
3908        ///Returns a mutable reference to `defining_id`.
3909        ///If the field is unset, it is first initialized with the default value.
3910        pub fn defining_id_mut(&mut self) -> &mut String {
3911            self.defining_id.get_or_insert_default()
3912        }
3913        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3914        pub fn defining_id_opt(&self) -> Option<&str> {
3915            self.defining_id.as_ref().map(|field| field as _)
3916        }
3917        ///Sets `defining_id` with the provided value.
3918        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3919            self.defining_id = Some(field.into().into());
3920        }
3921        ///Sets `defining_id` with the provided value.
3922        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3923            self.set_defining_id(field.into());
3924            self
3925        }
3926        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3927        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3928            self.module.as_mut().map(|field| field as _)
3929        }
3930        ///Returns a mutable reference to `module`.
3931        ///If the field is unset, it is first initialized with the default value.
3932        pub fn module_mut(&mut self) -> &mut String {
3933            self.module.get_or_insert_default()
3934        }
3935        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3936        pub fn module_opt(&self) -> Option<&str> {
3937            self.module.as_ref().map(|field| field as _)
3938        }
3939        ///Sets `module` with the provided value.
3940        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3941            self.module = Some(field.into().into());
3942        }
3943        ///Sets `module` with the provided value.
3944        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3945            self.set_module(field.into());
3946            self
3947        }
3948        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3949        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3950            self.name.as_mut().map(|field| field as _)
3951        }
3952        ///Returns a mutable reference to `name`.
3953        ///If the field is unset, it is first initialized with the default value.
3954        pub fn name_mut(&mut self) -> &mut String {
3955            self.name.get_or_insert_default()
3956        }
3957        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3958        pub fn name_opt(&self) -> Option<&str> {
3959            self.name.as_ref().map(|field| field as _)
3960        }
3961        ///Sets `name` with the provided value.
3962        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3963            self.name = Some(field.into().into());
3964        }
3965        ///Sets `name` with the provided value.
3966        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3967            self.set_name(field.into());
3968            self
3969        }
3970        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3971        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3972            &self.type_parameters
3973        }
3974        ///Returns a mutable reference to `type_parameters`.
3975        ///If the field is unset, it is first initialized with the default value.
3976        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3977            &mut self.type_parameters
3978        }
3979        ///Sets `type_parameters` with the provided value.
3980        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3981            self.type_parameters = field;
3982        }
3983        ///Sets `type_parameters` with the provided value.
3984        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3985            self.set_type_parameters(field);
3986            self
3987        }
3988        ///Sets `kind` with the provided value.
3989        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3990            mut self,
3991            field: T,
3992        ) -> Self {
3993            self.set_kind(field.into());
3994            self
3995        }
3996        ///Returns the value of `fields`, or the default value if `fields` is unset.
3997        pub fn fields(&self) -> &[super::FieldDescriptor] {
3998            &self.fields
3999        }
4000        ///Returns a mutable reference to `fields`.
4001        ///If the field is unset, it is first initialized with the default value.
4002        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4003            &mut self.fields
4004        }
4005        ///Sets `fields` with the provided value.
4006        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4007            self.fields = field;
4008        }
4009        ///Sets `fields` with the provided value.
4010        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4011            self.set_fields(field);
4012            self
4013        }
4014        ///Returns the value of `variants`, or the default value if `variants` is unset.
4015        pub fn variants(&self) -> &[super::VariantDescriptor] {
4016            &self.variants
4017        }
4018        ///Returns a mutable reference to `variants`.
4019        ///If the field is unset, it is first initialized with the default value.
4020        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4021            &mut self.variants
4022        }
4023        ///Sets `variants` with the provided value.
4024        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4025            self.variants = field;
4026        }
4027        ///Sets `variants` with the provided value.
4028        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4029            self.set_variants(field);
4030            self
4031        }
4032    }
4033    impl super::Display {
4034        pub const fn const_default() -> Self {
4035            Self { output: None, errors: None }
4036        }
4037        #[doc(hidden)]
4038        pub fn default_instance() -> &'static Self {
4039            static DEFAULT: super::Display = super::Display::const_default();
4040            &DEFAULT
4041        }
4042        ///If `output` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4043        pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4044            self.output.as_mut().map(|field| field as _)
4045        }
4046        ///Returns a mutable reference to `output`.
4047        ///If the field is unset, it is first initialized with the default value.
4048        pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4049            self.output.get_or_insert_default()
4050        }
4051        ///If `output` is set, returns [`Some`] with the value; otherwise returns [`None`].
4052        pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4053            self.output.as_ref().map(|field| field as _)
4054        }
4055        ///Sets `output` with the provided value.
4056        pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4057            self.output = Some(field.into().into());
4058        }
4059        ///Sets `output` with the provided value.
4060        pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4061            self.set_output(field.into());
4062            self
4063        }
4064        ///If `errors` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4065        pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4066            self.errors.as_mut().map(|field| field as _)
4067        }
4068        ///Returns a mutable reference to `errors`.
4069        ///If the field is unset, it is first initialized with the default value.
4070        pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4071            self.errors.get_or_insert_default()
4072        }
4073        ///If `errors` is set, returns [`Some`] with the value; otherwise returns [`None`].
4074        pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4075            self.errors.as_ref().map(|field| field as _)
4076        }
4077        ///Sets `errors` with the provided value.
4078        pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4079            self.errors = Some(field.into().into());
4080        }
4081        ///Sets `errors` with the provided value.
4082        pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4083            self.set_errors(field.into());
4084            self
4085        }
4086    }
4087    impl super::DynamicField {
4088        pub const fn const_default() -> Self {
4089            Self {
4090                kind: None,
4091                parent: None,
4092                field_id: None,
4093                field_object: None,
4094                name: None,
4095                value: None,
4096                value_type: None,
4097                child_id: None,
4098                child_object: None,
4099            }
4100        }
4101        #[doc(hidden)]
4102        pub fn default_instance() -> &'static Self {
4103            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4104            &DEFAULT
4105        }
4106        ///Sets `kind` with the provided value.
4107        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4108            mut self,
4109            field: T,
4110        ) -> Self {
4111            self.set_kind(field.into());
4112            self
4113        }
4114        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4115        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4116            self.parent.as_mut().map(|field| field as _)
4117        }
4118        ///Returns a mutable reference to `parent`.
4119        ///If the field is unset, it is first initialized with the default value.
4120        pub fn parent_mut(&mut self) -> &mut String {
4121            self.parent.get_or_insert_default()
4122        }
4123        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
4124        pub fn parent_opt(&self) -> Option<&str> {
4125            self.parent.as_ref().map(|field| field as _)
4126        }
4127        ///Sets `parent` with the provided value.
4128        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4129            self.parent = Some(field.into().into());
4130        }
4131        ///Sets `parent` with the provided value.
4132        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4133            self.set_parent(field.into());
4134            self
4135        }
4136        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4137        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4138            self.field_id.as_mut().map(|field| field as _)
4139        }
4140        ///Returns a mutable reference to `field_id`.
4141        ///If the field is unset, it is first initialized with the default value.
4142        pub fn field_id_mut(&mut self) -> &mut String {
4143            self.field_id.get_or_insert_default()
4144        }
4145        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4146        pub fn field_id_opt(&self) -> Option<&str> {
4147            self.field_id.as_ref().map(|field| field as _)
4148        }
4149        ///Sets `field_id` with the provided value.
4150        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4151            self.field_id = Some(field.into().into());
4152        }
4153        ///Sets `field_id` with the provided value.
4154        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4155            self.set_field_id(field.into());
4156            self
4157        }
4158        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4159        pub fn field_object(&self) -> &super::Object {
4160            self.field_object
4161                .as_ref()
4162                .map(|field| field as _)
4163                .unwrap_or_else(|| super::Object::default_instance() as _)
4164        }
4165        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4166        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4167            self.field_object.as_mut().map(|field| field as _)
4168        }
4169        ///Returns a mutable reference to `field_object`.
4170        ///If the field is unset, it is first initialized with the default value.
4171        pub fn field_object_mut(&mut self) -> &mut super::Object {
4172            self.field_object.get_or_insert_default()
4173        }
4174        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4175        pub fn field_object_opt(&self) -> Option<&super::Object> {
4176            self.field_object.as_ref().map(|field| field as _)
4177        }
4178        ///Sets `field_object` with the provided value.
4179        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4180            self.field_object = Some(field.into().into());
4181        }
4182        ///Sets `field_object` with the provided value.
4183        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4184            self.set_field_object(field.into());
4185            self
4186        }
4187        ///Returns the value of `name`, or the default value if `name` is unset.
4188        pub fn name(&self) -> &super::Bcs {
4189            self.name
4190                .as_ref()
4191                .map(|field| field as _)
4192                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4193        }
4194        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4195        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4196            self.name.as_mut().map(|field| field as _)
4197        }
4198        ///Returns a mutable reference to `name`.
4199        ///If the field is unset, it is first initialized with the default value.
4200        pub fn name_mut(&mut self) -> &mut super::Bcs {
4201            self.name.get_or_insert_default()
4202        }
4203        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4204        pub fn name_opt(&self) -> Option<&super::Bcs> {
4205            self.name.as_ref().map(|field| field as _)
4206        }
4207        ///Sets `name` with the provided value.
4208        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4209            self.name = Some(field.into().into());
4210        }
4211        ///Sets `name` with the provided value.
4212        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4213            self.set_name(field.into());
4214            self
4215        }
4216        ///Returns the value of `value`, or the default value if `value` is unset.
4217        pub fn value(&self) -> &super::Bcs {
4218            self.value
4219                .as_ref()
4220                .map(|field| field as _)
4221                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4222        }
4223        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4224        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4225            self.value.as_mut().map(|field| field as _)
4226        }
4227        ///Returns a mutable reference to `value`.
4228        ///If the field is unset, it is first initialized with the default value.
4229        pub fn value_mut(&mut self) -> &mut super::Bcs {
4230            self.value.get_or_insert_default()
4231        }
4232        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4233        pub fn value_opt(&self) -> Option<&super::Bcs> {
4234            self.value.as_ref().map(|field| field as _)
4235        }
4236        ///Sets `value` with the provided value.
4237        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4238            self.value = Some(field.into().into());
4239        }
4240        ///Sets `value` with the provided value.
4241        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4242            self.set_value(field.into());
4243            self
4244        }
4245        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4246        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4247            self.value_type.as_mut().map(|field| field as _)
4248        }
4249        ///Returns a mutable reference to `value_type`.
4250        ///If the field is unset, it is first initialized with the default value.
4251        pub fn value_type_mut(&mut self) -> &mut String {
4252            self.value_type.get_or_insert_default()
4253        }
4254        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4255        pub fn value_type_opt(&self) -> Option<&str> {
4256            self.value_type.as_ref().map(|field| field as _)
4257        }
4258        ///Sets `value_type` with the provided value.
4259        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4260            self.value_type = Some(field.into().into());
4261        }
4262        ///Sets `value_type` with the provided value.
4263        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4264            self.set_value_type(field.into());
4265            self
4266        }
4267        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4268        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4269            self.child_id.as_mut().map(|field| field as _)
4270        }
4271        ///Returns a mutable reference to `child_id`.
4272        ///If the field is unset, it is first initialized with the default value.
4273        pub fn child_id_mut(&mut self) -> &mut String {
4274            self.child_id.get_or_insert_default()
4275        }
4276        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4277        pub fn child_id_opt(&self) -> Option<&str> {
4278            self.child_id.as_ref().map(|field| field as _)
4279        }
4280        ///Sets `child_id` with the provided value.
4281        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4282            self.child_id = Some(field.into().into());
4283        }
4284        ///Sets `child_id` with the provided value.
4285        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4286            self.set_child_id(field.into());
4287            self
4288        }
4289        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4290        pub fn child_object(&self) -> &super::Object {
4291            self.child_object
4292                .as_ref()
4293                .map(|field| field as _)
4294                .unwrap_or_else(|| super::Object::default_instance() as _)
4295        }
4296        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4297        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4298            self.child_object.as_mut().map(|field| field as _)
4299        }
4300        ///Returns a mutable reference to `child_object`.
4301        ///If the field is unset, it is first initialized with the default value.
4302        pub fn child_object_mut(&mut self) -> &mut super::Object {
4303            self.child_object.get_or_insert_default()
4304        }
4305        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4306        pub fn child_object_opt(&self) -> Option<&super::Object> {
4307            self.child_object.as_ref().map(|field| field as _)
4308        }
4309        ///Sets `child_object` with the provided value.
4310        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4311            self.child_object = Some(field.into().into());
4312        }
4313        ///Sets `child_object` with the provided value.
4314        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4315            self.set_child_object(field.into());
4316            self
4317        }
4318    }
4319    impl super::EndOfEpochData {
4320        pub const fn const_default() -> Self {
4321            Self {
4322                next_epoch_committee: Vec::new(),
4323                next_epoch_protocol_version: None,
4324                epoch_commitments: Vec::new(),
4325            }
4326        }
4327        #[doc(hidden)]
4328        pub fn default_instance() -> &'static Self {
4329            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4330            &DEFAULT
4331        }
4332        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4333        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4334            &self.next_epoch_committee
4335        }
4336        ///Returns a mutable reference to `next_epoch_committee`.
4337        ///If the field is unset, it is first initialized with the default value.
4338        pub fn next_epoch_committee_mut(
4339            &mut self,
4340        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4341            &mut self.next_epoch_committee
4342        }
4343        ///Sets `next_epoch_committee` with the provided value.
4344        pub fn set_next_epoch_committee(
4345            &mut self,
4346            field: Vec<super::ValidatorCommitteeMember>,
4347        ) {
4348            self.next_epoch_committee = field;
4349        }
4350        ///Sets `next_epoch_committee` with the provided value.
4351        pub fn with_next_epoch_committee(
4352            mut self,
4353            field: Vec<super::ValidatorCommitteeMember>,
4354        ) -> Self {
4355            self.set_next_epoch_committee(field);
4356            self
4357        }
4358        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4359        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4360            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4361        }
4362        ///Returns a mutable reference to `next_epoch_protocol_version`.
4363        ///If the field is unset, it is first initialized with the default value.
4364        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4365            self.next_epoch_protocol_version.get_or_insert_default()
4366        }
4367        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4368        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4369            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4370        }
4371        ///Sets `next_epoch_protocol_version` with the provided value.
4372        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4373            self.next_epoch_protocol_version = Some(field);
4374        }
4375        ///Sets `next_epoch_protocol_version` with the provided value.
4376        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4377            self.set_next_epoch_protocol_version(field);
4378            self
4379        }
4380        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4381        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4382            &self.epoch_commitments
4383        }
4384        ///Returns a mutable reference to `epoch_commitments`.
4385        ///If the field is unset, it is first initialized with the default value.
4386        pub fn epoch_commitments_mut(
4387            &mut self,
4388        ) -> &mut Vec<super::CheckpointCommitment> {
4389            &mut self.epoch_commitments
4390        }
4391        ///Sets `epoch_commitments` with the provided value.
4392        pub fn set_epoch_commitments(
4393            &mut self,
4394            field: Vec<super::CheckpointCommitment>,
4395        ) {
4396            self.epoch_commitments = field;
4397        }
4398        ///Sets `epoch_commitments` with the provided value.
4399        pub fn with_epoch_commitments(
4400            mut self,
4401            field: Vec<super::CheckpointCommitment>,
4402        ) -> Self {
4403            self.set_epoch_commitments(field);
4404            self
4405        }
4406    }
4407    impl super::EndOfEpochTransaction {
4408        pub const fn const_default() -> Self {
4409            Self { transactions: Vec::new() }
4410        }
4411        #[doc(hidden)]
4412        pub fn default_instance() -> &'static Self {
4413            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4414            &DEFAULT
4415        }
4416        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4417        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4418            &self.transactions
4419        }
4420        ///Returns a mutable reference to `transactions`.
4421        ///If the field is unset, it is first initialized with the default value.
4422        pub fn transactions_mut(
4423            &mut self,
4424        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4425            &mut self.transactions
4426        }
4427        ///Sets `transactions` with the provided value.
4428        pub fn set_transactions(
4429            &mut self,
4430            field: Vec<super::EndOfEpochTransactionKind>,
4431        ) {
4432            self.transactions = field;
4433        }
4434        ///Sets `transactions` with the provided value.
4435        pub fn with_transactions(
4436            mut self,
4437            field: Vec<super::EndOfEpochTransactionKind>,
4438        ) -> Self {
4439            self.set_transactions(field);
4440            self
4441        }
4442    }
4443    impl super::EndOfEpochTransactionKind {
4444        pub const fn const_default() -> Self {
4445            Self { kind: None, data: None }
4446        }
4447        #[doc(hidden)]
4448        pub fn default_instance() -> &'static Self {
4449            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4450            &DEFAULT
4451        }
4452        ///Sets `kind` with the provided value.
4453        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4454            mut self,
4455            field: T,
4456        ) -> Self {
4457            self.set_kind(field.into());
4458            self
4459        }
4460        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4461        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4462            if let Some(
4463                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4464            ) = &self.data
4465            {
4466                field as _
4467            } else {
4468                super::ChangeEpoch::default_instance() as _
4469            }
4470        }
4471        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4472        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4473            if let Some(
4474                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4475            ) = &self.data
4476            {
4477                Some(field as _)
4478            } else {
4479                None
4480            }
4481        }
4482        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4483        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4484            if let Some(
4485                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4486            ) = &mut self.data
4487            {
4488                Some(field as _)
4489            } else {
4490                None
4491            }
4492        }
4493        ///Returns a mutable reference to `change_epoch`.
4494        ///If the field is unset, it is first initialized with the default value.
4495        ///If any other oneof field in the same oneof is set, it will be cleared.
4496        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4497            if self.change_epoch_opt_mut().is_none() {
4498                self.data = Some(
4499                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4500                        super::ChangeEpoch::default(),
4501                    ),
4502                );
4503            }
4504            self.change_epoch_opt_mut().unwrap()
4505        }
4506        ///Sets `change_epoch` with the provided value.
4507        ///If any other oneof field in the same oneof is set, it will be cleared.
4508        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4509            self.data = Some(
4510                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4511                    field.into().into(),
4512                ),
4513            );
4514        }
4515        ///Sets `change_epoch` with the provided value.
4516        ///If any other oneof field in the same oneof is set, it will be cleared.
4517        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4518            mut self,
4519            field: T,
4520        ) -> Self {
4521            self.set_change_epoch(field.into());
4522            self
4523        }
4524        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4525        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4526            if let Some(
4527                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4528                    field,
4529                ),
4530            ) = &self.data
4531            {
4532                field as _
4533            } else {
4534                super::AuthenticatorStateExpire::default_instance() as _
4535            }
4536        }
4537        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4538        pub fn authenticator_state_expire_opt(
4539            &self,
4540        ) -> Option<&super::AuthenticatorStateExpire> {
4541            if let Some(
4542                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4543                    field,
4544                ),
4545            ) = &self.data
4546            {
4547                Some(field as _)
4548            } else {
4549                None
4550            }
4551        }
4552        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4553        pub fn authenticator_state_expire_opt_mut(
4554            &mut self,
4555        ) -> Option<&mut super::AuthenticatorStateExpire> {
4556            if let Some(
4557                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4558                    field,
4559                ),
4560            ) = &mut self.data
4561            {
4562                Some(field as _)
4563            } else {
4564                None
4565            }
4566        }
4567        ///Returns a mutable reference to `authenticator_state_expire`.
4568        ///If the field is unset, it is first initialized with the default value.
4569        ///If any other oneof field in the same oneof is set, it will be cleared.
4570        pub fn authenticator_state_expire_mut(
4571            &mut self,
4572        ) -> &mut super::AuthenticatorStateExpire {
4573            if self.authenticator_state_expire_opt_mut().is_none() {
4574                self.data = Some(
4575                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4576                        super::AuthenticatorStateExpire::default(),
4577                    ),
4578                );
4579            }
4580            self.authenticator_state_expire_opt_mut().unwrap()
4581        }
4582        ///Sets `authenticator_state_expire` with the provided value.
4583        ///If any other oneof field in the same oneof is set, it will be cleared.
4584        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4585            &mut self,
4586            field: T,
4587        ) {
4588            self.data = Some(
4589                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4590                    field.into().into(),
4591                ),
4592            );
4593        }
4594        ///Sets `authenticator_state_expire` with the provided value.
4595        ///If any other oneof field in the same oneof is set, it will be cleared.
4596        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4597            mut self,
4598            field: T,
4599        ) -> Self {
4600            self.set_authenticator_state_expire(field.into());
4601            self
4602        }
4603        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4604        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4605            if let Some(
4606                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4607                    field,
4608                ),
4609            ) = &self.data
4610            {
4611                field as _
4612            } else {
4613                super::ExecutionTimeObservations::default_instance() as _
4614            }
4615        }
4616        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4617        pub fn execution_time_observations_opt(
4618            &self,
4619        ) -> Option<&super::ExecutionTimeObservations> {
4620            if let Some(
4621                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4622                    field,
4623                ),
4624            ) = &self.data
4625            {
4626                Some(field as _)
4627            } else {
4628                None
4629            }
4630        }
4631        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4632        pub fn execution_time_observations_opt_mut(
4633            &mut self,
4634        ) -> Option<&mut super::ExecutionTimeObservations> {
4635            if let Some(
4636                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4637                    field,
4638                ),
4639            ) = &mut self.data
4640            {
4641                Some(field as _)
4642            } else {
4643                None
4644            }
4645        }
4646        ///Returns a mutable reference to `execution_time_observations`.
4647        ///If the field is unset, it is first initialized with the default value.
4648        ///If any other oneof field in the same oneof is set, it will be cleared.
4649        pub fn execution_time_observations_mut(
4650            &mut self,
4651        ) -> &mut super::ExecutionTimeObservations {
4652            if self.execution_time_observations_opt_mut().is_none() {
4653                self.data = Some(
4654                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4655                        super::ExecutionTimeObservations::default(),
4656                    ),
4657                );
4658            }
4659            self.execution_time_observations_opt_mut().unwrap()
4660        }
4661        ///Sets `execution_time_observations` with the provided value.
4662        ///If any other oneof field in the same oneof is set, it will be cleared.
4663        pub fn set_execution_time_observations<
4664            T: Into<super::ExecutionTimeObservations>,
4665        >(&mut self, field: T) {
4666            self.data = Some(
4667                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4668                    field.into().into(),
4669                ),
4670            );
4671        }
4672        ///Sets `execution_time_observations` with the provided value.
4673        ///If any other oneof field in the same oneof is set, it will be cleared.
4674        pub fn with_execution_time_observations<
4675            T: Into<super::ExecutionTimeObservations>,
4676        >(mut self, field: T) -> Self {
4677            self.set_execution_time_observations(field.into());
4678            self
4679        }
4680        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4681        pub fn bridge_chain_id(&self) -> &str {
4682            if let Some(
4683                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4684            ) = &self.data
4685            {
4686                field as _
4687            } else {
4688                ""
4689            }
4690        }
4691        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4692        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4693            if let Some(
4694                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4695            ) = &self.data
4696            {
4697                Some(field as _)
4698            } else {
4699                None
4700            }
4701        }
4702        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4703        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4704            if let Some(
4705                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4706            ) = &mut self.data
4707            {
4708                Some(field as _)
4709            } else {
4710                None
4711            }
4712        }
4713        ///Returns a mutable reference to `bridge_chain_id`.
4714        ///If the field is unset, it is first initialized with the default value.
4715        ///If any other oneof field in the same oneof is set, it will be cleared.
4716        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4717            if self.bridge_chain_id_opt_mut().is_none() {
4718                self.data = Some(
4719                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4720                        String::default(),
4721                    ),
4722                );
4723            }
4724            self.bridge_chain_id_opt_mut().unwrap()
4725        }
4726        ///Sets `bridge_chain_id` with the provided value.
4727        ///If any other oneof field in the same oneof is set, it will be cleared.
4728        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4729            self.data = Some(
4730                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4731                    field.into().into(),
4732                ),
4733            );
4734        }
4735        ///Sets `bridge_chain_id` with the provided value.
4736        ///If any other oneof field in the same oneof is set, it will be cleared.
4737        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4738            self.set_bridge_chain_id(field.into());
4739            self
4740        }
4741        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4742        pub fn bridge_object_version(&self) -> u64 {
4743            if let Some(
4744                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4745            ) = &self.data
4746            {
4747                *field
4748            } else {
4749                0u64
4750            }
4751        }
4752        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4753        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4754            if let Some(
4755                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4756            ) = &self.data
4757            {
4758                Some(*field)
4759            } else {
4760                None
4761            }
4762        }
4763        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4764        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4765            if let Some(
4766                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4767            ) = &mut self.data
4768            {
4769                Some(field as _)
4770            } else {
4771                None
4772            }
4773        }
4774        ///Returns a mutable reference to `bridge_object_version`.
4775        ///If the field is unset, it is first initialized with the default value.
4776        ///If any other oneof field in the same oneof is set, it will be cleared.
4777        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4778            if self.bridge_object_version_opt_mut().is_none() {
4779                self.data = Some(
4780                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4781                        u64::default(),
4782                    ),
4783                );
4784            }
4785            self.bridge_object_version_opt_mut().unwrap()
4786        }
4787        ///Sets `bridge_object_version` with the provided value.
4788        ///If any other oneof field in the same oneof is set, it will be cleared.
4789        pub fn set_bridge_object_version(&mut self, field: u64) {
4790            self.data = Some(
4791                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4792            );
4793        }
4794        ///Sets `bridge_object_version` with the provided value.
4795        ///If any other oneof field in the same oneof is set, it will be cleared.
4796        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4797            self.set_bridge_object_version(field);
4798            self
4799        }
4800        ///Returns the value of `storage_cost`, or the default value if `storage_cost` is unset.
4801        pub fn storage_cost(&self) -> u64 {
4802            if let Some(
4803                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4804            ) = &self.data
4805            {
4806                *field
4807            } else {
4808                0u64
4809            }
4810        }
4811        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
4812        pub fn storage_cost_opt(&self) -> Option<u64> {
4813            if let Some(
4814                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4815            ) = &self.data
4816            {
4817                Some(*field)
4818            } else {
4819                None
4820            }
4821        }
4822        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4823        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4824            if let Some(
4825                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4826            ) = &mut self.data
4827            {
4828                Some(field as _)
4829            } else {
4830                None
4831            }
4832        }
4833        ///Returns a mutable reference to `storage_cost`.
4834        ///If the field is unset, it is first initialized with the default value.
4835        ///If any other oneof field in the same oneof is set, it will be cleared.
4836        pub fn storage_cost_mut(&mut self) -> &mut u64 {
4837            if self.storage_cost_opt_mut().is_none() {
4838                self.data = Some(
4839                    super::end_of_epoch_transaction_kind::Data::StorageCost(
4840                        u64::default(),
4841                    ),
4842                );
4843            }
4844            self.storage_cost_opt_mut().unwrap()
4845        }
4846        ///Sets `storage_cost` with the provided value.
4847        ///If any other oneof field in the same oneof is set, it will be cleared.
4848        pub fn set_storage_cost(&mut self, field: u64) {
4849            self.data = Some(
4850                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4851            );
4852        }
4853        ///Sets `storage_cost` with the provided value.
4854        ///If any other oneof field in the same oneof is set, it will be cleared.
4855        pub fn with_storage_cost(mut self, field: u64) -> Self {
4856            self.set_storage_cost(field);
4857            self
4858        }
4859    }
4860    impl super::Epoch {
4861        pub const fn const_default() -> Self {
4862            Self {
4863                epoch: None,
4864                committee: None,
4865                system_state: None,
4866                first_checkpoint: None,
4867                last_checkpoint: None,
4868                start: None,
4869                end: None,
4870                reference_gas_price: None,
4871                protocol_config: None,
4872            }
4873        }
4874        #[doc(hidden)]
4875        pub fn default_instance() -> &'static Self {
4876            static DEFAULT: super::Epoch = super::Epoch::const_default();
4877            &DEFAULT
4878        }
4879        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4880        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4881            self.epoch.as_mut().map(|field| field as _)
4882        }
4883        ///Returns a mutable reference to `epoch`.
4884        ///If the field is unset, it is first initialized with the default value.
4885        pub fn epoch_mut(&mut self) -> &mut u64 {
4886            self.epoch.get_or_insert_default()
4887        }
4888        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4889        pub fn epoch_opt(&self) -> Option<u64> {
4890            self.epoch.as_ref().map(|field| *field)
4891        }
4892        ///Sets `epoch` with the provided value.
4893        pub fn set_epoch(&mut self, field: u64) {
4894            self.epoch = Some(field);
4895        }
4896        ///Sets `epoch` with the provided value.
4897        pub fn with_epoch(mut self, field: u64) -> Self {
4898            self.set_epoch(field);
4899            self
4900        }
4901        ///Returns the value of `committee`, or the default value if `committee` is unset.
4902        pub fn committee(&self) -> &super::ValidatorCommittee {
4903            self.committee
4904                .as_ref()
4905                .map(|field| field as _)
4906                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4907        }
4908        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4909        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4910            self.committee.as_mut().map(|field| field as _)
4911        }
4912        ///Returns a mutable reference to `committee`.
4913        ///If the field is unset, it is first initialized with the default value.
4914        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4915            self.committee.get_or_insert_default()
4916        }
4917        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4918        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4919            self.committee.as_ref().map(|field| field as _)
4920        }
4921        ///Sets `committee` with the provided value.
4922        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4923            self.committee = Some(field.into().into());
4924        }
4925        ///Sets `committee` with the provided value.
4926        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4927            mut self,
4928            field: T,
4929        ) -> Self {
4930            self.set_committee(field.into());
4931            self
4932        }
4933        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4934        pub fn system_state(&self) -> &super::SystemState {
4935            self.system_state
4936                .as_ref()
4937                .map(|field| field as _)
4938                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4939        }
4940        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4941        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4942            self.system_state.as_mut().map(|field| field as _)
4943        }
4944        ///Returns a mutable reference to `system_state`.
4945        ///If the field is unset, it is first initialized with the default value.
4946        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4947            self.system_state.get_or_insert_default()
4948        }
4949        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4950        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4951            self.system_state.as_ref().map(|field| field as _)
4952        }
4953        ///Sets `system_state` with the provided value.
4954        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4955            self.system_state = Some(field.into().into());
4956        }
4957        ///Sets `system_state` with the provided value.
4958        pub fn with_system_state<T: Into<super::SystemState>>(
4959            mut self,
4960            field: T,
4961        ) -> Self {
4962            self.set_system_state(field.into());
4963            self
4964        }
4965        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4966        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4967            self.first_checkpoint.as_mut().map(|field| field as _)
4968        }
4969        ///Returns a mutable reference to `first_checkpoint`.
4970        ///If the field is unset, it is first initialized with the default value.
4971        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4972            self.first_checkpoint.get_or_insert_default()
4973        }
4974        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4975        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4976            self.first_checkpoint.as_ref().map(|field| *field)
4977        }
4978        ///Sets `first_checkpoint` with the provided value.
4979        pub fn set_first_checkpoint(&mut self, field: u64) {
4980            self.first_checkpoint = Some(field);
4981        }
4982        ///Sets `first_checkpoint` with the provided value.
4983        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4984            self.set_first_checkpoint(field);
4985            self
4986        }
4987        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4988        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4989            self.last_checkpoint.as_mut().map(|field| field as _)
4990        }
4991        ///Returns a mutable reference to `last_checkpoint`.
4992        ///If the field is unset, it is first initialized with the default value.
4993        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4994            self.last_checkpoint.get_or_insert_default()
4995        }
4996        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4997        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4998            self.last_checkpoint.as_ref().map(|field| *field)
4999        }
5000        ///Sets `last_checkpoint` with the provided value.
5001        pub fn set_last_checkpoint(&mut self, field: u64) {
5002            self.last_checkpoint = Some(field);
5003        }
5004        ///Sets `last_checkpoint` with the provided value.
5005        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5006            self.set_last_checkpoint(field);
5007            self
5008        }
5009        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5010        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5011            self.start.as_mut().map(|field| field as _)
5012        }
5013        ///Returns a mutable reference to `start`.
5014        ///If the field is unset, it is first initialized with the default value.
5015        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5016            self.start.get_or_insert_default()
5017        }
5018        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
5019        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5020            self.start.as_ref().map(|field| field as _)
5021        }
5022        ///Sets `start` with the provided value.
5023        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5024            self.start = Some(field.into().into());
5025        }
5026        ///Sets `start` with the provided value.
5027        pub fn with_start<T: Into<::prost_types::Timestamp>>(
5028            mut self,
5029            field: T,
5030        ) -> Self {
5031            self.set_start(field.into());
5032            self
5033        }
5034        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5035        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5036            self.end.as_mut().map(|field| field as _)
5037        }
5038        ///Returns a mutable reference to `end`.
5039        ///If the field is unset, it is first initialized with the default value.
5040        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5041            self.end.get_or_insert_default()
5042        }
5043        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
5044        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5045            self.end.as_ref().map(|field| field as _)
5046        }
5047        ///Sets `end` with the provided value.
5048        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5049            self.end = Some(field.into().into());
5050        }
5051        ///Sets `end` with the provided value.
5052        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5053            self.set_end(field.into());
5054            self
5055        }
5056        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5057        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5058            self.reference_gas_price.as_mut().map(|field| field as _)
5059        }
5060        ///Returns a mutable reference to `reference_gas_price`.
5061        ///If the field is unset, it is first initialized with the default value.
5062        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5063            self.reference_gas_price.get_or_insert_default()
5064        }
5065        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
5066        pub fn reference_gas_price_opt(&self) -> Option<u64> {
5067            self.reference_gas_price.as_ref().map(|field| *field)
5068        }
5069        ///Sets `reference_gas_price` with the provided value.
5070        pub fn set_reference_gas_price(&mut self, field: u64) {
5071            self.reference_gas_price = Some(field);
5072        }
5073        ///Sets `reference_gas_price` with the provided value.
5074        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5075            self.set_reference_gas_price(field);
5076            self
5077        }
5078        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
5079        pub fn protocol_config(&self) -> &super::ProtocolConfig {
5080            self.protocol_config
5081                .as_ref()
5082                .map(|field| field as _)
5083                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5084        }
5085        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5086        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5087            self.protocol_config.as_mut().map(|field| field as _)
5088        }
5089        ///Returns a mutable reference to `protocol_config`.
5090        ///If the field is unset, it is first initialized with the default value.
5091        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5092            self.protocol_config.get_or_insert_default()
5093        }
5094        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
5095        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5096            self.protocol_config.as_ref().map(|field| field as _)
5097        }
5098        ///Sets `protocol_config` with the provided value.
5099        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5100            self.protocol_config = Some(field.into().into());
5101        }
5102        ///Sets `protocol_config` with the provided value.
5103        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5104            mut self,
5105            field: T,
5106        ) -> Self {
5107            self.set_protocol_config(field.into());
5108            self
5109        }
5110    }
5111    impl super::Event {
5112        pub const fn const_default() -> Self {
5113            Self {
5114                package_id: None,
5115                module: None,
5116                sender: None,
5117                event_type: None,
5118                contents: None,
5119                json: None,
5120            }
5121        }
5122        #[doc(hidden)]
5123        pub fn default_instance() -> &'static Self {
5124            static DEFAULT: super::Event = super::Event::const_default();
5125            &DEFAULT
5126        }
5127        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5128        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5129            self.package_id.as_mut().map(|field| field as _)
5130        }
5131        ///Returns a mutable reference to `package_id`.
5132        ///If the field is unset, it is first initialized with the default value.
5133        pub fn package_id_mut(&mut self) -> &mut String {
5134            self.package_id.get_or_insert_default()
5135        }
5136        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5137        pub fn package_id_opt(&self) -> Option<&str> {
5138            self.package_id.as_ref().map(|field| field as _)
5139        }
5140        ///Sets `package_id` with the provided value.
5141        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5142            self.package_id = Some(field.into().into());
5143        }
5144        ///Sets `package_id` with the provided value.
5145        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5146            self.set_package_id(field.into());
5147            self
5148        }
5149        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5150        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5151            self.module.as_mut().map(|field| field as _)
5152        }
5153        ///Returns a mutable reference to `module`.
5154        ///If the field is unset, it is first initialized with the default value.
5155        pub fn module_mut(&mut self) -> &mut String {
5156            self.module.get_or_insert_default()
5157        }
5158        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5159        pub fn module_opt(&self) -> Option<&str> {
5160            self.module.as_ref().map(|field| field as _)
5161        }
5162        ///Sets `module` with the provided value.
5163        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5164            self.module = Some(field.into().into());
5165        }
5166        ///Sets `module` with the provided value.
5167        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5168            self.set_module(field.into());
5169            self
5170        }
5171        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5172        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5173            self.sender.as_mut().map(|field| field as _)
5174        }
5175        ///Returns a mutable reference to `sender`.
5176        ///If the field is unset, it is first initialized with the default value.
5177        pub fn sender_mut(&mut self) -> &mut String {
5178            self.sender.get_or_insert_default()
5179        }
5180        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5181        pub fn sender_opt(&self) -> Option<&str> {
5182            self.sender.as_ref().map(|field| field as _)
5183        }
5184        ///Sets `sender` with the provided value.
5185        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5186            self.sender = Some(field.into().into());
5187        }
5188        ///Sets `sender` with the provided value.
5189        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5190            self.set_sender(field.into());
5191            self
5192        }
5193        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5194        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5195            self.event_type.as_mut().map(|field| field as _)
5196        }
5197        ///Returns a mutable reference to `event_type`.
5198        ///If the field is unset, it is first initialized with the default value.
5199        pub fn event_type_mut(&mut self) -> &mut String {
5200            self.event_type.get_or_insert_default()
5201        }
5202        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5203        pub fn event_type_opt(&self) -> Option<&str> {
5204            self.event_type.as_ref().map(|field| field as _)
5205        }
5206        ///Sets `event_type` with the provided value.
5207        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5208            self.event_type = Some(field.into().into());
5209        }
5210        ///Sets `event_type` with the provided value.
5211        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5212            self.set_event_type(field.into());
5213            self
5214        }
5215        ///Returns the value of `contents`, or the default value if `contents` is unset.
5216        pub fn contents(&self) -> &super::Bcs {
5217            self.contents
5218                .as_ref()
5219                .map(|field| field as _)
5220                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5221        }
5222        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5223        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5224            self.contents.as_mut().map(|field| field as _)
5225        }
5226        ///Returns a mutable reference to `contents`.
5227        ///If the field is unset, it is first initialized with the default value.
5228        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5229            self.contents.get_or_insert_default()
5230        }
5231        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5232        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5233            self.contents.as_ref().map(|field| field as _)
5234        }
5235        ///Sets `contents` with the provided value.
5236        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5237            self.contents = Some(field.into().into());
5238        }
5239        ///Sets `contents` with the provided value.
5240        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5241            self.set_contents(field.into());
5242            self
5243        }
5244        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5245        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5246            self.json.as_mut().map(|field| field as _)
5247        }
5248        ///Returns a mutable reference to `json`.
5249        ///If the field is unset, it is first initialized with the default value.
5250        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5251            self.json.get_or_insert_default()
5252        }
5253        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5254        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5255            self.json.as_ref().map(|field| field as _)
5256        }
5257        ///Sets `json` with the provided value.
5258        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5259            self.json = Some(field.into().into());
5260        }
5261        ///Sets `json` with the provided value.
5262        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5263            self.set_json(field.into());
5264            self
5265        }
5266    }
5267    impl super::EventDigestEntry {
5268        pub const fn const_default() -> Self {
5269            Self {
5270                event_index: None,
5271                digest: None,
5272            }
5273        }
5274        #[doc(hidden)]
5275        pub fn default_instance() -> &'static Self {
5276            static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5277            &DEFAULT
5278        }
5279        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5280        pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5281            self.event_index.as_mut().map(|field| field as _)
5282        }
5283        ///Returns a mutable reference to `event_index`.
5284        ///If the field is unset, it is first initialized with the default value.
5285        pub fn event_index_mut(&mut self) -> &mut u64 {
5286            self.event_index.get_or_insert_default()
5287        }
5288        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5289        pub fn event_index_opt(&self) -> Option<u64> {
5290            self.event_index.as_ref().map(|field| *field)
5291        }
5292        ///Sets `event_index` with the provided value.
5293        pub fn set_event_index(&mut self, field: u64) {
5294            self.event_index = Some(field);
5295        }
5296        ///Sets `event_index` with the provided value.
5297        pub fn with_event_index(mut self, field: u64) -> Self {
5298            self.set_event_index(field);
5299            self
5300        }
5301        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5302        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5303            self.digest.as_mut().map(|field| field as _)
5304        }
5305        ///Returns a mutable reference to `digest`.
5306        ///If the field is unset, it is first initialized with the default value.
5307        pub fn digest_mut(&mut self) -> &mut String {
5308            self.digest.get_or_insert_default()
5309        }
5310        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5311        pub fn digest_opt(&self) -> Option<&str> {
5312            self.digest.as_ref().map(|field| field as _)
5313        }
5314        ///Sets `digest` with the provided value.
5315        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5316            self.digest = Some(field.into().into());
5317        }
5318        ///Sets `digest` with the provided value.
5319        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5320            self.set_digest(field.into());
5321            self
5322        }
5323    }
5324    impl super::ExecuteTransactionRequest {
5325        pub const fn const_default() -> Self {
5326            Self {
5327                transaction: None,
5328                signatures: Vec::new(),
5329                read_mask: None,
5330            }
5331        }
5332        #[doc(hidden)]
5333        pub fn default_instance() -> &'static Self {
5334            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5335            &DEFAULT
5336        }
5337        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5338        pub fn transaction(&self) -> &super::Transaction {
5339            self.transaction
5340                .as_ref()
5341                .map(|field| field as _)
5342                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5343        }
5344        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5345        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5346            self.transaction.as_mut().map(|field| field as _)
5347        }
5348        ///Returns a mutable reference to `transaction`.
5349        ///If the field is unset, it is first initialized with the default value.
5350        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5351            self.transaction.get_or_insert_default()
5352        }
5353        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5354        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5355            self.transaction.as_ref().map(|field| field as _)
5356        }
5357        ///Sets `transaction` with the provided value.
5358        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5359            self.transaction = Some(field.into().into());
5360        }
5361        ///Sets `transaction` with the provided value.
5362        pub fn with_transaction<T: Into<super::Transaction>>(
5363            mut self,
5364            field: T,
5365        ) -> Self {
5366            self.set_transaction(field.into());
5367            self
5368        }
5369        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5370        pub fn signatures(&self) -> &[super::UserSignature] {
5371            &self.signatures
5372        }
5373        ///Returns a mutable reference to `signatures`.
5374        ///If the field is unset, it is first initialized with the default value.
5375        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5376            &mut self.signatures
5377        }
5378        ///Sets `signatures` with the provided value.
5379        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5380            self.signatures = field;
5381        }
5382        ///Sets `signatures` with the provided value.
5383        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5384            self.set_signatures(field);
5385            self
5386        }
5387        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5388        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5389            self.read_mask.as_mut().map(|field| field as _)
5390        }
5391        ///Returns a mutable reference to `read_mask`.
5392        ///If the field is unset, it is first initialized with the default value.
5393        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5394            self.read_mask.get_or_insert_default()
5395        }
5396        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
5397        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5398            self.read_mask.as_ref().map(|field| field as _)
5399        }
5400        ///Sets `read_mask` with the provided value.
5401        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5402            self.read_mask = Some(field.into().into());
5403        }
5404        ///Sets `read_mask` with the provided value.
5405        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5406            mut self,
5407            field: T,
5408        ) -> Self {
5409            self.set_read_mask(field.into());
5410            self
5411        }
5412    }
5413    impl super::ExecuteTransactionResponse {
5414        pub const fn const_default() -> Self {
5415            Self { transaction: None }
5416        }
5417        #[doc(hidden)]
5418        pub fn default_instance() -> &'static Self {
5419            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5420            &DEFAULT
5421        }
5422        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5423        pub fn transaction(&self) -> &super::ExecutedTransaction {
5424            self.transaction
5425                .as_ref()
5426                .map(|field| field as _)
5427                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5428        }
5429        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5430        pub fn transaction_opt_mut(
5431            &mut self,
5432        ) -> Option<&mut super::ExecutedTransaction> {
5433            self.transaction.as_mut().map(|field| field as _)
5434        }
5435        ///Returns a mutable reference to `transaction`.
5436        ///If the field is unset, it is first initialized with the default value.
5437        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5438            self.transaction.get_or_insert_default()
5439        }
5440        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5441        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5442            self.transaction.as_ref().map(|field| field as _)
5443        }
5444        ///Sets `transaction` with the provided value.
5445        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5446            &mut self,
5447            field: T,
5448        ) {
5449            self.transaction = Some(field.into().into());
5450        }
5451        ///Sets `transaction` with the provided value.
5452        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5453            mut self,
5454            field: T,
5455        ) -> Self {
5456            self.set_transaction(field.into());
5457            self
5458        }
5459    }
5460    impl super::ExecutedTransaction {
5461        pub const fn const_default() -> Self {
5462            Self {
5463                digest: None,
5464                transaction: None,
5465                signatures: Vec::new(),
5466                effects: None,
5467                events: None,
5468                checkpoint: None,
5469                timestamp: None,
5470                balance_changes: Vec::new(),
5471                objects: None,
5472            }
5473        }
5474        #[doc(hidden)]
5475        pub fn default_instance() -> &'static Self {
5476            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5477            &DEFAULT
5478        }
5479        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5480        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5481            self.digest.as_mut().map(|field| field as _)
5482        }
5483        ///Returns a mutable reference to `digest`.
5484        ///If the field is unset, it is first initialized with the default value.
5485        pub fn digest_mut(&mut self) -> &mut String {
5486            self.digest.get_or_insert_default()
5487        }
5488        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5489        pub fn digest_opt(&self) -> Option<&str> {
5490            self.digest.as_ref().map(|field| field as _)
5491        }
5492        ///Sets `digest` with the provided value.
5493        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5494            self.digest = Some(field.into().into());
5495        }
5496        ///Sets `digest` with the provided value.
5497        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5498            self.set_digest(field.into());
5499            self
5500        }
5501        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5502        pub fn transaction(&self) -> &super::Transaction {
5503            self.transaction
5504                .as_ref()
5505                .map(|field| field as _)
5506                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5507        }
5508        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5509        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5510            self.transaction.as_mut().map(|field| field as _)
5511        }
5512        ///Returns a mutable reference to `transaction`.
5513        ///If the field is unset, it is first initialized with the default value.
5514        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5515            self.transaction.get_or_insert_default()
5516        }
5517        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5518        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5519            self.transaction.as_ref().map(|field| field as _)
5520        }
5521        ///Sets `transaction` with the provided value.
5522        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5523            self.transaction = Some(field.into().into());
5524        }
5525        ///Sets `transaction` with the provided value.
5526        pub fn with_transaction<T: Into<super::Transaction>>(
5527            mut self,
5528            field: T,
5529        ) -> Self {
5530            self.set_transaction(field.into());
5531            self
5532        }
5533        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5534        pub fn signatures(&self) -> &[super::UserSignature] {
5535            &self.signatures
5536        }
5537        ///Returns a mutable reference to `signatures`.
5538        ///If the field is unset, it is first initialized with the default value.
5539        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5540            &mut self.signatures
5541        }
5542        ///Sets `signatures` with the provided value.
5543        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5544            self.signatures = field;
5545        }
5546        ///Sets `signatures` with the provided value.
5547        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5548            self.set_signatures(field);
5549            self
5550        }
5551        ///Returns the value of `effects`, or the default value if `effects` is unset.
5552        pub fn effects(&self) -> &super::TransactionEffects {
5553            self.effects
5554                .as_ref()
5555                .map(|field| field as _)
5556                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5557        }
5558        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5559        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5560            self.effects.as_mut().map(|field| field as _)
5561        }
5562        ///Returns a mutable reference to `effects`.
5563        ///If the field is unset, it is first initialized with the default value.
5564        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5565            self.effects.get_or_insert_default()
5566        }
5567        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5568        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5569            self.effects.as_ref().map(|field| field as _)
5570        }
5571        ///Sets `effects` with the provided value.
5572        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5573            self.effects = Some(field.into().into());
5574        }
5575        ///Sets `effects` with the provided value.
5576        pub fn with_effects<T: Into<super::TransactionEffects>>(
5577            mut self,
5578            field: T,
5579        ) -> Self {
5580            self.set_effects(field.into());
5581            self
5582        }
5583        ///Returns the value of `events`, or the default value if `events` is unset.
5584        pub fn events(&self) -> &super::TransactionEvents {
5585            self.events
5586                .as_ref()
5587                .map(|field| field as _)
5588                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5589        }
5590        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5591        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5592            self.events.as_mut().map(|field| field as _)
5593        }
5594        ///Returns a mutable reference to `events`.
5595        ///If the field is unset, it is first initialized with the default value.
5596        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5597            self.events.get_or_insert_default()
5598        }
5599        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5600        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5601            self.events.as_ref().map(|field| field as _)
5602        }
5603        ///Sets `events` with the provided value.
5604        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5605            self.events = Some(field.into().into());
5606        }
5607        ///Sets `events` with the provided value.
5608        pub fn with_events<T: Into<super::TransactionEvents>>(
5609            mut self,
5610            field: T,
5611        ) -> Self {
5612            self.set_events(field.into());
5613            self
5614        }
5615        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5616        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5617            self.checkpoint.as_mut().map(|field| field as _)
5618        }
5619        ///Returns a mutable reference to `checkpoint`.
5620        ///If the field is unset, it is first initialized with the default value.
5621        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5622            self.checkpoint.get_or_insert_default()
5623        }
5624        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5625        pub fn checkpoint_opt(&self) -> Option<u64> {
5626            self.checkpoint.as_ref().map(|field| *field)
5627        }
5628        ///Sets `checkpoint` with the provided value.
5629        pub fn set_checkpoint(&mut self, field: u64) {
5630            self.checkpoint = Some(field);
5631        }
5632        ///Sets `checkpoint` with the provided value.
5633        pub fn with_checkpoint(mut self, field: u64) -> Self {
5634            self.set_checkpoint(field);
5635            self
5636        }
5637        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5638        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5639            self.timestamp.as_mut().map(|field| field as _)
5640        }
5641        ///Returns a mutable reference to `timestamp`.
5642        ///If the field is unset, it is first initialized with the default value.
5643        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5644            self.timestamp.get_or_insert_default()
5645        }
5646        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5647        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5648            self.timestamp.as_ref().map(|field| field as _)
5649        }
5650        ///Sets `timestamp` with the provided value.
5651        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5652            self.timestamp = Some(field.into().into());
5653        }
5654        ///Sets `timestamp` with the provided value.
5655        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5656            mut self,
5657            field: T,
5658        ) -> Self {
5659            self.set_timestamp(field.into());
5660            self
5661        }
5662        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5663        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5664            &self.balance_changes
5665        }
5666        ///Returns a mutable reference to `balance_changes`.
5667        ///If the field is unset, it is first initialized with the default value.
5668        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5669            &mut self.balance_changes
5670        }
5671        ///Sets `balance_changes` with the provided value.
5672        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5673            self.balance_changes = field;
5674        }
5675        ///Sets `balance_changes` with the provided value.
5676        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5677            self.set_balance_changes(field);
5678            self
5679        }
5680        ///Returns the value of `objects`, or the default value if `objects` is unset.
5681        pub fn objects(&self) -> &super::ObjectSet {
5682            self.objects
5683                .as_ref()
5684                .map(|field| field as _)
5685                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5686        }
5687        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5688        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5689            self.objects.as_mut().map(|field| field as _)
5690        }
5691        ///Returns a mutable reference to `objects`.
5692        ///If the field is unset, it is first initialized with the default value.
5693        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5694            self.objects.get_or_insert_default()
5695        }
5696        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5697        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5698            self.objects.as_ref().map(|field| field as _)
5699        }
5700        ///Sets `objects` with the provided value.
5701        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5702            self.objects = Some(field.into().into());
5703        }
5704        ///Sets `objects` with the provided value.
5705        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5706            self.set_objects(field.into());
5707            self
5708        }
5709    }
5710    impl super::ExecutionError {
5711        pub const fn const_default() -> Self {
5712            Self {
5713                description: None,
5714                command: None,
5715                kind: None,
5716                error_details: None,
5717            }
5718        }
5719        #[doc(hidden)]
5720        pub fn default_instance() -> &'static Self {
5721            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5722            &DEFAULT
5723        }
5724        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5725        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5726            self.description.as_mut().map(|field| field as _)
5727        }
5728        ///Returns a mutable reference to `description`.
5729        ///If the field is unset, it is first initialized with the default value.
5730        pub fn description_mut(&mut self) -> &mut String {
5731            self.description.get_or_insert_default()
5732        }
5733        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5734        pub fn description_opt(&self) -> Option<&str> {
5735            self.description.as_ref().map(|field| field as _)
5736        }
5737        ///Sets `description` with the provided value.
5738        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5739            self.description = Some(field.into().into());
5740        }
5741        ///Sets `description` with the provided value.
5742        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5743            self.set_description(field.into());
5744            self
5745        }
5746        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5747        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5748            self.command.as_mut().map(|field| field as _)
5749        }
5750        ///Returns a mutable reference to `command`.
5751        ///If the field is unset, it is first initialized with the default value.
5752        pub fn command_mut(&mut self) -> &mut u64 {
5753            self.command.get_or_insert_default()
5754        }
5755        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5756        pub fn command_opt(&self) -> Option<u64> {
5757            self.command.as_ref().map(|field| *field)
5758        }
5759        ///Sets `command` with the provided value.
5760        pub fn set_command(&mut self, field: u64) {
5761            self.command = Some(field);
5762        }
5763        ///Sets `command` with the provided value.
5764        pub fn with_command(mut self, field: u64) -> Self {
5765            self.set_command(field);
5766            self
5767        }
5768        ///Sets `kind` with the provided value.
5769        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5770            mut self,
5771            field: T,
5772        ) -> Self {
5773            self.set_kind(field.into());
5774            self
5775        }
5776        ///Returns the value of `abort`, or the default value if `abort` is unset.
5777        pub fn abort(&self) -> &super::MoveAbort {
5778            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5779                .error_details
5780            {
5781                field as _
5782            } else {
5783                super::MoveAbort::default_instance() as _
5784            }
5785        }
5786        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5787        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5788            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5789                .error_details
5790            {
5791                Some(field as _)
5792            } else {
5793                None
5794            }
5795        }
5796        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5797        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5798            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5799                .error_details
5800            {
5801                Some(field as _)
5802            } else {
5803                None
5804            }
5805        }
5806        ///Returns a mutable reference to `abort`.
5807        ///If the field is unset, it is first initialized with the default value.
5808        ///If any other oneof field in the same oneof is set, it will be cleared.
5809        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5810            if self.abort_opt_mut().is_none() {
5811                self.error_details = Some(
5812                    super::execution_error::ErrorDetails::Abort(
5813                        super::MoveAbort::default(),
5814                    ),
5815                );
5816            }
5817            self.abort_opt_mut().unwrap()
5818        }
5819        ///Sets `abort` with the provided value.
5820        ///If any other oneof field in the same oneof is set, it will be cleared.
5821        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5822            self.error_details = Some(
5823                super::execution_error::ErrorDetails::Abort(field.into().into()),
5824            );
5825        }
5826        ///Sets `abort` with the provided value.
5827        ///If any other oneof field in the same oneof is set, it will be cleared.
5828        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5829            self.set_abort(field.into());
5830            self
5831        }
5832        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5833        pub fn size_error(&self) -> &super::SizeError {
5834            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5835                .error_details
5836            {
5837                field as _
5838            } else {
5839                super::SizeError::default_instance() as _
5840            }
5841        }
5842        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5843        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5844            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5845                .error_details
5846            {
5847                Some(field as _)
5848            } else {
5849                None
5850            }
5851        }
5852        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5853        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5854            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5855                .error_details
5856            {
5857                Some(field as _)
5858            } else {
5859                None
5860            }
5861        }
5862        ///Returns a mutable reference to `size_error`.
5863        ///If the field is unset, it is first initialized with the default value.
5864        ///If any other oneof field in the same oneof is set, it will be cleared.
5865        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5866            if self.size_error_opt_mut().is_none() {
5867                self.error_details = Some(
5868                    super::execution_error::ErrorDetails::SizeError(
5869                        super::SizeError::default(),
5870                    ),
5871                );
5872            }
5873            self.size_error_opt_mut().unwrap()
5874        }
5875        ///Sets `size_error` with the provided value.
5876        ///If any other oneof field in the same oneof is set, it will be cleared.
5877        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5878            self.error_details = Some(
5879                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5880            );
5881        }
5882        ///Sets `size_error` with the provided value.
5883        ///If any other oneof field in the same oneof is set, it will be cleared.
5884        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5885            self.set_size_error(field.into());
5886            self
5887        }
5888        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5889        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5890            if let Some(
5891                super::execution_error::ErrorDetails::CommandArgumentError(field),
5892            ) = &self.error_details
5893            {
5894                field as _
5895            } else {
5896                super::CommandArgumentError::default_instance() as _
5897            }
5898        }
5899        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5900        pub fn command_argument_error_opt(
5901            &self,
5902        ) -> Option<&super::CommandArgumentError> {
5903            if let Some(
5904                super::execution_error::ErrorDetails::CommandArgumentError(field),
5905            ) = &self.error_details
5906            {
5907                Some(field as _)
5908            } else {
5909                None
5910            }
5911        }
5912        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5913        pub fn command_argument_error_opt_mut(
5914            &mut self,
5915        ) -> Option<&mut super::CommandArgumentError> {
5916            if let Some(
5917                super::execution_error::ErrorDetails::CommandArgumentError(field),
5918            ) = &mut self.error_details
5919            {
5920                Some(field as _)
5921            } else {
5922                None
5923            }
5924        }
5925        ///Returns a mutable reference to `command_argument_error`.
5926        ///If the field is unset, it is first initialized with the default value.
5927        ///If any other oneof field in the same oneof is set, it will be cleared.
5928        pub fn command_argument_error_mut(
5929            &mut self,
5930        ) -> &mut super::CommandArgumentError {
5931            if self.command_argument_error_opt_mut().is_none() {
5932                self.error_details = Some(
5933                    super::execution_error::ErrorDetails::CommandArgumentError(
5934                        super::CommandArgumentError::default(),
5935                    ),
5936                );
5937            }
5938            self.command_argument_error_opt_mut().unwrap()
5939        }
5940        ///Sets `command_argument_error` with the provided value.
5941        ///If any other oneof field in the same oneof is set, it will be cleared.
5942        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5943            &mut self,
5944            field: T,
5945        ) {
5946            self.error_details = Some(
5947                super::execution_error::ErrorDetails::CommandArgumentError(
5948                    field.into().into(),
5949                ),
5950            );
5951        }
5952        ///Sets `command_argument_error` with the provided value.
5953        ///If any other oneof field in the same oneof is set, it will be cleared.
5954        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5955            mut self,
5956            field: T,
5957        ) -> Self {
5958            self.set_command_argument_error(field.into());
5959            self
5960        }
5961        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5962        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5963            if let Some(
5964                super::execution_error::ErrorDetails::TypeArgumentError(field),
5965            ) = &self.error_details
5966            {
5967                field as _
5968            } else {
5969                super::TypeArgumentError::default_instance() as _
5970            }
5971        }
5972        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5973        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5974            if let Some(
5975                super::execution_error::ErrorDetails::TypeArgumentError(field),
5976            ) = &self.error_details
5977            {
5978                Some(field as _)
5979            } else {
5980                None
5981            }
5982        }
5983        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5984        pub fn type_argument_error_opt_mut(
5985            &mut self,
5986        ) -> Option<&mut super::TypeArgumentError> {
5987            if let Some(
5988                super::execution_error::ErrorDetails::TypeArgumentError(field),
5989            ) = &mut self.error_details
5990            {
5991                Some(field as _)
5992            } else {
5993                None
5994            }
5995        }
5996        ///Returns a mutable reference to `type_argument_error`.
5997        ///If the field is unset, it is first initialized with the default value.
5998        ///If any other oneof field in the same oneof is set, it will be cleared.
5999        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6000            if self.type_argument_error_opt_mut().is_none() {
6001                self.error_details = Some(
6002                    super::execution_error::ErrorDetails::TypeArgumentError(
6003                        super::TypeArgumentError::default(),
6004                    ),
6005                );
6006            }
6007            self.type_argument_error_opt_mut().unwrap()
6008        }
6009        ///Sets `type_argument_error` with the provided value.
6010        ///If any other oneof field in the same oneof is set, it will be cleared.
6011        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6012            &mut self,
6013            field: T,
6014        ) {
6015            self.error_details = Some(
6016                super::execution_error::ErrorDetails::TypeArgumentError(
6017                    field.into().into(),
6018                ),
6019            );
6020        }
6021        ///Sets `type_argument_error` with the provided value.
6022        ///If any other oneof field in the same oneof is set, it will be cleared.
6023        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6024            mut self,
6025            field: T,
6026        ) -> Self {
6027            self.set_type_argument_error(field.into());
6028            self
6029        }
6030        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
6031        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6032            if let Some(
6033                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6034            ) = &self.error_details
6035            {
6036                field as _
6037            } else {
6038                super::PackageUpgradeError::default_instance() as _
6039            }
6040        }
6041        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6042        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6043            if let Some(
6044                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6045            ) = &self.error_details
6046            {
6047                Some(field as _)
6048            } else {
6049                None
6050            }
6051        }
6052        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6053        pub fn package_upgrade_error_opt_mut(
6054            &mut self,
6055        ) -> Option<&mut super::PackageUpgradeError> {
6056            if let Some(
6057                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6058            ) = &mut self.error_details
6059            {
6060                Some(field as _)
6061            } else {
6062                None
6063            }
6064        }
6065        ///Returns a mutable reference to `package_upgrade_error`.
6066        ///If the field is unset, it is first initialized with the default value.
6067        ///If any other oneof field in the same oneof is set, it will be cleared.
6068        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6069            if self.package_upgrade_error_opt_mut().is_none() {
6070                self.error_details = Some(
6071                    super::execution_error::ErrorDetails::PackageUpgradeError(
6072                        super::PackageUpgradeError::default(),
6073                    ),
6074                );
6075            }
6076            self.package_upgrade_error_opt_mut().unwrap()
6077        }
6078        ///Sets `package_upgrade_error` with the provided value.
6079        ///If any other oneof field in the same oneof is set, it will be cleared.
6080        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6081            &mut self,
6082            field: T,
6083        ) {
6084            self.error_details = Some(
6085                super::execution_error::ErrorDetails::PackageUpgradeError(
6086                    field.into().into(),
6087                ),
6088            );
6089        }
6090        ///Sets `package_upgrade_error` with the provided value.
6091        ///If any other oneof field in the same oneof is set, it will be cleared.
6092        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6093            mut self,
6094            field: T,
6095        ) -> Self {
6096            self.set_package_upgrade_error(field.into());
6097            self
6098        }
6099        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
6100        pub fn index_error(&self) -> &super::IndexError {
6101            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6102                .error_details
6103            {
6104                field as _
6105            } else {
6106                super::IndexError::default_instance() as _
6107            }
6108        }
6109        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6110        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6111            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6112                .error_details
6113            {
6114                Some(field as _)
6115            } else {
6116                None
6117            }
6118        }
6119        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6120        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6121            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6122                .error_details
6123            {
6124                Some(field as _)
6125            } else {
6126                None
6127            }
6128        }
6129        ///Returns a mutable reference to `index_error`.
6130        ///If the field is unset, it is first initialized with the default value.
6131        ///If any other oneof field in the same oneof is set, it will be cleared.
6132        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6133            if self.index_error_opt_mut().is_none() {
6134                self.error_details = Some(
6135                    super::execution_error::ErrorDetails::IndexError(
6136                        super::IndexError::default(),
6137                    ),
6138                );
6139            }
6140            self.index_error_opt_mut().unwrap()
6141        }
6142        ///Sets `index_error` with the provided value.
6143        ///If any other oneof field in the same oneof is set, it will be cleared.
6144        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6145            self.error_details = Some(
6146                super::execution_error::ErrorDetails::IndexError(field.into().into()),
6147            );
6148        }
6149        ///Sets `index_error` with the provided value.
6150        ///If any other oneof field in the same oneof is set, it will be cleared.
6151        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6152            self.set_index_error(field.into());
6153            self
6154        }
6155        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
6156        pub fn object_id(&self) -> &str {
6157            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6158                .error_details
6159            {
6160                field as _
6161            } else {
6162                ""
6163            }
6164        }
6165        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6166        pub fn object_id_opt(&self) -> Option<&str> {
6167            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6168                .error_details
6169            {
6170                Some(field as _)
6171            } else {
6172                None
6173            }
6174        }
6175        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6176        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6177            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6178                .error_details
6179            {
6180                Some(field as _)
6181            } else {
6182                None
6183            }
6184        }
6185        ///Returns a mutable reference to `object_id`.
6186        ///If the field is unset, it is first initialized with the default value.
6187        ///If any other oneof field in the same oneof is set, it will be cleared.
6188        pub fn object_id_mut(&mut self) -> &mut String {
6189            if self.object_id_opt_mut().is_none() {
6190                self.error_details = Some(
6191                    super::execution_error::ErrorDetails::ObjectId(String::default()),
6192                );
6193            }
6194            self.object_id_opt_mut().unwrap()
6195        }
6196        ///Sets `object_id` with the provided value.
6197        ///If any other oneof field in the same oneof is set, it will be cleared.
6198        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6199            self.error_details = Some(
6200                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6201            );
6202        }
6203        ///Sets `object_id` with the provided value.
6204        ///If any other oneof field in the same oneof is set, it will be cleared.
6205        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6206            self.set_object_id(field.into());
6207            self
6208        }
6209        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
6210        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6211            if let Some(
6212                super::execution_error::ErrorDetails::CoinDenyListError(field),
6213            ) = &self.error_details
6214            {
6215                field as _
6216            } else {
6217                super::CoinDenyListError::default_instance() as _
6218            }
6219        }
6220        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6221        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6222            if let Some(
6223                super::execution_error::ErrorDetails::CoinDenyListError(field),
6224            ) = &self.error_details
6225            {
6226                Some(field as _)
6227            } else {
6228                None
6229            }
6230        }
6231        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6232        pub fn coin_deny_list_error_opt_mut(
6233            &mut self,
6234        ) -> Option<&mut super::CoinDenyListError> {
6235            if let Some(
6236                super::execution_error::ErrorDetails::CoinDenyListError(field),
6237            ) = &mut self.error_details
6238            {
6239                Some(field as _)
6240            } else {
6241                None
6242            }
6243        }
6244        ///Returns a mutable reference to `coin_deny_list_error`.
6245        ///If the field is unset, it is first initialized with the default value.
6246        ///If any other oneof field in the same oneof is set, it will be cleared.
6247        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6248            if self.coin_deny_list_error_opt_mut().is_none() {
6249                self.error_details = Some(
6250                    super::execution_error::ErrorDetails::CoinDenyListError(
6251                        super::CoinDenyListError::default(),
6252                    ),
6253                );
6254            }
6255            self.coin_deny_list_error_opt_mut().unwrap()
6256        }
6257        ///Sets `coin_deny_list_error` with the provided value.
6258        ///If any other oneof field in the same oneof is set, it will be cleared.
6259        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6260            &mut self,
6261            field: T,
6262        ) {
6263            self.error_details = Some(
6264                super::execution_error::ErrorDetails::CoinDenyListError(
6265                    field.into().into(),
6266                ),
6267            );
6268        }
6269        ///Sets `coin_deny_list_error` with the provided value.
6270        ///If any other oneof field in the same oneof is set, it will be cleared.
6271        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6272            mut self,
6273            field: T,
6274        ) -> Self {
6275            self.set_coin_deny_list_error(field.into());
6276            self
6277        }
6278        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6279        pub fn congested_objects(&self) -> &super::CongestedObjects {
6280            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6281                .error_details
6282            {
6283                field as _
6284            } else {
6285                super::CongestedObjects::default_instance() as _
6286            }
6287        }
6288        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6289        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6290            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6291                .error_details
6292            {
6293                Some(field as _)
6294            } else {
6295                None
6296            }
6297        }
6298        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6299        pub fn congested_objects_opt_mut(
6300            &mut self,
6301        ) -> Option<&mut super::CongestedObjects> {
6302            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6303                .error_details
6304            {
6305                Some(field as _)
6306            } else {
6307                None
6308            }
6309        }
6310        ///Returns a mutable reference to `congested_objects`.
6311        ///If the field is unset, it is first initialized with the default value.
6312        ///If any other oneof field in the same oneof is set, it will be cleared.
6313        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6314            if self.congested_objects_opt_mut().is_none() {
6315                self.error_details = Some(
6316                    super::execution_error::ErrorDetails::CongestedObjects(
6317                        super::CongestedObjects::default(),
6318                    ),
6319                );
6320            }
6321            self.congested_objects_opt_mut().unwrap()
6322        }
6323        ///Sets `congested_objects` with the provided value.
6324        ///If any other oneof field in the same oneof is set, it will be cleared.
6325        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6326            &mut self,
6327            field: T,
6328        ) {
6329            self.error_details = Some(
6330                super::execution_error::ErrorDetails::CongestedObjects(
6331                    field.into().into(),
6332                ),
6333            );
6334        }
6335        ///Sets `congested_objects` with the provided value.
6336        ///If any other oneof field in the same oneof is set, it will be cleared.
6337        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6338            mut self,
6339            field: T,
6340        ) -> Self {
6341            self.set_congested_objects(field.into());
6342            self
6343        }
6344    }
6345    impl super::ExecutionStatus {
6346        pub const fn const_default() -> Self {
6347            Self { success: None, error: None }
6348        }
6349        #[doc(hidden)]
6350        pub fn default_instance() -> &'static Self {
6351            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6352            &DEFAULT
6353        }
6354        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6355        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6356            self.success.as_mut().map(|field| field as _)
6357        }
6358        ///Returns a mutable reference to `success`.
6359        ///If the field is unset, it is first initialized with the default value.
6360        pub fn success_mut(&mut self) -> &mut bool {
6361            self.success.get_or_insert_default()
6362        }
6363        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
6364        pub fn success_opt(&self) -> Option<bool> {
6365            self.success.as_ref().map(|field| *field)
6366        }
6367        ///Sets `success` with the provided value.
6368        pub fn set_success(&mut self, field: bool) {
6369            self.success = Some(field);
6370        }
6371        ///Sets `success` with the provided value.
6372        pub fn with_success(mut self, field: bool) -> Self {
6373            self.set_success(field);
6374            self
6375        }
6376        ///Returns the value of `error`, or the default value if `error` is unset.
6377        pub fn error(&self) -> &super::ExecutionError {
6378            self.error
6379                .as_ref()
6380                .map(|field| field as _)
6381                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6382        }
6383        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6384        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6385            self.error.as_mut().map(|field| field as _)
6386        }
6387        ///Returns a mutable reference to `error`.
6388        ///If the field is unset, it is first initialized with the default value.
6389        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6390            self.error.get_or_insert_default()
6391        }
6392        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6393        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6394            self.error.as_ref().map(|field| field as _)
6395        }
6396        ///Sets `error` with the provided value.
6397        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6398            self.error = Some(field.into().into());
6399        }
6400        ///Sets `error` with the provided value.
6401        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6402            self.set_error(field.into());
6403            self
6404        }
6405    }
6406    impl super::ExecutionTimeObservation {
6407        pub const fn const_default() -> Self {
6408            Self {
6409                kind: None,
6410                move_entry_point: None,
6411                validator_observations: Vec::new(),
6412            }
6413        }
6414        #[doc(hidden)]
6415        pub fn default_instance() -> &'static Self {
6416            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6417            &DEFAULT
6418        }
6419        ///Sets `kind` with the provided value.
6420        pub fn with_kind<
6421            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6422        >(mut self, field: T) -> Self {
6423            self.set_kind(field.into());
6424            self
6425        }
6426        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
6427        pub fn move_entry_point(&self) -> &super::MoveCall {
6428            self.move_entry_point
6429                .as_ref()
6430                .map(|field| field as _)
6431                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6432        }
6433        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6434        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6435            self.move_entry_point.as_mut().map(|field| field as _)
6436        }
6437        ///Returns a mutable reference to `move_entry_point`.
6438        ///If the field is unset, it is first initialized with the default value.
6439        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6440            self.move_entry_point.get_or_insert_default()
6441        }
6442        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
6443        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6444            self.move_entry_point.as_ref().map(|field| field as _)
6445        }
6446        ///Sets `move_entry_point` with the provided value.
6447        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6448            self.move_entry_point = Some(field.into().into());
6449        }
6450        ///Sets `move_entry_point` with the provided value.
6451        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6452            mut self,
6453            field: T,
6454        ) -> Self {
6455            self.set_move_entry_point(field.into());
6456            self
6457        }
6458        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6459        pub fn validator_observations(
6460            &self,
6461        ) -> &[super::ValidatorExecutionTimeObservation] {
6462            &self.validator_observations
6463        }
6464        ///Returns a mutable reference to `validator_observations`.
6465        ///If the field is unset, it is first initialized with the default value.
6466        pub fn validator_observations_mut(
6467            &mut self,
6468        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6469            &mut self.validator_observations
6470        }
6471        ///Sets `validator_observations` with the provided value.
6472        pub fn set_validator_observations(
6473            &mut self,
6474            field: Vec<super::ValidatorExecutionTimeObservation>,
6475        ) {
6476            self.validator_observations = field;
6477        }
6478        ///Sets `validator_observations` with the provided value.
6479        pub fn with_validator_observations(
6480            mut self,
6481            field: Vec<super::ValidatorExecutionTimeObservation>,
6482        ) -> Self {
6483            self.set_validator_observations(field);
6484            self
6485        }
6486    }
6487    impl super::ExecutionTimeObservations {
6488        pub const fn const_default() -> Self {
6489            Self {
6490                version: None,
6491                observations: Vec::new(),
6492            }
6493        }
6494        #[doc(hidden)]
6495        pub fn default_instance() -> &'static Self {
6496            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6497            &DEFAULT
6498        }
6499        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6500        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6501            self.version.as_mut().map(|field| field as _)
6502        }
6503        ///Returns a mutable reference to `version`.
6504        ///If the field is unset, it is first initialized with the default value.
6505        pub fn version_mut(&mut self) -> &mut i32 {
6506            self.version.get_or_insert_default()
6507        }
6508        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6509        pub fn version_opt(&self) -> Option<i32> {
6510            self.version.as_ref().map(|field| *field)
6511        }
6512        ///Sets `version` with the provided value.
6513        pub fn set_version(&mut self, field: i32) {
6514            self.version = Some(field);
6515        }
6516        ///Sets `version` with the provided value.
6517        pub fn with_version(mut self, field: i32) -> Self {
6518            self.set_version(field);
6519            self
6520        }
6521        ///Returns the value of `observations`, or the default value if `observations` is unset.
6522        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6523            &self.observations
6524        }
6525        ///Returns a mutable reference to `observations`.
6526        ///If the field is unset, it is first initialized with the default value.
6527        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6528            &mut self.observations
6529        }
6530        ///Sets `observations` with the provided value.
6531        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6532            self.observations = field;
6533        }
6534        ///Sets `observations` with the provided value.
6535        pub fn with_observations(
6536            mut self,
6537            field: Vec<super::ExecutionTimeObservation>,
6538        ) -> Self {
6539            self.set_observations(field);
6540            self
6541        }
6542    }
6543    impl super::FieldDescriptor {
6544        pub const fn const_default() -> Self {
6545            Self {
6546                name: None,
6547                position: None,
6548                r#type: None,
6549            }
6550        }
6551        #[doc(hidden)]
6552        pub fn default_instance() -> &'static Self {
6553            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6554            &DEFAULT
6555        }
6556        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6557        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6558            self.name.as_mut().map(|field| field as _)
6559        }
6560        ///Returns a mutable reference to `name`.
6561        ///If the field is unset, it is first initialized with the default value.
6562        pub fn name_mut(&mut self) -> &mut String {
6563            self.name.get_or_insert_default()
6564        }
6565        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6566        pub fn name_opt(&self) -> Option<&str> {
6567            self.name.as_ref().map(|field| field as _)
6568        }
6569        ///Sets `name` with the provided value.
6570        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6571            self.name = Some(field.into().into());
6572        }
6573        ///Sets `name` with the provided value.
6574        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6575            self.set_name(field.into());
6576            self
6577        }
6578        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6579        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6580            self.position.as_mut().map(|field| field as _)
6581        }
6582        ///Returns a mutable reference to `position`.
6583        ///If the field is unset, it is first initialized with the default value.
6584        pub fn position_mut(&mut self) -> &mut u32 {
6585            self.position.get_or_insert_default()
6586        }
6587        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6588        pub fn position_opt(&self) -> Option<u32> {
6589            self.position.as_ref().map(|field| *field)
6590        }
6591        ///Sets `position` with the provided value.
6592        pub fn set_position(&mut self, field: u32) {
6593            self.position = Some(field);
6594        }
6595        ///Sets `position` with the provided value.
6596        pub fn with_position(mut self, field: u32) -> Self {
6597            self.set_position(field);
6598            self
6599        }
6600        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6601        pub fn r#type(&self) -> &super::OpenSignatureBody {
6602            self.r#type
6603                .as_ref()
6604                .map(|field| field as _)
6605                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6606        }
6607        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6608        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6609            self.r#type.as_mut().map(|field| field as _)
6610        }
6611        ///Returns a mutable reference to `r#type`.
6612        ///If the field is unset, it is first initialized with the default value.
6613        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6614            self.r#type.get_or_insert_default()
6615        }
6616        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6617        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6618            self.r#type.as_ref().map(|field| field as _)
6619        }
6620        ///Sets `r#type` with the provided value.
6621        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6622            self.r#type = Some(field.into().into());
6623        }
6624        ///Sets `r#type` with the provided value.
6625        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6626            self.set_type(field.into());
6627            self
6628        }
6629    }
6630    impl super::FunctionDescriptor {
6631        pub const fn const_default() -> Self {
6632            Self {
6633                name: None,
6634                visibility: None,
6635                is_entry: None,
6636                type_parameters: Vec::new(),
6637                parameters: Vec::new(),
6638                returns: Vec::new(),
6639            }
6640        }
6641        #[doc(hidden)]
6642        pub fn default_instance() -> &'static Self {
6643            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6644            &DEFAULT
6645        }
6646        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6647        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6648            self.name.as_mut().map(|field| field as _)
6649        }
6650        ///Returns a mutable reference to `name`.
6651        ///If the field is unset, it is first initialized with the default value.
6652        pub fn name_mut(&mut self) -> &mut String {
6653            self.name.get_or_insert_default()
6654        }
6655        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6656        pub fn name_opt(&self) -> Option<&str> {
6657            self.name.as_ref().map(|field| field as _)
6658        }
6659        ///Sets `name` with the provided value.
6660        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6661            self.name = Some(field.into().into());
6662        }
6663        ///Sets `name` with the provided value.
6664        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6665            self.set_name(field.into());
6666            self
6667        }
6668        ///Sets `visibility` with the provided value.
6669        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6670            mut self,
6671            field: T,
6672        ) -> Self {
6673            self.set_visibility(field.into());
6674            self
6675        }
6676        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6677        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6678            self.is_entry.as_mut().map(|field| field as _)
6679        }
6680        ///Returns a mutable reference to `is_entry`.
6681        ///If the field is unset, it is first initialized with the default value.
6682        pub fn is_entry_mut(&mut self) -> &mut bool {
6683            self.is_entry.get_or_insert_default()
6684        }
6685        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6686        pub fn is_entry_opt(&self) -> Option<bool> {
6687            self.is_entry.as_ref().map(|field| *field)
6688        }
6689        ///Sets `is_entry` with the provided value.
6690        pub fn set_is_entry(&mut self, field: bool) {
6691            self.is_entry = Some(field);
6692        }
6693        ///Sets `is_entry` with the provided value.
6694        pub fn with_is_entry(mut self, field: bool) -> Self {
6695            self.set_is_entry(field);
6696            self
6697        }
6698        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6699        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6700            &self.type_parameters
6701        }
6702        ///Returns a mutable reference to `type_parameters`.
6703        ///If the field is unset, it is first initialized with the default value.
6704        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6705            &mut self.type_parameters
6706        }
6707        ///Sets `type_parameters` with the provided value.
6708        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6709            self.type_parameters = field;
6710        }
6711        ///Sets `type_parameters` with the provided value.
6712        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6713            self.set_type_parameters(field);
6714            self
6715        }
6716        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6717        pub fn parameters(&self) -> &[super::OpenSignature] {
6718            &self.parameters
6719        }
6720        ///Returns a mutable reference to `parameters`.
6721        ///If the field is unset, it is first initialized with the default value.
6722        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6723            &mut self.parameters
6724        }
6725        ///Sets `parameters` with the provided value.
6726        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6727            self.parameters = field;
6728        }
6729        ///Sets `parameters` with the provided value.
6730        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6731            self.set_parameters(field);
6732            self
6733        }
6734        ///Returns the value of `returns`, or the default value if `returns` is unset.
6735        pub fn returns(&self) -> &[super::OpenSignature] {
6736            &self.returns
6737        }
6738        ///Returns a mutable reference to `returns`.
6739        ///If the field is unset, it is first initialized with the default value.
6740        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6741            &mut self.returns
6742        }
6743        ///Sets `returns` with the provided value.
6744        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6745            self.returns = field;
6746        }
6747        ///Sets `returns` with the provided value.
6748        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6749            self.set_returns(field);
6750            self
6751        }
6752    }
6753    impl super::FundsWithdrawal {
6754        pub const fn const_default() -> Self {
6755            Self {
6756                amount: None,
6757                coin_type: None,
6758                source: None,
6759            }
6760        }
6761        #[doc(hidden)]
6762        pub fn default_instance() -> &'static Self {
6763            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6764            &DEFAULT
6765        }
6766        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6767        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6768            self.amount.as_mut().map(|field| field as _)
6769        }
6770        ///Returns a mutable reference to `amount`.
6771        ///If the field is unset, it is first initialized with the default value.
6772        pub fn amount_mut(&mut self) -> &mut u64 {
6773            self.amount.get_or_insert_default()
6774        }
6775        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
6776        pub fn amount_opt(&self) -> Option<u64> {
6777            self.amount.as_ref().map(|field| *field)
6778        }
6779        ///Sets `amount` with the provided value.
6780        pub fn set_amount(&mut self, field: u64) {
6781            self.amount = Some(field);
6782        }
6783        ///Sets `amount` with the provided value.
6784        pub fn with_amount(mut self, field: u64) -> Self {
6785            self.set_amount(field);
6786            self
6787        }
6788        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6789        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6790            self.coin_type.as_mut().map(|field| field as _)
6791        }
6792        ///Returns a mutable reference to `coin_type`.
6793        ///If the field is unset, it is first initialized with the default value.
6794        pub fn coin_type_mut(&mut self) -> &mut String {
6795            self.coin_type.get_or_insert_default()
6796        }
6797        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6798        pub fn coin_type_opt(&self) -> Option<&str> {
6799            self.coin_type.as_ref().map(|field| field as _)
6800        }
6801        ///Sets `coin_type` with the provided value.
6802        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6803            self.coin_type = Some(field.into().into());
6804        }
6805        ///Sets `coin_type` with the provided value.
6806        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6807            self.set_coin_type(field.into());
6808            self
6809        }
6810        ///Sets `source` with the provided value.
6811        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6812            mut self,
6813            field: T,
6814        ) -> Self {
6815            self.set_source(field.into());
6816            self
6817        }
6818    }
6819    impl super::GasCostSummary {
6820        pub const fn const_default() -> Self {
6821            Self {
6822                computation_cost: None,
6823                storage_cost: None,
6824                storage_rebate: None,
6825                non_refundable_storage_fee: None,
6826            }
6827        }
6828        #[doc(hidden)]
6829        pub fn default_instance() -> &'static Self {
6830            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6831            &DEFAULT
6832        }
6833        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6834        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6835            self.computation_cost.as_mut().map(|field| field as _)
6836        }
6837        ///Returns a mutable reference to `computation_cost`.
6838        ///If the field is unset, it is first initialized with the default value.
6839        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6840            self.computation_cost.get_or_insert_default()
6841        }
6842        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6843        pub fn computation_cost_opt(&self) -> Option<u64> {
6844            self.computation_cost.as_ref().map(|field| *field)
6845        }
6846        ///Sets `computation_cost` with the provided value.
6847        pub fn set_computation_cost(&mut self, field: u64) {
6848            self.computation_cost = Some(field);
6849        }
6850        ///Sets `computation_cost` with the provided value.
6851        pub fn with_computation_cost(mut self, field: u64) -> Self {
6852            self.set_computation_cost(field);
6853            self
6854        }
6855        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6856        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6857            self.storage_cost.as_mut().map(|field| field as _)
6858        }
6859        ///Returns a mutable reference to `storage_cost`.
6860        ///If the field is unset, it is first initialized with the default value.
6861        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6862            self.storage_cost.get_or_insert_default()
6863        }
6864        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6865        pub fn storage_cost_opt(&self) -> Option<u64> {
6866            self.storage_cost.as_ref().map(|field| *field)
6867        }
6868        ///Sets `storage_cost` with the provided value.
6869        pub fn set_storage_cost(&mut self, field: u64) {
6870            self.storage_cost = Some(field);
6871        }
6872        ///Sets `storage_cost` with the provided value.
6873        pub fn with_storage_cost(mut self, field: u64) -> Self {
6874            self.set_storage_cost(field);
6875            self
6876        }
6877        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6878        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6879            self.storage_rebate.as_mut().map(|field| field as _)
6880        }
6881        ///Returns a mutable reference to `storage_rebate`.
6882        ///If the field is unset, it is first initialized with the default value.
6883        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6884            self.storage_rebate.get_or_insert_default()
6885        }
6886        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6887        pub fn storage_rebate_opt(&self) -> Option<u64> {
6888            self.storage_rebate.as_ref().map(|field| *field)
6889        }
6890        ///Sets `storage_rebate` with the provided value.
6891        pub fn set_storage_rebate(&mut self, field: u64) {
6892            self.storage_rebate = Some(field);
6893        }
6894        ///Sets `storage_rebate` with the provided value.
6895        pub fn with_storage_rebate(mut self, field: u64) -> Self {
6896            self.set_storage_rebate(field);
6897            self
6898        }
6899        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6900        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6901            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6902        }
6903        ///Returns a mutable reference to `non_refundable_storage_fee`.
6904        ///If the field is unset, it is first initialized with the default value.
6905        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6906            self.non_refundable_storage_fee.get_or_insert_default()
6907        }
6908        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6909        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6910            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6911        }
6912        ///Sets `non_refundable_storage_fee` with the provided value.
6913        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6914            self.non_refundable_storage_fee = Some(field);
6915        }
6916        ///Sets `non_refundable_storage_fee` with the provided value.
6917        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6918            self.set_non_refundable_storage_fee(field);
6919            self
6920        }
6921    }
6922    impl super::GasPayment {
6923        pub const fn const_default() -> Self {
6924            Self {
6925                objects: Vec::new(),
6926                owner: None,
6927                price: None,
6928                budget: None,
6929            }
6930        }
6931        #[doc(hidden)]
6932        pub fn default_instance() -> &'static Self {
6933            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6934            &DEFAULT
6935        }
6936        ///Returns the value of `objects`, or the default value if `objects` is unset.
6937        pub fn objects(&self) -> &[super::ObjectReference] {
6938            &self.objects
6939        }
6940        ///Returns a mutable reference to `objects`.
6941        ///If the field is unset, it is first initialized with the default value.
6942        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6943            &mut self.objects
6944        }
6945        ///Sets `objects` with the provided value.
6946        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6947            self.objects = field;
6948        }
6949        ///Sets `objects` with the provided value.
6950        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6951            self.set_objects(field);
6952            self
6953        }
6954        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6955        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6956            self.owner.as_mut().map(|field| field as _)
6957        }
6958        ///Returns a mutable reference to `owner`.
6959        ///If the field is unset, it is first initialized with the default value.
6960        pub fn owner_mut(&mut self) -> &mut String {
6961            self.owner.get_or_insert_default()
6962        }
6963        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6964        pub fn owner_opt(&self) -> Option<&str> {
6965            self.owner.as_ref().map(|field| field as _)
6966        }
6967        ///Sets `owner` with the provided value.
6968        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6969            self.owner = Some(field.into().into());
6970        }
6971        ///Sets `owner` with the provided value.
6972        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6973            self.set_owner(field.into());
6974            self
6975        }
6976        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6977        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6978            self.price.as_mut().map(|field| field as _)
6979        }
6980        ///Returns a mutable reference to `price`.
6981        ///If the field is unset, it is first initialized with the default value.
6982        pub fn price_mut(&mut self) -> &mut u64 {
6983            self.price.get_or_insert_default()
6984        }
6985        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6986        pub fn price_opt(&self) -> Option<u64> {
6987            self.price.as_ref().map(|field| *field)
6988        }
6989        ///Sets `price` with the provided value.
6990        pub fn set_price(&mut self, field: u64) {
6991            self.price = Some(field);
6992        }
6993        ///Sets `price` with the provided value.
6994        pub fn with_price(mut self, field: u64) -> Self {
6995            self.set_price(field);
6996            self
6997        }
6998        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6999        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7000            self.budget.as_mut().map(|field| field as _)
7001        }
7002        ///Returns a mutable reference to `budget`.
7003        ///If the field is unset, it is first initialized with the default value.
7004        pub fn budget_mut(&mut self) -> &mut u64 {
7005            self.budget.get_or_insert_default()
7006        }
7007        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
7008        pub fn budget_opt(&self) -> Option<u64> {
7009            self.budget.as_ref().map(|field| *field)
7010        }
7011        ///Sets `budget` with the provided value.
7012        pub fn set_budget(&mut self, field: u64) {
7013            self.budget = Some(field);
7014        }
7015        ///Sets `budget` with the provided value.
7016        pub fn with_budget(mut self, field: u64) -> Self {
7017            self.set_budget(field);
7018            self
7019        }
7020    }
7021    impl super::GenesisTransaction {
7022        pub const fn const_default() -> Self {
7023            Self { objects: Vec::new() }
7024        }
7025        #[doc(hidden)]
7026        pub fn default_instance() -> &'static Self {
7027            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7028            &DEFAULT
7029        }
7030        ///Returns the value of `objects`, or the default value if `objects` is unset.
7031        pub fn objects(&self) -> &[super::Object] {
7032            &self.objects
7033        }
7034        ///Returns a mutable reference to `objects`.
7035        ///If the field is unset, it is first initialized with the default value.
7036        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7037            &mut self.objects
7038        }
7039        ///Sets `objects` with the provided value.
7040        pub fn set_objects(&mut self, field: Vec<super::Object>) {
7041            self.objects = field;
7042        }
7043        ///Sets `objects` with the provided value.
7044        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7045            self.set_objects(field);
7046            self
7047        }
7048    }
7049    impl super::GetBalanceRequest {
7050        pub const fn const_default() -> Self {
7051            Self {
7052                owner: None,
7053                coin_type: None,
7054            }
7055        }
7056        #[doc(hidden)]
7057        pub fn default_instance() -> &'static Self {
7058            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7059            &DEFAULT
7060        }
7061        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7062        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7063            self.owner.as_mut().map(|field| field as _)
7064        }
7065        ///Returns a mutable reference to `owner`.
7066        ///If the field is unset, it is first initialized with the default value.
7067        pub fn owner_mut(&mut self) -> &mut String {
7068            self.owner.get_or_insert_default()
7069        }
7070        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7071        pub fn owner_opt(&self) -> Option<&str> {
7072            self.owner.as_ref().map(|field| field as _)
7073        }
7074        ///Sets `owner` with the provided value.
7075        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7076            self.owner = Some(field.into().into());
7077        }
7078        ///Sets `owner` with the provided value.
7079        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7080            self.set_owner(field.into());
7081            self
7082        }
7083        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7084        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7085            self.coin_type.as_mut().map(|field| field as _)
7086        }
7087        ///Returns a mutable reference to `coin_type`.
7088        ///If the field is unset, it is first initialized with the default value.
7089        pub fn coin_type_mut(&mut self) -> &mut String {
7090            self.coin_type.get_or_insert_default()
7091        }
7092        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7093        pub fn coin_type_opt(&self) -> Option<&str> {
7094            self.coin_type.as_ref().map(|field| field as _)
7095        }
7096        ///Sets `coin_type` with the provided value.
7097        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7098            self.coin_type = Some(field.into().into());
7099        }
7100        ///Sets `coin_type` with the provided value.
7101        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7102            self.set_coin_type(field.into());
7103            self
7104        }
7105    }
7106    impl super::GetBalanceResponse {
7107        pub const fn const_default() -> Self {
7108            Self { balance: None }
7109        }
7110        #[doc(hidden)]
7111        pub fn default_instance() -> &'static Self {
7112            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7113            &DEFAULT
7114        }
7115        ///Returns the value of `balance`, or the default value if `balance` is unset.
7116        pub fn balance(&self) -> &super::Balance {
7117            self.balance
7118                .as_ref()
7119                .map(|field| field as _)
7120                .unwrap_or_else(|| super::Balance::default_instance() as _)
7121        }
7122        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7123        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7124            self.balance.as_mut().map(|field| field as _)
7125        }
7126        ///Returns a mutable reference to `balance`.
7127        ///If the field is unset, it is first initialized with the default value.
7128        pub fn balance_mut(&mut self) -> &mut super::Balance {
7129            self.balance.get_or_insert_default()
7130        }
7131        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7132        pub fn balance_opt(&self) -> Option<&super::Balance> {
7133            self.balance.as_ref().map(|field| field as _)
7134        }
7135        ///Sets `balance` with the provided value.
7136        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7137            self.balance = Some(field.into().into());
7138        }
7139        ///Sets `balance` with the provided value.
7140        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7141            self.set_balance(field.into());
7142            self
7143        }
7144    }
7145    impl super::GetCheckpointRequest {
7146        pub const fn const_default() -> Self {
7147            Self {
7148                read_mask: None,
7149                checkpoint_id: None,
7150            }
7151        }
7152        #[doc(hidden)]
7153        pub fn default_instance() -> &'static Self {
7154            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7155            &DEFAULT
7156        }
7157        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7158        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7159            self.read_mask.as_mut().map(|field| field as _)
7160        }
7161        ///Returns a mutable reference to `read_mask`.
7162        ///If the field is unset, it is first initialized with the default value.
7163        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7164            self.read_mask.get_or_insert_default()
7165        }
7166        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7167        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7168            self.read_mask.as_ref().map(|field| field as _)
7169        }
7170        ///Sets `read_mask` with the provided value.
7171        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7172            self.read_mask = Some(field.into().into());
7173        }
7174        ///Sets `read_mask` with the provided value.
7175        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7176            mut self,
7177            field: T,
7178        ) -> Self {
7179            self.set_read_mask(field.into());
7180            self
7181        }
7182        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
7183        pub fn sequence_number(&self) -> u64 {
7184            if let Some(
7185                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7186            ) = &self.checkpoint_id
7187            {
7188                *field
7189            } else {
7190                0u64
7191            }
7192        }
7193        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
7194        pub fn sequence_number_opt(&self) -> Option<u64> {
7195            if let Some(
7196                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7197            ) = &self.checkpoint_id
7198            {
7199                Some(*field)
7200            } else {
7201                None
7202            }
7203        }
7204        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7205        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7206            if let Some(
7207                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7208            ) = &mut self.checkpoint_id
7209            {
7210                Some(field as _)
7211            } else {
7212                None
7213            }
7214        }
7215        ///Returns a mutable reference to `sequence_number`.
7216        ///If the field is unset, it is first initialized with the default value.
7217        ///If any other oneof field in the same oneof is set, it will be cleared.
7218        pub fn sequence_number_mut(&mut self) -> &mut u64 {
7219            if self.sequence_number_opt_mut().is_none() {
7220                self.checkpoint_id = Some(
7221                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7222                        u64::default(),
7223                    ),
7224                );
7225            }
7226            self.sequence_number_opt_mut().unwrap()
7227        }
7228        ///Sets `sequence_number` with the provided value.
7229        ///If any other oneof field in the same oneof is set, it will be cleared.
7230        pub fn set_sequence_number(&mut self, field: u64) {
7231            self.checkpoint_id = Some(
7232                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7233            );
7234        }
7235        ///Sets `sequence_number` with the provided value.
7236        ///If any other oneof field in the same oneof is set, it will be cleared.
7237        pub fn with_sequence_number(mut self, field: u64) -> Self {
7238            self.set_sequence_number(field);
7239            self
7240        }
7241        ///Returns the value of `digest`, or the default value if `digest` is unset.
7242        pub fn digest(&self) -> &str {
7243            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7244                .checkpoint_id
7245            {
7246                field as _
7247            } else {
7248                ""
7249            }
7250        }
7251        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7252        pub fn digest_opt(&self) -> Option<&str> {
7253            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7254                .checkpoint_id
7255            {
7256                Some(field as _)
7257            } else {
7258                None
7259            }
7260        }
7261        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7262        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7263            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7264                .checkpoint_id
7265            {
7266                Some(field as _)
7267            } else {
7268                None
7269            }
7270        }
7271        ///Returns a mutable reference to `digest`.
7272        ///If the field is unset, it is first initialized with the default value.
7273        ///If any other oneof field in the same oneof is set, it will be cleared.
7274        pub fn digest_mut(&mut self) -> &mut String {
7275            if self.digest_opt_mut().is_none() {
7276                self.checkpoint_id = Some(
7277                    super::get_checkpoint_request::CheckpointId::Digest(
7278                        String::default(),
7279                    ),
7280                );
7281            }
7282            self.digest_opt_mut().unwrap()
7283        }
7284        ///Sets `digest` with the provided value.
7285        ///If any other oneof field in the same oneof is set, it will be cleared.
7286        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7287            self.checkpoint_id = Some(
7288                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7289            );
7290        }
7291        ///Sets `digest` with the provided value.
7292        ///If any other oneof field in the same oneof is set, it will be cleared.
7293        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7294            self.set_digest(field.into());
7295            self
7296        }
7297    }
7298    impl super::GetCheckpointResponse {
7299        pub const fn const_default() -> Self {
7300            Self { checkpoint: None }
7301        }
7302        #[doc(hidden)]
7303        pub fn default_instance() -> &'static Self {
7304            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7305            &DEFAULT
7306        }
7307        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7308        pub fn checkpoint(&self) -> &super::Checkpoint {
7309            self.checkpoint
7310                .as_ref()
7311                .map(|field| field as _)
7312                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7313        }
7314        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7315        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7316            self.checkpoint.as_mut().map(|field| field as _)
7317        }
7318        ///Returns a mutable reference to `checkpoint`.
7319        ///If the field is unset, it is first initialized with the default value.
7320        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7321            self.checkpoint.get_or_insert_default()
7322        }
7323        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7324        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7325            self.checkpoint.as_ref().map(|field| field as _)
7326        }
7327        ///Sets `checkpoint` with the provided value.
7328        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7329            self.checkpoint = Some(field.into().into());
7330        }
7331        ///Sets `checkpoint` with the provided value.
7332        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7333            self.set_checkpoint(field.into());
7334            self
7335        }
7336    }
7337    impl super::GetCoinInfoRequest {
7338        pub const fn const_default() -> Self {
7339            Self { coin_type: None }
7340        }
7341        #[doc(hidden)]
7342        pub fn default_instance() -> &'static Self {
7343            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7344            &DEFAULT
7345        }
7346        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7347        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7348            self.coin_type.as_mut().map(|field| field as _)
7349        }
7350        ///Returns a mutable reference to `coin_type`.
7351        ///If the field is unset, it is first initialized with the default value.
7352        pub fn coin_type_mut(&mut self) -> &mut String {
7353            self.coin_type.get_or_insert_default()
7354        }
7355        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7356        pub fn coin_type_opt(&self) -> Option<&str> {
7357            self.coin_type.as_ref().map(|field| field as _)
7358        }
7359        ///Sets `coin_type` with the provided value.
7360        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7361            self.coin_type = Some(field.into().into());
7362        }
7363        ///Sets `coin_type` with the provided value.
7364        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7365            self.set_coin_type(field.into());
7366            self
7367        }
7368    }
7369    impl super::GetCoinInfoResponse {
7370        pub const fn const_default() -> Self {
7371            Self {
7372                coin_type: None,
7373                metadata: None,
7374                treasury: None,
7375                regulated_metadata: None,
7376            }
7377        }
7378        #[doc(hidden)]
7379        pub fn default_instance() -> &'static Self {
7380            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7381            &DEFAULT
7382        }
7383        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7384        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7385            self.coin_type.as_mut().map(|field| field as _)
7386        }
7387        ///Returns a mutable reference to `coin_type`.
7388        ///If the field is unset, it is first initialized with the default value.
7389        pub fn coin_type_mut(&mut self) -> &mut String {
7390            self.coin_type.get_or_insert_default()
7391        }
7392        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7393        pub fn coin_type_opt(&self) -> Option<&str> {
7394            self.coin_type.as_ref().map(|field| field as _)
7395        }
7396        ///Sets `coin_type` with the provided value.
7397        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7398            self.coin_type = Some(field.into().into());
7399        }
7400        ///Sets `coin_type` with the provided value.
7401        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7402            self.set_coin_type(field.into());
7403            self
7404        }
7405        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
7406        pub fn metadata(&self) -> &super::CoinMetadata {
7407            self.metadata
7408                .as_ref()
7409                .map(|field| field as _)
7410                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7411        }
7412        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7413        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7414            self.metadata.as_mut().map(|field| field as _)
7415        }
7416        ///Returns a mutable reference to `metadata`.
7417        ///If the field is unset, it is first initialized with the default value.
7418        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7419            self.metadata.get_or_insert_default()
7420        }
7421        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7422        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7423            self.metadata.as_ref().map(|field| field as _)
7424        }
7425        ///Sets `metadata` with the provided value.
7426        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7427            self.metadata = Some(field.into().into());
7428        }
7429        ///Sets `metadata` with the provided value.
7430        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7431            self.set_metadata(field.into());
7432            self
7433        }
7434        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
7435        pub fn treasury(&self) -> &super::CoinTreasury {
7436            self.treasury
7437                .as_ref()
7438                .map(|field| field as _)
7439                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7440        }
7441        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7442        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7443            self.treasury.as_mut().map(|field| field as _)
7444        }
7445        ///Returns a mutable reference to `treasury`.
7446        ///If the field is unset, it is first initialized with the default value.
7447        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7448            self.treasury.get_or_insert_default()
7449        }
7450        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
7451        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7452            self.treasury.as_ref().map(|field| field as _)
7453        }
7454        ///Sets `treasury` with the provided value.
7455        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7456            self.treasury = Some(field.into().into());
7457        }
7458        ///Sets `treasury` with the provided value.
7459        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7460            self.set_treasury(field.into());
7461            self
7462        }
7463        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
7464        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7465            self.regulated_metadata
7466                .as_ref()
7467                .map(|field| field as _)
7468                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7469        }
7470        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7471        pub fn regulated_metadata_opt_mut(
7472            &mut self,
7473        ) -> Option<&mut super::RegulatedCoinMetadata> {
7474            self.regulated_metadata.as_mut().map(|field| field as _)
7475        }
7476        ///Returns a mutable reference to `regulated_metadata`.
7477        ///If the field is unset, it is first initialized with the default value.
7478        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7479            self.regulated_metadata.get_or_insert_default()
7480        }
7481        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7482        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7483            self.regulated_metadata.as_ref().map(|field| field as _)
7484        }
7485        ///Sets `regulated_metadata` with the provided value.
7486        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7487            &mut self,
7488            field: T,
7489        ) {
7490            self.regulated_metadata = Some(field.into().into());
7491        }
7492        ///Sets `regulated_metadata` with the provided value.
7493        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7494            mut self,
7495            field: T,
7496        ) -> Self {
7497            self.set_regulated_metadata(field.into());
7498            self
7499        }
7500    }
7501    impl super::GetDatatypeRequest {
7502        pub const fn const_default() -> Self {
7503            Self {
7504                package_id: None,
7505                module_name: None,
7506                name: None,
7507            }
7508        }
7509        #[doc(hidden)]
7510        pub fn default_instance() -> &'static Self {
7511            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7512            &DEFAULT
7513        }
7514        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7515        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7516            self.package_id.as_mut().map(|field| field as _)
7517        }
7518        ///Returns a mutable reference to `package_id`.
7519        ///If the field is unset, it is first initialized with the default value.
7520        pub fn package_id_mut(&mut self) -> &mut String {
7521            self.package_id.get_or_insert_default()
7522        }
7523        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7524        pub fn package_id_opt(&self) -> Option<&str> {
7525            self.package_id.as_ref().map(|field| field as _)
7526        }
7527        ///Sets `package_id` with the provided value.
7528        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7529            self.package_id = Some(field.into().into());
7530        }
7531        ///Sets `package_id` with the provided value.
7532        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7533            self.set_package_id(field.into());
7534            self
7535        }
7536        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7537        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7538            self.module_name.as_mut().map(|field| field as _)
7539        }
7540        ///Returns a mutable reference to `module_name`.
7541        ///If the field is unset, it is first initialized with the default value.
7542        pub fn module_name_mut(&mut self) -> &mut String {
7543            self.module_name.get_or_insert_default()
7544        }
7545        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7546        pub fn module_name_opt(&self) -> Option<&str> {
7547            self.module_name.as_ref().map(|field| field as _)
7548        }
7549        ///Sets `module_name` with the provided value.
7550        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7551            self.module_name = Some(field.into().into());
7552        }
7553        ///Sets `module_name` with the provided value.
7554        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7555            self.set_module_name(field.into());
7556            self
7557        }
7558        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7559        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7560            self.name.as_mut().map(|field| field as _)
7561        }
7562        ///Returns a mutable reference to `name`.
7563        ///If the field is unset, it is first initialized with the default value.
7564        pub fn name_mut(&mut self) -> &mut String {
7565            self.name.get_or_insert_default()
7566        }
7567        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7568        pub fn name_opt(&self) -> Option<&str> {
7569            self.name.as_ref().map(|field| field as _)
7570        }
7571        ///Sets `name` with the provided value.
7572        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7573            self.name = Some(field.into().into());
7574        }
7575        ///Sets `name` with the provided value.
7576        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7577            self.set_name(field.into());
7578            self
7579        }
7580    }
7581    impl super::GetDatatypeResponse {
7582        pub const fn const_default() -> Self {
7583            Self { datatype: None }
7584        }
7585        #[doc(hidden)]
7586        pub fn default_instance() -> &'static Self {
7587            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7588            &DEFAULT
7589        }
7590        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7591        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7592            self.datatype
7593                .as_ref()
7594                .map(|field| field as _)
7595                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7596        }
7597        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7598        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7599            self.datatype.as_mut().map(|field| field as _)
7600        }
7601        ///Returns a mutable reference to `datatype`.
7602        ///If the field is unset, it is first initialized with the default value.
7603        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7604            self.datatype.get_or_insert_default()
7605        }
7606        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7607        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7608            self.datatype.as_ref().map(|field| field as _)
7609        }
7610        ///Sets `datatype` with the provided value.
7611        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7612            self.datatype = Some(field.into().into());
7613        }
7614        ///Sets `datatype` with the provided value.
7615        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7616            mut self,
7617            field: T,
7618        ) -> Self {
7619            self.set_datatype(field.into());
7620            self
7621        }
7622    }
7623    impl super::GetEpochRequest {
7624        pub const fn const_default() -> Self {
7625            Self {
7626                epoch: None,
7627                read_mask: None,
7628            }
7629        }
7630        #[doc(hidden)]
7631        pub fn default_instance() -> &'static Self {
7632            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7633            &DEFAULT
7634        }
7635        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7636        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7637            self.epoch.as_mut().map(|field| field as _)
7638        }
7639        ///Returns a mutable reference to `epoch`.
7640        ///If the field is unset, it is first initialized with the default value.
7641        pub fn epoch_mut(&mut self) -> &mut u64 {
7642            self.epoch.get_or_insert_default()
7643        }
7644        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7645        pub fn epoch_opt(&self) -> Option<u64> {
7646            self.epoch.as_ref().map(|field| *field)
7647        }
7648        ///Sets `epoch` with the provided value.
7649        pub fn set_epoch(&mut self, field: u64) {
7650            self.epoch = Some(field);
7651        }
7652        ///Sets `epoch` with the provided value.
7653        pub fn with_epoch(mut self, field: u64) -> Self {
7654            self.set_epoch(field);
7655            self
7656        }
7657        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7658        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7659            self.read_mask.as_mut().map(|field| field as _)
7660        }
7661        ///Returns a mutable reference to `read_mask`.
7662        ///If the field is unset, it is first initialized with the default value.
7663        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7664            self.read_mask.get_or_insert_default()
7665        }
7666        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7667        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7668            self.read_mask.as_ref().map(|field| field as _)
7669        }
7670        ///Sets `read_mask` with the provided value.
7671        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7672            self.read_mask = Some(field.into().into());
7673        }
7674        ///Sets `read_mask` with the provided value.
7675        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7676            mut self,
7677            field: T,
7678        ) -> Self {
7679            self.set_read_mask(field.into());
7680            self
7681        }
7682    }
7683    impl super::GetEpochResponse {
7684        pub const fn const_default() -> Self {
7685            Self { epoch: None }
7686        }
7687        #[doc(hidden)]
7688        pub fn default_instance() -> &'static Self {
7689            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7690            &DEFAULT
7691        }
7692        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7693        pub fn epoch(&self) -> &super::Epoch {
7694            self.epoch
7695                .as_ref()
7696                .map(|field| field as _)
7697                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7698        }
7699        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7700        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7701            self.epoch.as_mut().map(|field| field as _)
7702        }
7703        ///Returns a mutable reference to `epoch`.
7704        ///If the field is unset, it is first initialized with the default value.
7705        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7706            self.epoch.get_or_insert_default()
7707        }
7708        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7709        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7710            self.epoch.as_ref().map(|field| field as _)
7711        }
7712        ///Sets `epoch` with the provided value.
7713        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7714            self.epoch = Some(field.into().into());
7715        }
7716        ///Sets `epoch` with the provided value.
7717        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7718            self.set_epoch(field.into());
7719            self
7720        }
7721    }
7722    impl super::GetFunctionRequest {
7723        pub const fn const_default() -> Self {
7724            Self {
7725                package_id: None,
7726                module_name: None,
7727                name: None,
7728            }
7729        }
7730        #[doc(hidden)]
7731        pub fn default_instance() -> &'static Self {
7732            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7733            &DEFAULT
7734        }
7735        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7736        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7737            self.package_id.as_mut().map(|field| field as _)
7738        }
7739        ///Returns a mutable reference to `package_id`.
7740        ///If the field is unset, it is first initialized with the default value.
7741        pub fn package_id_mut(&mut self) -> &mut String {
7742            self.package_id.get_or_insert_default()
7743        }
7744        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7745        pub fn package_id_opt(&self) -> Option<&str> {
7746            self.package_id.as_ref().map(|field| field as _)
7747        }
7748        ///Sets `package_id` with the provided value.
7749        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7750            self.package_id = Some(field.into().into());
7751        }
7752        ///Sets `package_id` with the provided value.
7753        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7754            self.set_package_id(field.into());
7755            self
7756        }
7757        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7758        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7759            self.module_name.as_mut().map(|field| field as _)
7760        }
7761        ///Returns a mutable reference to `module_name`.
7762        ///If the field is unset, it is first initialized with the default value.
7763        pub fn module_name_mut(&mut self) -> &mut String {
7764            self.module_name.get_or_insert_default()
7765        }
7766        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7767        pub fn module_name_opt(&self) -> Option<&str> {
7768            self.module_name.as_ref().map(|field| field as _)
7769        }
7770        ///Sets `module_name` with the provided value.
7771        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7772            self.module_name = Some(field.into().into());
7773        }
7774        ///Sets `module_name` with the provided value.
7775        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7776            self.set_module_name(field.into());
7777            self
7778        }
7779        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7780        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7781            self.name.as_mut().map(|field| field as _)
7782        }
7783        ///Returns a mutable reference to `name`.
7784        ///If the field is unset, it is first initialized with the default value.
7785        pub fn name_mut(&mut self) -> &mut String {
7786            self.name.get_or_insert_default()
7787        }
7788        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7789        pub fn name_opt(&self) -> Option<&str> {
7790            self.name.as_ref().map(|field| field as _)
7791        }
7792        ///Sets `name` with the provided value.
7793        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7794            self.name = Some(field.into().into());
7795        }
7796        ///Sets `name` with the provided value.
7797        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7798            self.set_name(field.into());
7799            self
7800        }
7801    }
7802    impl super::GetFunctionResponse {
7803        pub const fn const_default() -> Self {
7804            Self { function: None }
7805        }
7806        #[doc(hidden)]
7807        pub fn default_instance() -> &'static Self {
7808            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7809            &DEFAULT
7810        }
7811        ///Returns the value of `function`, or the default value if `function` is unset.
7812        pub fn function(&self) -> &super::FunctionDescriptor {
7813            self.function
7814                .as_ref()
7815                .map(|field| field as _)
7816                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7817        }
7818        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7819        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7820            self.function.as_mut().map(|field| field as _)
7821        }
7822        ///Returns a mutable reference to `function`.
7823        ///If the field is unset, it is first initialized with the default value.
7824        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7825            self.function.get_or_insert_default()
7826        }
7827        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7828        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7829            self.function.as_ref().map(|field| field as _)
7830        }
7831        ///Sets `function` with the provided value.
7832        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7833            self.function = Some(field.into().into());
7834        }
7835        ///Sets `function` with the provided value.
7836        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7837            mut self,
7838            field: T,
7839        ) -> Self {
7840            self.set_function(field.into());
7841            self
7842        }
7843    }
7844    impl super::GetObjectRequest {
7845        pub const fn const_default() -> Self {
7846            Self {
7847                object_id: None,
7848                version: None,
7849                read_mask: None,
7850            }
7851        }
7852        #[doc(hidden)]
7853        pub fn default_instance() -> &'static Self {
7854            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7855            &DEFAULT
7856        }
7857        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7858        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7859            self.object_id.as_mut().map(|field| field as _)
7860        }
7861        ///Returns a mutable reference to `object_id`.
7862        ///If the field is unset, it is first initialized with the default value.
7863        pub fn object_id_mut(&mut self) -> &mut String {
7864            self.object_id.get_or_insert_default()
7865        }
7866        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7867        pub fn object_id_opt(&self) -> Option<&str> {
7868            self.object_id.as_ref().map(|field| field as _)
7869        }
7870        ///Sets `object_id` with the provided value.
7871        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7872            self.object_id = Some(field.into().into());
7873        }
7874        ///Sets `object_id` with the provided value.
7875        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7876            self.set_object_id(field.into());
7877            self
7878        }
7879        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7880        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7881            self.version.as_mut().map(|field| field as _)
7882        }
7883        ///Returns a mutable reference to `version`.
7884        ///If the field is unset, it is first initialized with the default value.
7885        pub fn version_mut(&mut self) -> &mut u64 {
7886            self.version.get_or_insert_default()
7887        }
7888        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7889        pub fn version_opt(&self) -> Option<u64> {
7890            self.version.as_ref().map(|field| *field)
7891        }
7892        ///Sets `version` with the provided value.
7893        pub fn set_version(&mut self, field: u64) {
7894            self.version = Some(field);
7895        }
7896        ///Sets `version` with the provided value.
7897        pub fn with_version(mut self, field: u64) -> Self {
7898            self.set_version(field);
7899            self
7900        }
7901        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7902        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7903            self.read_mask.as_mut().map(|field| field as _)
7904        }
7905        ///Returns a mutable reference to `read_mask`.
7906        ///If the field is unset, it is first initialized with the default value.
7907        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7908            self.read_mask.get_or_insert_default()
7909        }
7910        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7911        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7912            self.read_mask.as_ref().map(|field| field as _)
7913        }
7914        ///Sets `read_mask` with the provided value.
7915        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7916            self.read_mask = Some(field.into().into());
7917        }
7918        ///Sets `read_mask` with the provided value.
7919        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7920            mut self,
7921            field: T,
7922        ) -> Self {
7923            self.set_read_mask(field.into());
7924            self
7925        }
7926    }
7927    impl super::GetObjectResponse {
7928        pub const fn const_default() -> Self {
7929            Self { object: None }
7930        }
7931        #[doc(hidden)]
7932        pub fn default_instance() -> &'static Self {
7933            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7934            &DEFAULT
7935        }
7936        ///Returns the value of `object`, or the default value if `object` is unset.
7937        pub fn object(&self) -> &super::Object {
7938            self.object
7939                .as_ref()
7940                .map(|field| field as _)
7941                .unwrap_or_else(|| super::Object::default_instance() as _)
7942        }
7943        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7944        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7945            self.object.as_mut().map(|field| field as _)
7946        }
7947        ///Returns a mutable reference to `object`.
7948        ///If the field is unset, it is first initialized with the default value.
7949        pub fn object_mut(&mut self) -> &mut super::Object {
7950            self.object.get_or_insert_default()
7951        }
7952        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7953        pub fn object_opt(&self) -> Option<&super::Object> {
7954            self.object.as_ref().map(|field| field as _)
7955        }
7956        ///Sets `object` with the provided value.
7957        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7958            self.object = Some(field.into().into());
7959        }
7960        ///Sets `object` with the provided value.
7961        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7962            self.set_object(field.into());
7963            self
7964        }
7965    }
7966    impl super::GetObjectResult {
7967        pub const fn const_default() -> Self {
7968            Self { result: None }
7969        }
7970        #[doc(hidden)]
7971        pub fn default_instance() -> &'static Self {
7972            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7973            &DEFAULT
7974        }
7975        ///Returns the value of `object`, or the default value if `object` is unset.
7976        pub fn object(&self) -> &super::Object {
7977            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7978                field as _
7979            } else {
7980                super::Object::default_instance() as _
7981            }
7982        }
7983        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7984        pub fn object_opt(&self) -> Option<&super::Object> {
7985            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7986                Some(field as _)
7987            } else {
7988                None
7989            }
7990        }
7991        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7992        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7993            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7994                .result
7995            {
7996                Some(field as _)
7997            } else {
7998                None
7999            }
8000        }
8001        ///Returns a mutable reference to `object`.
8002        ///If the field is unset, it is first initialized with the default value.
8003        ///If any other oneof field in the same oneof is set, it will be cleared.
8004        pub fn object_mut(&mut self) -> &mut super::Object {
8005            if self.object_opt_mut().is_none() {
8006                self.result = Some(
8007                    super::get_object_result::Result::Object(super::Object::default()),
8008                );
8009            }
8010            self.object_opt_mut().unwrap()
8011        }
8012        ///Sets `object` with the provided value.
8013        ///If any other oneof field in the same oneof is set, it will be cleared.
8014        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8015            self.result = Some(
8016                super::get_object_result::Result::Object(field.into().into()),
8017            );
8018        }
8019        ///Sets `object` with the provided value.
8020        ///If any other oneof field in the same oneof is set, it will be cleared.
8021        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8022            self.set_object(field.into());
8023            self
8024        }
8025        ///Returns the value of `error`, or the default value if `error` is unset.
8026        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8027            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8028                field as _
8029            } else {
8030                super::super::super::super::google::rpc::Status::default_instance() as _
8031            }
8032        }
8033        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8034        pub fn error_opt(
8035            &self,
8036        ) -> Option<&super::super::super::super::google::rpc::Status> {
8037            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8038                Some(field as _)
8039            } else {
8040                None
8041            }
8042        }
8043        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8044        pub fn error_opt_mut(
8045            &mut self,
8046        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8047            if let Some(super::get_object_result::Result::Error(field)) = &mut self
8048                .result
8049            {
8050                Some(field as _)
8051            } else {
8052                None
8053            }
8054        }
8055        ///Returns a mutable reference to `error`.
8056        ///If the field is unset, it is first initialized with the default value.
8057        ///If any other oneof field in the same oneof is set, it will be cleared.
8058        pub fn error_mut(
8059            &mut self,
8060        ) -> &mut super::super::super::super::google::rpc::Status {
8061            if self.error_opt_mut().is_none() {
8062                self.result = Some(
8063                    super::get_object_result::Result::Error(
8064                        super::super::super::super::google::rpc::Status::default(),
8065                    ),
8066                );
8067            }
8068            self.error_opt_mut().unwrap()
8069        }
8070        ///Sets `error` with the provided value.
8071        ///If any other oneof field in the same oneof is set, it will be cleared.
8072        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8073            &mut self,
8074            field: T,
8075        ) {
8076            self.result = Some(
8077                super::get_object_result::Result::Error(field.into().into()),
8078            );
8079        }
8080        ///Sets `error` with the provided value.
8081        ///If any other oneof field in the same oneof is set, it will be cleared.
8082        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8083            mut self,
8084            field: T,
8085        ) -> Self {
8086            self.set_error(field.into());
8087            self
8088        }
8089    }
8090    impl super::GetPackageRequest {
8091        pub const fn const_default() -> Self {
8092            Self { package_id: None }
8093        }
8094        #[doc(hidden)]
8095        pub fn default_instance() -> &'static Self {
8096            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8097            &DEFAULT
8098        }
8099        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8100        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8101            self.package_id.as_mut().map(|field| field as _)
8102        }
8103        ///Returns a mutable reference to `package_id`.
8104        ///If the field is unset, it is first initialized with the default value.
8105        pub fn package_id_mut(&mut self) -> &mut String {
8106            self.package_id.get_or_insert_default()
8107        }
8108        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8109        pub fn package_id_opt(&self) -> Option<&str> {
8110            self.package_id.as_ref().map(|field| field as _)
8111        }
8112        ///Sets `package_id` with the provided value.
8113        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8114            self.package_id = Some(field.into().into());
8115        }
8116        ///Sets `package_id` with the provided value.
8117        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8118            self.set_package_id(field.into());
8119            self
8120        }
8121    }
8122    impl super::GetPackageResponse {
8123        pub const fn const_default() -> Self {
8124            Self { package: None }
8125        }
8126        #[doc(hidden)]
8127        pub fn default_instance() -> &'static Self {
8128            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8129            &DEFAULT
8130        }
8131        ///Returns the value of `package`, or the default value if `package` is unset.
8132        pub fn package(&self) -> &super::Package {
8133            self.package
8134                .as_ref()
8135                .map(|field| field as _)
8136                .unwrap_or_else(|| super::Package::default_instance() as _)
8137        }
8138        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8139        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8140            self.package.as_mut().map(|field| field as _)
8141        }
8142        ///Returns a mutable reference to `package`.
8143        ///If the field is unset, it is first initialized with the default value.
8144        pub fn package_mut(&mut self) -> &mut super::Package {
8145            self.package.get_or_insert_default()
8146        }
8147        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
8148        pub fn package_opt(&self) -> Option<&super::Package> {
8149            self.package.as_ref().map(|field| field as _)
8150        }
8151        ///Sets `package` with the provided value.
8152        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8153            self.package = Some(field.into().into());
8154        }
8155        ///Sets `package` with the provided value.
8156        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8157            self.set_package(field.into());
8158            self
8159        }
8160    }
8161    impl super::GetServiceInfoRequest {
8162        pub const fn const_default() -> Self {
8163            Self {}
8164        }
8165        #[doc(hidden)]
8166        pub fn default_instance() -> &'static Self {
8167            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8168            &DEFAULT
8169        }
8170    }
8171    impl super::GetServiceInfoResponse {
8172        pub const fn const_default() -> Self {
8173            Self {
8174                chain_id: None,
8175                chain: None,
8176                epoch: None,
8177                checkpoint_height: None,
8178                timestamp: None,
8179                lowest_available_checkpoint: None,
8180                lowest_available_checkpoint_objects: None,
8181                server: None,
8182            }
8183        }
8184        #[doc(hidden)]
8185        pub fn default_instance() -> &'static Self {
8186            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8187            &DEFAULT
8188        }
8189        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8190        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8191            self.chain_id.as_mut().map(|field| field as _)
8192        }
8193        ///Returns a mutable reference to `chain_id`.
8194        ///If the field is unset, it is first initialized with the default value.
8195        pub fn chain_id_mut(&mut self) -> &mut String {
8196            self.chain_id.get_or_insert_default()
8197        }
8198        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8199        pub fn chain_id_opt(&self) -> Option<&str> {
8200            self.chain_id.as_ref().map(|field| field as _)
8201        }
8202        ///Sets `chain_id` with the provided value.
8203        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8204            self.chain_id = Some(field.into().into());
8205        }
8206        ///Sets `chain_id` with the provided value.
8207        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8208            self.set_chain_id(field.into());
8209            self
8210        }
8211        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8212        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8213            self.chain.as_mut().map(|field| field as _)
8214        }
8215        ///Returns a mutable reference to `chain`.
8216        ///If the field is unset, it is first initialized with the default value.
8217        pub fn chain_mut(&mut self) -> &mut String {
8218            self.chain.get_or_insert_default()
8219        }
8220        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8221        pub fn chain_opt(&self) -> Option<&str> {
8222            self.chain.as_ref().map(|field| field as _)
8223        }
8224        ///Sets `chain` with the provided value.
8225        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8226            self.chain = Some(field.into().into());
8227        }
8228        ///Sets `chain` with the provided value.
8229        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8230            self.set_chain(field.into());
8231            self
8232        }
8233        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8234        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8235            self.epoch.as_mut().map(|field| field as _)
8236        }
8237        ///Returns a mutable reference to `epoch`.
8238        ///If the field is unset, it is first initialized with the default value.
8239        pub fn epoch_mut(&mut self) -> &mut u64 {
8240            self.epoch.get_or_insert_default()
8241        }
8242        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8243        pub fn epoch_opt(&self) -> Option<u64> {
8244            self.epoch.as_ref().map(|field| *field)
8245        }
8246        ///Sets `epoch` with the provided value.
8247        pub fn set_epoch(&mut self, field: u64) {
8248            self.epoch = Some(field);
8249        }
8250        ///Sets `epoch` with the provided value.
8251        pub fn with_epoch(mut self, field: u64) -> Self {
8252            self.set_epoch(field);
8253            self
8254        }
8255        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8256        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8257            self.checkpoint_height.as_mut().map(|field| field as _)
8258        }
8259        ///Returns a mutable reference to `checkpoint_height`.
8260        ///If the field is unset, it is first initialized with the default value.
8261        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8262            self.checkpoint_height.get_or_insert_default()
8263        }
8264        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8265        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8266            self.checkpoint_height.as_ref().map(|field| *field)
8267        }
8268        ///Sets `checkpoint_height` with the provided value.
8269        pub fn set_checkpoint_height(&mut self, field: u64) {
8270            self.checkpoint_height = Some(field);
8271        }
8272        ///Sets `checkpoint_height` with the provided value.
8273        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8274            self.set_checkpoint_height(field);
8275            self
8276        }
8277        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8278        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8279            self.timestamp.as_mut().map(|field| field as _)
8280        }
8281        ///Returns a mutable reference to `timestamp`.
8282        ///If the field is unset, it is first initialized with the default value.
8283        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8284            self.timestamp.get_or_insert_default()
8285        }
8286        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8287        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8288            self.timestamp.as_ref().map(|field| field as _)
8289        }
8290        ///Sets `timestamp` with the provided value.
8291        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8292            self.timestamp = Some(field.into().into());
8293        }
8294        ///Sets `timestamp` with the provided value.
8295        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8296            mut self,
8297            field: T,
8298        ) -> Self {
8299            self.set_timestamp(field.into());
8300            self
8301        }
8302        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8303        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8304            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8305        }
8306        ///Returns a mutable reference to `lowest_available_checkpoint`.
8307        ///If the field is unset, it is first initialized with the default value.
8308        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8309            self.lowest_available_checkpoint.get_or_insert_default()
8310        }
8311        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8312        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8313            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8314        }
8315        ///Sets `lowest_available_checkpoint` with the provided value.
8316        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8317            self.lowest_available_checkpoint = Some(field);
8318        }
8319        ///Sets `lowest_available_checkpoint` with the provided value.
8320        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8321            self.set_lowest_available_checkpoint(field);
8322            self
8323        }
8324        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8325        pub fn lowest_available_checkpoint_objects_opt_mut(
8326            &mut self,
8327        ) -> Option<&mut u64> {
8328            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8329        }
8330        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8331        ///If the field is unset, it is first initialized with the default value.
8332        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8333            self.lowest_available_checkpoint_objects.get_or_insert_default()
8334        }
8335        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8336        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8337            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8338        }
8339        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8340        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8341            self.lowest_available_checkpoint_objects = Some(field);
8342        }
8343        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8344        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8345            self.set_lowest_available_checkpoint_objects(field);
8346            self
8347        }
8348        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8349        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8350            self.server.as_mut().map(|field| field as _)
8351        }
8352        ///Returns a mutable reference to `server`.
8353        ///If the field is unset, it is first initialized with the default value.
8354        pub fn server_mut(&mut self) -> &mut String {
8355            self.server.get_or_insert_default()
8356        }
8357        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8358        pub fn server_opt(&self) -> Option<&str> {
8359            self.server.as_ref().map(|field| field as _)
8360        }
8361        ///Sets `server` with the provided value.
8362        pub fn set_server<T: Into<String>>(&mut self, field: T) {
8363            self.server = Some(field.into().into());
8364        }
8365        ///Sets `server` with the provided value.
8366        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8367            self.set_server(field.into());
8368            self
8369        }
8370    }
8371    impl super::GetTransactionRequest {
8372        pub const fn const_default() -> Self {
8373            Self {
8374                digest: None,
8375                read_mask: None,
8376            }
8377        }
8378        #[doc(hidden)]
8379        pub fn default_instance() -> &'static Self {
8380            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8381            &DEFAULT
8382        }
8383        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8384        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8385            self.digest.as_mut().map(|field| field as _)
8386        }
8387        ///Returns a mutable reference to `digest`.
8388        ///If the field is unset, it is first initialized with the default value.
8389        pub fn digest_mut(&mut self) -> &mut String {
8390            self.digest.get_or_insert_default()
8391        }
8392        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8393        pub fn digest_opt(&self) -> Option<&str> {
8394            self.digest.as_ref().map(|field| field as _)
8395        }
8396        ///Sets `digest` with the provided value.
8397        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8398            self.digest = Some(field.into().into());
8399        }
8400        ///Sets `digest` with the provided value.
8401        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8402            self.set_digest(field.into());
8403            self
8404        }
8405        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8406        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8407            self.read_mask.as_mut().map(|field| field as _)
8408        }
8409        ///Returns a mutable reference to `read_mask`.
8410        ///If the field is unset, it is first initialized with the default value.
8411        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8412            self.read_mask.get_or_insert_default()
8413        }
8414        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8415        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8416            self.read_mask.as_ref().map(|field| field as _)
8417        }
8418        ///Sets `read_mask` with the provided value.
8419        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8420            self.read_mask = Some(field.into().into());
8421        }
8422        ///Sets `read_mask` with the provided value.
8423        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8424            mut self,
8425            field: T,
8426        ) -> Self {
8427            self.set_read_mask(field.into());
8428            self
8429        }
8430    }
8431    impl super::GetTransactionResponse {
8432        pub const fn const_default() -> Self {
8433            Self { transaction: None }
8434        }
8435        #[doc(hidden)]
8436        pub fn default_instance() -> &'static Self {
8437            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8438            &DEFAULT
8439        }
8440        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8441        pub fn transaction(&self) -> &super::ExecutedTransaction {
8442            self.transaction
8443                .as_ref()
8444                .map(|field| field as _)
8445                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8446        }
8447        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8448        pub fn transaction_opt_mut(
8449            &mut self,
8450        ) -> Option<&mut super::ExecutedTransaction> {
8451            self.transaction.as_mut().map(|field| field as _)
8452        }
8453        ///Returns a mutable reference to `transaction`.
8454        ///If the field is unset, it is first initialized with the default value.
8455        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8456            self.transaction.get_or_insert_default()
8457        }
8458        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8459        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8460            self.transaction.as_ref().map(|field| field as _)
8461        }
8462        ///Sets `transaction` with the provided value.
8463        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8464            &mut self,
8465            field: T,
8466        ) {
8467            self.transaction = Some(field.into().into());
8468        }
8469        ///Sets `transaction` with the provided value.
8470        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8471            mut self,
8472            field: T,
8473        ) -> Self {
8474            self.set_transaction(field.into());
8475            self
8476        }
8477    }
8478    impl super::GetTransactionResult {
8479        pub const fn const_default() -> Self {
8480            Self { result: None }
8481        }
8482        #[doc(hidden)]
8483        pub fn default_instance() -> &'static Self {
8484            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8485            &DEFAULT
8486        }
8487        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8488        pub fn transaction(&self) -> &super::ExecutedTransaction {
8489            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8490                .result
8491            {
8492                field as _
8493            } else {
8494                super::ExecutedTransaction::default_instance() as _
8495            }
8496        }
8497        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8498        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8499            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8500                .result
8501            {
8502                Some(field as _)
8503            } else {
8504                None
8505            }
8506        }
8507        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8508        pub fn transaction_opt_mut(
8509            &mut self,
8510        ) -> Option<&mut super::ExecutedTransaction> {
8511            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8512                .result
8513            {
8514                Some(field as _)
8515            } else {
8516                None
8517            }
8518        }
8519        ///Returns a mutable reference to `transaction`.
8520        ///If the field is unset, it is first initialized with the default value.
8521        ///If any other oneof field in the same oneof is set, it will be cleared.
8522        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8523            if self.transaction_opt_mut().is_none() {
8524                self.result = Some(
8525                    super::get_transaction_result::Result::Transaction(
8526                        super::ExecutedTransaction::default(),
8527                    ),
8528                );
8529            }
8530            self.transaction_opt_mut().unwrap()
8531        }
8532        ///Sets `transaction` with the provided value.
8533        ///If any other oneof field in the same oneof is set, it will be cleared.
8534        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8535            &mut self,
8536            field: T,
8537        ) {
8538            self.result = Some(
8539                super::get_transaction_result::Result::Transaction(field.into().into()),
8540            );
8541        }
8542        ///Sets `transaction` with the provided value.
8543        ///If any other oneof field in the same oneof is set, it will be cleared.
8544        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8545            mut self,
8546            field: T,
8547        ) -> Self {
8548            self.set_transaction(field.into());
8549            self
8550        }
8551        ///Returns the value of `error`, or the default value if `error` is unset.
8552        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8553            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8554                .result
8555            {
8556                field as _
8557            } else {
8558                super::super::super::super::google::rpc::Status::default_instance() as _
8559            }
8560        }
8561        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8562        pub fn error_opt(
8563            &self,
8564        ) -> Option<&super::super::super::super::google::rpc::Status> {
8565            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8566                .result
8567            {
8568                Some(field as _)
8569            } else {
8570                None
8571            }
8572        }
8573        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8574        pub fn error_opt_mut(
8575            &mut self,
8576        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8577            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8578                .result
8579            {
8580                Some(field as _)
8581            } else {
8582                None
8583            }
8584        }
8585        ///Returns a mutable reference to `error`.
8586        ///If the field is unset, it is first initialized with the default value.
8587        ///If any other oneof field in the same oneof is set, it will be cleared.
8588        pub fn error_mut(
8589            &mut self,
8590        ) -> &mut super::super::super::super::google::rpc::Status {
8591            if self.error_opt_mut().is_none() {
8592                self.result = Some(
8593                    super::get_transaction_result::Result::Error(
8594                        super::super::super::super::google::rpc::Status::default(),
8595                    ),
8596                );
8597            }
8598            self.error_opt_mut().unwrap()
8599        }
8600        ///Sets `error` with the provided value.
8601        ///If any other oneof field in the same oneof is set, it will be cleared.
8602        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8603            &mut self,
8604            field: T,
8605        ) {
8606            self.result = Some(
8607                super::get_transaction_result::Result::Error(field.into().into()),
8608            );
8609        }
8610        ///Sets `error` with the provided value.
8611        ///If any other oneof field in the same oneof is set, it will be cleared.
8612        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8613            mut self,
8614            field: T,
8615        ) -> Self {
8616            self.set_error(field.into());
8617            self
8618        }
8619    }
8620    impl super::IndexError {
8621        pub const fn const_default() -> Self {
8622            Self {
8623                index: None,
8624                subresult: None,
8625            }
8626        }
8627        #[doc(hidden)]
8628        pub fn default_instance() -> &'static Self {
8629            static DEFAULT: super::IndexError = super::IndexError::const_default();
8630            &DEFAULT
8631        }
8632        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8633        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8634            self.index.as_mut().map(|field| field as _)
8635        }
8636        ///Returns a mutable reference to `index`.
8637        ///If the field is unset, it is first initialized with the default value.
8638        pub fn index_mut(&mut self) -> &mut u32 {
8639            self.index.get_or_insert_default()
8640        }
8641        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8642        pub fn index_opt(&self) -> Option<u32> {
8643            self.index.as_ref().map(|field| *field)
8644        }
8645        ///Sets `index` with the provided value.
8646        pub fn set_index(&mut self, field: u32) {
8647            self.index = Some(field);
8648        }
8649        ///Sets `index` with the provided value.
8650        pub fn with_index(mut self, field: u32) -> Self {
8651            self.set_index(field);
8652            self
8653        }
8654        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8655        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8656            self.subresult.as_mut().map(|field| field as _)
8657        }
8658        ///Returns a mutable reference to `subresult`.
8659        ///If the field is unset, it is first initialized with the default value.
8660        pub fn subresult_mut(&mut self) -> &mut u32 {
8661            self.subresult.get_or_insert_default()
8662        }
8663        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8664        pub fn subresult_opt(&self) -> Option<u32> {
8665            self.subresult.as_ref().map(|field| *field)
8666        }
8667        ///Sets `subresult` with the provided value.
8668        pub fn set_subresult(&mut self, field: u32) {
8669            self.subresult = Some(field);
8670        }
8671        ///Sets `subresult` with the provided value.
8672        pub fn with_subresult(mut self, field: u32) -> Self {
8673            self.set_subresult(field);
8674            self
8675        }
8676    }
8677    impl super::Input {
8678        pub const fn const_default() -> Self {
8679            Self {
8680                kind: None,
8681                pure: None,
8682                object_id: None,
8683                version: None,
8684                digest: None,
8685                mutable: None,
8686                mutability: None,
8687                funds_withdrawal: None,
8688                literal: None,
8689            }
8690        }
8691        #[doc(hidden)]
8692        pub fn default_instance() -> &'static Self {
8693            static DEFAULT: super::Input = super::Input::const_default();
8694            &DEFAULT
8695        }
8696        ///Sets `kind` with the provided value.
8697        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8698            self.set_kind(field.into());
8699            self
8700        }
8701        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8702        pub fn pure_opt(&self) -> Option<&[u8]> {
8703            self.pure.as_ref().map(|field| field as _)
8704        }
8705        ///Sets `pure` with the provided value.
8706        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8707            self.pure = Some(field.into().into());
8708        }
8709        ///Sets `pure` with the provided value.
8710        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8711            self.set_pure(field.into());
8712            self
8713        }
8714        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8715        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8716            self.object_id.as_mut().map(|field| field as _)
8717        }
8718        ///Returns a mutable reference to `object_id`.
8719        ///If the field is unset, it is first initialized with the default value.
8720        pub fn object_id_mut(&mut self) -> &mut String {
8721            self.object_id.get_or_insert_default()
8722        }
8723        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8724        pub fn object_id_opt(&self) -> Option<&str> {
8725            self.object_id.as_ref().map(|field| field as _)
8726        }
8727        ///Sets `object_id` with the provided value.
8728        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8729            self.object_id = Some(field.into().into());
8730        }
8731        ///Sets `object_id` with the provided value.
8732        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8733            self.set_object_id(field.into());
8734            self
8735        }
8736        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8737        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8738            self.version.as_mut().map(|field| field as _)
8739        }
8740        ///Returns a mutable reference to `version`.
8741        ///If the field is unset, it is first initialized with the default value.
8742        pub fn version_mut(&mut self) -> &mut u64 {
8743            self.version.get_or_insert_default()
8744        }
8745        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8746        pub fn version_opt(&self) -> Option<u64> {
8747            self.version.as_ref().map(|field| *field)
8748        }
8749        ///Sets `version` with the provided value.
8750        pub fn set_version(&mut self, field: u64) {
8751            self.version = Some(field);
8752        }
8753        ///Sets `version` with the provided value.
8754        pub fn with_version(mut self, field: u64) -> Self {
8755            self.set_version(field);
8756            self
8757        }
8758        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8759        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8760            self.digest.as_mut().map(|field| field as _)
8761        }
8762        ///Returns a mutable reference to `digest`.
8763        ///If the field is unset, it is first initialized with the default value.
8764        pub fn digest_mut(&mut self) -> &mut String {
8765            self.digest.get_or_insert_default()
8766        }
8767        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8768        pub fn digest_opt(&self) -> Option<&str> {
8769            self.digest.as_ref().map(|field| field as _)
8770        }
8771        ///Sets `digest` with the provided value.
8772        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8773            self.digest = Some(field.into().into());
8774        }
8775        ///Sets `digest` with the provided value.
8776        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8777            self.set_digest(field.into());
8778            self
8779        }
8780        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8781        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8782            self.mutable.as_mut().map(|field| field as _)
8783        }
8784        ///Returns a mutable reference to `mutable`.
8785        ///If the field is unset, it is first initialized with the default value.
8786        pub fn mutable_mut(&mut self) -> &mut bool {
8787            self.mutable.get_or_insert_default()
8788        }
8789        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8790        pub fn mutable_opt(&self) -> Option<bool> {
8791            self.mutable.as_ref().map(|field| *field)
8792        }
8793        ///Sets `mutable` with the provided value.
8794        pub fn set_mutable(&mut self, field: bool) {
8795            self.mutable = Some(field);
8796        }
8797        ///Sets `mutable` with the provided value.
8798        pub fn with_mutable(mut self, field: bool) -> Self {
8799            self.set_mutable(field);
8800            self
8801        }
8802        ///Sets `mutability` with the provided value.
8803        pub fn with_mutability<T: Into<super::input::Mutability>>(
8804            mut self,
8805            field: T,
8806        ) -> Self {
8807            self.set_mutability(field.into());
8808            self
8809        }
8810        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
8811        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8812            self.funds_withdrawal
8813                .as_ref()
8814                .map(|field| field as _)
8815                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8816        }
8817        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8818        pub fn funds_withdrawal_opt_mut(
8819            &mut self,
8820        ) -> Option<&mut super::FundsWithdrawal> {
8821            self.funds_withdrawal.as_mut().map(|field| field as _)
8822        }
8823        ///Returns a mutable reference to `funds_withdrawal`.
8824        ///If the field is unset, it is first initialized with the default value.
8825        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8826            self.funds_withdrawal.get_or_insert_default()
8827        }
8828        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8829        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8830            self.funds_withdrawal.as_ref().map(|field| field as _)
8831        }
8832        ///Sets `funds_withdrawal` with the provided value.
8833        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8834            &mut self,
8835            field: T,
8836        ) {
8837            self.funds_withdrawal = Some(field.into().into());
8838        }
8839        ///Sets `funds_withdrawal` with the provided value.
8840        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8841            mut self,
8842            field: T,
8843        ) -> Self {
8844            self.set_funds_withdrawal(field.into());
8845            self
8846        }
8847        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8848        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8849            self.literal.as_mut().map(|field| field as _)
8850        }
8851        ///Returns a mutable reference to `literal`.
8852        ///If the field is unset, it is first initialized with the default value.
8853        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8854            self.literal.get_or_insert_default()
8855        }
8856        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8857        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8858            self.literal.as_ref().map(|field| field as _)
8859        }
8860        ///Sets `literal` with the provided value.
8861        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8862            self.literal = Some(field.into().into());
8863        }
8864        ///Sets `literal` with the provided value.
8865        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8866            self.set_literal(field.into());
8867            self
8868        }
8869    }
8870    impl super::Jwk {
8871        pub const fn const_default() -> Self {
8872            Self {
8873                kty: None,
8874                e: None,
8875                n: None,
8876                alg: None,
8877            }
8878        }
8879        #[doc(hidden)]
8880        pub fn default_instance() -> &'static Self {
8881            static DEFAULT: super::Jwk = super::Jwk::const_default();
8882            &DEFAULT
8883        }
8884        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8885        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8886            self.kty.as_mut().map(|field| field as _)
8887        }
8888        ///Returns a mutable reference to `kty`.
8889        ///If the field is unset, it is first initialized with the default value.
8890        pub fn kty_mut(&mut self) -> &mut String {
8891            self.kty.get_or_insert_default()
8892        }
8893        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8894        pub fn kty_opt(&self) -> Option<&str> {
8895            self.kty.as_ref().map(|field| field as _)
8896        }
8897        ///Sets `kty` with the provided value.
8898        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8899            self.kty = Some(field.into().into());
8900        }
8901        ///Sets `kty` with the provided value.
8902        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8903            self.set_kty(field.into());
8904            self
8905        }
8906        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8907        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8908            self.e.as_mut().map(|field| field as _)
8909        }
8910        ///Returns a mutable reference to `e`.
8911        ///If the field is unset, it is first initialized with the default value.
8912        pub fn e_mut(&mut self) -> &mut String {
8913            self.e.get_or_insert_default()
8914        }
8915        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8916        pub fn e_opt(&self) -> Option<&str> {
8917            self.e.as_ref().map(|field| field as _)
8918        }
8919        ///Sets `e` with the provided value.
8920        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8921            self.e = Some(field.into().into());
8922        }
8923        ///Sets `e` with the provided value.
8924        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8925            self.set_e(field.into());
8926            self
8927        }
8928        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8929        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8930            self.n.as_mut().map(|field| field as _)
8931        }
8932        ///Returns a mutable reference to `n`.
8933        ///If the field is unset, it is first initialized with the default value.
8934        pub fn n_mut(&mut self) -> &mut String {
8935            self.n.get_or_insert_default()
8936        }
8937        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8938        pub fn n_opt(&self) -> Option<&str> {
8939            self.n.as_ref().map(|field| field as _)
8940        }
8941        ///Sets `n` with the provided value.
8942        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8943            self.n = Some(field.into().into());
8944        }
8945        ///Sets `n` with the provided value.
8946        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8947            self.set_n(field.into());
8948            self
8949        }
8950        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8951        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8952            self.alg.as_mut().map(|field| field as _)
8953        }
8954        ///Returns a mutable reference to `alg`.
8955        ///If the field is unset, it is first initialized with the default value.
8956        pub fn alg_mut(&mut self) -> &mut String {
8957            self.alg.get_or_insert_default()
8958        }
8959        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8960        pub fn alg_opt(&self) -> Option<&str> {
8961            self.alg.as_ref().map(|field| field as _)
8962        }
8963        ///Sets `alg` with the provided value.
8964        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8965            self.alg = Some(field.into().into());
8966        }
8967        ///Sets `alg` with the provided value.
8968        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8969            self.set_alg(field.into());
8970            self
8971        }
8972    }
8973    impl super::JwkId {
8974        pub const fn const_default() -> Self {
8975            Self { iss: None, kid: None }
8976        }
8977        #[doc(hidden)]
8978        pub fn default_instance() -> &'static Self {
8979            static DEFAULT: super::JwkId = super::JwkId::const_default();
8980            &DEFAULT
8981        }
8982        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8983        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8984            self.iss.as_mut().map(|field| field as _)
8985        }
8986        ///Returns a mutable reference to `iss`.
8987        ///If the field is unset, it is first initialized with the default value.
8988        pub fn iss_mut(&mut self) -> &mut String {
8989            self.iss.get_or_insert_default()
8990        }
8991        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8992        pub fn iss_opt(&self) -> Option<&str> {
8993            self.iss.as_ref().map(|field| field as _)
8994        }
8995        ///Sets `iss` with the provided value.
8996        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8997            self.iss = Some(field.into().into());
8998        }
8999        ///Sets `iss` with the provided value.
9000        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9001            self.set_iss(field.into());
9002            self
9003        }
9004        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9005        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9006            self.kid.as_mut().map(|field| field as _)
9007        }
9008        ///Returns a mutable reference to `kid`.
9009        ///If the field is unset, it is first initialized with the default value.
9010        pub fn kid_mut(&mut self) -> &mut String {
9011            self.kid.get_or_insert_default()
9012        }
9013        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
9014        pub fn kid_opt(&self) -> Option<&str> {
9015            self.kid.as_ref().map(|field| field as _)
9016        }
9017        ///Sets `kid` with the provided value.
9018        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9019            self.kid = Some(field.into().into());
9020        }
9021        ///Sets `kid` with the provided value.
9022        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9023            self.set_kid(field.into());
9024            self
9025        }
9026    }
9027    impl super::Linkage {
9028        pub const fn const_default() -> Self {
9029            Self {
9030                original_id: None,
9031                upgraded_id: None,
9032                upgraded_version: None,
9033            }
9034        }
9035        #[doc(hidden)]
9036        pub fn default_instance() -> &'static Self {
9037            static DEFAULT: super::Linkage = super::Linkage::const_default();
9038            &DEFAULT
9039        }
9040        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9041        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9042            self.original_id.as_mut().map(|field| field as _)
9043        }
9044        ///Returns a mutable reference to `original_id`.
9045        ///If the field is unset, it is first initialized with the default value.
9046        pub fn original_id_mut(&mut self) -> &mut String {
9047            self.original_id.get_or_insert_default()
9048        }
9049        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9050        pub fn original_id_opt(&self) -> Option<&str> {
9051            self.original_id.as_ref().map(|field| field as _)
9052        }
9053        ///Sets `original_id` with the provided value.
9054        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9055            self.original_id = Some(field.into().into());
9056        }
9057        ///Sets `original_id` with the provided value.
9058        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9059            self.set_original_id(field.into());
9060            self
9061        }
9062        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9063        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9064            self.upgraded_id.as_mut().map(|field| field as _)
9065        }
9066        ///Returns a mutable reference to `upgraded_id`.
9067        ///If the field is unset, it is first initialized with the default value.
9068        pub fn upgraded_id_mut(&mut self) -> &mut String {
9069            self.upgraded_id.get_or_insert_default()
9070        }
9071        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9072        pub fn upgraded_id_opt(&self) -> Option<&str> {
9073            self.upgraded_id.as_ref().map(|field| field as _)
9074        }
9075        ///Sets `upgraded_id` with the provided value.
9076        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9077            self.upgraded_id = Some(field.into().into());
9078        }
9079        ///Sets `upgraded_id` with the provided value.
9080        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9081            self.set_upgraded_id(field.into());
9082            self
9083        }
9084        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9085        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9086            self.upgraded_version.as_mut().map(|field| field as _)
9087        }
9088        ///Returns a mutable reference to `upgraded_version`.
9089        ///If the field is unset, it is first initialized with the default value.
9090        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9091            self.upgraded_version.get_or_insert_default()
9092        }
9093        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9094        pub fn upgraded_version_opt(&self) -> Option<u64> {
9095            self.upgraded_version.as_ref().map(|field| *field)
9096        }
9097        ///Sets `upgraded_version` with the provided value.
9098        pub fn set_upgraded_version(&mut self, field: u64) {
9099            self.upgraded_version = Some(field);
9100        }
9101        ///Sets `upgraded_version` with the provided value.
9102        pub fn with_upgraded_version(mut self, field: u64) -> Self {
9103            self.set_upgraded_version(field);
9104            self
9105        }
9106    }
9107    impl super::ListBalancesRequest {
9108        pub const fn const_default() -> Self {
9109            Self {
9110                owner: None,
9111                page_size: None,
9112                page_token: None,
9113            }
9114        }
9115        #[doc(hidden)]
9116        pub fn default_instance() -> &'static Self {
9117            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9118            &DEFAULT
9119        }
9120        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9121        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9122            self.owner.as_mut().map(|field| field as _)
9123        }
9124        ///Returns a mutable reference to `owner`.
9125        ///If the field is unset, it is first initialized with the default value.
9126        pub fn owner_mut(&mut self) -> &mut String {
9127            self.owner.get_or_insert_default()
9128        }
9129        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9130        pub fn owner_opt(&self) -> Option<&str> {
9131            self.owner.as_ref().map(|field| field as _)
9132        }
9133        ///Sets `owner` with the provided value.
9134        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9135            self.owner = Some(field.into().into());
9136        }
9137        ///Sets `owner` with the provided value.
9138        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9139            self.set_owner(field.into());
9140            self
9141        }
9142        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9143        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9144            self.page_size.as_mut().map(|field| field as _)
9145        }
9146        ///Returns a mutable reference to `page_size`.
9147        ///If the field is unset, it is first initialized with the default value.
9148        pub fn page_size_mut(&mut self) -> &mut u32 {
9149            self.page_size.get_or_insert_default()
9150        }
9151        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9152        pub fn page_size_opt(&self) -> Option<u32> {
9153            self.page_size.as_ref().map(|field| *field)
9154        }
9155        ///Sets `page_size` with the provided value.
9156        pub fn set_page_size(&mut self, field: u32) {
9157            self.page_size = Some(field);
9158        }
9159        ///Sets `page_size` with the provided value.
9160        pub fn with_page_size(mut self, field: u32) -> Self {
9161            self.set_page_size(field);
9162            self
9163        }
9164        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9165        pub fn page_token_opt(&self) -> Option<&[u8]> {
9166            self.page_token.as_ref().map(|field| field as _)
9167        }
9168        ///Sets `page_token` with the provided value.
9169        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9170            self.page_token = Some(field.into().into());
9171        }
9172        ///Sets `page_token` with the provided value.
9173        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9174            mut self,
9175            field: T,
9176        ) -> Self {
9177            self.set_page_token(field.into());
9178            self
9179        }
9180    }
9181    impl super::ListBalancesResponse {
9182        pub const fn const_default() -> Self {
9183            Self {
9184                balances: Vec::new(),
9185                next_page_token: None,
9186            }
9187        }
9188        #[doc(hidden)]
9189        pub fn default_instance() -> &'static Self {
9190            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9191            &DEFAULT
9192        }
9193        ///Returns the value of `balances`, or the default value if `balances` is unset.
9194        pub fn balances(&self) -> &[super::Balance] {
9195            &self.balances
9196        }
9197        ///Returns a mutable reference to `balances`.
9198        ///If the field is unset, it is first initialized with the default value.
9199        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9200            &mut self.balances
9201        }
9202        ///Sets `balances` with the provided value.
9203        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9204            self.balances = field;
9205        }
9206        ///Sets `balances` with the provided value.
9207        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9208            self.set_balances(field);
9209            self
9210        }
9211        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9212        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9213            self.next_page_token.as_ref().map(|field| field as _)
9214        }
9215        ///Sets `next_page_token` with the provided value.
9216        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9217            self.next_page_token = Some(field.into().into());
9218        }
9219        ///Sets `next_page_token` with the provided value.
9220        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9221            mut self,
9222            field: T,
9223        ) -> Self {
9224            self.set_next_page_token(field.into());
9225            self
9226        }
9227    }
9228    impl super::ListDynamicFieldsRequest {
9229        pub const fn const_default() -> Self {
9230            Self {
9231                parent: None,
9232                page_size: None,
9233                page_token: None,
9234                read_mask: None,
9235            }
9236        }
9237        #[doc(hidden)]
9238        pub fn default_instance() -> &'static Self {
9239            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9240            &DEFAULT
9241        }
9242        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9243        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9244            self.parent.as_mut().map(|field| field as _)
9245        }
9246        ///Returns a mutable reference to `parent`.
9247        ///If the field is unset, it is first initialized with the default value.
9248        pub fn parent_mut(&mut self) -> &mut String {
9249            self.parent.get_or_insert_default()
9250        }
9251        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
9252        pub fn parent_opt(&self) -> Option<&str> {
9253            self.parent.as_ref().map(|field| field as _)
9254        }
9255        ///Sets `parent` with the provided value.
9256        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9257            self.parent = Some(field.into().into());
9258        }
9259        ///Sets `parent` with the provided value.
9260        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9261            self.set_parent(field.into());
9262            self
9263        }
9264        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9265        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9266            self.page_size.as_mut().map(|field| field as _)
9267        }
9268        ///Returns a mutable reference to `page_size`.
9269        ///If the field is unset, it is first initialized with the default value.
9270        pub fn page_size_mut(&mut self) -> &mut u32 {
9271            self.page_size.get_or_insert_default()
9272        }
9273        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9274        pub fn page_size_opt(&self) -> Option<u32> {
9275            self.page_size.as_ref().map(|field| *field)
9276        }
9277        ///Sets `page_size` with the provided value.
9278        pub fn set_page_size(&mut self, field: u32) {
9279            self.page_size = Some(field);
9280        }
9281        ///Sets `page_size` with the provided value.
9282        pub fn with_page_size(mut self, field: u32) -> Self {
9283            self.set_page_size(field);
9284            self
9285        }
9286        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9287        pub fn page_token_opt(&self) -> Option<&[u8]> {
9288            self.page_token.as_ref().map(|field| field as _)
9289        }
9290        ///Sets `page_token` with the provided value.
9291        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9292            self.page_token = Some(field.into().into());
9293        }
9294        ///Sets `page_token` with the provided value.
9295        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9296            mut self,
9297            field: T,
9298        ) -> Self {
9299            self.set_page_token(field.into());
9300            self
9301        }
9302        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9303        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9304            self.read_mask.as_mut().map(|field| field as _)
9305        }
9306        ///Returns a mutable reference to `read_mask`.
9307        ///If the field is unset, it is first initialized with the default value.
9308        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9309            self.read_mask.get_or_insert_default()
9310        }
9311        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9312        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9313            self.read_mask.as_ref().map(|field| field as _)
9314        }
9315        ///Sets `read_mask` with the provided value.
9316        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9317            self.read_mask = Some(field.into().into());
9318        }
9319        ///Sets `read_mask` with the provided value.
9320        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9321            mut self,
9322            field: T,
9323        ) -> Self {
9324            self.set_read_mask(field.into());
9325            self
9326        }
9327    }
9328    impl super::ListDynamicFieldsResponse {
9329        pub const fn const_default() -> Self {
9330            Self {
9331                dynamic_fields: Vec::new(),
9332                next_page_token: None,
9333            }
9334        }
9335        #[doc(hidden)]
9336        pub fn default_instance() -> &'static Self {
9337            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9338            &DEFAULT
9339        }
9340        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
9341        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9342            &self.dynamic_fields
9343        }
9344        ///Returns a mutable reference to `dynamic_fields`.
9345        ///If the field is unset, it is first initialized with the default value.
9346        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9347            &mut self.dynamic_fields
9348        }
9349        ///Sets `dynamic_fields` with the provided value.
9350        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9351            self.dynamic_fields = field;
9352        }
9353        ///Sets `dynamic_fields` with the provided value.
9354        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9355            self.set_dynamic_fields(field);
9356            self
9357        }
9358        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9359        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9360            self.next_page_token.as_ref().map(|field| field as _)
9361        }
9362        ///Sets `next_page_token` with the provided value.
9363        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9364            self.next_page_token = Some(field.into().into());
9365        }
9366        ///Sets `next_page_token` with the provided value.
9367        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9368            mut self,
9369            field: T,
9370        ) -> Self {
9371            self.set_next_page_token(field.into());
9372            self
9373        }
9374    }
9375    impl super::ListOwnedObjectsRequest {
9376        pub const fn const_default() -> Self {
9377            Self {
9378                owner: None,
9379                page_size: None,
9380                page_token: None,
9381                read_mask: None,
9382                object_type: None,
9383            }
9384        }
9385        #[doc(hidden)]
9386        pub fn default_instance() -> &'static Self {
9387            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9388            &DEFAULT
9389        }
9390        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9391        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9392            self.owner.as_mut().map(|field| field as _)
9393        }
9394        ///Returns a mutable reference to `owner`.
9395        ///If the field is unset, it is first initialized with the default value.
9396        pub fn owner_mut(&mut self) -> &mut String {
9397            self.owner.get_or_insert_default()
9398        }
9399        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9400        pub fn owner_opt(&self) -> Option<&str> {
9401            self.owner.as_ref().map(|field| field as _)
9402        }
9403        ///Sets `owner` with the provided value.
9404        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9405            self.owner = Some(field.into().into());
9406        }
9407        ///Sets `owner` with the provided value.
9408        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9409            self.set_owner(field.into());
9410            self
9411        }
9412        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9413        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9414            self.page_size.as_mut().map(|field| field as _)
9415        }
9416        ///Returns a mutable reference to `page_size`.
9417        ///If the field is unset, it is first initialized with the default value.
9418        pub fn page_size_mut(&mut self) -> &mut u32 {
9419            self.page_size.get_or_insert_default()
9420        }
9421        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9422        pub fn page_size_opt(&self) -> Option<u32> {
9423            self.page_size.as_ref().map(|field| *field)
9424        }
9425        ///Sets `page_size` with the provided value.
9426        pub fn set_page_size(&mut self, field: u32) {
9427            self.page_size = Some(field);
9428        }
9429        ///Sets `page_size` with the provided value.
9430        pub fn with_page_size(mut self, field: u32) -> Self {
9431            self.set_page_size(field);
9432            self
9433        }
9434        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9435        pub fn page_token_opt(&self) -> Option<&[u8]> {
9436            self.page_token.as_ref().map(|field| field as _)
9437        }
9438        ///Sets `page_token` with the provided value.
9439        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9440            self.page_token = Some(field.into().into());
9441        }
9442        ///Sets `page_token` with the provided value.
9443        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9444            mut self,
9445            field: T,
9446        ) -> Self {
9447            self.set_page_token(field.into());
9448            self
9449        }
9450        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9451        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9452            self.read_mask.as_mut().map(|field| field as _)
9453        }
9454        ///Returns a mutable reference to `read_mask`.
9455        ///If the field is unset, it is first initialized with the default value.
9456        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9457            self.read_mask.get_or_insert_default()
9458        }
9459        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9460        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9461            self.read_mask.as_ref().map(|field| field as _)
9462        }
9463        ///Sets `read_mask` with the provided value.
9464        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9465            self.read_mask = Some(field.into().into());
9466        }
9467        ///Sets `read_mask` with the provided value.
9468        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9469            mut self,
9470            field: T,
9471        ) -> Self {
9472            self.set_read_mask(field.into());
9473            self
9474        }
9475        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9476        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9477            self.object_type.as_mut().map(|field| field as _)
9478        }
9479        ///Returns a mutable reference to `object_type`.
9480        ///If the field is unset, it is first initialized with the default value.
9481        pub fn object_type_mut(&mut self) -> &mut String {
9482            self.object_type.get_or_insert_default()
9483        }
9484        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9485        pub fn object_type_opt(&self) -> Option<&str> {
9486            self.object_type.as_ref().map(|field| field as _)
9487        }
9488        ///Sets `object_type` with the provided value.
9489        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9490            self.object_type = Some(field.into().into());
9491        }
9492        ///Sets `object_type` with the provided value.
9493        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9494            self.set_object_type(field.into());
9495            self
9496        }
9497    }
9498    impl super::ListOwnedObjectsResponse {
9499        pub const fn const_default() -> Self {
9500            Self {
9501                objects: Vec::new(),
9502                next_page_token: None,
9503            }
9504        }
9505        #[doc(hidden)]
9506        pub fn default_instance() -> &'static Self {
9507            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9508            &DEFAULT
9509        }
9510        ///Returns the value of `objects`, or the default value if `objects` is unset.
9511        pub fn objects(&self) -> &[super::Object] {
9512            &self.objects
9513        }
9514        ///Returns a mutable reference to `objects`.
9515        ///If the field is unset, it is first initialized with the default value.
9516        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9517            &mut self.objects
9518        }
9519        ///Sets `objects` with the provided value.
9520        pub fn set_objects(&mut self, field: Vec<super::Object>) {
9521            self.objects = field;
9522        }
9523        ///Sets `objects` with the provided value.
9524        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9525            self.set_objects(field);
9526            self
9527        }
9528        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9529        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9530            self.next_page_token.as_ref().map(|field| field as _)
9531        }
9532        ///Sets `next_page_token` with the provided value.
9533        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9534            self.next_page_token = Some(field.into().into());
9535        }
9536        ///Sets `next_page_token` with the provided value.
9537        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9538            mut self,
9539            field: T,
9540        ) -> Self {
9541            self.set_next_page_token(field.into());
9542            self
9543        }
9544    }
9545    impl super::ListPackageVersionsRequest {
9546        pub const fn const_default() -> Self {
9547            Self {
9548                package_id: None,
9549                page_size: None,
9550                page_token: None,
9551            }
9552        }
9553        #[doc(hidden)]
9554        pub fn default_instance() -> &'static Self {
9555            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9556            &DEFAULT
9557        }
9558        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9559        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9560            self.package_id.as_mut().map(|field| field as _)
9561        }
9562        ///Returns a mutable reference to `package_id`.
9563        ///If the field is unset, it is first initialized with the default value.
9564        pub fn package_id_mut(&mut self) -> &mut String {
9565            self.package_id.get_or_insert_default()
9566        }
9567        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9568        pub fn package_id_opt(&self) -> Option<&str> {
9569            self.package_id.as_ref().map(|field| field as _)
9570        }
9571        ///Sets `package_id` with the provided value.
9572        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9573            self.package_id = Some(field.into().into());
9574        }
9575        ///Sets `package_id` with the provided value.
9576        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9577            self.set_package_id(field.into());
9578            self
9579        }
9580        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9581        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9582            self.page_size.as_mut().map(|field| field as _)
9583        }
9584        ///Returns a mutable reference to `page_size`.
9585        ///If the field is unset, it is first initialized with the default value.
9586        pub fn page_size_mut(&mut self) -> &mut u32 {
9587            self.page_size.get_or_insert_default()
9588        }
9589        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9590        pub fn page_size_opt(&self) -> Option<u32> {
9591            self.page_size.as_ref().map(|field| *field)
9592        }
9593        ///Sets `page_size` with the provided value.
9594        pub fn set_page_size(&mut self, field: u32) {
9595            self.page_size = Some(field);
9596        }
9597        ///Sets `page_size` with the provided value.
9598        pub fn with_page_size(mut self, field: u32) -> Self {
9599            self.set_page_size(field);
9600            self
9601        }
9602        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9603        pub fn page_token_opt(&self) -> Option<&[u8]> {
9604            self.page_token.as_ref().map(|field| field as _)
9605        }
9606        ///Sets `page_token` with the provided value.
9607        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9608            self.page_token = Some(field.into().into());
9609        }
9610        ///Sets `page_token` with the provided value.
9611        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9612            mut self,
9613            field: T,
9614        ) -> Self {
9615            self.set_page_token(field.into());
9616            self
9617        }
9618    }
9619    impl super::ListPackageVersionsResponse {
9620        pub const fn const_default() -> Self {
9621            Self {
9622                versions: Vec::new(),
9623                next_page_token: None,
9624            }
9625        }
9626        #[doc(hidden)]
9627        pub fn default_instance() -> &'static Self {
9628            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9629            &DEFAULT
9630        }
9631        ///Returns the value of `versions`, or the default value if `versions` is unset.
9632        pub fn versions(&self) -> &[super::PackageVersion] {
9633            &self.versions
9634        }
9635        ///Returns a mutable reference to `versions`.
9636        ///If the field is unset, it is first initialized with the default value.
9637        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9638            &mut self.versions
9639        }
9640        ///Sets `versions` with the provided value.
9641        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9642            self.versions = field;
9643        }
9644        ///Sets `versions` with the provided value.
9645        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9646            self.set_versions(field);
9647            self
9648        }
9649        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9650        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9651            self.next_page_token.as_ref().map(|field| field as _)
9652        }
9653        ///Sets `next_page_token` with the provided value.
9654        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9655            self.next_page_token = Some(field.into().into());
9656        }
9657        ///Sets `next_page_token` with the provided value.
9658        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9659            mut self,
9660            field: T,
9661        ) -> Self {
9662            self.set_next_page_token(field.into());
9663            self
9664        }
9665    }
9666    impl super::LookupNameRequest {
9667        pub const fn const_default() -> Self {
9668            Self { name: None }
9669        }
9670        #[doc(hidden)]
9671        pub fn default_instance() -> &'static Self {
9672            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9673            &DEFAULT
9674        }
9675        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9676        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9677            self.name.as_mut().map(|field| field as _)
9678        }
9679        ///Returns a mutable reference to `name`.
9680        ///If the field is unset, it is first initialized with the default value.
9681        pub fn name_mut(&mut self) -> &mut String {
9682            self.name.get_or_insert_default()
9683        }
9684        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9685        pub fn name_opt(&self) -> Option<&str> {
9686            self.name.as_ref().map(|field| field as _)
9687        }
9688        ///Sets `name` with the provided value.
9689        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9690            self.name = Some(field.into().into());
9691        }
9692        ///Sets `name` with the provided value.
9693        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9694            self.set_name(field.into());
9695            self
9696        }
9697    }
9698    impl super::LookupNameResponse {
9699        pub const fn const_default() -> Self {
9700            Self { record: None }
9701        }
9702        #[doc(hidden)]
9703        pub fn default_instance() -> &'static Self {
9704            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9705            &DEFAULT
9706        }
9707        ///Returns the value of `record`, or the default value if `record` is unset.
9708        pub fn record(&self) -> &super::NameRecord {
9709            self.record
9710                .as_ref()
9711                .map(|field| field as _)
9712                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9713        }
9714        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9715        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9716            self.record.as_mut().map(|field| field as _)
9717        }
9718        ///Returns a mutable reference to `record`.
9719        ///If the field is unset, it is first initialized with the default value.
9720        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9721            self.record.get_or_insert_default()
9722        }
9723        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9724        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9725            self.record.as_ref().map(|field| field as _)
9726        }
9727        ///Sets `record` with the provided value.
9728        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9729            self.record = Some(field.into().into());
9730        }
9731        ///Sets `record` with the provided value.
9732        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9733            self.set_record(field.into());
9734            self
9735        }
9736    }
9737    impl super::MakeMoveVector {
9738        pub const fn const_default() -> Self {
9739            Self {
9740                element_type: None,
9741                elements: Vec::new(),
9742            }
9743        }
9744        #[doc(hidden)]
9745        pub fn default_instance() -> &'static Self {
9746            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9747            &DEFAULT
9748        }
9749        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9750        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9751            self.element_type.as_mut().map(|field| field as _)
9752        }
9753        ///Returns a mutable reference to `element_type`.
9754        ///If the field is unset, it is first initialized with the default value.
9755        pub fn element_type_mut(&mut self) -> &mut String {
9756            self.element_type.get_or_insert_default()
9757        }
9758        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9759        pub fn element_type_opt(&self) -> Option<&str> {
9760            self.element_type.as_ref().map(|field| field as _)
9761        }
9762        ///Sets `element_type` with the provided value.
9763        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9764            self.element_type = Some(field.into().into());
9765        }
9766        ///Sets `element_type` with the provided value.
9767        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9768            self.set_element_type(field.into());
9769            self
9770        }
9771        ///Returns the value of `elements`, or the default value if `elements` is unset.
9772        pub fn elements(&self) -> &[super::Argument] {
9773            &self.elements
9774        }
9775        ///Returns a mutable reference to `elements`.
9776        ///If the field is unset, it is first initialized with the default value.
9777        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9778            &mut self.elements
9779        }
9780        ///Sets `elements` with the provided value.
9781        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9782            self.elements = field;
9783        }
9784        ///Sets `elements` with the provided value.
9785        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9786            self.set_elements(field);
9787            self
9788        }
9789    }
9790    impl super::MergeCoins {
9791        pub const fn const_default() -> Self {
9792            Self {
9793                coin: None,
9794                coins_to_merge: Vec::new(),
9795            }
9796        }
9797        #[doc(hidden)]
9798        pub fn default_instance() -> &'static Self {
9799            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9800            &DEFAULT
9801        }
9802        ///Returns the value of `coin`, or the default value if `coin` is unset.
9803        pub fn coin(&self) -> &super::Argument {
9804            self.coin
9805                .as_ref()
9806                .map(|field| field as _)
9807                .unwrap_or_else(|| super::Argument::default_instance() as _)
9808        }
9809        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9810        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9811            self.coin.as_mut().map(|field| field as _)
9812        }
9813        ///Returns a mutable reference to `coin`.
9814        ///If the field is unset, it is first initialized with the default value.
9815        pub fn coin_mut(&mut self) -> &mut super::Argument {
9816            self.coin.get_or_insert_default()
9817        }
9818        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9819        pub fn coin_opt(&self) -> Option<&super::Argument> {
9820            self.coin.as_ref().map(|field| field as _)
9821        }
9822        ///Sets `coin` with the provided value.
9823        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9824            self.coin = Some(field.into().into());
9825        }
9826        ///Sets `coin` with the provided value.
9827        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9828            self.set_coin(field.into());
9829            self
9830        }
9831        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9832        pub fn coins_to_merge(&self) -> &[super::Argument] {
9833            &self.coins_to_merge
9834        }
9835        ///Returns a mutable reference to `coins_to_merge`.
9836        ///If the field is unset, it is first initialized with the default value.
9837        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9838            &mut self.coins_to_merge
9839        }
9840        ///Sets `coins_to_merge` with the provided value.
9841        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9842            self.coins_to_merge = field;
9843        }
9844        ///Sets `coins_to_merge` with the provided value.
9845        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9846            self.set_coins_to_merge(field);
9847            self
9848        }
9849    }
9850    impl super::Module {
9851        pub const fn const_default() -> Self {
9852            Self {
9853                name: None,
9854                contents: None,
9855                datatypes: Vec::new(),
9856                functions: Vec::new(),
9857            }
9858        }
9859        #[doc(hidden)]
9860        pub fn default_instance() -> &'static Self {
9861            static DEFAULT: super::Module = super::Module::const_default();
9862            &DEFAULT
9863        }
9864        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9865        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9866            self.name.as_mut().map(|field| field as _)
9867        }
9868        ///Returns a mutable reference to `name`.
9869        ///If the field is unset, it is first initialized with the default value.
9870        pub fn name_mut(&mut self) -> &mut String {
9871            self.name.get_or_insert_default()
9872        }
9873        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9874        pub fn name_opt(&self) -> Option<&str> {
9875            self.name.as_ref().map(|field| field as _)
9876        }
9877        ///Sets `name` with the provided value.
9878        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9879            self.name = Some(field.into().into());
9880        }
9881        ///Sets `name` with the provided value.
9882        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9883            self.set_name(field.into());
9884            self
9885        }
9886        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9887        pub fn contents_opt(&self) -> Option<&[u8]> {
9888            self.contents.as_ref().map(|field| field as _)
9889        }
9890        ///Sets `contents` with the provided value.
9891        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9892            self.contents = Some(field.into().into());
9893        }
9894        ///Sets `contents` with the provided value.
9895        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9896            mut self,
9897            field: T,
9898        ) -> Self {
9899            self.set_contents(field.into());
9900            self
9901        }
9902        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9903        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9904            &self.datatypes
9905        }
9906        ///Returns a mutable reference to `datatypes`.
9907        ///If the field is unset, it is first initialized with the default value.
9908        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9909            &mut self.datatypes
9910        }
9911        ///Sets `datatypes` with the provided value.
9912        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9913            self.datatypes = field;
9914        }
9915        ///Sets `datatypes` with the provided value.
9916        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9917            self.set_datatypes(field);
9918            self
9919        }
9920        ///Returns the value of `functions`, or the default value if `functions` is unset.
9921        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9922            &self.functions
9923        }
9924        ///Returns a mutable reference to `functions`.
9925        ///If the field is unset, it is first initialized with the default value.
9926        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9927            &mut self.functions
9928        }
9929        ///Sets `functions` with the provided value.
9930        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9931            self.functions = field;
9932        }
9933        ///Sets `functions` with the provided value.
9934        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9935            self.set_functions(field);
9936            self
9937        }
9938    }
9939    impl super::MoveAbort {
9940        pub const fn const_default() -> Self {
9941            Self {
9942                abort_code: None,
9943                location: None,
9944                clever_error: None,
9945            }
9946        }
9947        #[doc(hidden)]
9948        pub fn default_instance() -> &'static Self {
9949            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9950            &DEFAULT
9951        }
9952        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9953        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9954            self.abort_code.as_mut().map(|field| field as _)
9955        }
9956        ///Returns a mutable reference to `abort_code`.
9957        ///If the field is unset, it is first initialized with the default value.
9958        pub fn abort_code_mut(&mut self) -> &mut u64 {
9959            self.abort_code.get_or_insert_default()
9960        }
9961        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9962        pub fn abort_code_opt(&self) -> Option<u64> {
9963            self.abort_code.as_ref().map(|field| *field)
9964        }
9965        ///Sets `abort_code` with the provided value.
9966        pub fn set_abort_code(&mut self, field: u64) {
9967            self.abort_code = Some(field);
9968        }
9969        ///Sets `abort_code` with the provided value.
9970        pub fn with_abort_code(mut self, field: u64) -> Self {
9971            self.set_abort_code(field);
9972            self
9973        }
9974        ///Returns the value of `location`, or the default value if `location` is unset.
9975        pub fn location(&self) -> &super::MoveLocation {
9976            self.location
9977                .as_ref()
9978                .map(|field| field as _)
9979                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9980        }
9981        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9982        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9983            self.location.as_mut().map(|field| field as _)
9984        }
9985        ///Returns a mutable reference to `location`.
9986        ///If the field is unset, it is first initialized with the default value.
9987        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9988            self.location.get_or_insert_default()
9989        }
9990        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9991        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9992            self.location.as_ref().map(|field| field as _)
9993        }
9994        ///Sets `location` with the provided value.
9995        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9996            self.location = Some(field.into().into());
9997        }
9998        ///Sets `location` with the provided value.
9999        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
10000            self.set_location(field.into());
10001            self
10002        }
10003        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
10004        pub fn clever_error(&self) -> &super::CleverError {
10005            self.clever_error
10006                .as_ref()
10007                .map(|field| field as _)
10008                .unwrap_or_else(|| super::CleverError::default_instance() as _)
10009        }
10010        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10011        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
10012            self.clever_error.as_mut().map(|field| field as _)
10013        }
10014        ///Returns a mutable reference to `clever_error`.
10015        ///If the field is unset, it is first initialized with the default value.
10016        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
10017            self.clever_error.get_or_insert_default()
10018        }
10019        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
10020        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
10021            self.clever_error.as_ref().map(|field| field as _)
10022        }
10023        ///Sets `clever_error` with the provided value.
10024        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
10025            self.clever_error = Some(field.into().into());
10026        }
10027        ///Sets `clever_error` with the provided value.
10028        pub fn with_clever_error<T: Into<super::CleverError>>(
10029            mut self,
10030            field: T,
10031        ) -> Self {
10032            self.set_clever_error(field.into());
10033            self
10034        }
10035    }
10036    impl super::MoveCall {
10037        pub const fn const_default() -> Self {
10038            Self {
10039                package: None,
10040                module: None,
10041                function: None,
10042                type_arguments: Vec::new(),
10043                arguments: Vec::new(),
10044            }
10045        }
10046        #[doc(hidden)]
10047        pub fn default_instance() -> &'static Self {
10048            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
10049            &DEFAULT
10050        }
10051        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10052        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10053            self.package.as_mut().map(|field| field as _)
10054        }
10055        ///Returns a mutable reference to `package`.
10056        ///If the field is unset, it is first initialized with the default value.
10057        pub fn package_mut(&mut self) -> &mut String {
10058            self.package.get_or_insert_default()
10059        }
10060        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10061        pub fn package_opt(&self) -> Option<&str> {
10062            self.package.as_ref().map(|field| field as _)
10063        }
10064        ///Sets `package` with the provided value.
10065        pub fn set_package<T: Into<String>>(&mut self, field: T) {
10066            self.package = Some(field.into().into());
10067        }
10068        ///Sets `package` with the provided value.
10069        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10070            self.set_package(field.into());
10071            self
10072        }
10073        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10074        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10075            self.module.as_mut().map(|field| field as _)
10076        }
10077        ///Returns a mutable reference to `module`.
10078        ///If the field is unset, it is first initialized with the default value.
10079        pub fn module_mut(&mut self) -> &mut String {
10080            self.module.get_or_insert_default()
10081        }
10082        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
10083        pub fn module_opt(&self) -> Option<&str> {
10084            self.module.as_ref().map(|field| field as _)
10085        }
10086        ///Sets `module` with the provided value.
10087        pub fn set_module<T: Into<String>>(&mut self, field: T) {
10088            self.module = Some(field.into().into());
10089        }
10090        ///Sets `module` with the provided value.
10091        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10092            self.set_module(field.into());
10093            self
10094        }
10095        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10096        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
10097            self.function.as_mut().map(|field| field as _)
10098        }
10099        ///Returns a mutable reference to `function`.
10100        ///If the field is unset, it is first initialized with the default value.
10101        pub fn function_mut(&mut self) -> &mut String {
10102            self.function.get_or_insert_default()
10103        }
10104        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
10105        pub fn function_opt(&self) -> Option<&str> {
10106            self.function.as_ref().map(|field| field as _)
10107        }
10108        ///Sets `function` with the provided value.
10109        pub fn set_function<T: Into<String>>(&mut self, field: T) {
10110            self.function = Some(field.into().into());
10111        }
10112        ///Sets `function` with the provided value.
10113        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
10114            self.set_function(field.into());
10115            self
10116        }
10117        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
10118        pub fn type_arguments(&self) -> &[String] {
10119            &self.type_arguments
10120        }
10121        ///Returns a mutable reference to `type_arguments`.
10122        ///If the field is unset, it is first initialized with the default value.
10123        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
10124            &mut self.type_arguments
10125        }
10126        ///Sets `type_arguments` with the provided value.
10127        pub fn set_type_arguments(&mut self, field: Vec<String>) {
10128            self.type_arguments = field;
10129        }
10130        ///Sets `type_arguments` with the provided value.
10131        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
10132            self.set_type_arguments(field);
10133            self
10134        }
10135        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
10136        pub fn arguments(&self) -> &[super::Argument] {
10137            &self.arguments
10138        }
10139        ///Returns a mutable reference to `arguments`.
10140        ///If the field is unset, it is first initialized with the default value.
10141        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
10142            &mut self.arguments
10143        }
10144        ///Sets `arguments` with the provided value.
10145        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
10146            self.arguments = field;
10147        }
10148        ///Sets `arguments` with the provided value.
10149        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
10150            self.set_arguments(field);
10151            self
10152        }
10153    }
10154    impl super::MoveLocation {
10155        pub const fn const_default() -> Self {
10156            Self {
10157                package: None,
10158                module: None,
10159                function: None,
10160                instruction: None,
10161                function_name: None,
10162            }
10163        }
10164        #[doc(hidden)]
10165        pub fn default_instance() -> &'static Self {
10166            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
10167            &DEFAULT
10168        }
10169        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10170        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10171            self.package.as_mut().map(|field| field as _)
10172        }
10173        ///Returns a mutable reference to `package`.
10174        ///If the field is unset, it is first initialized with the default value.
10175        pub fn package_mut(&mut self) -> &mut String {
10176            self.package.get_or_insert_default()
10177        }
10178        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10179        pub fn package_opt(&self) -> Option<&str> {
10180            self.package.as_ref().map(|field| field as _)
10181        }
10182        ///Sets `package` with the provided value.
10183        pub fn set_package<T: Into<String>>(&mut self, field: T) {
10184            self.package = Some(field.into().into());
10185        }
10186        ///Sets `package` with the provided value.
10187        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10188            self.set_package(field.into());
10189            self
10190        }
10191        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10192        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10193            self.module.as_mut().map(|field| field as _)
10194        }
10195        ///Returns a mutable reference to `module`.
10196        ///If the field is unset, it is first initialized with the default value.
10197        pub fn module_mut(&mut self) -> &mut String {
10198            self.module.get_or_insert_default()
10199        }
10200        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
10201        pub fn module_opt(&self) -> Option<&str> {
10202            self.module.as_ref().map(|field| field as _)
10203        }
10204        ///Sets `module` with the provided value.
10205        pub fn set_module<T: Into<String>>(&mut self, field: T) {
10206            self.module = Some(field.into().into());
10207        }
10208        ///Sets `module` with the provided value.
10209        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10210            self.set_module(field.into());
10211            self
10212        }
10213        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10214        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
10215            self.function.as_mut().map(|field| field as _)
10216        }
10217        ///Returns a mutable reference to `function`.
10218        ///If the field is unset, it is first initialized with the default value.
10219        pub fn function_mut(&mut self) -> &mut u32 {
10220            self.function.get_or_insert_default()
10221        }
10222        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
10223        pub fn function_opt(&self) -> Option<u32> {
10224            self.function.as_ref().map(|field| *field)
10225        }
10226        ///Sets `function` with the provided value.
10227        pub fn set_function(&mut self, field: u32) {
10228            self.function = Some(field);
10229        }
10230        ///Sets `function` with the provided value.
10231        pub fn with_function(mut self, field: u32) -> Self {
10232            self.set_function(field);
10233            self
10234        }
10235        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10236        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10237            self.instruction.as_mut().map(|field| field as _)
10238        }
10239        ///Returns a mutable reference to `instruction`.
10240        ///If the field is unset, it is first initialized with the default value.
10241        pub fn instruction_mut(&mut self) -> &mut u32 {
10242            self.instruction.get_or_insert_default()
10243        }
10244        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10245        pub fn instruction_opt(&self) -> Option<u32> {
10246            self.instruction.as_ref().map(|field| *field)
10247        }
10248        ///Sets `instruction` with the provided value.
10249        pub fn set_instruction(&mut self, field: u32) {
10250            self.instruction = Some(field);
10251        }
10252        ///Sets `instruction` with the provided value.
10253        pub fn with_instruction(mut self, field: u32) -> Self {
10254            self.set_instruction(field);
10255            self
10256        }
10257        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10258        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10259            self.function_name.as_mut().map(|field| field as _)
10260        }
10261        ///Returns a mutable reference to `function_name`.
10262        ///If the field is unset, it is first initialized with the default value.
10263        pub fn function_name_mut(&mut self) -> &mut String {
10264            self.function_name.get_or_insert_default()
10265        }
10266        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10267        pub fn function_name_opt(&self) -> Option<&str> {
10268            self.function_name.as_ref().map(|field| field as _)
10269        }
10270        ///Sets `function_name` with the provided value.
10271        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10272            self.function_name = Some(field.into().into());
10273        }
10274        ///Sets `function_name` with the provided value.
10275        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10276            self.set_function_name(field.into());
10277            self
10278        }
10279    }
10280    impl super::MoveTable {
10281        pub const fn const_default() -> Self {
10282            Self { id: None, size: None }
10283        }
10284        #[doc(hidden)]
10285        pub fn default_instance() -> &'static Self {
10286            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10287            &DEFAULT
10288        }
10289        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10290        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10291            self.id.as_mut().map(|field| field as _)
10292        }
10293        ///Returns a mutable reference to `id`.
10294        ///If the field is unset, it is first initialized with the default value.
10295        pub fn id_mut(&mut self) -> &mut String {
10296            self.id.get_or_insert_default()
10297        }
10298        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10299        pub fn id_opt(&self) -> Option<&str> {
10300            self.id.as_ref().map(|field| field as _)
10301        }
10302        ///Sets `id` with the provided value.
10303        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10304            self.id = Some(field.into().into());
10305        }
10306        ///Sets `id` with the provided value.
10307        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10308            self.set_id(field.into());
10309            self
10310        }
10311        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10312        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10313            self.size.as_mut().map(|field| field as _)
10314        }
10315        ///Returns a mutable reference to `size`.
10316        ///If the field is unset, it is first initialized with the default value.
10317        pub fn size_mut(&mut self) -> &mut u64 {
10318            self.size.get_or_insert_default()
10319        }
10320        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10321        pub fn size_opt(&self) -> Option<u64> {
10322            self.size.as_ref().map(|field| *field)
10323        }
10324        ///Sets `size` with the provided value.
10325        pub fn set_size(&mut self, field: u64) {
10326            self.size = Some(field);
10327        }
10328        ///Sets `size` with the provided value.
10329        pub fn with_size(mut self, field: u64) -> Self {
10330            self.set_size(field);
10331            self
10332        }
10333    }
10334    impl super::MultisigAggregatedSignature {
10335        pub const fn const_default() -> Self {
10336            Self {
10337                signatures: Vec::new(),
10338                bitmap: None,
10339                legacy_bitmap: None,
10340                committee: None,
10341            }
10342        }
10343        #[doc(hidden)]
10344        pub fn default_instance() -> &'static Self {
10345            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10346            &DEFAULT
10347        }
10348        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
10349        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10350            &self.signatures
10351        }
10352        ///Returns a mutable reference to `signatures`.
10353        ///If the field is unset, it is first initialized with the default value.
10354        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10355            &mut self.signatures
10356        }
10357        ///Sets `signatures` with the provided value.
10358        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10359            self.signatures = field;
10360        }
10361        ///Sets `signatures` with the provided value.
10362        pub fn with_signatures(
10363            mut self,
10364            field: Vec<super::MultisigMemberSignature>,
10365        ) -> Self {
10366            self.set_signatures(field);
10367            self
10368        }
10369        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10370        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10371            self.bitmap.as_mut().map(|field| field as _)
10372        }
10373        ///Returns a mutable reference to `bitmap`.
10374        ///If the field is unset, it is first initialized with the default value.
10375        pub fn bitmap_mut(&mut self) -> &mut u32 {
10376            self.bitmap.get_or_insert_default()
10377        }
10378        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10379        pub fn bitmap_opt(&self) -> Option<u32> {
10380            self.bitmap.as_ref().map(|field| *field)
10381        }
10382        ///Sets `bitmap` with the provided value.
10383        pub fn set_bitmap(&mut self, field: u32) {
10384            self.bitmap = Some(field);
10385        }
10386        ///Sets `bitmap` with the provided value.
10387        pub fn with_bitmap(mut self, field: u32) -> Self {
10388            self.set_bitmap(field);
10389            self
10390        }
10391        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10392        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10393            self.legacy_bitmap.as_ref().map(|field| field as _)
10394        }
10395        ///Sets `legacy_bitmap` with the provided value.
10396        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10397            self.legacy_bitmap = Some(field.into().into());
10398        }
10399        ///Sets `legacy_bitmap` with the provided value.
10400        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10401            mut self,
10402            field: T,
10403        ) -> Self {
10404            self.set_legacy_bitmap(field.into());
10405            self
10406        }
10407        ///Returns the value of `committee`, or the default value if `committee` is unset.
10408        pub fn committee(&self) -> &super::MultisigCommittee {
10409            self.committee
10410                .as_ref()
10411                .map(|field| field as _)
10412                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10413        }
10414        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10415        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10416            self.committee.as_mut().map(|field| field as _)
10417        }
10418        ///Returns a mutable reference to `committee`.
10419        ///If the field is unset, it is first initialized with the default value.
10420        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10421            self.committee.get_or_insert_default()
10422        }
10423        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
10424        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10425            self.committee.as_ref().map(|field| field as _)
10426        }
10427        ///Sets `committee` with the provided value.
10428        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10429            self.committee = Some(field.into().into());
10430        }
10431        ///Sets `committee` with the provided value.
10432        pub fn with_committee<T: Into<super::MultisigCommittee>>(
10433            mut self,
10434            field: T,
10435        ) -> Self {
10436            self.set_committee(field.into());
10437            self
10438        }
10439    }
10440    impl super::MultisigCommittee {
10441        pub const fn const_default() -> Self {
10442            Self {
10443                members: Vec::new(),
10444                threshold: None,
10445            }
10446        }
10447        #[doc(hidden)]
10448        pub fn default_instance() -> &'static Self {
10449            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10450            &DEFAULT
10451        }
10452        ///Returns the value of `members`, or the default value if `members` is unset.
10453        pub fn members(&self) -> &[super::MultisigMember] {
10454            &self.members
10455        }
10456        ///Returns a mutable reference to `members`.
10457        ///If the field is unset, it is first initialized with the default value.
10458        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10459            &mut self.members
10460        }
10461        ///Sets `members` with the provided value.
10462        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10463            self.members = field;
10464        }
10465        ///Sets `members` with the provided value.
10466        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10467            self.set_members(field);
10468            self
10469        }
10470        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10471        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10472            self.threshold.as_mut().map(|field| field as _)
10473        }
10474        ///Returns a mutable reference to `threshold`.
10475        ///If the field is unset, it is first initialized with the default value.
10476        pub fn threshold_mut(&mut self) -> &mut u32 {
10477            self.threshold.get_or_insert_default()
10478        }
10479        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
10480        pub fn threshold_opt(&self) -> Option<u32> {
10481            self.threshold.as_ref().map(|field| *field)
10482        }
10483        ///Sets `threshold` with the provided value.
10484        pub fn set_threshold(&mut self, field: u32) {
10485            self.threshold = Some(field);
10486        }
10487        ///Sets `threshold` with the provided value.
10488        pub fn with_threshold(mut self, field: u32) -> Self {
10489            self.set_threshold(field);
10490            self
10491        }
10492    }
10493    impl super::MultisigMember {
10494        pub const fn const_default() -> Self {
10495            Self {
10496                public_key: None,
10497                weight: None,
10498            }
10499        }
10500        #[doc(hidden)]
10501        pub fn default_instance() -> &'static Self {
10502            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10503            &DEFAULT
10504        }
10505        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
10506        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10507            self.public_key
10508                .as_ref()
10509                .map(|field| field as _)
10510                .unwrap_or_else(|| {
10511                    super::MultisigMemberPublicKey::default_instance() as _
10512                })
10513        }
10514        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10515        pub fn public_key_opt_mut(
10516            &mut self,
10517        ) -> Option<&mut super::MultisigMemberPublicKey> {
10518            self.public_key.as_mut().map(|field| field as _)
10519        }
10520        ///Returns a mutable reference to `public_key`.
10521        ///If the field is unset, it is first initialized with the default value.
10522        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10523            self.public_key.get_or_insert_default()
10524        }
10525        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10526        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10527            self.public_key.as_ref().map(|field| field as _)
10528        }
10529        ///Sets `public_key` with the provided value.
10530        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10531            &mut self,
10532            field: T,
10533        ) {
10534            self.public_key = Some(field.into().into());
10535        }
10536        ///Sets `public_key` with the provided value.
10537        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10538            mut self,
10539            field: T,
10540        ) -> Self {
10541            self.set_public_key(field.into());
10542            self
10543        }
10544        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10545        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10546            self.weight.as_mut().map(|field| field as _)
10547        }
10548        ///Returns a mutable reference to `weight`.
10549        ///If the field is unset, it is first initialized with the default value.
10550        pub fn weight_mut(&mut self) -> &mut u32 {
10551            self.weight.get_or_insert_default()
10552        }
10553        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
10554        pub fn weight_opt(&self) -> Option<u32> {
10555            self.weight.as_ref().map(|field| *field)
10556        }
10557        ///Sets `weight` with the provided value.
10558        pub fn set_weight(&mut self, field: u32) {
10559            self.weight = Some(field);
10560        }
10561        ///Sets `weight` with the provided value.
10562        pub fn with_weight(mut self, field: u32) -> Self {
10563            self.set_weight(field);
10564            self
10565        }
10566    }
10567    impl super::MultisigMemberPublicKey {
10568        pub const fn const_default() -> Self {
10569            Self {
10570                scheme: None,
10571                public_key: None,
10572                zklogin: None,
10573            }
10574        }
10575        #[doc(hidden)]
10576        pub fn default_instance() -> &'static Self {
10577            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10578            &DEFAULT
10579        }
10580        ///Sets `scheme` with the provided value.
10581        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10582            self.set_scheme(field.into());
10583            self
10584        }
10585        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10586        pub fn public_key_opt(&self) -> Option<&[u8]> {
10587            self.public_key.as_ref().map(|field| field as _)
10588        }
10589        ///Sets `public_key` with the provided value.
10590        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10591            self.public_key = Some(field.into().into());
10592        }
10593        ///Sets `public_key` with the provided value.
10594        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10595            mut self,
10596            field: T,
10597        ) -> Self {
10598            self.set_public_key(field.into());
10599            self
10600        }
10601        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10602        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10603            self.zklogin
10604                .as_ref()
10605                .map(|field| field as _)
10606                .unwrap_or_else(|| {
10607                    super::ZkLoginPublicIdentifier::default_instance() as _
10608                })
10609        }
10610        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10611        pub fn zklogin_opt_mut(
10612            &mut self,
10613        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10614            self.zklogin.as_mut().map(|field| field as _)
10615        }
10616        ///Returns a mutable reference to `zklogin`.
10617        ///If the field is unset, it is first initialized with the default value.
10618        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10619            self.zklogin.get_or_insert_default()
10620        }
10621        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10622        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10623            self.zklogin.as_ref().map(|field| field as _)
10624        }
10625        ///Sets `zklogin` with the provided value.
10626        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10627            &mut self,
10628            field: T,
10629        ) {
10630            self.zklogin = Some(field.into().into());
10631        }
10632        ///Sets `zklogin` with the provided value.
10633        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10634            mut self,
10635            field: T,
10636        ) -> Self {
10637            self.set_zklogin(field.into());
10638            self
10639        }
10640    }
10641    impl super::MultisigMemberSignature {
10642        pub const fn const_default() -> Self {
10643            Self {
10644                scheme: None,
10645                signature: None,
10646                zklogin: None,
10647                passkey: None,
10648            }
10649        }
10650        #[doc(hidden)]
10651        pub fn default_instance() -> &'static Self {
10652            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10653            &DEFAULT
10654        }
10655        ///Sets `scheme` with the provided value.
10656        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10657            self.set_scheme(field.into());
10658            self
10659        }
10660        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10661        pub fn signature_opt(&self) -> Option<&[u8]> {
10662            self.signature.as_ref().map(|field| field as _)
10663        }
10664        ///Sets `signature` with the provided value.
10665        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10666            self.signature = Some(field.into().into());
10667        }
10668        ///Sets `signature` with the provided value.
10669        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10670            mut self,
10671            field: T,
10672        ) -> Self {
10673            self.set_signature(field.into());
10674            self
10675        }
10676        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10677        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10678            self.zklogin
10679                .as_ref()
10680                .map(|field| field as _)
10681                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10682        }
10683        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10684        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10685            self.zklogin.as_mut().map(|field| field as _)
10686        }
10687        ///Returns a mutable reference to `zklogin`.
10688        ///If the field is unset, it is first initialized with the default value.
10689        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10690            self.zklogin.get_or_insert_default()
10691        }
10692        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10693        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10694            self.zklogin.as_ref().map(|field| field as _)
10695        }
10696        ///Sets `zklogin` with the provided value.
10697        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10698            self.zklogin = Some(field.into().into());
10699        }
10700        ///Sets `zklogin` with the provided value.
10701        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10702            mut self,
10703            field: T,
10704        ) -> Self {
10705            self.set_zklogin(field.into());
10706            self
10707        }
10708        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10709        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10710            self.passkey
10711                .as_ref()
10712                .map(|field| field as _)
10713                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10714        }
10715        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10716        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10717            self.passkey.as_mut().map(|field| field as _)
10718        }
10719        ///Returns a mutable reference to `passkey`.
10720        ///If the field is unset, it is first initialized with the default value.
10721        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10722            self.passkey.get_or_insert_default()
10723        }
10724        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10725        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10726            self.passkey.as_ref().map(|field| field as _)
10727        }
10728        ///Sets `passkey` with the provided value.
10729        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10730            self.passkey = Some(field.into().into());
10731        }
10732        ///Sets `passkey` with the provided value.
10733        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10734            mut self,
10735            field: T,
10736        ) -> Self {
10737            self.set_passkey(field.into());
10738            self
10739        }
10740    }
10741    impl super::NameRecord {
10742        pub const fn const_default() -> Self {
10743            Self {
10744                id: None,
10745                name: None,
10746                registration_nft_id: None,
10747                expiration_timestamp: None,
10748                target_address: None,
10749                data: std::collections::BTreeMap::new(),
10750            }
10751        }
10752        #[doc(hidden)]
10753        pub fn default_instance() -> &'static Self {
10754            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10755            &DEFAULT
10756        }
10757        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10758        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10759            self.id.as_mut().map(|field| field as _)
10760        }
10761        ///Returns a mutable reference to `id`.
10762        ///If the field is unset, it is first initialized with the default value.
10763        pub fn id_mut(&mut self) -> &mut String {
10764            self.id.get_or_insert_default()
10765        }
10766        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10767        pub fn id_opt(&self) -> Option<&str> {
10768            self.id.as_ref().map(|field| field as _)
10769        }
10770        ///Sets `id` with the provided value.
10771        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10772            self.id = Some(field.into().into());
10773        }
10774        ///Sets `id` with the provided value.
10775        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10776            self.set_id(field.into());
10777            self
10778        }
10779        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10780        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10781            self.name.as_mut().map(|field| field as _)
10782        }
10783        ///Returns a mutable reference to `name`.
10784        ///If the field is unset, it is first initialized with the default value.
10785        pub fn name_mut(&mut self) -> &mut String {
10786            self.name.get_or_insert_default()
10787        }
10788        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10789        pub fn name_opt(&self) -> Option<&str> {
10790            self.name.as_ref().map(|field| field as _)
10791        }
10792        ///Sets `name` with the provided value.
10793        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10794            self.name = Some(field.into().into());
10795        }
10796        ///Sets `name` with the provided value.
10797        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10798            self.set_name(field.into());
10799            self
10800        }
10801        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10802        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10803            self.registration_nft_id.as_mut().map(|field| field as _)
10804        }
10805        ///Returns a mutable reference to `registration_nft_id`.
10806        ///If the field is unset, it is first initialized with the default value.
10807        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10808            self.registration_nft_id.get_or_insert_default()
10809        }
10810        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10811        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10812            self.registration_nft_id.as_ref().map(|field| field as _)
10813        }
10814        ///Sets `registration_nft_id` with the provided value.
10815        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10816            self.registration_nft_id = Some(field.into().into());
10817        }
10818        ///Sets `registration_nft_id` with the provided value.
10819        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10820            self.set_registration_nft_id(field.into());
10821            self
10822        }
10823        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10824        pub fn expiration_timestamp_opt_mut(
10825            &mut self,
10826        ) -> Option<&mut ::prost_types::Timestamp> {
10827            self.expiration_timestamp.as_mut().map(|field| field as _)
10828        }
10829        ///Returns a mutable reference to `expiration_timestamp`.
10830        ///If the field is unset, it is first initialized with the default value.
10831        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10832            self.expiration_timestamp.get_or_insert_default()
10833        }
10834        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10835        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10836            self.expiration_timestamp.as_ref().map(|field| field as _)
10837        }
10838        ///Sets `expiration_timestamp` with the provided value.
10839        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10840            &mut self,
10841            field: T,
10842        ) {
10843            self.expiration_timestamp = Some(field.into().into());
10844        }
10845        ///Sets `expiration_timestamp` with the provided value.
10846        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10847            mut self,
10848            field: T,
10849        ) -> Self {
10850            self.set_expiration_timestamp(field.into());
10851            self
10852        }
10853        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10854        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10855            self.target_address.as_mut().map(|field| field as _)
10856        }
10857        ///Returns a mutable reference to `target_address`.
10858        ///If the field is unset, it is first initialized with the default value.
10859        pub fn target_address_mut(&mut self) -> &mut String {
10860            self.target_address.get_or_insert_default()
10861        }
10862        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10863        pub fn target_address_opt(&self) -> Option<&str> {
10864            self.target_address.as_ref().map(|field| field as _)
10865        }
10866        ///Sets `target_address` with the provided value.
10867        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10868            self.target_address = Some(field.into().into());
10869        }
10870        ///Sets `target_address` with the provided value.
10871        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10872            self.set_target_address(field.into());
10873            self
10874        }
10875        ///Returns the value of `data`, or the default value if `data` is unset.
10876        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10877            &self.data
10878        }
10879        ///Returns a mutable reference to `data`.
10880        ///If the field is unset, it is first initialized with the default value.
10881        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10882            &mut self.data
10883        }
10884        ///Sets `data` with the provided value.
10885        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10886            self.data = field;
10887        }
10888        ///Sets `data` with the provided value.
10889        pub fn with_data(
10890            mut self,
10891            field: ::std::collections::BTreeMap<String, String>,
10892        ) -> Self {
10893            self.set_data(field);
10894            self
10895        }
10896    }
10897    impl super::Object {
10898        pub const fn const_default() -> Self {
10899            Self {
10900                bcs: None,
10901                object_id: None,
10902                version: None,
10903                digest: None,
10904                owner: None,
10905                object_type: None,
10906                has_public_transfer: None,
10907                contents: None,
10908                package: None,
10909                previous_transaction: None,
10910                storage_rebate: None,
10911                json: None,
10912                balance: None,
10913                display: None,
10914            }
10915        }
10916        #[doc(hidden)]
10917        pub fn default_instance() -> &'static Self {
10918            static DEFAULT: super::Object = super::Object::const_default();
10919            &DEFAULT
10920        }
10921        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10922        pub fn bcs(&self) -> &super::Bcs {
10923            self.bcs
10924                .as_ref()
10925                .map(|field| field as _)
10926                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10927        }
10928        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10929        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10930            self.bcs.as_mut().map(|field| field as _)
10931        }
10932        ///Returns a mutable reference to `bcs`.
10933        ///If the field is unset, it is first initialized with the default value.
10934        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10935            self.bcs.get_or_insert_default()
10936        }
10937        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10938        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10939            self.bcs.as_ref().map(|field| field as _)
10940        }
10941        ///Sets `bcs` with the provided value.
10942        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10943            self.bcs = Some(field.into().into());
10944        }
10945        ///Sets `bcs` with the provided value.
10946        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10947            self.set_bcs(field.into());
10948            self
10949        }
10950        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10951        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10952            self.object_id.as_mut().map(|field| field as _)
10953        }
10954        ///Returns a mutable reference to `object_id`.
10955        ///If the field is unset, it is first initialized with the default value.
10956        pub fn object_id_mut(&mut self) -> &mut String {
10957            self.object_id.get_or_insert_default()
10958        }
10959        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10960        pub fn object_id_opt(&self) -> Option<&str> {
10961            self.object_id.as_ref().map(|field| field as _)
10962        }
10963        ///Sets `object_id` with the provided value.
10964        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10965            self.object_id = Some(field.into().into());
10966        }
10967        ///Sets `object_id` with the provided value.
10968        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10969            self.set_object_id(field.into());
10970            self
10971        }
10972        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10973        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10974            self.version.as_mut().map(|field| field as _)
10975        }
10976        ///Returns a mutable reference to `version`.
10977        ///If the field is unset, it is first initialized with the default value.
10978        pub fn version_mut(&mut self) -> &mut u64 {
10979            self.version.get_or_insert_default()
10980        }
10981        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10982        pub fn version_opt(&self) -> Option<u64> {
10983            self.version.as_ref().map(|field| *field)
10984        }
10985        ///Sets `version` with the provided value.
10986        pub fn set_version(&mut self, field: u64) {
10987            self.version = Some(field);
10988        }
10989        ///Sets `version` with the provided value.
10990        pub fn with_version(mut self, field: u64) -> Self {
10991            self.set_version(field);
10992            self
10993        }
10994        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10995        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10996            self.digest.as_mut().map(|field| field as _)
10997        }
10998        ///Returns a mutable reference to `digest`.
10999        ///If the field is unset, it is first initialized with the default value.
11000        pub fn digest_mut(&mut self) -> &mut String {
11001            self.digest.get_or_insert_default()
11002        }
11003        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11004        pub fn digest_opt(&self) -> Option<&str> {
11005            self.digest.as_ref().map(|field| field as _)
11006        }
11007        ///Sets `digest` with the provided value.
11008        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11009            self.digest = Some(field.into().into());
11010        }
11011        ///Sets `digest` with the provided value.
11012        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11013            self.set_digest(field.into());
11014            self
11015        }
11016        ///Returns the value of `owner`, or the default value if `owner` is unset.
11017        pub fn owner(&self) -> &super::Owner {
11018            self.owner
11019                .as_ref()
11020                .map(|field| field as _)
11021                .unwrap_or_else(|| super::Owner::default_instance() as _)
11022        }
11023        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11024        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
11025            self.owner.as_mut().map(|field| field as _)
11026        }
11027        ///Returns a mutable reference to `owner`.
11028        ///If the field is unset, it is first initialized with the default value.
11029        pub fn owner_mut(&mut self) -> &mut super::Owner {
11030            self.owner.get_or_insert_default()
11031        }
11032        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
11033        pub fn owner_opt(&self) -> Option<&super::Owner> {
11034            self.owner.as_ref().map(|field| field as _)
11035        }
11036        ///Sets `owner` with the provided value.
11037        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
11038            self.owner = Some(field.into().into());
11039        }
11040        ///Sets `owner` with the provided value.
11041        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
11042            self.set_owner(field.into());
11043            self
11044        }
11045        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11046        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
11047            self.object_type.as_mut().map(|field| field as _)
11048        }
11049        ///Returns a mutable reference to `object_type`.
11050        ///If the field is unset, it is first initialized with the default value.
11051        pub fn object_type_mut(&mut self) -> &mut String {
11052            self.object_type.get_or_insert_default()
11053        }
11054        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
11055        pub fn object_type_opt(&self) -> Option<&str> {
11056            self.object_type.as_ref().map(|field| field as _)
11057        }
11058        ///Sets `object_type` with the provided value.
11059        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
11060            self.object_type = Some(field.into().into());
11061        }
11062        ///Sets `object_type` with the provided value.
11063        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
11064            self.set_object_type(field.into());
11065            self
11066        }
11067        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11068        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
11069            self.has_public_transfer.as_mut().map(|field| field as _)
11070        }
11071        ///Returns a mutable reference to `has_public_transfer`.
11072        ///If the field is unset, it is first initialized with the default value.
11073        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
11074            self.has_public_transfer.get_or_insert_default()
11075        }
11076        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
11077        pub fn has_public_transfer_opt(&self) -> Option<bool> {
11078            self.has_public_transfer.as_ref().map(|field| *field)
11079        }
11080        ///Sets `has_public_transfer` with the provided value.
11081        pub fn set_has_public_transfer(&mut self, field: bool) {
11082            self.has_public_transfer = Some(field);
11083        }
11084        ///Sets `has_public_transfer` with the provided value.
11085        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
11086            self.set_has_public_transfer(field);
11087            self
11088        }
11089        ///Returns the value of `contents`, or the default value if `contents` is unset.
11090        pub fn contents(&self) -> &super::Bcs {
11091            self.contents
11092                .as_ref()
11093                .map(|field| field as _)
11094                .unwrap_or_else(|| super::Bcs::default_instance() as _)
11095        }
11096        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11097        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
11098            self.contents.as_mut().map(|field| field as _)
11099        }
11100        ///Returns a mutable reference to `contents`.
11101        ///If the field is unset, it is first initialized with the default value.
11102        pub fn contents_mut(&mut self) -> &mut super::Bcs {
11103            self.contents.get_or_insert_default()
11104        }
11105        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
11106        pub fn contents_opt(&self) -> Option<&super::Bcs> {
11107            self.contents.as_ref().map(|field| field as _)
11108        }
11109        ///Sets `contents` with the provided value.
11110        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
11111            self.contents = Some(field.into().into());
11112        }
11113        ///Sets `contents` with the provided value.
11114        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
11115            self.set_contents(field.into());
11116            self
11117        }
11118        ///Returns the value of `package`, or the default value if `package` is unset.
11119        pub fn package(&self) -> &super::Package {
11120            self.package
11121                .as_ref()
11122                .map(|field| field as _)
11123                .unwrap_or_else(|| super::Package::default_instance() as _)
11124        }
11125        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11126        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
11127            self.package.as_mut().map(|field| field as _)
11128        }
11129        ///Returns a mutable reference to `package`.
11130        ///If the field is unset, it is first initialized with the default value.
11131        pub fn package_mut(&mut self) -> &mut super::Package {
11132            self.package.get_or_insert_default()
11133        }
11134        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11135        pub fn package_opt(&self) -> Option<&super::Package> {
11136            self.package.as_ref().map(|field| field as _)
11137        }
11138        ///Sets `package` with the provided value.
11139        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
11140            self.package = Some(field.into().into());
11141        }
11142        ///Sets `package` with the provided value.
11143        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
11144            self.set_package(field.into());
11145            self
11146        }
11147        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11148        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
11149            self.previous_transaction.as_mut().map(|field| field as _)
11150        }
11151        ///Returns a mutable reference to `previous_transaction`.
11152        ///If the field is unset, it is first initialized with the default value.
11153        pub fn previous_transaction_mut(&mut self) -> &mut String {
11154            self.previous_transaction.get_or_insert_default()
11155        }
11156        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11157        pub fn previous_transaction_opt(&self) -> Option<&str> {
11158            self.previous_transaction.as_ref().map(|field| field as _)
11159        }
11160        ///Sets `previous_transaction` with the provided value.
11161        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
11162            self.previous_transaction = Some(field.into().into());
11163        }
11164        ///Sets `previous_transaction` with the provided value.
11165        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
11166            self.set_previous_transaction(field.into());
11167            self
11168        }
11169        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11170        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
11171            self.storage_rebate.as_mut().map(|field| field as _)
11172        }
11173        ///Returns a mutable reference to `storage_rebate`.
11174        ///If the field is unset, it is first initialized with the default value.
11175        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
11176            self.storage_rebate.get_or_insert_default()
11177        }
11178        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
11179        pub fn storage_rebate_opt(&self) -> Option<u64> {
11180            self.storage_rebate.as_ref().map(|field| *field)
11181        }
11182        ///Sets `storage_rebate` with the provided value.
11183        pub fn set_storage_rebate(&mut self, field: u64) {
11184            self.storage_rebate = Some(field);
11185        }
11186        ///Sets `storage_rebate` with the provided value.
11187        pub fn with_storage_rebate(mut self, field: u64) -> Self {
11188            self.set_storage_rebate(field);
11189            self
11190        }
11191        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11192        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
11193            self.json.as_mut().map(|field| field as _)
11194        }
11195        ///Returns a mutable reference to `json`.
11196        ///If the field is unset, it is first initialized with the default value.
11197        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
11198            self.json.get_or_insert_default()
11199        }
11200        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11201        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
11202            self.json.as_ref().map(|field| field as _)
11203        }
11204        ///Sets `json` with the provided value.
11205        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
11206            self.json = Some(field.into().into());
11207        }
11208        ///Sets `json` with the provided value.
11209        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
11210            self.set_json(field.into());
11211            self
11212        }
11213        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11214        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
11215            self.balance.as_mut().map(|field| field as _)
11216        }
11217        ///Returns a mutable reference to `balance`.
11218        ///If the field is unset, it is first initialized with the default value.
11219        pub fn balance_mut(&mut self) -> &mut u64 {
11220            self.balance.get_or_insert_default()
11221        }
11222        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
11223        pub fn balance_opt(&self) -> Option<u64> {
11224            self.balance.as_ref().map(|field| *field)
11225        }
11226        ///Sets `balance` with the provided value.
11227        pub fn set_balance(&mut self, field: u64) {
11228            self.balance = Some(field);
11229        }
11230        ///Sets `balance` with the provided value.
11231        pub fn with_balance(mut self, field: u64) -> Self {
11232            self.set_balance(field);
11233            self
11234        }
11235        ///Returns the value of `display`, or the default value if `display` is unset.
11236        pub fn display(&self) -> &super::Display {
11237            self.display
11238                .as_ref()
11239                .map(|field| field as _)
11240                .unwrap_or_else(|| super::Display::default_instance() as _)
11241        }
11242        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11243        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
11244            self.display.as_mut().map(|field| field as _)
11245        }
11246        ///Returns a mutable reference to `display`.
11247        ///If the field is unset, it is first initialized with the default value.
11248        pub fn display_mut(&mut self) -> &mut super::Display {
11249            self.display.get_or_insert_default()
11250        }
11251        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
11252        pub fn display_opt(&self) -> Option<&super::Display> {
11253            self.display.as_ref().map(|field| field as _)
11254        }
11255        ///Sets `display` with the provided value.
11256        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
11257            self.display = Some(field.into().into());
11258        }
11259        ///Sets `display` with the provided value.
11260        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
11261            self.set_display(field.into());
11262            self
11263        }
11264    }
11265    impl super::ObjectReference {
11266        pub const fn const_default() -> Self {
11267            Self {
11268                object_id: None,
11269                version: None,
11270                digest: None,
11271            }
11272        }
11273        #[doc(hidden)]
11274        pub fn default_instance() -> &'static Self {
11275            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11276            &DEFAULT
11277        }
11278        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11279        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11280            self.object_id.as_mut().map(|field| field as _)
11281        }
11282        ///Returns a mutable reference to `object_id`.
11283        ///If the field is unset, it is first initialized with the default value.
11284        pub fn object_id_mut(&mut self) -> &mut String {
11285            self.object_id.get_or_insert_default()
11286        }
11287        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11288        pub fn object_id_opt(&self) -> Option<&str> {
11289            self.object_id.as_ref().map(|field| field as _)
11290        }
11291        ///Sets `object_id` with the provided value.
11292        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11293            self.object_id = Some(field.into().into());
11294        }
11295        ///Sets `object_id` with the provided value.
11296        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11297            self.set_object_id(field.into());
11298            self
11299        }
11300        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11301        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11302            self.version.as_mut().map(|field| field as _)
11303        }
11304        ///Returns a mutable reference to `version`.
11305        ///If the field is unset, it is first initialized with the default value.
11306        pub fn version_mut(&mut self) -> &mut u64 {
11307            self.version.get_or_insert_default()
11308        }
11309        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11310        pub fn version_opt(&self) -> Option<u64> {
11311            self.version.as_ref().map(|field| *field)
11312        }
11313        ///Sets `version` with the provided value.
11314        pub fn set_version(&mut self, field: u64) {
11315            self.version = Some(field);
11316        }
11317        ///Sets `version` with the provided value.
11318        pub fn with_version(mut self, field: u64) -> Self {
11319            self.set_version(field);
11320            self
11321        }
11322        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11323        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11324            self.digest.as_mut().map(|field| field as _)
11325        }
11326        ///Returns a mutable reference to `digest`.
11327        ///If the field is unset, it is first initialized with the default value.
11328        pub fn digest_mut(&mut self) -> &mut String {
11329            self.digest.get_or_insert_default()
11330        }
11331        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11332        pub fn digest_opt(&self) -> Option<&str> {
11333            self.digest.as_ref().map(|field| field as _)
11334        }
11335        ///Sets `digest` with the provided value.
11336        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11337            self.digest = Some(field.into().into());
11338        }
11339        ///Sets `digest` with the provided value.
11340        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11341            self.set_digest(field.into());
11342            self
11343        }
11344    }
11345    impl super::ObjectSet {
11346        pub const fn const_default() -> Self {
11347            Self { objects: Vec::new() }
11348        }
11349        #[doc(hidden)]
11350        pub fn default_instance() -> &'static Self {
11351            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11352            &DEFAULT
11353        }
11354        ///Returns the value of `objects`, or the default value if `objects` is unset.
11355        pub fn objects(&self) -> &[super::Object] {
11356            &self.objects
11357        }
11358        ///Returns a mutable reference to `objects`.
11359        ///If the field is unset, it is first initialized with the default value.
11360        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11361            &mut self.objects
11362        }
11363        ///Sets `objects` with the provided value.
11364        pub fn set_objects(&mut self, field: Vec<super::Object>) {
11365            self.objects = field;
11366        }
11367        ///Sets `objects` with the provided value.
11368        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11369            self.set_objects(field);
11370            self
11371        }
11372    }
11373    impl super::OpenSignature {
11374        pub const fn const_default() -> Self {
11375            Self {
11376                reference: None,
11377                body: None,
11378            }
11379        }
11380        #[doc(hidden)]
11381        pub fn default_instance() -> &'static Self {
11382            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11383            &DEFAULT
11384        }
11385        ///Sets `reference` with the provided value.
11386        pub fn with_reference<T: Into<super::open_signature::Reference>>(
11387            mut self,
11388            field: T,
11389        ) -> Self {
11390            self.set_reference(field.into());
11391            self
11392        }
11393        ///Returns the value of `body`, or the default value if `body` is unset.
11394        pub fn body(&self) -> &super::OpenSignatureBody {
11395            self.body
11396                .as_ref()
11397                .map(|field| field as _)
11398                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11399        }
11400        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11401        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11402            self.body.as_mut().map(|field| field as _)
11403        }
11404        ///Returns a mutable reference to `body`.
11405        ///If the field is unset, it is first initialized with the default value.
11406        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11407            self.body.get_or_insert_default()
11408        }
11409        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
11410        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11411            self.body.as_ref().map(|field| field as _)
11412        }
11413        ///Sets `body` with the provided value.
11414        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11415            self.body = Some(field.into().into());
11416        }
11417        ///Sets `body` with the provided value.
11418        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11419            self.set_body(field.into());
11420            self
11421        }
11422    }
11423    impl super::OpenSignatureBody {
11424        pub const fn const_default() -> Self {
11425            Self {
11426                r#type: None,
11427                type_name: None,
11428                type_parameter_instantiation: Vec::new(),
11429                type_parameter: None,
11430            }
11431        }
11432        #[doc(hidden)]
11433        pub fn default_instance() -> &'static Self {
11434            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11435            &DEFAULT
11436        }
11437        ///Sets `r#type` with the provided value.
11438        pub fn with_type<T: Into<super::open_signature_body::Type>>(
11439            mut self,
11440            field: T,
11441        ) -> Self {
11442            self.set_type(field.into());
11443            self
11444        }
11445        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11446        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11447            self.type_name.as_mut().map(|field| field as _)
11448        }
11449        ///Returns a mutable reference to `type_name`.
11450        ///If the field is unset, it is first initialized with the default value.
11451        pub fn type_name_mut(&mut self) -> &mut String {
11452            self.type_name.get_or_insert_default()
11453        }
11454        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11455        pub fn type_name_opt(&self) -> Option<&str> {
11456            self.type_name.as_ref().map(|field| field as _)
11457        }
11458        ///Sets `type_name` with the provided value.
11459        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11460            self.type_name = Some(field.into().into());
11461        }
11462        ///Sets `type_name` with the provided value.
11463        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11464            self.set_type_name(field.into());
11465            self
11466        }
11467        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
11468        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11469            &self.type_parameter_instantiation
11470        }
11471        ///Returns a mutable reference to `type_parameter_instantiation`.
11472        ///If the field is unset, it is first initialized with the default value.
11473        pub fn type_parameter_instantiation_mut(
11474            &mut self,
11475        ) -> &mut Vec<super::OpenSignatureBody> {
11476            &mut self.type_parameter_instantiation
11477        }
11478        ///Sets `type_parameter_instantiation` with the provided value.
11479        pub fn set_type_parameter_instantiation(
11480            &mut self,
11481            field: Vec<super::OpenSignatureBody>,
11482        ) {
11483            self.type_parameter_instantiation = field;
11484        }
11485        ///Sets `type_parameter_instantiation` with the provided value.
11486        pub fn with_type_parameter_instantiation(
11487            mut self,
11488            field: Vec<super::OpenSignatureBody>,
11489        ) -> Self {
11490            self.set_type_parameter_instantiation(field);
11491            self
11492        }
11493        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11494        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11495            self.type_parameter.as_mut().map(|field| field as _)
11496        }
11497        ///Returns a mutable reference to `type_parameter`.
11498        ///If the field is unset, it is first initialized with the default value.
11499        pub fn type_parameter_mut(&mut self) -> &mut u32 {
11500            self.type_parameter.get_or_insert_default()
11501        }
11502        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
11503        pub fn type_parameter_opt(&self) -> Option<u32> {
11504            self.type_parameter.as_ref().map(|field| *field)
11505        }
11506        ///Sets `type_parameter` with the provided value.
11507        pub fn set_type_parameter(&mut self, field: u32) {
11508            self.type_parameter = Some(field);
11509        }
11510        ///Sets `type_parameter` with the provided value.
11511        pub fn with_type_parameter(mut self, field: u32) -> Self {
11512            self.set_type_parameter(field);
11513            self
11514        }
11515    }
11516    impl super::Owner {
11517        pub const fn const_default() -> Self {
11518            Self {
11519                kind: None,
11520                address: None,
11521                version: None,
11522            }
11523        }
11524        #[doc(hidden)]
11525        pub fn default_instance() -> &'static Self {
11526            static DEFAULT: super::Owner = super::Owner::const_default();
11527            &DEFAULT
11528        }
11529        ///Sets `kind` with the provided value.
11530        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11531            self.set_kind(field.into());
11532            self
11533        }
11534        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11535        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11536            self.address.as_mut().map(|field| field as _)
11537        }
11538        ///Returns a mutable reference to `address`.
11539        ///If the field is unset, it is first initialized with the default value.
11540        pub fn address_mut(&mut self) -> &mut String {
11541            self.address.get_or_insert_default()
11542        }
11543        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11544        pub fn address_opt(&self) -> Option<&str> {
11545            self.address.as_ref().map(|field| field as _)
11546        }
11547        ///Sets `address` with the provided value.
11548        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11549            self.address = Some(field.into().into());
11550        }
11551        ///Sets `address` with the provided value.
11552        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11553            self.set_address(field.into());
11554            self
11555        }
11556        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11557        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11558            self.version.as_mut().map(|field| field as _)
11559        }
11560        ///Returns a mutable reference to `version`.
11561        ///If the field is unset, it is first initialized with the default value.
11562        pub fn version_mut(&mut self) -> &mut u64 {
11563            self.version.get_or_insert_default()
11564        }
11565        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11566        pub fn version_opt(&self) -> Option<u64> {
11567            self.version.as_ref().map(|field| *field)
11568        }
11569        ///Sets `version` with the provided value.
11570        pub fn set_version(&mut self, field: u64) {
11571            self.version = Some(field);
11572        }
11573        ///Sets `version` with the provided value.
11574        pub fn with_version(mut self, field: u64) -> Self {
11575            self.set_version(field);
11576            self
11577        }
11578    }
11579    impl super::Package {
11580        pub const fn const_default() -> Self {
11581            Self {
11582                storage_id: None,
11583                original_id: None,
11584                version: None,
11585                modules: Vec::new(),
11586                type_origins: Vec::new(),
11587                linkage: Vec::new(),
11588            }
11589        }
11590        #[doc(hidden)]
11591        pub fn default_instance() -> &'static Self {
11592            static DEFAULT: super::Package = super::Package::const_default();
11593            &DEFAULT
11594        }
11595        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11596        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11597            self.storage_id.as_mut().map(|field| field as _)
11598        }
11599        ///Returns a mutable reference to `storage_id`.
11600        ///If the field is unset, it is first initialized with the default value.
11601        pub fn storage_id_mut(&mut self) -> &mut String {
11602            self.storage_id.get_or_insert_default()
11603        }
11604        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11605        pub fn storage_id_opt(&self) -> Option<&str> {
11606            self.storage_id.as_ref().map(|field| field as _)
11607        }
11608        ///Sets `storage_id` with the provided value.
11609        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11610            self.storage_id = Some(field.into().into());
11611        }
11612        ///Sets `storage_id` with the provided value.
11613        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11614            self.set_storage_id(field.into());
11615            self
11616        }
11617        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11618        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11619            self.original_id.as_mut().map(|field| field as _)
11620        }
11621        ///Returns a mutable reference to `original_id`.
11622        ///If the field is unset, it is first initialized with the default value.
11623        pub fn original_id_mut(&mut self) -> &mut String {
11624            self.original_id.get_or_insert_default()
11625        }
11626        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11627        pub fn original_id_opt(&self) -> Option<&str> {
11628            self.original_id.as_ref().map(|field| field as _)
11629        }
11630        ///Sets `original_id` with the provided value.
11631        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11632            self.original_id = Some(field.into().into());
11633        }
11634        ///Sets `original_id` with the provided value.
11635        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11636            self.set_original_id(field.into());
11637            self
11638        }
11639        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11640        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11641            self.version.as_mut().map(|field| field as _)
11642        }
11643        ///Returns a mutable reference to `version`.
11644        ///If the field is unset, it is first initialized with the default value.
11645        pub fn version_mut(&mut self) -> &mut u64 {
11646            self.version.get_or_insert_default()
11647        }
11648        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11649        pub fn version_opt(&self) -> Option<u64> {
11650            self.version.as_ref().map(|field| *field)
11651        }
11652        ///Sets `version` with the provided value.
11653        pub fn set_version(&mut self, field: u64) {
11654            self.version = Some(field);
11655        }
11656        ///Sets `version` with the provided value.
11657        pub fn with_version(mut self, field: u64) -> Self {
11658            self.set_version(field);
11659            self
11660        }
11661        ///Returns the value of `modules`, or the default value if `modules` is unset.
11662        pub fn modules(&self) -> &[super::Module] {
11663            &self.modules
11664        }
11665        ///Returns a mutable reference to `modules`.
11666        ///If the field is unset, it is first initialized with the default value.
11667        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11668            &mut self.modules
11669        }
11670        ///Sets `modules` with the provided value.
11671        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11672            self.modules = field;
11673        }
11674        ///Sets `modules` with the provided value.
11675        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11676            self.set_modules(field);
11677            self
11678        }
11679        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11680        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11681            &self.type_origins
11682        }
11683        ///Returns a mutable reference to `type_origins`.
11684        ///If the field is unset, it is first initialized with the default value.
11685        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11686            &mut self.type_origins
11687        }
11688        ///Sets `type_origins` with the provided value.
11689        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11690            self.type_origins = field;
11691        }
11692        ///Sets `type_origins` with the provided value.
11693        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11694            self.set_type_origins(field);
11695            self
11696        }
11697        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11698        pub fn linkage(&self) -> &[super::Linkage] {
11699            &self.linkage
11700        }
11701        ///Returns a mutable reference to `linkage`.
11702        ///If the field is unset, it is first initialized with the default value.
11703        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11704            &mut self.linkage
11705        }
11706        ///Sets `linkage` with the provided value.
11707        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11708            self.linkage = field;
11709        }
11710        ///Sets `linkage` with the provided value.
11711        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11712            self.set_linkage(field);
11713            self
11714        }
11715    }
11716    impl super::PackageUpgradeError {
11717        pub const fn const_default() -> Self {
11718            Self {
11719                kind: None,
11720                package_id: None,
11721                digest: None,
11722                policy: None,
11723                ticket_id: None,
11724            }
11725        }
11726        #[doc(hidden)]
11727        pub fn default_instance() -> &'static Self {
11728            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11729            &DEFAULT
11730        }
11731        ///Sets `kind` with the provided value.
11732        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11733            mut self,
11734            field: T,
11735        ) -> Self {
11736            self.set_kind(field.into());
11737            self
11738        }
11739        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11740        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11741            self.package_id.as_mut().map(|field| field as _)
11742        }
11743        ///Returns a mutable reference to `package_id`.
11744        ///If the field is unset, it is first initialized with the default value.
11745        pub fn package_id_mut(&mut self) -> &mut String {
11746            self.package_id.get_or_insert_default()
11747        }
11748        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11749        pub fn package_id_opt(&self) -> Option<&str> {
11750            self.package_id.as_ref().map(|field| field as _)
11751        }
11752        ///Sets `package_id` with the provided value.
11753        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11754            self.package_id = Some(field.into().into());
11755        }
11756        ///Sets `package_id` with the provided value.
11757        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11758            self.set_package_id(field.into());
11759            self
11760        }
11761        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11762        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11763            self.digest.as_mut().map(|field| field as _)
11764        }
11765        ///Returns a mutable reference to `digest`.
11766        ///If the field is unset, it is first initialized with the default value.
11767        pub fn digest_mut(&mut self) -> &mut String {
11768            self.digest.get_or_insert_default()
11769        }
11770        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11771        pub fn digest_opt(&self) -> Option<&str> {
11772            self.digest.as_ref().map(|field| field as _)
11773        }
11774        ///Sets `digest` with the provided value.
11775        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11776            self.digest = Some(field.into().into());
11777        }
11778        ///Sets `digest` with the provided value.
11779        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11780            self.set_digest(field.into());
11781            self
11782        }
11783        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11784        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11785            self.policy.as_mut().map(|field| field as _)
11786        }
11787        ///Returns a mutable reference to `policy`.
11788        ///If the field is unset, it is first initialized with the default value.
11789        pub fn policy_mut(&mut self) -> &mut u32 {
11790            self.policy.get_or_insert_default()
11791        }
11792        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11793        pub fn policy_opt(&self) -> Option<u32> {
11794            self.policy.as_ref().map(|field| *field)
11795        }
11796        ///Sets `policy` with the provided value.
11797        pub fn set_policy(&mut self, field: u32) {
11798            self.policy = Some(field);
11799        }
11800        ///Sets `policy` with the provided value.
11801        pub fn with_policy(mut self, field: u32) -> Self {
11802            self.set_policy(field);
11803            self
11804        }
11805        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11806        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11807            self.ticket_id.as_mut().map(|field| field as _)
11808        }
11809        ///Returns a mutable reference to `ticket_id`.
11810        ///If the field is unset, it is first initialized with the default value.
11811        pub fn ticket_id_mut(&mut self) -> &mut String {
11812            self.ticket_id.get_or_insert_default()
11813        }
11814        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11815        pub fn ticket_id_opt(&self) -> Option<&str> {
11816            self.ticket_id.as_ref().map(|field| field as _)
11817        }
11818        ///Sets `ticket_id` with the provided value.
11819        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11820            self.ticket_id = Some(field.into().into());
11821        }
11822        ///Sets `ticket_id` with the provided value.
11823        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11824            self.set_ticket_id(field.into());
11825            self
11826        }
11827    }
11828    impl super::PackageVersion {
11829        pub const fn const_default() -> Self {
11830            Self {
11831                package_id: None,
11832                version: None,
11833            }
11834        }
11835        #[doc(hidden)]
11836        pub fn default_instance() -> &'static Self {
11837            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11838            &DEFAULT
11839        }
11840        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11841        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11842            self.package_id.as_mut().map(|field| field as _)
11843        }
11844        ///Returns a mutable reference to `package_id`.
11845        ///If the field is unset, it is first initialized with the default value.
11846        pub fn package_id_mut(&mut self) -> &mut String {
11847            self.package_id.get_or_insert_default()
11848        }
11849        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11850        pub fn package_id_opt(&self) -> Option<&str> {
11851            self.package_id.as_ref().map(|field| field as _)
11852        }
11853        ///Sets `package_id` with the provided value.
11854        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11855            self.package_id = Some(field.into().into());
11856        }
11857        ///Sets `package_id` with the provided value.
11858        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11859            self.set_package_id(field.into());
11860            self
11861        }
11862        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11863        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11864            self.version.as_mut().map(|field| field as _)
11865        }
11866        ///Returns a mutable reference to `version`.
11867        ///If the field is unset, it is first initialized with the default value.
11868        pub fn version_mut(&mut self) -> &mut u64 {
11869            self.version.get_or_insert_default()
11870        }
11871        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11872        pub fn version_opt(&self) -> Option<u64> {
11873            self.version.as_ref().map(|field| *field)
11874        }
11875        ///Sets `version` with the provided value.
11876        pub fn set_version(&mut self, field: u64) {
11877            self.version = Some(field);
11878        }
11879        ///Sets `version` with the provided value.
11880        pub fn with_version(mut self, field: u64) -> Self {
11881            self.set_version(field);
11882            self
11883        }
11884    }
11885    impl super::PasskeyAuthenticator {
11886        pub const fn const_default() -> Self {
11887            Self {
11888                authenticator_data: None,
11889                client_data_json: None,
11890                signature: None,
11891            }
11892        }
11893        #[doc(hidden)]
11894        pub fn default_instance() -> &'static Self {
11895            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11896            &DEFAULT
11897        }
11898        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11899        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11900            self.authenticator_data.as_ref().map(|field| field as _)
11901        }
11902        ///Sets `authenticator_data` with the provided value.
11903        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11904            &mut self,
11905            field: T,
11906        ) {
11907            self.authenticator_data = Some(field.into().into());
11908        }
11909        ///Sets `authenticator_data` with the provided value.
11910        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11911            mut self,
11912            field: T,
11913        ) -> Self {
11914            self.set_authenticator_data(field.into());
11915            self
11916        }
11917        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11918        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11919            self.client_data_json.as_mut().map(|field| field as _)
11920        }
11921        ///Returns a mutable reference to `client_data_json`.
11922        ///If the field is unset, it is first initialized with the default value.
11923        pub fn client_data_json_mut(&mut self) -> &mut String {
11924            self.client_data_json.get_or_insert_default()
11925        }
11926        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11927        pub fn client_data_json_opt(&self) -> Option<&str> {
11928            self.client_data_json.as_ref().map(|field| field as _)
11929        }
11930        ///Sets `client_data_json` with the provided value.
11931        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11932            self.client_data_json = Some(field.into().into());
11933        }
11934        ///Sets `client_data_json` with the provided value.
11935        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11936            self.set_client_data_json(field.into());
11937            self
11938        }
11939        ///Returns the value of `signature`, or the default value if `signature` is unset.
11940        pub fn signature(&self) -> &super::SimpleSignature {
11941            self.signature
11942                .as_ref()
11943                .map(|field| field as _)
11944                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11945        }
11946        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11947        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11948            self.signature.as_mut().map(|field| field as _)
11949        }
11950        ///Returns a mutable reference to `signature`.
11951        ///If the field is unset, it is first initialized with the default value.
11952        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11953            self.signature.get_or_insert_default()
11954        }
11955        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11956        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11957            self.signature.as_ref().map(|field| field as _)
11958        }
11959        ///Sets `signature` with the provided value.
11960        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11961            self.signature = Some(field.into().into());
11962        }
11963        ///Sets `signature` with the provided value.
11964        pub fn with_signature<T: Into<super::SimpleSignature>>(
11965            mut self,
11966            field: T,
11967        ) -> Self {
11968            self.set_signature(field.into());
11969            self
11970        }
11971    }
11972    impl super::ProgrammableTransaction {
11973        pub const fn const_default() -> Self {
11974            Self {
11975                inputs: Vec::new(),
11976                commands: Vec::new(),
11977            }
11978        }
11979        #[doc(hidden)]
11980        pub fn default_instance() -> &'static Self {
11981            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11982            &DEFAULT
11983        }
11984        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11985        pub fn inputs(&self) -> &[super::Input] {
11986            &self.inputs
11987        }
11988        ///Returns a mutable reference to `inputs`.
11989        ///If the field is unset, it is first initialized with the default value.
11990        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11991            &mut self.inputs
11992        }
11993        ///Sets `inputs` with the provided value.
11994        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11995            self.inputs = field;
11996        }
11997        ///Sets `inputs` with the provided value.
11998        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11999            self.set_inputs(field);
12000            self
12001        }
12002        ///Returns the value of `commands`, or the default value if `commands` is unset.
12003        pub fn commands(&self) -> &[super::Command] {
12004            &self.commands
12005        }
12006        ///Returns a mutable reference to `commands`.
12007        ///If the field is unset, it is first initialized with the default value.
12008        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
12009            &mut self.commands
12010        }
12011        ///Sets `commands` with the provided value.
12012        pub fn set_commands(&mut self, field: Vec<super::Command>) {
12013            self.commands = field;
12014        }
12015        ///Sets `commands` with the provided value.
12016        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
12017            self.set_commands(field);
12018            self
12019        }
12020    }
12021    impl super::ProtocolConfig {
12022        pub const fn const_default() -> Self {
12023            Self {
12024                protocol_version: None,
12025                feature_flags: std::collections::BTreeMap::new(),
12026                attributes: std::collections::BTreeMap::new(),
12027                configs: std::collections::BTreeMap::new(),
12028            }
12029        }
12030        #[doc(hidden)]
12031        pub fn default_instance() -> &'static Self {
12032            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
12033            &DEFAULT
12034        }
12035        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12036        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
12037            self.protocol_version.as_mut().map(|field| field as _)
12038        }
12039        ///Returns a mutable reference to `protocol_version`.
12040        ///If the field is unset, it is first initialized with the default value.
12041        pub fn protocol_version_mut(&mut self) -> &mut u64 {
12042            self.protocol_version.get_or_insert_default()
12043        }
12044        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12045        pub fn protocol_version_opt(&self) -> Option<u64> {
12046            self.protocol_version.as_ref().map(|field| *field)
12047        }
12048        ///Sets `protocol_version` with the provided value.
12049        pub fn set_protocol_version(&mut self, field: u64) {
12050            self.protocol_version = Some(field);
12051        }
12052        ///Sets `protocol_version` with the provided value.
12053        pub fn with_protocol_version(mut self, field: u64) -> Self {
12054            self.set_protocol_version(field);
12055            self
12056        }
12057        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
12058        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
12059            &self.feature_flags
12060        }
12061        ///Returns a mutable reference to `feature_flags`.
12062        ///If the field is unset, it is first initialized with the default value.
12063        pub fn feature_flags_mut(
12064            &mut self,
12065        ) -> &mut ::std::collections::BTreeMap<String, bool> {
12066            &mut self.feature_flags
12067        }
12068        ///Sets `feature_flags` with the provided value.
12069        pub fn set_feature_flags(
12070            &mut self,
12071            field: ::std::collections::BTreeMap<String, bool>,
12072        ) {
12073            self.feature_flags = field;
12074        }
12075        ///Sets `feature_flags` with the provided value.
12076        pub fn with_feature_flags(
12077            mut self,
12078            field: ::std::collections::BTreeMap<String, bool>,
12079        ) -> Self {
12080            self.set_feature_flags(field);
12081            self
12082        }
12083        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
12084        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
12085            &self.attributes
12086        }
12087        ///Returns a mutable reference to `attributes`.
12088        ///If the field is unset, it is first initialized with the default value.
12089        pub fn attributes_mut(
12090            &mut self,
12091        ) -> &mut ::std::collections::BTreeMap<String, String> {
12092            &mut self.attributes
12093        }
12094        ///Sets `attributes` with the provided value.
12095        pub fn set_attributes(
12096            &mut self,
12097            field: ::std::collections::BTreeMap<String, String>,
12098        ) {
12099            self.attributes = field;
12100        }
12101        ///Sets `attributes` with the provided value.
12102        pub fn with_attributes(
12103            mut self,
12104            field: ::std::collections::BTreeMap<String, String>,
12105        ) -> Self {
12106            self.set_attributes(field);
12107            self
12108        }
12109        ///Returns the value of `configs`, or the default value if `configs` is unset.
12110        pub fn configs(
12111            &self,
12112        ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
12113            &self.configs
12114        }
12115        ///Returns a mutable reference to `configs`.
12116        ///If the field is unset, it is first initialized with the default value.
12117        pub fn configs_mut(
12118            &mut self,
12119        ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
12120            &mut self.configs
12121        }
12122        ///Sets `configs` with the provided value.
12123        pub fn set_configs(
12124            &mut self,
12125            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
12126        ) {
12127            self.configs = field;
12128        }
12129        ///Sets `configs` with the provided value.
12130        pub fn with_configs(
12131            mut self,
12132            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
12133        ) -> Self {
12134            self.set_configs(field);
12135            self
12136        }
12137    }
12138    impl super::Publish {
12139        pub const fn const_default() -> Self {
12140            Self {
12141                modules: Vec::new(),
12142                dependencies: Vec::new(),
12143            }
12144        }
12145        #[doc(hidden)]
12146        pub fn default_instance() -> &'static Self {
12147            static DEFAULT: super::Publish = super::Publish::const_default();
12148            &DEFAULT
12149        }
12150        ///Returns the value of `modules`, or the default value if `modules` is unset.
12151        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12152            &self.modules
12153        }
12154        ///Returns a mutable reference to `modules`.
12155        ///If the field is unset, it is first initialized with the default value.
12156        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12157            &mut self.modules
12158        }
12159        ///Sets `modules` with the provided value.
12160        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12161            self.modules = field;
12162        }
12163        ///Sets `modules` with the provided value.
12164        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12165            self.set_modules(field);
12166            self
12167        }
12168        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
12169        pub fn dependencies(&self) -> &[String] {
12170            &self.dependencies
12171        }
12172        ///Returns a mutable reference to `dependencies`.
12173        ///If the field is unset, it is first initialized with the default value.
12174        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12175            &mut self.dependencies
12176        }
12177        ///Sets `dependencies` with the provided value.
12178        pub fn set_dependencies(&mut self, field: Vec<String>) {
12179            self.dependencies = field;
12180        }
12181        ///Sets `dependencies` with the provided value.
12182        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12183            self.set_dependencies(field);
12184            self
12185        }
12186    }
12187    impl super::RandomnessStateUpdate {
12188        pub const fn const_default() -> Self {
12189            Self {
12190                epoch: None,
12191                randomness_round: None,
12192                random_bytes: None,
12193                randomness_object_initial_shared_version: None,
12194            }
12195        }
12196        #[doc(hidden)]
12197        pub fn default_instance() -> &'static Self {
12198            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
12199            &DEFAULT
12200        }
12201        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12202        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
12203            self.epoch.as_mut().map(|field| field as _)
12204        }
12205        ///Returns a mutable reference to `epoch`.
12206        ///If the field is unset, it is first initialized with the default value.
12207        pub fn epoch_mut(&mut self) -> &mut u64 {
12208            self.epoch.get_or_insert_default()
12209        }
12210        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12211        pub fn epoch_opt(&self) -> Option<u64> {
12212            self.epoch.as_ref().map(|field| *field)
12213        }
12214        ///Sets `epoch` with the provided value.
12215        pub fn set_epoch(&mut self, field: u64) {
12216            self.epoch = Some(field);
12217        }
12218        ///Sets `epoch` with the provided value.
12219        pub fn with_epoch(mut self, field: u64) -> Self {
12220            self.set_epoch(field);
12221            self
12222        }
12223        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12224        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12225            self.randomness_round.as_mut().map(|field| field as _)
12226        }
12227        ///Returns a mutable reference to `randomness_round`.
12228        ///If the field is unset, it is first initialized with the default value.
12229        pub fn randomness_round_mut(&mut self) -> &mut u64 {
12230            self.randomness_round.get_or_insert_default()
12231        }
12232        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
12233        pub fn randomness_round_opt(&self) -> Option<u64> {
12234            self.randomness_round.as_ref().map(|field| *field)
12235        }
12236        ///Sets `randomness_round` with the provided value.
12237        pub fn set_randomness_round(&mut self, field: u64) {
12238            self.randomness_round = Some(field);
12239        }
12240        ///Sets `randomness_round` with the provided value.
12241        pub fn with_randomness_round(mut self, field: u64) -> Self {
12242            self.set_randomness_round(field);
12243            self
12244        }
12245        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
12246        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12247            self.random_bytes.as_ref().map(|field| field as _)
12248        }
12249        ///Sets `random_bytes` with the provided value.
12250        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12251            self.random_bytes = Some(field.into().into());
12252        }
12253        ///Sets `random_bytes` with the provided value.
12254        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12255            mut self,
12256            field: T,
12257        ) -> Self {
12258            self.set_random_bytes(field.into());
12259            self
12260        }
12261        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12262        pub fn randomness_object_initial_shared_version_opt_mut(
12263            &mut self,
12264        ) -> Option<&mut u64> {
12265            self.randomness_object_initial_shared_version
12266                .as_mut()
12267                .map(|field| field as _)
12268        }
12269        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
12270        ///If the field is unset, it is first initialized with the default value.
12271        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12272            self.randomness_object_initial_shared_version.get_or_insert_default()
12273        }
12274        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12275        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12276            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12277        }
12278        ///Sets `randomness_object_initial_shared_version` with the provided value.
12279        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12280            self.randomness_object_initial_shared_version = Some(field);
12281        }
12282        ///Sets `randomness_object_initial_shared_version` with the provided value.
12283        pub fn with_randomness_object_initial_shared_version(
12284            mut self,
12285            field: u64,
12286        ) -> Self {
12287            self.set_randomness_object_initial_shared_version(field);
12288            self
12289        }
12290    }
12291    impl super::RegulatedCoinMetadata {
12292        pub const fn const_default() -> Self {
12293            Self {
12294                id: None,
12295                coin_metadata_object: None,
12296                deny_cap_object: None,
12297                allow_global_pause: None,
12298                variant: None,
12299                coin_regulated_state: None,
12300            }
12301        }
12302        #[doc(hidden)]
12303        pub fn default_instance() -> &'static Self {
12304            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12305            &DEFAULT
12306        }
12307        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12308        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12309            self.id.as_mut().map(|field| field as _)
12310        }
12311        ///Returns a mutable reference to `id`.
12312        ///If the field is unset, it is first initialized with the default value.
12313        pub fn id_mut(&mut self) -> &mut String {
12314            self.id.get_or_insert_default()
12315        }
12316        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12317        pub fn id_opt(&self) -> Option<&str> {
12318            self.id.as_ref().map(|field| field as _)
12319        }
12320        ///Sets `id` with the provided value.
12321        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12322            self.id = Some(field.into().into());
12323        }
12324        ///Sets `id` with the provided value.
12325        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12326            self.set_id(field.into());
12327            self
12328        }
12329        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12330        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12331            self.coin_metadata_object.as_mut().map(|field| field as _)
12332        }
12333        ///Returns a mutable reference to `coin_metadata_object`.
12334        ///If the field is unset, it is first initialized with the default value.
12335        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12336            self.coin_metadata_object.get_or_insert_default()
12337        }
12338        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12339        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12340            self.coin_metadata_object.as_ref().map(|field| field as _)
12341        }
12342        ///Sets `coin_metadata_object` with the provided value.
12343        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12344            self.coin_metadata_object = Some(field.into().into());
12345        }
12346        ///Sets `coin_metadata_object` with the provided value.
12347        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12348            self.set_coin_metadata_object(field.into());
12349            self
12350        }
12351        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12352        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12353            self.deny_cap_object.as_mut().map(|field| field as _)
12354        }
12355        ///Returns a mutable reference to `deny_cap_object`.
12356        ///If the field is unset, it is first initialized with the default value.
12357        pub fn deny_cap_object_mut(&mut self) -> &mut String {
12358            self.deny_cap_object.get_or_insert_default()
12359        }
12360        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12361        pub fn deny_cap_object_opt(&self) -> Option<&str> {
12362            self.deny_cap_object.as_ref().map(|field| field as _)
12363        }
12364        ///Sets `deny_cap_object` with the provided value.
12365        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12366            self.deny_cap_object = Some(field.into().into());
12367        }
12368        ///Sets `deny_cap_object` with the provided value.
12369        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12370            self.set_deny_cap_object(field.into());
12371            self
12372        }
12373        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12374        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12375            self.allow_global_pause.as_mut().map(|field| field as _)
12376        }
12377        ///Returns a mutable reference to `allow_global_pause`.
12378        ///If the field is unset, it is first initialized with the default value.
12379        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12380            self.allow_global_pause.get_or_insert_default()
12381        }
12382        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
12383        pub fn allow_global_pause_opt(&self) -> Option<bool> {
12384            self.allow_global_pause.as_ref().map(|field| *field)
12385        }
12386        ///Sets `allow_global_pause` with the provided value.
12387        pub fn set_allow_global_pause(&mut self, field: bool) {
12388            self.allow_global_pause = Some(field);
12389        }
12390        ///Sets `allow_global_pause` with the provided value.
12391        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12392            self.set_allow_global_pause(field);
12393            self
12394        }
12395        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12396        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12397            self.variant.as_mut().map(|field| field as _)
12398        }
12399        ///Returns a mutable reference to `variant`.
12400        ///If the field is unset, it is first initialized with the default value.
12401        pub fn variant_mut(&mut self) -> &mut u32 {
12402            self.variant.get_or_insert_default()
12403        }
12404        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
12405        pub fn variant_opt(&self) -> Option<u32> {
12406            self.variant.as_ref().map(|field| *field)
12407        }
12408        ///Sets `variant` with the provided value.
12409        pub fn set_variant(&mut self, field: u32) {
12410            self.variant = Some(field);
12411        }
12412        ///Sets `variant` with the provided value.
12413        pub fn with_variant(mut self, field: u32) -> Self {
12414            self.set_variant(field);
12415            self
12416        }
12417        ///Sets `coin_regulated_state` with the provided value.
12418        pub fn with_coin_regulated_state<
12419            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12420        >(mut self, field: T) -> Self {
12421            self.set_coin_regulated_state(field.into());
12422            self
12423        }
12424    }
12425    impl super::ReverseLookupNameRequest {
12426        pub const fn const_default() -> Self {
12427            Self { address: None }
12428        }
12429        #[doc(hidden)]
12430        pub fn default_instance() -> &'static Self {
12431            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12432            &DEFAULT
12433        }
12434        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12435        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12436            self.address.as_mut().map(|field| field as _)
12437        }
12438        ///Returns a mutable reference to `address`.
12439        ///If the field is unset, it is first initialized with the default value.
12440        pub fn address_mut(&mut self) -> &mut String {
12441            self.address.get_or_insert_default()
12442        }
12443        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12444        pub fn address_opt(&self) -> Option<&str> {
12445            self.address.as_ref().map(|field| field as _)
12446        }
12447        ///Sets `address` with the provided value.
12448        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12449            self.address = Some(field.into().into());
12450        }
12451        ///Sets `address` with the provided value.
12452        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12453            self.set_address(field.into());
12454            self
12455        }
12456    }
12457    impl super::ReverseLookupNameResponse {
12458        pub const fn const_default() -> Self {
12459            Self { record: None }
12460        }
12461        #[doc(hidden)]
12462        pub fn default_instance() -> &'static Self {
12463            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12464            &DEFAULT
12465        }
12466        ///Returns the value of `record`, or the default value if `record` is unset.
12467        pub fn record(&self) -> &super::NameRecord {
12468            self.record
12469                .as_ref()
12470                .map(|field| field as _)
12471                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12472        }
12473        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12474        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12475            self.record.as_mut().map(|field| field as _)
12476        }
12477        ///Returns a mutable reference to `record`.
12478        ///If the field is unset, it is first initialized with the default value.
12479        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12480            self.record.get_or_insert_default()
12481        }
12482        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12483        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12484            self.record.as_ref().map(|field| field as _)
12485        }
12486        ///Sets `record` with the provided value.
12487        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12488            self.record = Some(field.into().into());
12489        }
12490        ///Sets `record` with the provided value.
12491        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12492            self.set_record(field.into());
12493            self
12494        }
12495    }
12496    impl super::SimpleSignature {
12497        pub const fn const_default() -> Self {
12498            Self {
12499                scheme: None,
12500                signature: None,
12501                public_key: None,
12502            }
12503        }
12504        #[doc(hidden)]
12505        pub fn default_instance() -> &'static Self {
12506            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12507            &DEFAULT
12508        }
12509        ///Sets `scheme` with the provided value.
12510        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12511            self.set_scheme(field.into());
12512            self
12513        }
12514        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12515        pub fn signature_opt(&self) -> Option<&[u8]> {
12516            self.signature.as_ref().map(|field| field as _)
12517        }
12518        ///Sets `signature` with the provided value.
12519        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12520            self.signature = Some(field.into().into());
12521        }
12522        ///Sets `signature` with the provided value.
12523        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12524            mut self,
12525            field: T,
12526        ) -> Self {
12527            self.set_signature(field.into());
12528            self
12529        }
12530        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12531        pub fn public_key_opt(&self) -> Option<&[u8]> {
12532            self.public_key.as_ref().map(|field| field as _)
12533        }
12534        ///Sets `public_key` with the provided value.
12535        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12536            self.public_key = Some(field.into().into());
12537        }
12538        ///Sets `public_key` with the provided value.
12539        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12540            mut self,
12541            field: T,
12542        ) -> Self {
12543            self.set_public_key(field.into());
12544            self
12545        }
12546    }
12547    impl super::SimulateTransactionRequest {
12548        pub const fn const_default() -> Self {
12549            Self {
12550                transaction: None,
12551                read_mask: None,
12552                checks: None,
12553                do_gas_selection: None,
12554            }
12555        }
12556        #[doc(hidden)]
12557        pub fn default_instance() -> &'static Self {
12558            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12559            &DEFAULT
12560        }
12561        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12562        pub fn transaction(&self) -> &super::Transaction {
12563            self.transaction
12564                .as_ref()
12565                .map(|field| field as _)
12566                .unwrap_or_else(|| super::Transaction::default_instance() as _)
12567        }
12568        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12569        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12570            self.transaction.as_mut().map(|field| field as _)
12571        }
12572        ///Returns a mutable reference to `transaction`.
12573        ///If the field is unset, it is first initialized with the default value.
12574        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12575            self.transaction.get_or_insert_default()
12576        }
12577        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12578        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12579            self.transaction.as_ref().map(|field| field as _)
12580        }
12581        ///Sets `transaction` with the provided value.
12582        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12583            self.transaction = Some(field.into().into());
12584        }
12585        ///Sets `transaction` with the provided value.
12586        pub fn with_transaction<T: Into<super::Transaction>>(
12587            mut self,
12588            field: T,
12589        ) -> Self {
12590            self.set_transaction(field.into());
12591            self
12592        }
12593        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12594        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12595            self.read_mask.as_mut().map(|field| field as _)
12596        }
12597        ///Returns a mutable reference to `read_mask`.
12598        ///If the field is unset, it is first initialized with the default value.
12599        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12600            self.read_mask.get_or_insert_default()
12601        }
12602        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12603        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12604            self.read_mask.as_ref().map(|field| field as _)
12605        }
12606        ///Sets `read_mask` with the provided value.
12607        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12608            self.read_mask = Some(field.into().into());
12609        }
12610        ///Sets `read_mask` with the provided value.
12611        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12612            mut self,
12613            field: T,
12614        ) -> Self {
12615            self.set_read_mask(field.into());
12616            self
12617        }
12618        ///Sets `checks` with the provided value.
12619        pub fn with_checks<
12620            T: Into<super::simulate_transaction_request::TransactionChecks>,
12621        >(mut self, field: T) -> Self {
12622            self.set_checks(field.into());
12623            self
12624        }
12625        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12626        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12627            self.do_gas_selection.as_mut().map(|field| field as _)
12628        }
12629        ///Returns a mutable reference to `do_gas_selection`.
12630        ///If the field is unset, it is first initialized with the default value.
12631        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12632            self.do_gas_selection.get_or_insert_default()
12633        }
12634        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12635        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12636            self.do_gas_selection.as_ref().map(|field| *field)
12637        }
12638        ///Sets `do_gas_selection` with the provided value.
12639        pub fn set_do_gas_selection(&mut self, field: bool) {
12640            self.do_gas_selection = Some(field);
12641        }
12642        ///Sets `do_gas_selection` with the provided value.
12643        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12644            self.set_do_gas_selection(field);
12645            self
12646        }
12647    }
12648    impl super::SimulateTransactionResponse {
12649        pub const fn const_default() -> Self {
12650            Self {
12651                transaction: None,
12652                command_outputs: Vec::new(),
12653                suggested_gas_price: None,
12654            }
12655        }
12656        #[doc(hidden)]
12657        pub fn default_instance() -> &'static Self {
12658            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12659            &DEFAULT
12660        }
12661        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12662        pub fn transaction(&self) -> &super::ExecutedTransaction {
12663            self.transaction
12664                .as_ref()
12665                .map(|field| field as _)
12666                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12667        }
12668        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12669        pub fn transaction_opt_mut(
12670            &mut self,
12671        ) -> Option<&mut super::ExecutedTransaction> {
12672            self.transaction.as_mut().map(|field| field as _)
12673        }
12674        ///Returns a mutable reference to `transaction`.
12675        ///If the field is unset, it is first initialized with the default value.
12676        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12677            self.transaction.get_or_insert_default()
12678        }
12679        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12680        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12681            self.transaction.as_ref().map(|field| field as _)
12682        }
12683        ///Sets `transaction` with the provided value.
12684        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12685            &mut self,
12686            field: T,
12687        ) {
12688            self.transaction = Some(field.into().into());
12689        }
12690        ///Sets `transaction` with the provided value.
12691        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12692            mut self,
12693            field: T,
12694        ) -> Self {
12695            self.set_transaction(field.into());
12696            self
12697        }
12698        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12699        pub fn command_outputs(&self) -> &[super::CommandResult] {
12700            &self.command_outputs
12701        }
12702        ///Returns a mutable reference to `command_outputs`.
12703        ///If the field is unset, it is first initialized with the default value.
12704        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12705            &mut self.command_outputs
12706        }
12707        ///Sets `command_outputs` with the provided value.
12708        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12709            self.command_outputs = field;
12710        }
12711        ///Sets `command_outputs` with the provided value.
12712        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12713            self.set_command_outputs(field);
12714            self
12715        }
12716        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12717        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
12718            self.suggested_gas_price.as_mut().map(|field| field as _)
12719        }
12720        ///Returns a mutable reference to `suggested_gas_price`.
12721        ///If the field is unset, it is first initialized with the default value.
12722        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
12723            self.suggested_gas_price.get_or_insert_default()
12724        }
12725        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
12726        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
12727            self.suggested_gas_price.as_ref().map(|field| *field)
12728        }
12729        ///Sets `suggested_gas_price` with the provided value.
12730        pub fn set_suggested_gas_price(&mut self, field: u64) {
12731            self.suggested_gas_price = Some(field);
12732        }
12733        ///Sets `suggested_gas_price` with the provided value.
12734        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
12735            self.set_suggested_gas_price(field);
12736            self
12737        }
12738    }
12739    impl super::SizeError {
12740        pub const fn const_default() -> Self {
12741            Self { size: None, max_size: None }
12742        }
12743        #[doc(hidden)]
12744        pub fn default_instance() -> &'static Self {
12745            static DEFAULT: super::SizeError = super::SizeError::const_default();
12746            &DEFAULT
12747        }
12748        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12749        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12750            self.size.as_mut().map(|field| field as _)
12751        }
12752        ///Returns a mutable reference to `size`.
12753        ///If the field is unset, it is first initialized with the default value.
12754        pub fn size_mut(&mut self) -> &mut u64 {
12755            self.size.get_or_insert_default()
12756        }
12757        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12758        pub fn size_opt(&self) -> Option<u64> {
12759            self.size.as_ref().map(|field| *field)
12760        }
12761        ///Sets `size` with the provided value.
12762        pub fn set_size(&mut self, field: u64) {
12763            self.size = Some(field);
12764        }
12765        ///Sets `size` with the provided value.
12766        pub fn with_size(mut self, field: u64) -> Self {
12767            self.set_size(field);
12768            self
12769        }
12770        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12771        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12772            self.max_size.as_mut().map(|field| field as _)
12773        }
12774        ///Returns a mutable reference to `max_size`.
12775        ///If the field is unset, it is first initialized with the default value.
12776        pub fn max_size_mut(&mut self) -> &mut u64 {
12777            self.max_size.get_or_insert_default()
12778        }
12779        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12780        pub fn max_size_opt(&self) -> Option<u64> {
12781            self.max_size.as_ref().map(|field| *field)
12782        }
12783        ///Sets `max_size` with the provided value.
12784        pub fn set_max_size(&mut self, field: u64) {
12785            self.max_size = Some(field);
12786        }
12787        ///Sets `max_size` with the provided value.
12788        pub fn with_max_size(mut self, field: u64) -> Self {
12789            self.set_max_size(field);
12790            self
12791        }
12792    }
12793    impl super::SplitCoins {
12794        pub const fn const_default() -> Self {
12795            Self {
12796                coin: None,
12797                amounts: Vec::new(),
12798            }
12799        }
12800        #[doc(hidden)]
12801        pub fn default_instance() -> &'static Self {
12802            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12803            &DEFAULT
12804        }
12805        ///Returns the value of `coin`, or the default value if `coin` is unset.
12806        pub fn coin(&self) -> &super::Argument {
12807            self.coin
12808                .as_ref()
12809                .map(|field| field as _)
12810                .unwrap_or_else(|| super::Argument::default_instance() as _)
12811        }
12812        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12813        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12814            self.coin.as_mut().map(|field| field as _)
12815        }
12816        ///Returns a mutable reference to `coin`.
12817        ///If the field is unset, it is first initialized with the default value.
12818        pub fn coin_mut(&mut self) -> &mut super::Argument {
12819            self.coin.get_or_insert_default()
12820        }
12821        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12822        pub fn coin_opt(&self) -> Option<&super::Argument> {
12823            self.coin.as_ref().map(|field| field as _)
12824        }
12825        ///Sets `coin` with the provided value.
12826        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12827            self.coin = Some(field.into().into());
12828        }
12829        ///Sets `coin` with the provided value.
12830        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12831            self.set_coin(field.into());
12832            self
12833        }
12834        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12835        pub fn amounts(&self) -> &[super::Argument] {
12836            &self.amounts
12837        }
12838        ///Returns a mutable reference to `amounts`.
12839        ///If the field is unset, it is first initialized with the default value.
12840        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12841            &mut self.amounts
12842        }
12843        ///Sets `amounts` with the provided value.
12844        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12845            self.amounts = field;
12846        }
12847        ///Sets `amounts` with the provided value.
12848        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12849            self.set_amounts(field);
12850            self
12851        }
12852    }
12853    impl super::StakeSubsidy {
12854        pub const fn const_default() -> Self {
12855            Self {
12856                balance: None,
12857                distribution_counter: None,
12858                current_distribution_amount: None,
12859                stake_subsidy_period_length: None,
12860                stake_subsidy_decrease_rate: None,
12861                extra_fields: None,
12862            }
12863        }
12864        #[doc(hidden)]
12865        pub fn default_instance() -> &'static Self {
12866            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12867            &DEFAULT
12868        }
12869        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12870        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12871            self.balance.as_mut().map(|field| field as _)
12872        }
12873        ///Returns a mutable reference to `balance`.
12874        ///If the field is unset, it is first initialized with the default value.
12875        pub fn balance_mut(&mut self) -> &mut u64 {
12876            self.balance.get_or_insert_default()
12877        }
12878        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12879        pub fn balance_opt(&self) -> Option<u64> {
12880            self.balance.as_ref().map(|field| *field)
12881        }
12882        ///Sets `balance` with the provided value.
12883        pub fn set_balance(&mut self, field: u64) {
12884            self.balance = Some(field);
12885        }
12886        ///Sets `balance` with the provided value.
12887        pub fn with_balance(mut self, field: u64) -> Self {
12888            self.set_balance(field);
12889            self
12890        }
12891        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12892        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12893            self.distribution_counter.as_mut().map(|field| field as _)
12894        }
12895        ///Returns a mutable reference to `distribution_counter`.
12896        ///If the field is unset, it is first initialized with the default value.
12897        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12898            self.distribution_counter.get_or_insert_default()
12899        }
12900        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12901        pub fn distribution_counter_opt(&self) -> Option<u64> {
12902            self.distribution_counter.as_ref().map(|field| *field)
12903        }
12904        ///Sets `distribution_counter` with the provided value.
12905        pub fn set_distribution_counter(&mut self, field: u64) {
12906            self.distribution_counter = Some(field);
12907        }
12908        ///Sets `distribution_counter` with the provided value.
12909        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12910            self.set_distribution_counter(field);
12911            self
12912        }
12913        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12914        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12915            self.current_distribution_amount.as_mut().map(|field| field as _)
12916        }
12917        ///Returns a mutable reference to `current_distribution_amount`.
12918        ///If the field is unset, it is first initialized with the default value.
12919        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12920            self.current_distribution_amount.get_or_insert_default()
12921        }
12922        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12923        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12924            self.current_distribution_amount.as_ref().map(|field| *field)
12925        }
12926        ///Sets `current_distribution_amount` with the provided value.
12927        pub fn set_current_distribution_amount(&mut self, field: u64) {
12928            self.current_distribution_amount = Some(field);
12929        }
12930        ///Sets `current_distribution_amount` with the provided value.
12931        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12932            self.set_current_distribution_amount(field);
12933            self
12934        }
12935        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12936        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12937            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12938        }
12939        ///Returns a mutable reference to `stake_subsidy_period_length`.
12940        ///If the field is unset, it is first initialized with the default value.
12941        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12942            self.stake_subsidy_period_length.get_or_insert_default()
12943        }
12944        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12945        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12946            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12947        }
12948        ///Sets `stake_subsidy_period_length` with the provided value.
12949        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12950            self.stake_subsidy_period_length = Some(field);
12951        }
12952        ///Sets `stake_subsidy_period_length` with the provided value.
12953        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12954            self.set_stake_subsidy_period_length(field);
12955            self
12956        }
12957        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12958        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12959            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12960        }
12961        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12962        ///If the field is unset, it is first initialized with the default value.
12963        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12964            self.stake_subsidy_decrease_rate.get_or_insert_default()
12965        }
12966        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12967        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12968            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12969        }
12970        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12971        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12972            self.stake_subsidy_decrease_rate = Some(field);
12973        }
12974        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12975        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12976            self.set_stake_subsidy_decrease_rate(field);
12977            self
12978        }
12979        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12980        pub fn extra_fields(&self) -> &super::MoveTable {
12981            self.extra_fields
12982                .as_ref()
12983                .map(|field| field as _)
12984                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12985        }
12986        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12987        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12988            self.extra_fields.as_mut().map(|field| field as _)
12989        }
12990        ///Returns a mutable reference to `extra_fields`.
12991        ///If the field is unset, it is first initialized with the default value.
12992        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12993            self.extra_fields.get_or_insert_default()
12994        }
12995        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12996        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12997            self.extra_fields.as_ref().map(|field| field as _)
12998        }
12999        ///Sets `extra_fields` with the provided value.
13000        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13001            self.extra_fields = Some(field.into().into());
13002        }
13003        ///Sets `extra_fields` with the provided value.
13004        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13005            self.set_extra_fields(field.into());
13006            self
13007        }
13008    }
13009    impl super::StakingPool {
13010        pub const fn const_default() -> Self {
13011            Self {
13012                id: None,
13013                activation_epoch: None,
13014                deactivation_epoch: None,
13015                sui_balance: None,
13016                rewards_pool: None,
13017                pool_token_balance: None,
13018                exchange_rates: None,
13019                pending_stake: None,
13020                pending_total_sui_withdraw: None,
13021                pending_pool_token_withdraw: None,
13022                extra_fields: None,
13023            }
13024        }
13025        #[doc(hidden)]
13026        pub fn default_instance() -> &'static Self {
13027            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
13028            &DEFAULT
13029        }
13030        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13031        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13032            self.id.as_mut().map(|field| field as _)
13033        }
13034        ///Returns a mutable reference to `id`.
13035        ///If the field is unset, it is first initialized with the default value.
13036        pub fn id_mut(&mut self) -> &mut String {
13037            self.id.get_or_insert_default()
13038        }
13039        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13040        pub fn id_opt(&self) -> Option<&str> {
13041            self.id.as_ref().map(|field| field as _)
13042        }
13043        ///Sets `id` with the provided value.
13044        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13045            self.id = Some(field.into().into());
13046        }
13047        ///Sets `id` with the provided value.
13048        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13049            self.set_id(field.into());
13050            self
13051        }
13052        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13053        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13054            self.activation_epoch.as_mut().map(|field| field as _)
13055        }
13056        ///Returns a mutable reference to `activation_epoch`.
13057        ///If the field is unset, it is first initialized with the default value.
13058        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
13059            self.activation_epoch.get_or_insert_default()
13060        }
13061        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13062        pub fn activation_epoch_opt(&self) -> Option<u64> {
13063            self.activation_epoch.as_ref().map(|field| *field)
13064        }
13065        ///Sets `activation_epoch` with the provided value.
13066        pub fn set_activation_epoch(&mut self, field: u64) {
13067            self.activation_epoch = Some(field);
13068        }
13069        ///Sets `activation_epoch` with the provided value.
13070        pub fn with_activation_epoch(mut self, field: u64) -> Self {
13071            self.set_activation_epoch(field);
13072            self
13073        }
13074        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13075        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13076            self.deactivation_epoch.as_mut().map(|field| field as _)
13077        }
13078        ///Returns a mutable reference to `deactivation_epoch`.
13079        ///If the field is unset, it is first initialized with the default value.
13080        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
13081            self.deactivation_epoch.get_or_insert_default()
13082        }
13083        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13084        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
13085            self.deactivation_epoch.as_ref().map(|field| *field)
13086        }
13087        ///Sets `deactivation_epoch` with the provided value.
13088        pub fn set_deactivation_epoch(&mut self, field: u64) {
13089            self.deactivation_epoch = Some(field);
13090        }
13091        ///Sets `deactivation_epoch` with the provided value.
13092        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
13093            self.set_deactivation_epoch(field);
13094            self
13095        }
13096        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13097        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
13098            self.sui_balance.as_mut().map(|field| field as _)
13099        }
13100        ///Returns a mutable reference to `sui_balance`.
13101        ///If the field is unset, it is first initialized with the default value.
13102        pub fn sui_balance_mut(&mut self) -> &mut u64 {
13103            self.sui_balance.get_or_insert_default()
13104        }
13105        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13106        pub fn sui_balance_opt(&self) -> Option<u64> {
13107            self.sui_balance.as_ref().map(|field| *field)
13108        }
13109        ///Sets `sui_balance` with the provided value.
13110        pub fn set_sui_balance(&mut self, field: u64) {
13111            self.sui_balance = Some(field);
13112        }
13113        ///Sets `sui_balance` with the provided value.
13114        pub fn with_sui_balance(mut self, field: u64) -> Self {
13115            self.set_sui_balance(field);
13116            self
13117        }
13118        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13119        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
13120            self.rewards_pool.as_mut().map(|field| field as _)
13121        }
13122        ///Returns a mutable reference to `rewards_pool`.
13123        ///If the field is unset, it is first initialized with the default value.
13124        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
13125            self.rewards_pool.get_or_insert_default()
13126        }
13127        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
13128        pub fn rewards_pool_opt(&self) -> Option<u64> {
13129            self.rewards_pool.as_ref().map(|field| *field)
13130        }
13131        ///Sets `rewards_pool` with the provided value.
13132        pub fn set_rewards_pool(&mut self, field: u64) {
13133            self.rewards_pool = Some(field);
13134        }
13135        ///Sets `rewards_pool` with the provided value.
13136        pub fn with_rewards_pool(mut self, field: u64) -> Self {
13137            self.set_rewards_pool(field);
13138            self
13139        }
13140        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13141        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
13142            self.pool_token_balance.as_mut().map(|field| field as _)
13143        }
13144        ///Returns a mutable reference to `pool_token_balance`.
13145        ///If the field is unset, it is first initialized with the default value.
13146        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
13147            self.pool_token_balance.get_or_insert_default()
13148        }
13149        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13150        pub fn pool_token_balance_opt(&self) -> Option<u64> {
13151            self.pool_token_balance.as_ref().map(|field| *field)
13152        }
13153        ///Sets `pool_token_balance` with the provided value.
13154        pub fn set_pool_token_balance(&mut self, field: u64) {
13155            self.pool_token_balance = Some(field);
13156        }
13157        ///Sets `pool_token_balance` with the provided value.
13158        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
13159            self.set_pool_token_balance(field);
13160            self
13161        }
13162        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
13163        pub fn exchange_rates(&self) -> &super::MoveTable {
13164            self.exchange_rates
13165                .as_ref()
13166                .map(|field| field as _)
13167                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13168        }
13169        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13170        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13171            self.exchange_rates.as_mut().map(|field| field as _)
13172        }
13173        ///Returns a mutable reference to `exchange_rates`.
13174        ///If the field is unset, it is first initialized with the default value.
13175        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
13176            self.exchange_rates.get_or_insert_default()
13177        }
13178        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13179        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
13180            self.exchange_rates.as_ref().map(|field| field as _)
13181        }
13182        ///Sets `exchange_rates` with the provided value.
13183        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
13184            self.exchange_rates = Some(field.into().into());
13185        }
13186        ///Sets `exchange_rates` with the provided value.
13187        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
13188            mut self,
13189            field: T,
13190        ) -> Self {
13191            self.set_exchange_rates(field.into());
13192            self
13193        }
13194        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13195        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
13196            self.pending_stake.as_mut().map(|field| field as _)
13197        }
13198        ///Returns a mutable reference to `pending_stake`.
13199        ///If the field is unset, it is first initialized with the default value.
13200        pub fn pending_stake_mut(&mut self) -> &mut u64 {
13201            self.pending_stake.get_or_insert_default()
13202        }
13203        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13204        pub fn pending_stake_opt(&self) -> Option<u64> {
13205            self.pending_stake.as_ref().map(|field| *field)
13206        }
13207        ///Sets `pending_stake` with the provided value.
13208        pub fn set_pending_stake(&mut self, field: u64) {
13209            self.pending_stake = Some(field);
13210        }
13211        ///Sets `pending_stake` with the provided value.
13212        pub fn with_pending_stake(mut self, field: u64) -> Self {
13213            self.set_pending_stake(field);
13214            self
13215        }
13216        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13217        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13218            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
13219        }
13220        ///Returns a mutable reference to `pending_total_sui_withdraw`.
13221        ///If the field is unset, it is first initialized with the default value.
13222        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
13223            self.pending_total_sui_withdraw.get_or_insert_default()
13224        }
13225        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13226        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
13227            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
13228        }
13229        ///Sets `pending_total_sui_withdraw` with the provided value.
13230        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
13231            self.pending_total_sui_withdraw = Some(field);
13232        }
13233        ///Sets `pending_total_sui_withdraw` with the provided value.
13234        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
13235            self.set_pending_total_sui_withdraw(field);
13236            self
13237        }
13238        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13239        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13240            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
13241        }
13242        ///Returns a mutable reference to `pending_pool_token_withdraw`.
13243        ///If the field is unset, it is first initialized with the default value.
13244        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13245            self.pending_pool_token_withdraw.get_or_insert_default()
13246        }
13247        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13248        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13249            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13250        }
13251        ///Sets `pending_pool_token_withdraw` with the provided value.
13252        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13253            self.pending_pool_token_withdraw = Some(field);
13254        }
13255        ///Sets `pending_pool_token_withdraw` with the provided value.
13256        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13257            self.set_pending_pool_token_withdraw(field);
13258            self
13259        }
13260        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13261        pub fn extra_fields(&self) -> &super::MoveTable {
13262            self.extra_fields
13263                .as_ref()
13264                .map(|field| field as _)
13265                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13266        }
13267        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13268        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13269            self.extra_fields.as_mut().map(|field| field as _)
13270        }
13271        ///Returns a mutable reference to `extra_fields`.
13272        ///If the field is unset, it is first initialized with the default value.
13273        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13274            self.extra_fields.get_or_insert_default()
13275        }
13276        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13277        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13278            self.extra_fields.as_ref().map(|field| field as _)
13279        }
13280        ///Sets `extra_fields` with the provided value.
13281        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13282            self.extra_fields = Some(field.into().into());
13283        }
13284        ///Sets `extra_fields` with the provided value.
13285        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13286            self.set_extra_fields(field.into());
13287            self
13288        }
13289    }
13290    impl super::StorageFund {
13291        pub const fn const_default() -> Self {
13292            Self {
13293                total_object_storage_rebates: None,
13294                non_refundable_balance: None,
13295            }
13296        }
13297        #[doc(hidden)]
13298        pub fn default_instance() -> &'static Self {
13299            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13300            &DEFAULT
13301        }
13302        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13303        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13304            self.total_object_storage_rebates.as_mut().map(|field| field as _)
13305        }
13306        ///Returns a mutable reference to `total_object_storage_rebates`.
13307        ///If the field is unset, it is first initialized with the default value.
13308        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13309            self.total_object_storage_rebates.get_or_insert_default()
13310        }
13311        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13312        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13313            self.total_object_storage_rebates.as_ref().map(|field| *field)
13314        }
13315        ///Sets `total_object_storage_rebates` with the provided value.
13316        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13317            self.total_object_storage_rebates = Some(field);
13318        }
13319        ///Sets `total_object_storage_rebates` with the provided value.
13320        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13321            self.set_total_object_storage_rebates(field);
13322            self
13323        }
13324        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13325        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13326            self.non_refundable_balance.as_mut().map(|field| field as _)
13327        }
13328        ///Returns a mutable reference to `non_refundable_balance`.
13329        ///If the field is unset, it is first initialized with the default value.
13330        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13331            self.non_refundable_balance.get_or_insert_default()
13332        }
13333        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13334        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13335            self.non_refundable_balance.as_ref().map(|field| *field)
13336        }
13337        ///Sets `non_refundable_balance` with the provided value.
13338        pub fn set_non_refundable_balance(&mut self, field: u64) {
13339            self.non_refundable_balance = Some(field);
13340        }
13341        ///Sets `non_refundable_balance` with the provided value.
13342        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13343            self.set_non_refundable_balance(field);
13344            self
13345        }
13346    }
13347    impl super::SubscribeCheckpointsRequest {
13348        pub const fn const_default() -> Self {
13349            Self { read_mask: None }
13350        }
13351        #[doc(hidden)]
13352        pub fn default_instance() -> &'static Self {
13353            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13354            &DEFAULT
13355        }
13356        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13357        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13358            self.read_mask.as_mut().map(|field| field as _)
13359        }
13360        ///Returns a mutable reference to `read_mask`.
13361        ///If the field is unset, it is first initialized with the default value.
13362        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13363            self.read_mask.get_or_insert_default()
13364        }
13365        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
13366        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13367            self.read_mask.as_ref().map(|field| field as _)
13368        }
13369        ///Sets `read_mask` with the provided value.
13370        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13371            self.read_mask = Some(field.into().into());
13372        }
13373        ///Sets `read_mask` with the provided value.
13374        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13375            mut self,
13376            field: T,
13377        ) -> Self {
13378            self.set_read_mask(field.into());
13379            self
13380        }
13381    }
13382    impl super::SubscribeCheckpointsResponse {
13383        pub const fn const_default() -> Self {
13384            Self {
13385                cursor: None,
13386                checkpoint: None,
13387            }
13388        }
13389        #[doc(hidden)]
13390        pub fn default_instance() -> &'static Self {
13391            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13392            &DEFAULT
13393        }
13394        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13395        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13396            self.cursor.as_mut().map(|field| field as _)
13397        }
13398        ///Returns a mutable reference to `cursor`.
13399        ///If the field is unset, it is first initialized with the default value.
13400        pub fn cursor_mut(&mut self) -> &mut u64 {
13401            self.cursor.get_or_insert_default()
13402        }
13403        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
13404        pub fn cursor_opt(&self) -> Option<u64> {
13405            self.cursor.as_ref().map(|field| *field)
13406        }
13407        ///Sets `cursor` with the provided value.
13408        pub fn set_cursor(&mut self, field: u64) {
13409            self.cursor = Some(field);
13410        }
13411        ///Sets `cursor` with the provided value.
13412        pub fn with_cursor(mut self, field: u64) -> Self {
13413            self.set_cursor(field);
13414            self
13415        }
13416        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
13417        pub fn checkpoint(&self) -> &super::Checkpoint {
13418            self.checkpoint
13419                .as_ref()
13420                .map(|field| field as _)
13421                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13422        }
13423        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13424        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13425            self.checkpoint.as_mut().map(|field| field as _)
13426        }
13427        ///Returns a mutable reference to `checkpoint`.
13428        ///If the field is unset, it is first initialized with the default value.
13429        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13430            self.checkpoint.get_or_insert_default()
13431        }
13432        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
13433        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13434            self.checkpoint.as_ref().map(|field| field as _)
13435        }
13436        ///Sets `checkpoint` with the provided value.
13437        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13438            self.checkpoint = Some(field.into().into());
13439        }
13440        ///Sets `checkpoint` with the provided value.
13441        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13442            self.set_checkpoint(field.into());
13443            self
13444        }
13445    }
13446    impl super::SystemPackage {
13447        pub const fn const_default() -> Self {
13448            Self {
13449                version: None,
13450                modules: Vec::new(),
13451                dependencies: Vec::new(),
13452            }
13453        }
13454        #[doc(hidden)]
13455        pub fn default_instance() -> &'static Self {
13456            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13457            &DEFAULT
13458        }
13459        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13460        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13461            self.version.as_mut().map(|field| field as _)
13462        }
13463        ///Returns a mutable reference to `version`.
13464        ///If the field is unset, it is first initialized with the default value.
13465        pub fn version_mut(&mut self) -> &mut u64 {
13466            self.version.get_or_insert_default()
13467        }
13468        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13469        pub fn version_opt(&self) -> Option<u64> {
13470            self.version.as_ref().map(|field| *field)
13471        }
13472        ///Sets `version` with the provided value.
13473        pub fn set_version(&mut self, field: u64) {
13474            self.version = Some(field);
13475        }
13476        ///Sets `version` with the provided value.
13477        pub fn with_version(mut self, field: u64) -> Self {
13478            self.set_version(field);
13479            self
13480        }
13481        ///Returns the value of `modules`, or the default value if `modules` is unset.
13482        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13483            &self.modules
13484        }
13485        ///Returns a mutable reference to `modules`.
13486        ///If the field is unset, it is first initialized with the default value.
13487        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13488            &mut self.modules
13489        }
13490        ///Sets `modules` with the provided value.
13491        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13492            self.modules = field;
13493        }
13494        ///Sets `modules` with the provided value.
13495        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13496            self.set_modules(field);
13497            self
13498        }
13499        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13500        pub fn dependencies(&self) -> &[String] {
13501            &self.dependencies
13502        }
13503        ///Returns a mutable reference to `dependencies`.
13504        ///If the field is unset, it is first initialized with the default value.
13505        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13506            &mut self.dependencies
13507        }
13508        ///Sets `dependencies` with the provided value.
13509        pub fn set_dependencies(&mut self, field: Vec<String>) {
13510            self.dependencies = field;
13511        }
13512        ///Sets `dependencies` with the provided value.
13513        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13514            self.set_dependencies(field);
13515            self
13516        }
13517    }
13518    impl super::SystemParameters {
13519        pub const fn const_default() -> Self {
13520            Self {
13521                epoch_duration_ms: None,
13522                stake_subsidy_start_epoch: None,
13523                min_validator_count: None,
13524                max_validator_count: None,
13525                min_validator_joining_stake: None,
13526                validator_low_stake_threshold: None,
13527                validator_very_low_stake_threshold: None,
13528                validator_low_stake_grace_period: None,
13529                extra_fields: None,
13530            }
13531        }
13532        #[doc(hidden)]
13533        pub fn default_instance() -> &'static Self {
13534            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13535            &DEFAULT
13536        }
13537        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13538        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13539            self.epoch_duration_ms.as_mut().map(|field| field as _)
13540        }
13541        ///Returns a mutable reference to `epoch_duration_ms`.
13542        ///If the field is unset, it is first initialized with the default value.
13543        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13544            self.epoch_duration_ms.get_or_insert_default()
13545        }
13546        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13547        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13548            self.epoch_duration_ms.as_ref().map(|field| *field)
13549        }
13550        ///Sets `epoch_duration_ms` with the provided value.
13551        pub fn set_epoch_duration_ms(&mut self, field: u64) {
13552            self.epoch_duration_ms = Some(field);
13553        }
13554        ///Sets `epoch_duration_ms` with the provided value.
13555        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13556            self.set_epoch_duration_ms(field);
13557            self
13558        }
13559        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13560        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13561            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13562        }
13563        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
13564        ///If the field is unset, it is first initialized with the default value.
13565        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13566            self.stake_subsidy_start_epoch.get_or_insert_default()
13567        }
13568        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13569        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13570            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13571        }
13572        ///Sets `stake_subsidy_start_epoch` with the provided value.
13573        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13574            self.stake_subsidy_start_epoch = Some(field);
13575        }
13576        ///Sets `stake_subsidy_start_epoch` with the provided value.
13577        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13578            self.set_stake_subsidy_start_epoch(field);
13579            self
13580        }
13581        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13582        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13583            self.min_validator_count.as_mut().map(|field| field as _)
13584        }
13585        ///Returns a mutable reference to `min_validator_count`.
13586        ///If the field is unset, it is first initialized with the default value.
13587        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13588            self.min_validator_count.get_or_insert_default()
13589        }
13590        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13591        pub fn min_validator_count_opt(&self) -> Option<u64> {
13592            self.min_validator_count.as_ref().map(|field| *field)
13593        }
13594        ///Sets `min_validator_count` with the provided value.
13595        pub fn set_min_validator_count(&mut self, field: u64) {
13596            self.min_validator_count = Some(field);
13597        }
13598        ///Sets `min_validator_count` with the provided value.
13599        pub fn with_min_validator_count(mut self, field: u64) -> Self {
13600            self.set_min_validator_count(field);
13601            self
13602        }
13603        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13604        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13605            self.max_validator_count.as_mut().map(|field| field as _)
13606        }
13607        ///Returns a mutable reference to `max_validator_count`.
13608        ///If the field is unset, it is first initialized with the default value.
13609        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13610            self.max_validator_count.get_or_insert_default()
13611        }
13612        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13613        pub fn max_validator_count_opt(&self) -> Option<u64> {
13614            self.max_validator_count.as_ref().map(|field| *field)
13615        }
13616        ///Sets `max_validator_count` with the provided value.
13617        pub fn set_max_validator_count(&mut self, field: u64) {
13618            self.max_validator_count = Some(field);
13619        }
13620        ///Sets `max_validator_count` with the provided value.
13621        pub fn with_max_validator_count(mut self, field: u64) -> Self {
13622            self.set_max_validator_count(field);
13623            self
13624        }
13625        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13626        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13627            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13628        }
13629        ///Returns a mutable reference to `min_validator_joining_stake`.
13630        ///If the field is unset, it is first initialized with the default value.
13631        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13632            self.min_validator_joining_stake.get_or_insert_default()
13633        }
13634        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13635        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13636            self.min_validator_joining_stake.as_ref().map(|field| *field)
13637        }
13638        ///Sets `min_validator_joining_stake` with the provided value.
13639        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13640            self.min_validator_joining_stake = Some(field);
13641        }
13642        ///Sets `min_validator_joining_stake` with the provided value.
13643        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13644            self.set_min_validator_joining_stake(field);
13645            self
13646        }
13647        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13648        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13649            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13650        }
13651        ///Returns a mutable reference to `validator_low_stake_threshold`.
13652        ///If the field is unset, it is first initialized with the default value.
13653        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13654            self.validator_low_stake_threshold.get_or_insert_default()
13655        }
13656        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13657        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13658            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13659        }
13660        ///Sets `validator_low_stake_threshold` with the provided value.
13661        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13662            self.validator_low_stake_threshold = Some(field);
13663        }
13664        ///Sets `validator_low_stake_threshold` with the provided value.
13665        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13666            self.set_validator_low_stake_threshold(field);
13667            self
13668        }
13669        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13670        pub fn validator_very_low_stake_threshold_opt_mut(
13671            &mut self,
13672        ) -> Option<&mut u64> {
13673            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13674        }
13675        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13676        ///If the field is unset, it is first initialized with the default value.
13677        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13678            self.validator_very_low_stake_threshold.get_or_insert_default()
13679        }
13680        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13681        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13682            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13683        }
13684        ///Sets `validator_very_low_stake_threshold` with the provided value.
13685        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13686            self.validator_very_low_stake_threshold = Some(field);
13687        }
13688        ///Sets `validator_very_low_stake_threshold` with the provided value.
13689        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13690            self.set_validator_very_low_stake_threshold(field);
13691            self
13692        }
13693        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13694        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13695            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13696        }
13697        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13698        ///If the field is unset, it is first initialized with the default value.
13699        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13700            self.validator_low_stake_grace_period.get_or_insert_default()
13701        }
13702        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13703        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13704            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13705        }
13706        ///Sets `validator_low_stake_grace_period` with the provided value.
13707        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13708            self.validator_low_stake_grace_period = Some(field);
13709        }
13710        ///Sets `validator_low_stake_grace_period` with the provided value.
13711        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13712            self.set_validator_low_stake_grace_period(field);
13713            self
13714        }
13715        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13716        pub fn extra_fields(&self) -> &super::MoveTable {
13717            self.extra_fields
13718                .as_ref()
13719                .map(|field| field as _)
13720                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13721        }
13722        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13723        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13724            self.extra_fields.as_mut().map(|field| field as _)
13725        }
13726        ///Returns a mutable reference to `extra_fields`.
13727        ///If the field is unset, it is first initialized with the default value.
13728        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13729            self.extra_fields.get_or_insert_default()
13730        }
13731        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13732        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13733            self.extra_fields.as_ref().map(|field| field as _)
13734        }
13735        ///Sets `extra_fields` with the provided value.
13736        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13737            self.extra_fields = Some(field.into().into());
13738        }
13739        ///Sets `extra_fields` with the provided value.
13740        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13741            self.set_extra_fields(field.into());
13742            self
13743        }
13744    }
13745    impl super::SystemState {
13746        pub const fn const_default() -> Self {
13747            Self {
13748                version: None,
13749                epoch: None,
13750                protocol_version: None,
13751                validators: None,
13752                storage_fund: None,
13753                parameters: None,
13754                reference_gas_price: None,
13755                validator_report_records: Vec::new(),
13756                stake_subsidy: None,
13757                safe_mode: None,
13758                safe_mode_storage_rewards: None,
13759                safe_mode_computation_rewards: None,
13760                safe_mode_storage_rebates: None,
13761                safe_mode_non_refundable_storage_fee: None,
13762                epoch_start_timestamp_ms: None,
13763                extra_fields: None,
13764            }
13765        }
13766        #[doc(hidden)]
13767        pub fn default_instance() -> &'static Self {
13768            static DEFAULT: super::SystemState = super::SystemState::const_default();
13769            &DEFAULT
13770        }
13771        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13772        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13773            self.version.as_mut().map(|field| field as _)
13774        }
13775        ///Returns a mutable reference to `version`.
13776        ///If the field is unset, it is first initialized with the default value.
13777        pub fn version_mut(&mut self) -> &mut u64 {
13778            self.version.get_or_insert_default()
13779        }
13780        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13781        pub fn version_opt(&self) -> Option<u64> {
13782            self.version.as_ref().map(|field| *field)
13783        }
13784        ///Sets `version` with the provided value.
13785        pub fn set_version(&mut self, field: u64) {
13786            self.version = Some(field);
13787        }
13788        ///Sets `version` with the provided value.
13789        pub fn with_version(mut self, field: u64) -> Self {
13790            self.set_version(field);
13791            self
13792        }
13793        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13794        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13795            self.epoch.as_mut().map(|field| field as _)
13796        }
13797        ///Returns a mutable reference to `epoch`.
13798        ///If the field is unset, it is first initialized with the default value.
13799        pub fn epoch_mut(&mut self) -> &mut u64 {
13800            self.epoch.get_or_insert_default()
13801        }
13802        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13803        pub fn epoch_opt(&self) -> Option<u64> {
13804            self.epoch.as_ref().map(|field| *field)
13805        }
13806        ///Sets `epoch` with the provided value.
13807        pub fn set_epoch(&mut self, field: u64) {
13808            self.epoch = Some(field);
13809        }
13810        ///Sets `epoch` with the provided value.
13811        pub fn with_epoch(mut self, field: u64) -> Self {
13812            self.set_epoch(field);
13813            self
13814        }
13815        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13816        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13817            self.protocol_version.as_mut().map(|field| field as _)
13818        }
13819        ///Returns a mutable reference to `protocol_version`.
13820        ///If the field is unset, it is first initialized with the default value.
13821        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13822            self.protocol_version.get_or_insert_default()
13823        }
13824        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13825        pub fn protocol_version_opt(&self) -> Option<u64> {
13826            self.protocol_version.as_ref().map(|field| *field)
13827        }
13828        ///Sets `protocol_version` with the provided value.
13829        pub fn set_protocol_version(&mut self, field: u64) {
13830            self.protocol_version = Some(field);
13831        }
13832        ///Sets `protocol_version` with the provided value.
13833        pub fn with_protocol_version(mut self, field: u64) -> Self {
13834            self.set_protocol_version(field);
13835            self
13836        }
13837        ///Returns the value of `validators`, or the default value if `validators` is unset.
13838        pub fn validators(&self) -> &super::ValidatorSet {
13839            self.validators
13840                .as_ref()
13841                .map(|field| field as _)
13842                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13843        }
13844        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13845        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13846            self.validators.as_mut().map(|field| field as _)
13847        }
13848        ///Returns a mutable reference to `validators`.
13849        ///If the field is unset, it is first initialized with the default value.
13850        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13851            self.validators.get_or_insert_default()
13852        }
13853        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13854        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13855            self.validators.as_ref().map(|field| field as _)
13856        }
13857        ///Sets `validators` with the provided value.
13858        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13859            self.validators = Some(field.into().into());
13860        }
13861        ///Sets `validators` with the provided value.
13862        pub fn with_validators<T: Into<super::ValidatorSet>>(
13863            mut self,
13864            field: T,
13865        ) -> Self {
13866            self.set_validators(field.into());
13867            self
13868        }
13869        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13870        pub fn storage_fund(&self) -> &super::StorageFund {
13871            self.storage_fund
13872                .as_ref()
13873                .map(|field| field as _)
13874                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13875        }
13876        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13877        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13878            self.storage_fund.as_mut().map(|field| field as _)
13879        }
13880        ///Returns a mutable reference to `storage_fund`.
13881        ///If the field is unset, it is first initialized with the default value.
13882        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13883            self.storage_fund.get_or_insert_default()
13884        }
13885        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13886        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13887            self.storage_fund.as_ref().map(|field| field as _)
13888        }
13889        ///Sets `storage_fund` with the provided value.
13890        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13891            self.storage_fund = Some(field.into().into());
13892        }
13893        ///Sets `storage_fund` with the provided value.
13894        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13895            mut self,
13896            field: T,
13897        ) -> Self {
13898            self.set_storage_fund(field.into());
13899            self
13900        }
13901        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13902        pub fn parameters(&self) -> &super::SystemParameters {
13903            self.parameters
13904                .as_ref()
13905                .map(|field| field as _)
13906                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13907        }
13908        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13909        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13910            self.parameters.as_mut().map(|field| field as _)
13911        }
13912        ///Returns a mutable reference to `parameters`.
13913        ///If the field is unset, it is first initialized with the default value.
13914        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13915            self.parameters.get_or_insert_default()
13916        }
13917        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13918        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13919            self.parameters.as_ref().map(|field| field as _)
13920        }
13921        ///Sets `parameters` with the provided value.
13922        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13923            self.parameters = Some(field.into().into());
13924        }
13925        ///Sets `parameters` with the provided value.
13926        pub fn with_parameters<T: Into<super::SystemParameters>>(
13927            mut self,
13928            field: T,
13929        ) -> Self {
13930            self.set_parameters(field.into());
13931            self
13932        }
13933        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13934        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13935            self.reference_gas_price.as_mut().map(|field| field as _)
13936        }
13937        ///Returns a mutable reference to `reference_gas_price`.
13938        ///If the field is unset, it is first initialized with the default value.
13939        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13940            self.reference_gas_price.get_or_insert_default()
13941        }
13942        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13943        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13944            self.reference_gas_price.as_ref().map(|field| *field)
13945        }
13946        ///Sets `reference_gas_price` with the provided value.
13947        pub fn set_reference_gas_price(&mut self, field: u64) {
13948            self.reference_gas_price = Some(field);
13949        }
13950        ///Sets `reference_gas_price` with the provided value.
13951        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13952            self.set_reference_gas_price(field);
13953            self
13954        }
13955        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13956        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13957            &self.validator_report_records
13958        }
13959        ///Returns a mutable reference to `validator_report_records`.
13960        ///If the field is unset, it is first initialized with the default value.
13961        pub fn validator_report_records_mut(
13962            &mut self,
13963        ) -> &mut Vec<super::ValidatorReportRecord> {
13964            &mut self.validator_report_records
13965        }
13966        ///Sets `validator_report_records` with the provided value.
13967        pub fn set_validator_report_records(
13968            &mut self,
13969            field: Vec<super::ValidatorReportRecord>,
13970        ) {
13971            self.validator_report_records = field;
13972        }
13973        ///Sets `validator_report_records` with the provided value.
13974        pub fn with_validator_report_records(
13975            mut self,
13976            field: Vec<super::ValidatorReportRecord>,
13977        ) -> Self {
13978            self.set_validator_report_records(field);
13979            self
13980        }
13981        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13982        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13983            self.stake_subsidy
13984                .as_ref()
13985                .map(|field| field as _)
13986                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13987        }
13988        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13989        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13990            self.stake_subsidy.as_mut().map(|field| field as _)
13991        }
13992        ///Returns a mutable reference to `stake_subsidy`.
13993        ///If the field is unset, it is first initialized with the default value.
13994        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13995            self.stake_subsidy.get_or_insert_default()
13996        }
13997        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13998        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13999            self.stake_subsidy.as_ref().map(|field| field as _)
14000        }
14001        ///Sets `stake_subsidy` with the provided value.
14002        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
14003            self.stake_subsidy = Some(field.into().into());
14004        }
14005        ///Sets `stake_subsidy` with the provided value.
14006        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
14007            mut self,
14008            field: T,
14009        ) -> Self {
14010            self.set_stake_subsidy(field.into());
14011            self
14012        }
14013        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14014        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
14015            self.safe_mode.as_mut().map(|field| field as _)
14016        }
14017        ///Returns a mutable reference to `safe_mode`.
14018        ///If the field is unset, it is first initialized with the default value.
14019        pub fn safe_mode_mut(&mut self) -> &mut bool {
14020            self.safe_mode.get_or_insert_default()
14021        }
14022        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
14023        pub fn safe_mode_opt(&self) -> Option<bool> {
14024            self.safe_mode.as_ref().map(|field| *field)
14025        }
14026        ///Sets `safe_mode` with the provided value.
14027        pub fn set_safe_mode(&mut self, field: bool) {
14028            self.safe_mode = Some(field);
14029        }
14030        ///Sets `safe_mode` with the provided value.
14031        pub fn with_safe_mode(mut self, field: bool) -> Self {
14032            self.set_safe_mode(field);
14033            self
14034        }
14035        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14036        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14037            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
14038        }
14039        ///Returns a mutable reference to `safe_mode_storage_rewards`.
14040        ///If the field is unset, it is first initialized with the default value.
14041        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
14042            self.safe_mode_storage_rewards.get_or_insert_default()
14043        }
14044        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
14045        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
14046            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
14047        }
14048        ///Sets `safe_mode_storage_rewards` with the provided value.
14049        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
14050            self.safe_mode_storage_rewards = Some(field);
14051        }
14052        ///Sets `safe_mode_storage_rewards` with the provided value.
14053        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
14054            self.set_safe_mode_storage_rewards(field);
14055            self
14056        }
14057        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14058        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14059            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
14060        }
14061        ///Returns a mutable reference to `safe_mode_computation_rewards`.
14062        ///If the field is unset, it is first initialized with the default value.
14063        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
14064            self.safe_mode_computation_rewards.get_or_insert_default()
14065        }
14066        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
14067        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
14068            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
14069        }
14070        ///Sets `safe_mode_computation_rewards` with the provided value.
14071        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
14072            self.safe_mode_computation_rewards = Some(field);
14073        }
14074        ///Sets `safe_mode_computation_rewards` with the provided value.
14075        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
14076            self.set_safe_mode_computation_rewards(field);
14077            self
14078        }
14079        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14080        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14081            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
14082        }
14083        ///Returns a mutable reference to `safe_mode_storage_rebates`.
14084        ///If the field is unset, it is first initialized with the default value.
14085        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
14086            self.safe_mode_storage_rebates.get_or_insert_default()
14087        }
14088        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14089        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
14090            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
14091        }
14092        ///Sets `safe_mode_storage_rebates` with the provided value.
14093        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
14094            self.safe_mode_storage_rebates = Some(field);
14095        }
14096        ///Sets `safe_mode_storage_rebates` with the provided value.
14097        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
14098            self.set_safe_mode_storage_rebates(field);
14099            self
14100        }
14101        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14102        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
14103            &mut self,
14104        ) -> Option<&mut u64> {
14105            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
14106        }
14107        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
14108        ///If the field is unset, it is first initialized with the default value.
14109        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
14110            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
14111        }
14112        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
14113        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
14114            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
14115        }
14116        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
14117        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
14118            self.safe_mode_non_refundable_storage_fee = Some(field);
14119        }
14120        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
14121        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
14122            self.set_safe_mode_non_refundable_storage_fee(field);
14123            self
14124        }
14125        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14126        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
14127            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
14128        }
14129        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
14130        ///If the field is unset, it is first initialized with the default value.
14131        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
14132            self.epoch_start_timestamp_ms.get_or_insert_default()
14133        }
14134        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
14135        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
14136            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
14137        }
14138        ///Sets `epoch_start_timestamp_ms` with the provided value.
14139        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
14140            self.epoch_start_timestamp_ms = Some(field);
14141        }
14142        ///Sets `epoch_start_timestamp_ms` with the provided value.
14143        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
14144            self.set_epoch_start_timestamp_ms(field);
14145            self
14146        }
14147        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14148        pub fn extra_fields(&self) -> &super::MoveTable {
14149            self.extra_fields
14150                .as_ref()
14151                .map(|field| field as _)
14152                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14153        }
14154        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14155        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14156            self.extra_fields.as_mut().map(|field| field as _)
14157        }
14158        ///Returns a mutable reference to `extra_fields`.
14159        ///If the field is unset, it is first initialized with the default value.
14160        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14161            self.extra_fields.get_or_insert_default()
14162        }
14163        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14164        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14165            self.extra_fields.as_ref().map(|field| field as _)
14166        }
14167        ///Sets `extra_fields` with the provided value.
14168        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14169            self.extra_fields = Some(field.into().into());
14170        }
14171        ///Sets `extra_fields` with the provided value.
14172        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14173            self.set_extra_fields(field.into());
14174            self
14175        }
14176    }
14177    impl super::Transaction {
14178        pub const fn const_default() -> Self {
14179            Self {
14180                bcs: None,
14181                digest: None,
14182                version: None,
14183                kind: None,
14184                sender: None,
14185                gas_payment: None,
14186                expiration: None,
14187            }
14188        }
14189        #[doc(hidden)]
14190        pub fn default_instance() -> &'static Self {
14191            static DEFAULT: super::Transaction = super::Transaction::const_default();
14192            &DEFAULT
14193        }
14194        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14195        pub fn bcs(&self) -> &super::Bcs {
14196            self.bcs
14197                .as_ref()
14198                .map(|field| field as _)
14199                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14200        }
14201        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14202        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14203            self.bcs.as_mut().map(|field| field as _)
14204        }
14205        ///Returns a mutable reference to `bcs`.
14206        ///If the field is unset, it is first initialized with the default value.
14207        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14208            self.bcs.get_or_insert_default()
14209        }
14210        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14211        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14212            self.bcs.as_ref().map(|field| field as _)
14213        }
14214        ///Sets `bcs` with the provided value.
14215        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14216            self.bcs = Some(field.into().into());
14217        }
14218        ///Sets `bcs` with the provided value.
14219        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14220            self.set_bcs(field.into());
14221            self
14222        }
14223        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14224        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14225            self.digest.as_mut().map(|field| field as _)
14226        }
14227        ///Returns a mutable reference to `digest`.
14228        ///If the field is unset, it is first initialized with the default value.
14229        pub fn digest_mut(&mut self) -> &mut String {
14230            self.digest.get_or_insert_default()
14231        }
14232        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14233        pub fn digest_opt(&self) -> Option<&str> {
14234            self.digest.as_ref().map(|field| field as _)
14235        }
14236        ///Sets `digest` with the provided value.
14237        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14238            self.digest = Some(field.into().into());
14239        }
14240        ///Sets `digest` with the provided value.
14241        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14242            self.set_digest(field.into());
14243            self
14244        }
14245        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14246        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14247            self.version.as_mut().map(|field| field as _)
14248        }
14249        ///Returns a mutable reference to `version`.
14250        ///If the field is unset, it is first initialized with the default value.
14251        pub fn version_mut(&mut self) -> &mut i32 {
14252            self.version.get_or_insert_default()
14253        }
14254        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14255        pub fn version_opt(&self) -> Option<i32> {
14256            self.version.as_ref().map(|field| *field)
14257        }
14258        ///Sets `version` with the provided value.
14259        pub fn set_version(&mut self, field: i32) {
14260            self.version = Some(field);
14261        }
14262        ///Sets `version` with the provided value.
14263        pub fn with_version(mut self, field: i32) -> Self {
14264            self.set_version(field);
14265            self
14266        }
14267        ///Returns the value of `kind`, or the default value if `kind` is unset.
14268        pub fn kind(&self) -> &super::TransactionKind {
14269            self.kind
14270                .as_ref()
14271                .map(|field| field as _)
14272                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14273        }
14274        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14275        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14276            self.kind.as_mut().map(|field| field as _)
14277        }
14278        ///Returns a mutable reference to `kind`.
14279        ///If the field is unset, it is first initialized with the default value.
14280        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14281            self.kind.get_or_insert_default()
14282        }
14283        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
14284        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14285            self.kind.as_ref().map(|field| field as _)
14286        }
14287        ///Sets `kind` with the provided value.
14288        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14289            self.kind = Some(field.into().into());
14290        }
14291        ///Sets `kind` with the provided value.
14292        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14293            self.set_kind(field.into());
14294            self
14295        }
14296        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14297        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14298            self.sender.as_mut().map(|field| field as _)
14299        }
14300        ///Returns a mutable reference to `sender`.
14301        ///If the field is unset, it is first initialized with the default value.
14302        pub fn sender_mut(&mut self) -> &mut String {
14303            self.sender.get_or_insert_default()
14304        }
14305        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
14306        pub fn sender_opt(&self) -> Option<&str> {
14307            self.sender.as_ref().map(|field| field as _)
14308        }
14309        ///Sets `sender` with the provided value.
14310        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14311            self.sender = Some(field.into().into());
14312        }
14313        ///Sets `sender` with the provided value.
14314        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14315            self.set_sender(field.into());
14316            self
14317        }
14318        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
14319        pub fn gas_payment(&self) -> &super::GasPayment {
14320            self.gas_payment
14321                .as_ref()
14322                .map(|field| field as _)
14323                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14324        }
14325        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14326        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14327            self.gas_payment.as_mut().map(|field| field as _)
14328        }
14329        ///Returns a mutable reference to `gas_payment`.
14330        ///If the field is unset, it is first initialized with the default value.
14331        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14332            self.gas_payment.get_or_insert_default()
14333        }
14334        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
14335        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14336            self.gas_payment.as_ref().map(|field| field as _)
14337        }
14338        ///Sets `gas_payment` with the provided value.
14339        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14340            self.gas_payment = Some(field.into().into());
14341        }
14342        ///Sets `gas_payment` with the provided value.
14343        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14344            self.set_gas_payment(field.into());
14345            self
14346        }
14347        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
14348        pub fn expiration(&self) -> &super::TransactionExpiration {
14349            self.expiration
14350                .as_ref()
14351                .map(|field| field as _)
14352                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14353        }
14354        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14355        pub fn expiration_opt_mut(
14356            &mut self,
14357        ) -> Option<&mut super::TransactionExpiration> {
14358            self.expiration.as_mut().map(|field| field as _)
14359        }
14360        ///Returns a mutable reference to `expiration`.
14361        ///If the field is unset, it is first initialized with the default value.
14362        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14363            self.expiration.get_or_insert_default()
14364        }
14365        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
14366        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14367            self.expiration.as_ref().map(|field| field as _)
14368        }
14369        ///Sets `expiration` with the provided value.
14370        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14371            &mut self,
14372            field: T,
14373        ) {
14374            self.expiration = Some(field.into().into());
14375        }
14376        ///Sets `expiration` with the provided value.
14377        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14378            mut self,
14379            field: T,
14380        ) -> Self {
14381            self.set_expiration(field.into());
14382            self
14383        }
14384    }
14385    impl super::TransactionEffects {
14386        pub const fn const_default() -> Self {
14387            Self {
14388                bcs: None,
14389                digest: None,
14390                version: None,
14391                status: None,
14392                epoch: None,
14393                gas_used: None,
14394                transaction_digest: None,
14395                gas_object: None,
14396                events_digest: None,
14397                dependencies: Vec::new(),
14398                lamport_version: None,
14399                changed_objects: Vec::new(),
14400                unchanged_consensus_objects: Vec::new(),
14401                auxiliary_data_digest: None,
14402                unchanged_loaded_runtime_objects: Vec::new(),
14403            }
14404        }
14405        #[doc(hidden)]
14406        pub fn default_instance() -> &'static Self {
14407            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14408            &DEFAULT
14409        }
14410        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14411        pub fn bcs(&self) -> &super::Bcs {
14412            self.bcs
14413                .as_ref()
14414                .map(|field| field as _)
14415                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14416        }
14417        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14418        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14419            self.bcs.as_mut().map(|field| field as _)
14420        }
14421        ///Returns a mutable reference to `bcs`.
14422        ///If the field is unset, it is first initialized with the default value.
14423        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14424            self.bcs.get_or_insert_default()
14425        }
14426        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14427        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14428            self.bcs.as_ref().map(|field| field as _)
14429        }
14430        ///Sets `bcs` with the provided value.
14431        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14432            self.bcs = Some(field.into().into());
14433        }
14434        ///Sets `bcs` with the provided value.
14435        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14436            self.set_bcs(field.into());
14437            self
14438        }
14439        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14440        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14441            self.digest.as_mut().map(|field| field as _)
14442        }
14443        ///Returns a mutable reference to `digest`.
14444        ///If the field is unset, it is first initialized with the default value.
14445        pub fn digest_mut(&mut self) -> &mut String {
14446            self.digest.get_or_insert_default()
14447        }
14448        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14449        pub fn digest_opt(&self) -> Option<&str> {
14450            self.digest.as_ref().map(|field| field as _)
14451        }
14452        ///Sets `digest` with the provided value.
14453        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14454            self.digest = Some(field.into().into());
14455        }
14456        ///Sets `digest` with the provided value.
14457        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14458            self.set_digest(field.into());
14459            self
14460        }
14461        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14462        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14463            self.version.as_mut().map(|field| field as _)
14464        }
14465        ///Returns a mutable reference to `version`.
14466        ///If the field is unset, it is first initialized with the default value.
14467        pub fn version_mut(&mut self) -> &mut i32 {
14468            self.version.get_or_insert_default()
14469        }
14470        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14471        pub fn version_opt(&self) -> Option<i32> {
14472            self.version.as_ref().map(|field| *field)
14473        }
14474        ///Sets `version` with the provided value.
14475        pub fn set_version(&mut self, field: i32) {
14476            self.version = Some(field);
14477        }
14478        ///Sets `version` with the provided value.
14479        pub fn with_version(mut self, field: i32) -> Self {
14480            self.set_version(field);
14481            self
14482        }
14483        ///Returns the value of `status`, or the default value if `status` is unset.
14484        pub fn status(&self) -> &super::ExecutionStatus {
14485            self.status
14486                .as_ref()
14487                .map(|field| field as _)
14488                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14489        }
14490        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14491        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14492            self.status.as_mut().map(|field| field as _)
14493        }
14494        ///Returns a mutable reference to `status`.
14495        ///If the field is unset, it is first initialized with the default value.
14496        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14497            self.status.get_or_insert_default()
14498        }
14499        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
14500        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14501            self.status.as_ref().map(|field| field as _)
14502        }
14503        ///Sets `status` with the provided value.
14504        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14505            self.status = Some(field.into().into());
14506        }
14507        ///Sets `status` with the provided value.
14508        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14509            self.set_status(field.into());
14510            self
14511        }
14512        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14513        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14514            self.epoch.as_mut().map(|field| field as _)
14515        }
14516        ///Returns a mutable reference to `epoch`.
14517        ///If the field is unset, it is first initialized with the default value.
14518        pub fn epoch_mut(&mut self) -> &mut u64 {
14519            self.epoch.get_or_insert_default()
14520        }
14521        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14522        pub fn epoch_opt(&self) -> Option<u64> {
14523            self.epoch.as_ref().map(|field| *field)
14524        }
14525        ///Sets `epoch` with the provided value.
14526        pub fn set_epoch(&mut self, field: u64) {
14527            self.epoch = Some(field);
14528        }
14529        ///Sets `epoch` with the provided value.
14530        pub fn with_epoch(mut self, field: u64) -> Self {
14531            self.set_epoch(field);
14532            self
14533        }
14534        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
14535        pub fn gas_used(&self) -> &super::GasCostSummary {
14536            self.gas_used
14537                .as_ref()
14538                .map(|field| field as _)
14539                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14540        }
14541        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14542        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14543            self.gas_used.as_mut().map(|field| field as _)
14544        }
14545        ///Returns a mutable reference to `gas_used`.
14546        ///If the field is unset, it is first initialized with the default value.
14547        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14548            self.gas_used.get_or_insert_default()
14549        }
14550        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
14551        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14552            self.gas_used.as_ref().map(|field| field as _)
14553        }
14554        ///Sets `gas_used` with the provided value.
14555        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14556            self.gas_used = Some(field.into().into());
14557        }
14558        ///Sets `gas_used` with the provided value.
14559        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14560            mut self,
14561            field: T,
14562        ) -> Self {
14563            self.set_gas_used(field.into());
14564            self
14565        }
14566        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14567        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14568            self.transaction_digest.as_mut().map(|field| field as _)
14569        }
14570        ///Returns a mutable reference to `transaction_digest`.
14571        ///If the field is unset, it is first initialized with the default value.
14572        pub fn transaction_digest_mut(&mut self) -> &mut String {
14573            self.transaction_digest.get_or_insert_default()
14574        }
14575        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14576        pub fn transaction_digest_opt(&self) -> Option<&str> {
14577            self.transaction_digest.as_ref().map(|field| field as _)
14578        }
14579        ///Sets `transaction_digest` with the provided value.
14580        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14581            self.transaction_digest = Some(field.into().into());
14582        }
14583        ///Sets `transaction_digest` with the provided value.
14584        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14585            self.set_transaction_digest(field.into());
14586            self
14587        }
14588        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14589        pub fn gas_object(&self) -> &super::ChangedObject {
14590            self.gas_object
14591                .as_ref()
14592                .map(|field| field as _)
14593                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14594        }
14595        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14596        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14597            self.gas_object.as_mut().map(|field| field as _)
14598        }
14599        ///Returns a mutable reference to `gas_object`.
14600        ///If the field is unset, it is first initialized with the default value.
14601        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14602            self.gas_object.get_or_insert_default()
14603        }
14604        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14605        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14606            self.gas_object.as_ref().map(|field| field as _)
14607        }
14608        ///Sets `gas_object` with the provided value.
14609        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14610            self.gas_object = Some(field.into().into());
14611        }
14612        ///Sets `gas_object` with the provided value.
14613        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14614            mut self,
14615            field: T,
14616        ) -> Self {
14617            self.set_gas_object(field.into());
14618            self
14619        }
14620        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14621        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14622            self.events_digest.as_mut().map(|field| field as _)
14623        }
14624        ///Returns a mutable reference to `events_digest`.
14625        ///If the field is unset, it is first initialized with the default value.
14626        pub fn events_digest_mut(&mut self) -> &mut String {
14627            self.events_digest.get_or_insert_default()
14628        }
14629        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14630        pub fn events_digest_opt(&self) -> Option<&str> {
14631            self.events_digest.as_ref().map(|field| field as _)
14632        }
14633        ///Sets `events_digest` with the provided value.
14634        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14635            self.events_digest = Some(field.into().into());
14636        }
14637        ///Sets `events_digest` with the provided value.
14638        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14639            self.set_events_digest(field.into());
14640            self
14641        }
14642        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14643        pub fn dependencies(&self) -> &[String] {
14644            &self.dependencies
14645        }
14646        ///Returns a mutable reference to `dependencies`.
14647        ///If the field is unset, it is first initialized with the default value.
14648        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14649            &mut self.dependencies
14650        }
14651        ///Sets `dependencies` with the provided value.
14652        pub fn set_dependencies(&mut self, field: Vec<String>) {
14653            self.dependencies = field;
14654        }
14655        ///Sets `dependencies` with the provided value.
14656        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14657            self.set_dependencies(field);
14658            self
14659        }
14660        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14661        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14662            self.lamport_version.as_mut().map(|field| field as _)
14663        }
14664        ///Returns a mutable reference to `lamport_version`.
14665        ///If the field is unset, it is first initialized with the default value.
14666        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14667            self.lamport_version.get_or_insert_default()
14668        }
14669        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14670        pub fn lamport_version_opt(&self) -> Option<u64> {
14671            self.lamport_version.as_ref().map(|field| *field)
14672        }
14673        ///Sets `lamport_version` with the provided value.
14674        pub fn set_lamport_version(&mut self, field: u64) {
14675            self.lamport_version = Some(field);
14676        }
14677        ///Sets `lamport_version` with the provided value.
14678        pub fn with_lamport_version(mut self, field: u64) -> Self {
14679            self.set_lamport_version(field);
14680            self
14681        }
14682        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14683        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14684            &self.changed_objects
14685        }
14686        ///Returns a mutable reference to `changed_objects`.
14687        ///If the field is unset, it is first initialized with the default value.
14688        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14689            &mut self.changed_objects
14690        }
14691        ///Sets `changed_objects` with the provided value.
14692        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14693            self.changed_objects = field;
14694        }
14695        ///Sets `changed_objects` with the provided value.
14696        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14697            self.set_changed_objects(field);
14698            self
14699        }
14700        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14701        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14702            &self.unchanged_consensus_objects
14703        }
14704        ///Returns a mutable reference to `unchanged_consensus_objects`.
14705        ///If the field is unset, it is first initialized with the default value.
14706        pub fn unchanged_consensus_objects_mut(
14707            &mut self,
14708        ) -> &mut Vec<super::UnchangedConsensusObject> {
14709            &mut self.unchanged_consensus_objects
14710        }
14711        ///Sets `unchanged_consensus_objects` with the provided value.
14712        pub fn set_unchanged_consensus_objects(
14713            &mut self,
14714            field: Vec<super::UnchangedConsensusObject>,
14715        ) {
14716            self.unchanged_consensus_objects = field;
14717        }
14718        ///Sets `unchanged_consensus_objects` with the provided value.
14719        pub fn with_unchanged_consensus_objects(
14720            mut self,
14721            field: Vec<super::UnchangedConsensusObject>,
14722        ) -> Self {
14723            self.set_unchanged_consensus_objects(field);
14724            self
14725        }
14726        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14727        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14728            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14729        }
14730        ///Returns a mutable reference to `auxiliary_data_digest`.
14731        ///If the field is unset, it is first initialized with the default value.
14732        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14733            self.auxiliary_data_digest.get_or_insert_default()
14734        }
14735        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14736        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14737            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14738        }
14739        ///Sets `auxiliary_data_digest` with the provided value.
14740        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14741            self.auxiliary_data_digest = Some(field.into().into());
14742        }
14743        ///Sets `auxiliary_data_digest` with the provided value.
14744        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14745            self.set_auxiliary_data_digest(field.into());
14746            self
14747        }
14748        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14749        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14750            &self.unchanged_loaded_runtime_objects
14751        }
14752        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14753        ///If the field is unset, it is first initialized with the default value.
14754        pub fn unchanged_loaded_runtime_objects_mut(
14755            &mut self,
14756        ) -> &mut Vec<super::ObjectReference> {
14757            &mut self.unchanged_loaded_runtime_objects
14758        }
14759        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14760        pub fn set_unchanged_loaded_runtime_objects(
14761            &mut self,
14762            field: Vec<super::ObjectReference>,
14763        ) {
14764            self.unchanged_loaded_runtime_objects = field;
14765        }
14766        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14767        pub fn with_unchanged_loaded_runtime_objects(
14768            mut self,
14769            field: Vec<super::ObjectReference>,
14770        ) -> Self {
14771            self.set_unchanged_loaded_runtime_objects(field);
14772            self
14773        }
14774    }
14775    impl super::TransactionEvents {
14776        pub const fn const_default() -> Self {
14777            Self {
14778                bcs: None,
14779                digest: None,
14780                events: Vec::new(),
14781            }
14782        }
14783        #[doc(hidden)]
14784        pub fn default_instance() -> &'static Self {
14785            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14786            &DEFAULT
14787        }
14788        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14789        pub fn bcs(&self) -> &super::Bcs {
14790            self.bcs
14791                .as_ref()
14792                .map(|field| field as _)
14793                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14794        }
14795        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14796        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14797            self.bcs.as_mut().map(|field| field as _)
14798        }
14799        ///Returns a mutable reference to `bcs`.
14800        ///If the field is unset, it is first initialized with the default value.
14801        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14802            self.bcs.get_or_insert_default()
14803        }
14804        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14805        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14806            self.bcs.as_ref().map(|field| field as _)
14807        }
14808        ///Sets `bcs` with the provided value.
14809        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14810            self.bcs = Some(field.into().into());
14811        }
14812        ///Sets `bcs` with the provided value.
14813        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14814            self.set_bcs(field.into());
14815            self
14816        }
14817        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14818        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14819            self.digest.as_mut().map(|field| field as _)
14820        }
14821        ///Returns a mutable reference to `digest`.
14822        ///If the field is unset, it is first initialized with the default value.
14823        pub fn digest_mut(&mut self) -> &mut String {
14824            self.digest.get_or_insert_default()
14825        }
14826        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14827        pub fn digest_opt(&self) -> Option<&str> {
14828            self.digest.as_ref().map(|field| field as _)
14829        }
14830        ///Sets `digest` with the provided value.
14831        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14832            self.digest = Some(field.into().into());
14833        }
14834        ///Sets `digest` with the provided value.
14835        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14836            self.set_digest(field.into());
14837            self
14838        }
14839        ///Returns the value of `events`, or the default value if `events` is unset.
14840        pub fn events(&self) -> &[super::Event] {
14841            &self.events
14842        }
14843        ///Returns a mutable reference to `events`.
14844        ///If the field is unset, it is first initialized with the default value.
14845        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14846            &mut self.events
14847        }
14848        ///Sets `events` with the provided value.
14849        pub fn set_events(&mut self, field: Vec<super::Event>) {
14850            self.events = field;
14851        }
14852        ///Sets `events` with the provided value.
14853        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14854            self.set_events(field);
14855            self
14856        }
14857    }
14858    impl super::TransactionExpiration {
14859        pub const fn const_default() -> Self {
14860            Self {
14861                kind: None,
14862                epoch: None,
14863                min_epoch: None,
14864                min_timestamp: None,
14865                max_timestamp: None,
14866                chain: None,
14867                nonce: None,
14868            }
14869        }
14870        #[doc(hidden)]
14871        pub fn default_instance() -> &'static Self {
14872            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14873            &DEFAULT
14874        }
14875        ///Sets `kind` with the provided value.
14876        pub fn with_kind<
14877            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14878        >(mut self, field: T) -> Self {
14879            self.set_kind(field.into());
14880            self
14881        }
14882        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14883        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14884            self.epoch.as_mut().map(|field| field as _)
14885        }
14886        ///Returns a mutable reference to `epoch`.
14887        ///If the field is unset, it is first initialized with the default value.
14888        pub fn epoch_mut(&mut self) -> &mut u64 {
14889            self.epoch.get_or_insert_default()
14890        }
14891        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14892        pub fn epoch_opt(&self) -> Option<u64> {
14893            self.epoch.as_ref().map(|field| *field)
14894        }
14895        ///Sets `epoch` with the provided value.
14896        pub fn set_epoch(&mut self, field: u64) {
14897            self.epoch = Some(field);
14898        }
14899        ///Sets `epoch` with the provided value.
14900        pub fn with_epoch(mut self, field: u64) -> Self {
14901            self.set_epoch(field);
14902            self
14903        }
14904        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14905        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14906            self.min_epoch.as_mut().map(|field| field as _)
14907        }
14908        ///Returns a mutable reference to `min_epoch`.
14909        ///If the field is unset, it is first initialized with the default value.
14910        pub fn min_epoch_mut(&mut self) -> &mut u64 {
14911            self.min_epoch.get_or_insert_default()
14912        }
14913        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14914        pub fn min_epoch_opt(&self) -> Option<u64> {
14915            self.min_epoch.as_ref().map(|field| *field)
14916        }
14917        ///Sets `min_epoch` with the provided value.
14918        pub fn set_min_epoch(&mut self, field: u64) {
14919            self.min_epoch = Some(field);
14920        }
14921        ///Sets `min_epoch` with the provided value.
14922        pub fn with_min_epoch(mut self, field: u64) -> Self {
14923            self.set_min_epoch(field);
14924            self
14925        }
14926        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14927        pub fn min_timestamp_opt_mut(
14928            &mut self,
14929        ) -> Option<&mut ::prost_types::Timestamp> {
14930            self.min_timestamp.as_mut().map(|field| field as _)
14931        }
14932        ///Returns a mutable reference to `min_timestamp`.
14933        ///If the field is unset, it is first initialized with the default value.
14934        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14935            self.min_timestamp.get_or_insert_default()
14936        }
14937        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14938        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14939            self.min_timestamp.as_ref().map(|field| field as _)
14940        }
14941        ///Sets `min_timestamp` with the provided value.
14942        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14943            &mut self,
14944            field: T,
14945        ) {
14946            self.min_timestamp = Some(field.into().into());
14947        }
14948        ///Sets `min_timestamp` with the provided value.
14949        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14950            mut self,
14951            field: T,
14952        ) -> Self {
14953            self.set_min_timestamp(field.into());
14954            self
14955        }
14956        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14957        pub fn max_timestamp_opt_mut(
14958            &mut self,
14959        ) -> Option<&mut ::prost_types::Timestamp> {
14960            self.max_timestamp.as_mut().map(|field| field as _)
14961        }
14962        ///Returns a mutable reference to `max_timestamp`.
14963        ///If the field is unset, it is first initialized with the default value.
14964        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14965            self.max_timestamp.get_or_insert_default()
14966        }
14967        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14968        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14969            self.max_timestamp.as_ref().map(|field| field as _)
14970        }
14971        ///Sets `max_timestamp` with the provided value.
14972        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14973            &mut self,
14974            field: T,
14975        ) {
14976            self.max_timestamp = Some(field.into().into());
14977        }
14978        ///Sets `max_timestamp` with the provided value.
14979        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14980            mut self,
14981            field: T,
14982        ) -> Self {
14983            self.set_max_timestamp(field.into());
14984            self
14985        }
14986        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14987        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14988            self.chain.as_mut().map(|field| field as _)
14989        }
14990        ///Returns a mutable reference to `chain`.
14991        ///If the field is unset, it is first initialized with the default value.
14992        pub fn chain_mut(&mut self) -> &mut String {
14993            self.chain.get_or_insert_default()
14994        }
14995        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
14996        pub fn chain_opt(&self) -> Option<&str> {
14997            self.chain.as_ref().map(|field| field as _)
14998        }
14999        ///Sets `chain` with the provided value.
15000        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
15001            self.chain = Some(field.into().into());
15002        }
15003        ///Sets `chain` with the provided value.
15004        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
15005            self.set_chain(field.into());
15006            self
15007        }
15008        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15009        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
15010            self.nonce.as_mut().map(|field| field as _)
15011        }
15012        ///Returns a mutable reference to `nonce`.
15013        ///If the field is unset, it is first initialized with the default value.
15014        pub fn nonce_mut(&mut self) -> &mut u32 {
15015            self.nonce.get_or_insert_default()
15016        }
15017        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
15018        pub fn nonce_opt(&self) -> Option<u32> {
15019            self.nonce.as_ref().map(|field| *field)
15020        }
15021        ///Sets `nonce` with the provided value.
15022        pub fn set_nonce(&mut self, field: u32) {
15023            self.nonce = Some(field);
15024        }
15025        ///Sets `nonce` with the provided value.
15026        pub fn with_nonce(mut self, field: u32) -> Self {
15027            self.set_nonce(field);
15028            self
15029        }
15030    }
15031    impl super::TransactionKind {
15032        pub const fn const_default() -> Self {
15033            Self { kind: None, data: None }
15034        }
15035        #[doc(hidden)]
15036        pub fn default_instance() -> &'static Self {
15037            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
15038            &DEFAULT
15039        }
15040        ///Sets `kind` with the provided value.
15041        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
15042            mut self,
15043            field: T,
15044        ) -> Self {
15045            self.set_kind(field.into());
15046            self
15047        }
15048        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
15049        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
15050            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15051                .data
15052            {
15053                field as _
15054            } else {
15055                super::ProgrammableTransaction::default_instance() as _
15056            }
15057        }
15058        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15059        pub fn programmable_transaction_opt(
15060            &self,
15061        ) -> Option<&super::ProgrammableTransaction> {
15062            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15063                .data
15064            {
15065                Some(field as _)
15066            } else {
15067                None
15068            }
15069        }
15070        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15071        pub fn programmable_transaction_opt_mut(
15072            &mut self,
15073        ) -> Option<&mut super::ProgrammableTransaction> {
15074            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
15075                .data
15076            {
15077                Some(field as _)
15078            } else {
15079                None
15080            }
15081        }
15082        ///Returns a mutable reference to `programmable_transaction`.
15083        ///If the field is unset, it is first initialized with the default value.
15084        ///If any other oneof field in the same oneof is set, it will be cleared.
15085        pub fn programmable_transaction_mut(
15086            &mut self,
15087        ) -> &mut super::ProgrammableTransaction {
15088            if self.programmable_transaction_opt_mut().is_none() {
15089                self.data = Some(
15090                    super::transaction_kind::Data::ProgrammableTransaction(
15091                        super::ProgrammableTransaction::default(),
15092                    ),
15093                );
15094            }
15095            self.programmable_transaction_opt_mut().unwrap()
15096        }
15097        ///Sets `programmable_transaction` with the provided value.
15098        ///If any other oneof field in the same oneof is set, it will be cleared.
15099        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15100            &mut self,
15101            field: T,
15102        ) {
15103            self.data = Some(
15104                super::transaction_kind::Data::ProgrammableTransaction(
15105                    field.into().into(),
15106                ),
15107            );
15108        }
15109        ///Sets `programmable_transaction` with the provided value.
15110        ///If any other oneof field in the same oneof is set, it will be cleared.
15111        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15112            mut self,
15113            field: T,
15114        ) -> Self {
15115            self.set_programmable_transaction(field.into());
15116            self
15117        }
15118        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
15119        pub fn change_epoch(&self) -> &super::ChangeEpoch {
15120            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15121                field as _
15122            } else {
15123                super::ChangeEpoch::default_instance() as _
15124            }
15125        }
15126        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15127        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
15128            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15129                Some(field as _)
15130            } else {
15131                None
15132            }
15133        }
15134        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15135        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
15136            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
15137                .data
15138            {
15139                Some(field as _)
15140            } else {
15141                None
15142            }
15143        }
15144        ///Returns a mutable reference to `change_epoch`.
15145        ///If the field is unset, it is first initialized with the default value.
15146        ///If any other oneof field in the same oneof is set, it will be cleared.
15147        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
15148            if self.change_epoch_opt_mut().is_none() {
15149                self.data = Some(
15150                    super::transaction_kind::Data::ChangeEpoch(
15151                        super::ChangeEpoch::default(),
15152                    ),
15153                );
15154            }
15155            self.change_epoch_opt_mut().unwrap()
15156        }
15157        ///Sets `change_epoch` with the provided value.
15158        ///If any other oneof field in the same oneof is set, it will be cleared.
15159        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
15160            self.data = Some(
15161                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
15162            );
15163        }
15164        ///Sets `change_epoch` with the provided value.
15165        ///If any other oneof field in the same oneof is set, it will be cleared.
15166        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
15167            mut self,
15168            field: T,
15169        ) -> Self {
15170            self.set_change_epoch(field.into());
15171            self
15172        }
15173        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
15174        pub fn genesis(&self) -> &super::GenesisTransaction {
15175            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15176                field as _
15177            } else {
15178                super::GenesisTransaction::default_instance() as _
15179            }
15180        }
15181        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
15182        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
15183            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15184                Some(field as _)
15185            } else {
15186                None
15187            }
15188        }
15189        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15190        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
15191            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
15192                Some(field as _)
15193            } else {
15194                None
15195            }
15196        }
15197        ///Returns a mutable reference to `genesis`.
15198        ///If the field is unset, it is first initialized with the default value.
15199        ///If any other oneof field in the same oneof is set, it will be cleared.
15200        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
15201            if self.genesis_opt_mut().is_none() {
15202                self.data = Some(
15203                    super::transaction_kind::Data::Genesis(
15204                        super::GenesisTransaction::default(),
15205                    ),
15206                );
15207            }
15208            self.genesis_opt_mut().unwrap()
15209        }
15210        ///Sets `genesis` with the provided value.
15211        ///If any other oneof field in the same oneof is set, it will be cleared.
15212        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
15213            self.data = Some(
15214                super::transaction_kind::Data::Genesis(field.into().into()),
15215            );
15216        }
15217        ///Sets `genesis` with the provided value.
15218        ///If any other oneof field in the same oneof is set, it will be cleared.
15219        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
15220            mut self,
15221            field: T,
15222        ) -> Self {
15223            self.set_genesis(field.into());
15224            self
15225        }
15226        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
15227        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
15228            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15229                .data
15230            {
15231                field as _
15232            } else {
15233                super::ConsensusCommitPrologue::default_instance() as _
15234            }
15235        }
15236        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
15237        pub fn consensus_commit_prologue_opt(
15238            &self,
15239        ) -> Option<&super::ConsensusCommitPrologue> {
15240            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15241                .data
15242            {
15243                Some(field as _)
15244            } else {
15245                None
15246            }
15247        }
15248        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15249        pub fn consensus_commit_prologue_opt_mut(
15250            &mut self,
15251        ) -> Option<&mut super::ConsensusCommitPrologue> {
15252            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15253                .data
15254            {
15255                Some(field as _)
15256            } else {
15257                None
15258            }
15259        }
15260        ///Returns a mutable reference to `consensus_commit_prologue`.
15261        ///If the field is unset, it is first initialized with the default value.
15262        ///If any other oneof field in the same oneof is set, it will be cleared.
15263        pub fn consensus_commit_prologue_mut(
15264            &mut self,
15265        ) -> &mut super::ConsensusCommitPrologue {
15266            if self.consensus_commit_prologue_opt_mut().is_none() {
15267                self.data = Some(
15268                    super::transaction_kind::Data::ConsensusCommitPrologue(
15269                        super::ConsensusCommitPrologue::default(),
15270                    ),
15271                );
15272            }
15273            self.consensus_commit_prologue_opt_mut().unwrap()
15274        }
15275        ///Sets `consensus_commit_prologue` with the provided value.
15276        ///If any other oneof field in the same oneof is set, it will be cleared.
15277        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15278            &mut self,
15279            field: T,
15280        ) {
15281            self.data = Some(
15282                super::transaction_kind::Data::ConsensusCommitPrologue(
15283                    field.into().into(),
15284                ),
15285            );
15286        }
15287        ///Sets `consensus_commit_prologue` with the provided value.
15288        ///If any other oneof field in the same oneof is set, it will be cleared.
15289        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15290            mut self,
15291            field: T,
15292        ) -> Self {
15293            self.set_consensus_commit_prologue(field.into());
15294            self
15295        }
15296        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
15297        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15298            if let Some(
15299                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15300            ) = &self.data
15301            {
15302                field as _
15303            } else {
15304                super::AuthenticatorStateUpdate::default_instance() as _
15305            }
15306        }
15307        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15308        pub fn authenticator_state_update_opt(
15309            &self,
15310        ) -> Option<&super::AuthenticatorStateUpdate> {
15311            if let Some(
15312                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15313            ) = &self.data
15314            {
15315                Some(field as _)
15316            } else {
15317                None
15318            }
15319        }
15320        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15321        pub fn authenticator_state_update_opt_mut(
15322            &mut self,
15323        ) -> Option<&mut super::AuthenticatorStateUpdate> {
15324            if let Some(
15325                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15326            ) = &mut self.data
15327            {
15328                Some(field as _)
15329            } else {
15330                None
15331            }
15332        }
15333        ///Returns a mutable reference to `authenticator_state_update`.
15334        ///If the field is unset, it is first initialized with the default value.
15335        ///If any other oneof field in the same oneof is set, it will be cleared.
15336        pub fn authenticator_state_update_mut(
15337            &mut self,
15338        ) -> &mut super::AuthenticatorStateUpdate {
15339            if self.authenticator_state_update_opt_mut().is_none() {
15340                self.data = Some(
15341                    super::transaction_kind::Data::AuthenticatorStateUpdate(
15342                        super::AuthenticatorStateUpdate::default(),
15343                    ),
15344                );
15345            }
15346            self.authenticator_state_update_opt_mut().unwrap()
15347        }
15348        ///Sets `authenticator_state_update` with the provided value.
15349        ///If any other oneof field in the same oneof is set, it will be cleared.
15350        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15351            &mut self,
15352            field: T,
15353        ) {
15354            self.data = Some(
15355                super::transaction_kind::Data::AuthenticatorStateUpdate(
15356                    field.into().into(),
15357                ),
15358            );
15359        }
15360        ///Sets `authenticator_state_update` with the provided value.
15361        ///If any other oneof field in the same oneof is set, it will be cleared.
15362        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15363            mut self,
15364            field: T,
15365        ) -> Self {
15366            self.set_authenticator_state_update(field.into());
15367            self
15368        }
15369        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
15370        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15371            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15372                field as _
15373            } else {
15374                super::EndOfEpochTransaction::default_instance() as _
15375            }
15376        }
15377        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15378        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15379            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15380                Some(field as _)
15381            } else {
15382                None
15383            }
15384        }
15385        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15386        pub fn end_of_epoch_opt_mut(
15387            &mut self,
15388        ) -> Option<&mut super::EndOfEpochTransaction> {
15389            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15390                .data
15391            {
15392                Some(field as _)
15393            } else {
15394                None
15395            }
15396        }
15397        ///Returns a mutable reference to `end_of_epoch`.
15398        ///If the field is unset, it is first initialized with the default value.
15399        ///If any other oneof field in the same oneof is set, it will be cleared.
15400        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15401            if self.end_of_epoch_opt_mut().is_none() {
15402                self.data = Some(
15403                    super::transaction_kind::Data::EndOfEpoch(
15404                        super::EndOfEpochTransaction::default(),
15405                    ),
15406                );
15407            }
15408            self.end_of_epoch_opt_mut().unwrap()
15409        }
15410        ///Sets `end_of_epoch` with the provided value.
15411        ///If any other oneof field in the same oneof is set, it will be cleared.
15412        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15413            &mut self,
15414            field: T,
15415        ) {
15416            self.data = Some(
15417                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15418            );
15419        }
15420        ///Sets `end_of_epoch` with the provided value.
15421        ///If any other oneof field in the same oneof is set, it will be cleared.
15422        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15423            mut self,
15424            field: T,
15425        ) -> Self {
15426            self.set_end_of_epoch(field.into());
15427            self
15428        }
15429        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
15430        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15431            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15432                .data
15433            {
15434                field as _
15435            } else {
15436                super::RandomnessStateUpdate::default_instance() as _
15437            }
15438        }
15439        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15440        pub fn randomness_state_update_opt(
15441            &self,
15442        ) -> Option<&super::RandomnessStateUpdate> {
15443            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15444                .data
15445            {
15446                Some(field as _)
15447            } else {
15448                None
15449            }
15450        }
15451        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15452        pub fn randomness_state_update_opt_mut(
15453            &mut self,
15454        ) -> Option<&mut super::RandomnessStateUpdate> {
15455            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15456                .data
15457            {
15458                Some(field as _)
15459            } else {
15460                None
15461            }
15462        }
15463        ///Returns a mutable reference to `randomness_state_update`.
15464        ///If the field is unset, it is first initialized with the default value.
15465        ///If any other oneof field in the same oneof is set, it will be cleared.
15466        pub fn randomness_state_update_mut(
15467            &mut self,
15468        ) -> &mut super::RandomnessStateUpdate {
15469            if self.randomness_state_update_opt_mut().is_none() {
15470                self.data = Some(
15471                    super::transaction_kind::Data::RandomnessStateUpdate(
15472                        super::RandomnessStateUpdate::default(),
15473                    ),
15474                );
15475            }
15476            self.randomness_state_update_opt_mut().unwrap()
15477        }
15478        ///Sets `randomness_state_update` with the provided value.
15479        ///If any other oneof field in the same oneof is set, it will be cleared.
15480        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15481            &mut self,
15482            field: T,
15483        ) {
15484            self.data = Some(
15485                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15486            );
15487        }
15488        ///Sets `randomness_state_update` with the provided value.
15489        ///If any other oneof field in the same oneof is set, it will be cleared.
15490        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15491            mut self,
15492            field: T,
15493        ) -> Self {
15494            self.set_randomness_state_update(field.into());
15495            self
15496        }
15497    }
15498    impl super::TransferObjects {
15499        pub const fn const_default() -> Self {
15500            Self {
15501                objects: Vec::new(),
15502                address: None,
15503            }
15504        }
15505        #[doc(hidden)]
15506        pub fn default_instance() -> &'static Self {
15507            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15508            &DEFAULT
15509        }
15510        ///Returns the value of `objects`, or the default value if `objects` is unset.
15511        pub fn objects(&self) -> &[super::Argument] {
15512            &self.objects
15513        }
15514        ///Returns a mutable reference to `objects`.
15515        ///If the field is unset, it is first initialized with the default value.
15516        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15517            &mut self.objects
15518        }
15519        ///Sets `objects` with the provided value.
15520        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15521            self.objects = field;
15522        }
15523        ///Sets `objects` with the provided value.
15524        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15525            self.set_objects(field);
15526            self
15527        }
15528        ///Returns the value of `address`, or the default value if `address` is unset.
15529        pub fn address(&self) -> &super::Argument {
15530            self.address
15531                .as_ref()
15532                .map(|field| field as _)
15533                .unwrap_or_else(|| super::Argument::default_instance() as _)
15534        }
15535        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15536        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15537            self.address.as_mut().map(|field| field as _)
15538        }
15539        ///Returns a mutable reference to `address`.
15540        ///If the field is unset, it is first initialized with the default value.
15541        pub fn address_mut(&mut self) -> &mut super::Argument {
15542            self.address.get_or_insert_default()
15543        }
15544        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15545        pub fn address_opt(&self) -> Option<&super::Argument> {
15546            self.address.as_ref().map(|field| field as _)
15547        }
15548        ///Sets `address` with the provided value.
15549        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15550            self.address = Some(field.into().into());
15551        }
15552        ///Sets `address` with the provided value.
15553        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15554            self.set_address(field.into());
15555            self
15556        }
15557    }
15558    impl super::TypeArgumentError {
15559        pub const fn const_default() -> Self {
15560            Self {
15561                type_argument: None,
15562                kind: None,
15563            }
15564        }
15565        #[doc(hidden)]
15566        pub fn default_instance() -> &'static Self {
15567            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15568            &DEFAULT
15569        }
15570        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15571        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15572            self.type_argument.as_mut().map(|field| field as _)
15573        }
15574        ///Returns a mutable reference to `type_argument`.
15575        ///If the field is unset, it is first initialized with the default value.
15576        pub fn type_argument_mut(&mut self) -> &mut u32 {
15577            self.type_argument.get_or_insert_default()
15578        }
15579        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15580        pub fn type_argument_opt(&self) -> Option<u32> {
15581            self.type_argument.as_ref().map(|field| *field)
15582        }
15583        ///Sets `type_argument` with the provided value.
15584        pub fn set_type_argument(&mut self, field: u32) {
15585            self.type_argument = Some(field);
15586        }
15587        ///Sets `type_argument` with the provided value.
15588        pub fn with_type_argument(mut self, field: u32) -> Self {
15589            self.set_type_argument(field);
15590            self
15591        }
15592        ///Sets `kind` with the provided value.
15593        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15594            mut self,
15595            field: T,
15596        ) -> Self {
15597            self.set_kind(field.into());
15598            self
15599        }
15600    }
15601    impl super::TypeOrigin {
15602        pub const fn const_default() -> Self {
15603            Self {
15604                module_name: None,
15605                datatype_name: None,
15606                package_id: None,
15607            }
15608        }
15609        #[doc(hidden)]
15610        pub fn default_instance() -> &'static Self {
15611            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15612            &DEFAULT
15613        }
15614        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15615        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15616            self.module_name.as_mut().map(|field| field as _)
15617        }
15618        ///Returns a mutable reference to `module_name`.
15619        ///If the field is unset, it is first initialized with the default value.
15620        pub fn module_name_mut(&mut self) -> &mut String {
15621            self.module_name.get_or_insert_default()
15622        }
15623        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15624        pub fn module_name_opt(&self) -> Option<&str> {
15625            self.module_name.as_ref().map(|field| field as _)
15626        }
15627        ///Sets `module_name` with the provided value.
15628        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15629            self.module_name = Some(field.into().into());
15630        }
15631        ///Sets `module_name` with the provided value.
15632        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15633            self.set_module_name(field.into());
15634            self
15635        }
15636        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15637        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15638            self.datatype_name.as_mut().map(|field| field as _)
15639        }
15640        ///Returns a mutable reference to `datatype_name`.
15641        ///If the field is unset, it is first initialized with the default value.
15642        pub fn datatype_name_mut(&mut self) -> &mut String {
15643            self.datatype_name.get_or_insert_default()
15644        }
15645        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15646        pub fn datatype_name_opt(&self) -> Option<&str> {
15647            self.datatype_name.as_ref().map(|field| field as _)
15648        }
15649        ///Sets `datatype_name` with the provided value.
15650        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15651            self.datatype_name = Some(field.into().into());
15652        }
15653        ///Sets `datatype_name` with the provided value.
15654        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15655            self.set_datatype_name(field.into());
15656            self
15657        }
15658        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15659        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15660            self.package_id.as_mut().map(|field| field as _)
15661        }
15662        ///Returns a mutable reference to `package_id`.
15663        ///If the field is unset, it is first initialized with the default value.
15664        pub fn package_id_mut(&mut self) -> &mut String {
15665            self.package_id.get_or_insert_default()
15666        }
15667        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15668        pub fn package_id_opt(&self) -> Option<&str> {
15669            self.package_id.as_ref().map(|field| field as _)
15670        }
15671        ///Sets `package_id` with the provided value.
15672        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15673            self.package_id = Some(field.into().into());
15674        }
15675        ///Sets `package_id` with the provided value.
15676        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15677            self.set_package_id(field.into());
15678            self
15679        }
15680    }
15681    impl super::TypeParameter {
15682        pub const fn const_default() -> Self {
15683            Self {
15684                constraints: Vec::new(),
15685                is_phantom: None,
15686            }
15687        }
15688        #[doc(hidden)]
15689        pub fn default_instance() -> &'static Self {
15690            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15691            &DEFAULT
15692        }
15693        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15694        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15695            self.is_phantom.as_mut().map(|field| field as _)
15696        }
15697        ///Returns a mutable reference to `is_phantom`.
15698        ///If the field is unset, it is first initialized with the default value.
15699        pub fn is_phantom_mut(&mut self) -> &mut bool {
15700            self.is_phantom.get_or_insert_default()
15701        }
15702        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15703        pub fn is_phantom_opt(&self) -> Option<bool> {
15704            self.is_phantom.as_ref().map(|field| *field)
15705        }
15706        ///Sets `is_phantom` with the provided value.
15707        pub fn set_is_phantom(&mut self, field: bool) {
15708            self.is_phantom = Some(field);
15709        }
15710        ///Sets `is_phantom` with the provided value.
15711        pub fn with_is_phantom(mut self, field: bool) -> Self {
15712            self.set_is_phantom(field);
15713            self
15714        }
15715    }
15716    impl super::UnchangedConsensusObject {
15717        pub const fn const_default() -> Self {
15718            Self {
15719                kind: None,
15720                object_id: None,
15721                version: None,
15722                digest: None,
15723                object_type: None,
15724            }
15725        }
15726        #[doc(hidden)]
15727        pub fn default_instance() -> &'static Self {
15728            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15729            &DEFAULT
15730        }
15731        ///Sets `kind` with the provided value.
15732        pub fn with_kind<
15733            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15734        >(mut self, field: T) -> Self {
15735            self.set_kind(field.into());
15736            self
15737        }
15738        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15739        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15740            self.object_id.as_mut().map(|field| field as _)
15741        }
15742        ///Returns a mutable reference to `object_id`.
15743        ///If the field is unset, it is first initialized with the default value.
15744        pub fn object_id_mut(&mut self) -> &mut String {
15745            self.object_id.get_or_insert_default()
15746        }
15747        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15748        pub fn object_id_opt(&self) -> Option<&str> {
15749            self.object_id.as_ref().map(|field| field as _)
15750        }
15751        ///Sets `object_id` with the provided value.
15752        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15753            self.object_id = Some(field.into().into());
15754        }
15755        ///Sets `object_id` with the provided value.
15756        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15757            self.set_object_id(field.into());
15758            self
15759        }
15760        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15761        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15762            self.version.as_mut().map(|field| field as _)
15763        }
15764        ///Returns a mutable reference to `version`.
15765        ///If the field is unset, it is first initialized with the default value.
15766        pub fn version_mut(&mut self) -> &mut u64 {
15767            self.version.get_or_insert_default()
15768        }
15769        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15770        pub fn version_opt(&self) -> Option<u64> {
15771            self.version.as_ref().map(|field| *field)
15772        }
15773        ///Sets `version` with the provided value.
15774        pub fn set_version(&mut self, field: u64) {
15775            self.version = Some(field);
15776        }
15777        ///Sets `version` with the provided value.
15778        pub fn with_version(mut self, field: u64) -> Self {
15779            self.set_version(field);
15780            self
15781        }
15782        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15783        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15784            self.digest.as_mut().map(|field| field as _)
15785        }
15786        ///Returns a mutable reference to `digest`.
15787        ///If the field is unset, it is first initialized with the default value.
15788        pub fn digest_mut(&mut self) -> &mut String {
15789            self.digest.get_or_insert_default()
15790        }
15791        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15792        pub fn digest_opt(&self) -> Option<&str> {
15793            self.digest.as_ref().map(|field| field as _)
15794        }
15795        ///Sets `digest` with the provided value.
15796        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15797            self.digest = Some(field.into().into());
15798        }
15799        ///Sets `digest` with the provided value.
15800        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15801            self.set_digest(field.into());
15802            self
15803        }
15804        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15805        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15806            self.object_type.as_mut().map(|field| field as _)
15807        }
15808        ///Returns a mutable reference to `object_type`.
15809        ///If the field is unset, it is first initialized with the default value.
15810        pub fn object_type_mut(&mut self) -> &mut String {
15811            self.object_type.get_or_insert_default()
15812        }
15813        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15814        pub fn object_type_opt(&self) -> Option<&str> {
15815            self.object_type.as_ref().map(|field| field as _)
15816        }
15817        ///Sets `object_type` with the provided value.
15818        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15819            self.object_type = Some(field.into().into());
15820        }
15821        ///Sets `object_type` with the provided value.
15822        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15823            self.set_object_type(field.into());
15824            self
15825        }
15826    }
15827    impl super::Upgrade {
15828        pub const fn const_default() -> Self {
15829            Self {
15830                modules: Vec::new(),
15831                dependencies: Vec::new(),
15832                package: None,
15833                ticket: None,
15834            }
15835        }
15836        #[doc(hidden)]
15837        pub fn default_instance() -> &'static Self {
15838            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15839            &DEFAULT
15840        }
15841        ///Returns the value of `modules`, or the default value if `modules` is unset.
15842        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15843            &self.modules
15844        }
15845        ///Returns a mutable reference to `modules`.
15846        ///If the field is unset, it is first initialized with the default value.
15847        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15848            &mut self.modules
15849        }
15850        ///Sets `modules` with the provided value.
15851        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15852            self.modules = field;
15853        }
15854        ///Sets `modules` with the provided value.
15855        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15856            self.set_modules(field);
15857            self
15858        }
15859        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15860        pub fn dependencies(&self) -> &[String] {
15861            &self.dependencies
15862        }
15863        ///Returns a mutable reference to `dependencies`.
15864        ///If the field is unset, it is first initialized with the default value.
15865        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15866            &mut self.dependencies
15867        }
15868        ///Sets `dependencies` with the provided value.
15869        pub fn set_dependencies(&mut self, field: Vec<String>) {
15870            self.dependencies = field;
15871        }
15872        ///Sets `dependencies` with the provided value.
15873        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15874            self.set_dependencies(field);
15875            self
15876        }
15877        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15878        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15879            self.package.as_mut().map(|field| field as _)
15880        }
15881        ///Returns a mutable reference to `package`.
15882        ///If the field is unset, it is first initialized with the default value.
15883        pub fn package_mut(&mut self) -> &mut String {
15884            self.package.get_or_insert_default()
15885        }
15886        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15887        pub fn package_opt(&self) -> Option<&str> {
15888            self.package.as_ref().map(|field| field as _)
15889        }
15890        ///Sets `package` with the provided value.
15891        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15892            self.package = Some(field.into().into());
15893        }
15894        ///Sets `package` with the provided value.
15895        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15896            self.set_package(field.into());
15897            self
15898        }
15899        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15900        pub fn ticket(&self) -> &super::Argument {
15901            self.ticket
15902                .as_ref()
15903                .map(|field| field as _)
15904                .unwrap_or_else(|| super::Argument::default_instance() as _)
15905        }
15906        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15907        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15908            self.ticket.as_mut().map(|field| field as _)
15909        }
15910        ///Returns a mutable reference to `ticket`.
15911        ///If the field is unset, it is first initialized with the default value.
15912        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15913            self.ticket.get_or_insert_default()
15914        }
15915        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15916        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15917            self.ticket.as_ref().map(|field| field as _)
15918        }
15919        ///Sets `ticket` with the provided value.
15920        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15921            self.ticket = Some(field.into().into());
15922        }
15923        ///Sets `ticket` with the provided value.
15924        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15925            self.set_ticket(field.into());
15926            self
15927        }
15928    }
15929    impl super::UserSignature {
15930        pub const fn const_default() -> Self {
15931            Self {
15932                bcs: None,
15933                scheme: None,
15934                signature: None,
15935            }
15936        }
15937        #[doc(hidden)]
15938        pub fn default_instance() -> &'static Self {
15939            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15940            &DEFAULT
15941        }
15942        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15943        pub fn bcs(&self) -> &super::Bcs {
15944            self.bcs
15945                .as_ref()
15946                .map(|field| field as _)
15947                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15948        }
15949        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15950        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15951            self.bcs.as_mut().map(|field| field as _)
15952        }
15953        ///Returns a mutable reference to `bcs`.
15954        ///If the field is unset, it is first initialized with the default value.
15955        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15956            self.bcs.get_or_insert_default()
15957        }
15958        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15959        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15960            self.bcs.as_ref().map(|field| field as _)
15961        }
15962        ///Sets `bcs` with the provided value.
15963        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15964            self.bcs = Some(field.into().into());
15965        }
15966        ///Sets `bcs` with the provided value.
15967        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15968            self.set_bcs(field.into());
15969            self
15970        }
15971        ///Sets `scheme` with the provided value.
15972        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15973            self.set_scheme(field.into());
15974            self
15975        }
15976        ///Returns the value of `simple`, or the default value if `simple` is unset.
15977        pub fn simple(&self) -> &super::SimpleSignature {
15978            if let Some(super::user_signature::Signature::Simple(field)) = &self
15979                .signature
15980            {
15981                field as _
15982            } else {
15983                super::SimpleSignature::default_instance() as _
15984            }
15985        }
15986        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15987        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15988            if let Some(super::user_signature::Signature::Simple(field)) = &self
15989                .signature
15990            {
15991                Some(field as _)
15992            } else {
15993                None
15994            }
15995        }
15996        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15997        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15998            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15999                .signature
16000            {
16001                Some(field as _)
16002            } else {
16003                None
16004            }
16005        }
16006        ///Returns a mutable reference to `simple`.
16007        ///If the field is unset, it is first initialized with the default value.
16008        ///If any other oneof field in the same oneof is set, it will be cleared.
16009        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
16010            if self.simple_opt_mut().is_none() {
16011                self.signature = Some(
16012                    super::user_signature::Signature::Simple(
16013                        super::SimpleSignature::default(),
16014                    ),
16015                );
16016            }
16017            self.simple_opt_mut().unwrap()
16018        }
16019        ///Sets `simple` with the provided value.
16020        ///If any other oneof field in the same oneof is set, it will be cleared.
16021        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
16022            self.signature = Some(
16023                super::user_signature::Signature::Simple(field.into().into()),
16024            );
16025        }
16026        ///Sets `simple` with the provided value.
16027        ///If any other oneof field in the same oneof is set, it will be cleared.
16028        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
16029            self.set_simple(field.into());
16030            self
16031        }
16032        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
16033        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
16034            if let Some(super::user_signature::Signature::Multisig(field)) = &self
16035                .signature
16036            {
16037                field as _
16038            } else {
16039                super::MultisigAggregatedSignature::default_instance() as _
16040            }
16041        }
16042        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
16043        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
16044            if let Some(super::user_signature::Signature::Multisig(field)) = &self
16045                .signature
16046            {
16047                Some(field as _)
16048            } else {
16049                None
16050            }
16051        }
16052        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16053        pub fn multisig_opt_mut(
16054            &mut self,
16055        ) -> Option<&mut super::MultisigAggregatedSignature> {
16056            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
16057                .signature
16058            {
16059                Some(field as _)
16060            } else {
16061                None
16062            }
16063        }
16064        ///Returns a mutable reference to `multisig`.
16065        ///If the field is unset, it is first initialized with the default value.
16066        ///If any other oneof field in the same oneof is set, it will be cleared.
16067        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
16068            if self.multisig_opt_mut().is_none() {
16069                self.signature = Some(
16070                    super::user_signature::Signature::Multisig(
16071                        super::MultisigAggregatedSignature::default(),
16072                    ),
16073                );
16074            }
16075            self.multisig_opt_mut().unwrap()
16076        }
16077        ///Sets `multisig` with the provided value.
16078        ///If any other oneof field in the same oneof is set, it will be cleared.
16079        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
16080            &mut self,
16081            field: T,
16082        ) {
16083            self.signature = Some(
16084                super::user_signature::Signature::Multisig(field.into().into()),
16085            );
16086        }
16087        ///Sets `multisig` with the provided value.
16088        ///If any other oneof field in the same oneof is set, it will be cleared.
16089        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
16090            mut self,
16091            field: T,
16092        ) -> Self {
16093            self.set_multisig(field.into());
16094            self
16095        }
16096        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
16097        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
16098            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16099                .signature
16100            {
16101                field as _
16102            } else {
16103                super::ZkLoginAuthenticator::default_instance() as _
16104            }
16105        }
16106        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
16107        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
16108            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16109                .signature
16110            {
16111                Some(field as _)
16112            } else {
16113                None
16114            }
16115        }
16116        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16117        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
16118            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
16119                .signature
16120            {
16121                Some(field as _)
16122            } else {
16123                None
16124            }
16125        }
16126        ///Returns a mutable reference to `zklogin`.
16127        ///If the field is unset, it is first initialized with the default value.
16128        ///If any other oneof field in the same oneof is set, it will be cleared.
16129        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
16130            if self.zklogin_opt_mut().is_none() {
16131                self.signature = Some(
16132                    super::user_signature::Signature::Zklogin(
16133                        super::ZkLoginAuthenticator::default(),
16134                    ),
16135                );
16136            }
16137            self.zklogin_opt_mut().unwrap()
16138        }
16139        ///Sets `zklogin` with the provided value.
16140        ///If any other oneof field in the same oneof is set, it will be cleared.
16141        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
16142            self.signature = Some(
16143                super::user_signature::Signature::Zklogin(field.into().into()),
16144            );
16145        }
16146        ///Sets `zklogin` with the provided value.
16147        ///If any other oneof field in the same oneof is set, it will be cleared.
16148        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
16149            mut self,
16150            field: T,
16151        ) -> Self {
16152            self.set_zklogin(field.into());
16153            self
16154        }
16155        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
16156        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
16157            if let Some(super::user_signature::Signature::Passkey(field)) = &self
16158                .signature
16159            {
16160                field as _
16161            } else {
16162                super::PasskeyAuthenticator::default_instance() as _
16163            }
16164        }
16165        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
16166        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
16167            if let Some(super::user_signature::Signature::Passkey(field)) = &self
16168                .signature
16169            {
16170                Some(field as _)
16171            } else {
16172                None
16173            }
16174        }
16175        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16176        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
16177            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
16178                .signature
16179            {
16180                Some(field as _)
16181            } else {
16182                None
16183            }
16184        }
16185        ///Returns a mutable reference to `passkey`.
16186        ///If the field is unset, it is first initialized with the default value.
16187        ///If any other oneof field in the same oneof is set, it will be cleared.
16188        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
16189            if self.passkey_opt_mut().is_none() {
16190                self.signature = Some(
16191                    super::user_signature::Signature::Passkey(
16192                        super::PasskeyAuthenticator::default(),
16193                    ),
16194                );
16195            }
16196            self.passkey_opt_mut().unwrap()
16197        }
16198        ///Sets `passkey` with the provided value.
16199        ///If any other oneof field in the same oneof is set, it will be cleared.
16200        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
16201            self.signature = Some(
16202                super::user_signature::Signature::Passkey(field.into().into()),
16203            );
16204        }
16205        ///Sets `passkey` with the provided value.
16206        ///If any other oneof field in the same oneof is set, it will be cleared.
16207        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
16208            mut self,
16209            field: T,
16210        ) -> Self {
16211            self.set_passkey(field.into());
16212            self
16213        }
16214    }
16215    impl super::Validator {
16216        pub const fn const_default() -> Self {
16217            Self {
16218                name: None,
16219                address: None,
16220                description: None,
16221                image_url: None,
16222                project_url: None,
16223                protocol_public_key: None,
16224                proof_of_possession: None,
16225                network_public_key: None,
16226                worker_public_key: None,
16227                network_address: None,
16228                p2p_address: None,
16229                primary_address: None,
16230                worker_address: None,
16231                next_epoch_protocol_public_key: None,
16232                next_epoch_proof_of_possession: None,
16233                next_epoch_network_public_key: None,
16234                next_epoch_worker_public_key: None,
16235                next_epoch_network_address: None,
16236                next_epoch_p2p_address: None,
16237                next_epoch_primary_address: None,
16238                next_epoch_worker_address: None,
16239                metadata_extra_fields: None,
16240                voting_power: None,
16241                operation_cap_id: None,
16242                gas_price: None,
16243                staking_pool: None,
16244                commission_rate: None,
16245                next_epoch_stake: None,
16246                next_epoch_gas_price: None,
16247                next_epoch_commission_rate: None,
16248                extra_fields: None,
16249            }
16250        }
16251        #[doc(hidden)]
16252        pub fn default_instance() -> &'static Self {
16253            static DEFAULT: super::Validator = super::Validator::const_default();
16254            &DEFAULT
16255        }
16256        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16257        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16258            self.name.as_mut().map(|field| field as _)
16259        }
16260        ///Returns a mutable reference to `name`.
16261        ///If the field is unset, it is first initialized with the default value.
16262        pub fn name_mut(&mut self) -> &mut String {
16263            self.name.get_or_insert_default()
16264        }
16265        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
16266        pub fn name_opt(&self) -> Option<&str> {
16267            self.name.as_ref().map(|field| field as _)
16268        }
16269        ///Sets `name` with the provided value.
16270        pub fn set_name<T: Into<String>>(&mut self, field: T) {
16271            self.name = Some(field.into().into());
16272        }
16273        ///Sets `name` with the provided value.
16274        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16275            self.set_name(field.into());
16276            self
16277        }
16278        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16279        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16280            self.address.as_mut().map(|field| field as _)
16281        }
16282        ///Returns a mutable reference to `address`.
16283        ///If the field is unset, it is first initialized with the default value.
16284        pub fn address_mut(&mut self) -> &mut String {
16285            self.address.get_or_insert_default()
16286        }
16287        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16288        pub fn address_opt(&self) -> Option<&str> {
16289            self.address.as_ref().map(|field| field as _)
16290        }
16291        ///Sets `address` with the provided value.
16292        pub fn set_address<T: Into<String>>(&mut self, field: T) {
16293            self.address = Some(field.into().into());
16294        }
16295        ///Sets `address` with the provided value.
16296        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16297            self.set_address(field.into());
16298            self
16299        }
16300        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16301        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16302            self.description.as_mut().map(|field| field as _)
16303        }
16304        ///Returns a mutable reference to `description`.
16305        ///If the field is unset, it is first initialized with the default value.
16306        pub fn description_mut(&mut self) -> &mut String {
16307            self.description.get_or_insert_default()
16308        }
16309        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
16310        pub fn description_opt(&self) -> Option<&str> {
16311            self.description.as_ref().map(|field| field as _)
16312        }
16313        ///Sets `description` with the provided value.
16314        pub fn set_description<T: Into<String>>(&mut self, field: T) {
16315            self.description = Some(field.into().into());
16316        }
16317        ///Sets `description` with the provided value.
16318        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16319            self.set_description(field.into());
16320            self
16321        }
16322        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16323        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16324            self.image_url.as_mut().map(|field| field as _)
16325        }
16326        ///Returns a mutable reference to `image_url`.
16327        ///If the field is unset, it is first initialized with the default value.
16328        pub fn image_url_mut(&mut self) -> &mut String {
16329            self.image_url.get_or_insert_default()
16330        }
16331        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16332        pub fn image_url_opt(&self) -> Option<&str> {
16333            self.image_url.as_ref().map(|field| field as _)
16334        }
16335        ///Sets `image_url` with the provided value.
16336        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16337            self.image_url = Some(field.into().into());
16338        }
16339        ///Sets `image_url` with the provided value.
16340        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16341            self.set_image_url(field.into());
16342            self
16343        }
16344        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16345        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16346            self.project_url.as_mut().map(|field| field as _)
16347        }
16348        ///Returns a mutable reference to `project_url`.
16349        ///If the field is unset, it is first initialized with the default value.
16350        pub fn project_url_mut(&mut self) -> &mut String {
16351            self.project_url.get_or_insert_default()
16352        }
16353        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16354        pub fn project_url_opt(&self) -> Option<&str> {
16355            self.project_url.as_ref().map(|field| field as _)
16356        }
16357        ///Sets `project_url` with the provided value.
16358        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16359            self.project_url = Some(field.into().into());
16360        }
16361        ///Sets `project_url` with the provided value.
16362        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16363            self.set_project_url(field.into());
16364            self
16365        }
16366        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16367        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16368            self.protocol_public_key.as_ref().map(|field| field as _)
16369        }
16370        ///Sets `protocol_public_key` with the provided value.
16371        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16372            &mut self,
16373            field: T,
16374        ) {
16375            self.protocol_public_key = Some(field.into().into());
16376        }
16377        ///Sets `protocol_public_key` with the provided value.
16378        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16379            mut self,
16380            field: T,
16381        ) -> Self {
16382            self.set_protocol_public_key(field.into());
16383            self
16384        }
16385        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16386        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16387            self.proof_of_possession.as_ref().map(|field| field as _)
16388        }
16389        ///Sets `proof_of_possession` with the provided value.
16390        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16391            &mut self,
16392            field: T,
16393        ) {
16394            self.proof_of_possession = Some(field.into().into());
16395        }
16396        ///Sets `proof_of_possession` with the provided value.
16397        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16398            mut self,
16399            field: T,
16400        ) -> Self {
16401            self.set_proof_of_possession(field.into());
16402            self
16403        }
16404        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16405        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16406            self.network_public_key.as_ref().map(|field| field as _)
16407        }
16408        ///Sets `network_public_key` with the provided value.
16409        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16410            &mut self,
16411            field: T,
16412        ) {
16413            self.network_public_key = Some(field.into().into());
16414        }
16415        ///Sets `network_public_key` with the provided value.
16416        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16417            mut self,
16418            field: T,
16419        ) -> Self {
16420            self.set_network_public_key(field.into());
16421            self
16422        }
16423        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16424        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16425            self.worker_public_key.as_ref().map(|field| field as _)
16426        }
16427        ///Sets `worker_public_key` with the provided value.
16428        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16429            &mut self,
16430            field: T,
16431        ) {
16432            self.worker_public_key = Some(field.into().into());
16433        }
16434        ///Sets `worker_public_key` with the provided value.
16435        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16436            mut self,
16437            field: T,
16438        ) -> Self {
16439            self.set_worker_public_key(field.into());
16440            self
16441        }
16442        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16443        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16444            self.network_address.as_mut().map(|field| field as _)
16445        }
16446        ///Returns a mutable reference to `network_address`.
16447        ///If the field is unset, it is first initialized with the default value.
16448        pub fn network_address_mut(&mut self) -> &mut String {
16449            self.network_address.get_or_insert_default()
16450        }
16451        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16452        pub fn network_address_opt(&self) -> Option<&str> {
16453            self.network_address.as_ref().map(|field| field as _)
16454        }
16455        ///Sets `network_address` with the provided value.
16456        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16457            self.network_address = Some(field.into().into());
16458        }
16459        ///Sets `network_address` with the provided value.
16460        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16461            self.set_network_address(field.into());
16462            self
16463        }
16464        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16465        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16466            self.p2p_address.as_mut().map(|field| field as _)
16467        }
16468        ///Returns a mutable reference to `p2p_address`.
16469        ///If the field is unset, it is first initialized with the default value.
16470        pub fn p2p_address_mut(&mut self) -> &mut String {
16471            self.p2p_address.get_or_insert_default()
16472        }
16473        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16474        pub fn p2p_address_opt(&self) -> Option<&str> {
16475            self.p2p_address.as_ref().map(|field| field as _)
16476        }
16477        ///Sets `p2p_address` with the provided value.
16478        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16479            self.p2p_address = Some(field.into().into());
16480        }
16481        ///Sets `p2p_address` with the provided value.
16482        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16483            self.set_p2p_address(field.into());
16484            self
16485        }
16486        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16487        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16488            self.primary_address.as_mut().map(|field| field as _)
16489        }
16490        ///Returns a mutable reference to `primary_address`.
16491        ///If the field is unset, it is first initialized with the default value.
16492        pub fn primary_address_mut(&mut self) -> &mut String {
16493            self.primary_address.get_or_insert_default()
16494        }
16495        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16496        pub fn primary_address_opt(&self) -> Option<&str> {
16497            self.primary_address.as_ref().map(|field| field as _)
16498        }
16499        ///Sets `primary_address` with the provided value.
16500        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16501            self.primary_address = Some(field.into().into());
16502        }
16503        ///Sets `primary_address` with the provided value.
16504        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16505            self.set_primary_address(field.into());
16506            self
16507        }
16508        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16509        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16510            self.worker_address.as_mut().map(|field| field as _)
16511        }
16512        ///Returns a mutable reference to `worker_address`.
16513        ///If the field is unset, it is first initialized with the default value.
16514        pub fn worker_address_mut(&mut self) -> &mut String {
16515            self.worker_address.get_or_insert_default()
16516        }
16517        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16518        pub fn worker_address_opt(&self) -> Option<&str> {
16519            self.worker_address.as_ref().map(|field| field as _)
16520        }
16521        ///Sets `worker_address` with the provided value.
16522        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16523            self.worker_address = Some(field.into().into());
16524        }
16525        ///Sets `worker_address` with the provided value.
16526        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16527            self.set_worker_address(field.into());
16528            self
16529        }
16530        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16531        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16532            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16533        }
16534        ///Sets `next_epoch_protocol_public_key` with the provided value.
16535        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16536            &mut self,
16537            field: T,
16538        ) {
16539            self.next_epoch_protocol_public_key = Some(field.into().into());
16540        }
16541        ///Sets `next_epoch_protocol_public_key` with the provided value.
16542        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16543            mut self,
16544            field: T,
16545        ) -> Self {
16546            self.set_next_epoch_protocol_public_key(field.into());
16547            self
16548        }
16549        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16550        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16551            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16552        }
16553        ///Sets `next_epoch_proof_of_possession` with the provided value.
16554        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16555            &mut self,
16556            field: T,
16557        ) {
16558            self.next_epoch_proof_of_possession = Some(field.into().into());
16559        }
16560        ///Sets `next_epoch_proof_of_possession` with the provided value.
16561        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16562            mut self,
16563            field: T,
16564        ) -> Self {
16565            self.set_next_epoch_proof_of_possession(field.into());
16566            self
16567        }
16568        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16569        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16570            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16571        }
16572        ///Sets `next_epoch_network_public_key` with the provided value.
16573        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16574            &mut self,
16575            field: T,
16576        ) {
16577            self.next_epoch_network_public_key = Some(field.into().into());
16578        }
16579        ///Sets `next_epoch_network_public_key` with the provided value.
16580        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16581            mut self,
16582            field: T,
16583        ) -> Self {
16584            self.set_next_epoch_network_public_key(field.into());
16585            self
16586        }
16587        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16588        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16589            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16590        }
16591        ///Sets `next_epoch_worker_public_key` with the provided value.
16592        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16593            &mut self,
16594            field: T,
16595        ) {
16596            self.next_epoch_worker_public_key = Some(field.into().into());
16597        }
16598        ///Sets `next_epoch_worker_public_key` with the provided value.
16599        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16600            mut self,
16601            field: T,
16602        ) -> Self {
16603            self.set_next_epoch_worker_public_key(field.into());
16604            self
16605        }
16606        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16607        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16608            self.next_epoch_network_address.as_mut().map(|field| field as _)
16609        }
16610        ///Returns a mutable reference to `next_epoch_network_address`.
16611        ///If the field is unset, it is first initialized with the default value.
16612        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16613            self.next_epoch_network_address.get_or_insert_default()
16614        }
16615        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16616        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16617            self.next_epoch_network_address.as_ref().map(|field| field as _)
16618        }
16619        ///Sets `next_epoch_network_address` with the provided value.
16620        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16621            self.next_epoch_network_address = Some(field.into().into());
16622        }
16623        ///Sets `next_epoch_network_address` with the provided value.
16624        pub fn with_next_epoch_network_address<T: Into<String>>(
16625            mut self,
16626            field: T,
16627        ) -> Self {
16628            self.set_next_epoch_network_address(field.into());
16629            self
16630        }
16631        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16632        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16633            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16634        }
16635        ///Returns a mutable reference to `next_epoch_p2p_address`.
16636        ///If the field is unset, it is first initialized with the default value.
16637        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16638            self.next_epoch_p2p_address.get_or_insert_default()
16639        }
16640        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16641        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16642            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16643        }
16644        ///Sets `next_epoch_p2p_address` with the provided value.
16645        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16646            self.next_epoch_p2p_address = Some(field.into().into());
16647        }
16648        ///Sets `next_epoch_p2p_address` with the provided value.
16649        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16650            self.set_next_epoch_p2p_address(field.into());
16651            self
16652        }
16653        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16654        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16655            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16656        }
16657        ///Returns a mutable reference to `next_epoch_primary_address`.
16658        ///If the field is unset, it is first initialized with the default value.
16659        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16660            self.next_epoch_primary_address.get_or_insert_default()
16661        }
16662        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16663        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16664            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16665        }
16666        ///Sets `next_epoch_primary_address` with the provided value.
16667        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16668            self.next_epoch_primary_address = Some(field.into().into());
16669        }
16670        ///Sets `next_epoch_primary_address` with the provided value.
16671        pub fn with_next_epoch_primary_address<T: Into<String>>(
16672            mut self,
16673            field: T,
16674        ) -> Self {
16675            self.set_next_epoch_primary_address(field.into());
16676            self
16677        }
16678        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16679        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16680            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16681        }
16682        ///Returns a mutable reference to `next_epoch_worker_address`.
16683        ///If the field is unset, it is first initialized with the default value.
16684        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16685            self.next_epoch_worker_address.get_or_insert_default()
16686        }
16687        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16688        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16689            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16690        }
16691        ///Sets `next_epoch_worker_address` with the provided value.
16692        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16693            self.next_epoch_worker_address = Some(field.into().into());
16694        }
16695        ///Sets `next_epoch_worker_address` with the provided value.
16696        pub fn with_next_epoch_worker_address<T: Into<String>>(
16697            mut self,
16698            field: T,
16699        ) -> Self {
16700            self.set_next_epoch_worker_address(field.into());
16701            self
16702        }
16703        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16704        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16705            self.metadata_extra_fields
16706                .as_ref()
16707                .map(|field| field as _)
16708                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16709        }
16710        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16711        pub fn metadata_extra_fields_opt_mut(
16712            &mut self,
16713        ) -> Option<&mut super::MoveTable> {
16714            self.metadata_extra_fields.as_mut().map(|field| field as _)
16715        }
16716        ///Returns a mutable reference to `metadata_extra_fields`.
16717        ///If the field is unset, it is first initialized with the default value.
16718        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16719            self.metadata_extra_fields.get_or_insert_default()
16720        }
16721        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16722        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16723            self.metadata_extra_fields.as_ref().map(|field| field as _)
16724        }
16725        ///Sets `metadata_extra_fields` with the provided value.
16726        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16727            &mut self,
16728            field: T,
16729        ) {
16730            self.metadata_extra_fields = Some(field.into().into());
16731        }
16732        ///Sets `metadata_extra_fields` with the provided value.
16733        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16734            mut self,
16735            field: T,
16736        ) -> Self {
16737            self.set_metadata_extra_fields(field.into());
16738            self
16739        }
16740        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16741        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16742            self.voting_power.as_mut().map(|field| field as _)
16743        }
16744        ///Returns a mutable reference to `voting_power`.
16745        ///If the field is unset, it is first initialized with the default value.
16746        pub fn voting_power_mut(&mut self) -> &mut u64 {
16747            self.voting_power.get_or_insert_default()
16748        }
16749        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16750        pub fn voting_power_opt(&self) -> Option<u64> {
16751            self.voting_power.as_ref().map(|field| *field)
16752        }
16753        ///Sets `voting_power` with the provided value.
16754        pub fn set_voting_power(&mut self, field: u64) {
16755            self.voting_power = Some(field);
16756        }
16757        ///Sets `voting_power` with the provided value.
16758        pub fn with_voting_power(mut self, field: u64) -> Self {
16759            self.set_voting_power(field);
16760            self
16761        }
16762        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16763        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16764            self.operation_cap_id.as_mut().map(|field| field as _)
16765        }
16766        ///Returns a mutable reference to `operation_cap_id`.
16767        ///If the field is unset, it is first initialized with the default value.
16768        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16769            self.operation_cap_id.get_or_insert_default()
16770        }
16771        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16772        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16773            self.operation_cap_id.as_ref().map(|field| field as _)
16774        }
16775        ///Sets `operation_cap_id` with the provided value.
16776        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16777            self.operation_cap_id = Some(field.into().into());
16778        }
16779        ///Sets `operation_cap_id` with the provided value.
16780        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16781            self.set_operation_cap_id(field.into());
16782            self
16783        }
16784        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16785        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16786            self.gas_price.as_mut().map(|field| field as _)
16787        }
16788        ///Returns a mutable reference to `gas_price`.
16789        ///If the field is unset, it is first initialized with the default value.
16790        pub fn gas_price_mut(&mut self) -> &mut u64 {
16791            self.gas_price.get_or_insert_default()
16792        }
16793        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16794        pub fn gas_price_opt(&self) -> Option<u64> {
16795            self.gas_price.as_ref().map(|field| *field)
16796        }
16797        ///Sets `gas_price` with the provided value.
16798        pub fn set_gas_price(&mut self, field: u64) {
16799            self.gas_price = Some(field);
16800        }
16801        ///Sets `gas_price` with the provided value.
16802        pub fn with_gas_price(mut self, field: u64) -> Self {
16803            self.set_gas_price(field);
16804            self
16805        }
16806        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16807        pub fn staking_pool(&self) -> &super::StakingPool {
16808            self.staking_pool
16809                .as_ref()
16810                .map(|field| field as _)
16811                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16812        }
16813        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16814        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16815            self.staking_pool.as_mut().map(|field| field as _)
16816        }
16817        ///Returns a mutable reference to `staking_pool`.
16818        ///If the field is unset, it is first initialized with the default value.
16819        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16820            self.staking_pool.get_or_insert_default()
16821        }
16822        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16823        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16824            self.staking_pool.as_ref().map(|field| field as _)
16825        }
16826        ///Sets `staking_pool` with the provided value.
16827        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16828            self.staking_pool = Some(field.into().into());
16829        }
16830        ///Sets `staking_pool` with the provided value.
16831        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16832            mut self,
16833            field: T,
16834        ) -> Self {
16835            self.set_staking_pool(field.into());
16836            self
16837        }
16838        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16839        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16840            self.commission_rate.as_mut().map(|field| field as _)
16841        }
16842        ///Returns a mutable reference to `commission_rate`.
16843        ///If the field is unset, it is first initialized with the default value.
16844        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16845            self.commission_rate.get_or_insert_default()
16846        }
16847        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16848        pub fn commission_rate_opt(&self) -> Option<u64> {
16849            self.commission_rate.as_ref().map(|field| *field)
16850        }
16851        ///Sets `commission_rate` with the provided value.
16852        pub fn set_commission_rate(&mut self, field: u64) {
16853            self.commission_rate = Some(field);
16854        }
16855        ///Sets `commission_rate` with the provided value.
16856        pub fn with_commission_rate(mut self, field: u64) -> Self {
16857            self.set_commission_rate(field);
16858            self
16859        }
16860        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16861        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16862            self.next_epoch_stake.as_mut().map(|field| field as _)
16863        }
16864        ///Returns a mutable reference to `next_epoch_stake`.
16865        ///If the field is unset, it is first initialized with the default value.
16866        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16867            self.next_epoch_stake.get_or_insert_default()
16868        }
16869        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16870        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16871            self.next_epoch_stake.as_ref().map(|field| *field)
16872        }
16873        ///Sets `next_epoch_stake` with the provided value.
16874        pub fn set_next_epoch_stake(&mut self, field: u64) {
16875            self.next_epoch_stake = Some(field);
16876        }
16877        ///Sets `next_epoch_stake` with the provided value.
16878        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16879            self.set_next_epoch_stake(field);
16880            self
16881        }
16882        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16883        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16884            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16885        }
16886        ///Returns a mutable reference to `next_epoch_gas_price`.
16887        ///If the field is unset, it is first initialized with the default value.
16888        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16889            self.next_epoch_gas_price.get_or_insert_default()
16890        }
16891        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16892        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16893            self.next_epoch_gas_price.as_ref().map(|field| *field)
16894        }
16895        ///Sets `next_epoch_gas_price` with the provided value.
16896        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16897            self.next_epoch_gas_price = Some(field);
16898        }
16899        ///Sets `next_epoch_gas_price` with the provided value.
16900        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16901            self.set_next_epoch_gas_price(field);
16902            self
16903        }
16904        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16905        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16906            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16907        }
16908        ///Returns a mutable reference to `next_epoch_commission_rate`.
16909        ///If the field is unset, it is first initialized with the default value.
16910        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16911            self.next_epoch_commission_rate.get_or_insert_default()
16912        }
16913        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16914        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16915            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16916        }
16917        ///Sets `next_epoch_commission_rate` with the provided value.
16918        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16919            self.next_epoch_commission_rate = Some(field);
16920        }
16921        ///Sets `next_epoch_commission_rate` with the provided value.
16922        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16923            self.set_next_epoch_commission_rate(field);
16924            self
16925        }
16926        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16927        pub fn extra_fields(&self) -> &super::MoveTable {
16928            self.extra_fields
16929                .as_ref()
16930                .map(|field| field as _)
16931                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16932        }
16933        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16934        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16935            self.extra_fields.as_mut().map(|field| field as _)
16936        }
16937        ///Returns a mutable reference to `extra_fields`.
16938        ///If the field is unset, it is first initialized with the default value.
16939        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16940            self.extra_fields.get_or_insert_default()
16941        }
16942        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16943        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16944            self.extra_fields.as_ref().map(|field| field as _)
16945        }
16946        ///Sets `extra_fields` with the provided value.
16947        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16948            self.extra_fields = Some(field.into().into());
16949        }
16950        ///Sets `extra_fields` with the provided value.
16951        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16952            self.set_extra_fields(field.into());
16953            self
16954        }
16955    }
16956    impl super::ValidatorAggregatedSignature {
16957        pub const fn const_default() -> Self {
16958            Self {
16959                epoch: None,
16960                signature: None,
16961                bitmap: None,
16962            }
16963        }
16964        #[doc(hidden)]
16965        pub fn default_instance() -> &'static Self {
16966            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16967            &DEFAULT
16968        }
16969        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16970        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16971            self.epoch.as_mut().map(|field| field as _)
16972        }
16973        ///Returns a mutable reference to `epoch`.
16974        ///If the field is unset, it is first initialized with the default value.
16975        pub fn epoch_mut(&mut self) -> &mut u64 {
16976            self.epoch.get_or_insert_default()
16977        }
16978        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16979        pub fn epoch_opt(&self) -> Option<u64> {
16980            self.epoch.as_ref().map(|field| *field)
16981        }
16982        ///Sets `epoch` with the provided value.
16983        pub fn set_epoch(&mut self, field: u64) {
16984            self.epoch = Some(field);
16985        }
16986        ///Sets `epoch` with the provided value.
16987        pub fn with_epoch(mut self, field: u64) -> Self {
16988            self.set_epoch(field);
16989            self
16990        }
16991        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16992        pub fn signature_opt(&self) -> Option<&[u8]> {
16993            self.signature.as_ref().map(|field| field as _)
16994        }
16995        ///Sets `signature` with the provided value.
16996        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16997            self.signature = Some(field.into().into());
16998        }
16999        ///Sets `signature` with the provided value.
17000        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
17001            mut self,
17002            field: T,
17003        ) -> Self {
17004            self.set_signature(field.into());
17005            self
17006        }
17007        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
17008        pub fn bitmap_opt(&self) -> Option<&[u8]> {
17009            self.bitmap.as_ref().map(|field| field as _)
17010        }
17011        ///Sets `bitmap` with the provided value.
17012        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17013            self.bitmap = Some(field.into().into());
17014        }
17015        ///Sets `bitmap` with the provided value.
17016        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
17017            self.set_bitmap(field.into());
17018            self
17019        }
17020    }
17021    impl super::ValidatorCommittee {
17022        pub const fn const_default() -> Self {
17023            Self {
17024                epoch: None,
17025                members: Vec::new(),
17026            }
17027        }
17028        #[doc(hidden)]
17029        pub fn default_instance() -> &'static Self {
17030            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
17031            &DEFAULT
17032        }
17033        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17034        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
17035            self.epoch.as_mut().map(|field| field as _)
17036        }
17037        ///Returns a mutable reference to `epoch`.
17038        ///If the field is unset, it is first initialized with the default value.
17039        pub fn epoch_mut(&mut self) -> &mut u64 {
17040            self.epoch.get_or_insert_default()
17041        }
17042        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17043        pub fn epoch_opt(&self) -> Option<u64> {
17044            self.epoch.as_ref().map(|field| *field)
17045        }
17046        ///Sets `epoch` with the provided value.
17047        pub fn set_epoch(&mut self, field: u64) {
17048            self.epoch = Some(field);
17049        }
17050        ///Sets `epoch` with the provided value.
17051        pub fn with_epoch(mut self, field: u64) -> Self {
17052            self.set_epoch(field);
17053            self
17054        }
17055        ///Returns the value of `members`, or the default value if `members` is unset.
17056        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
17057            &self.members
17058        }
17059        ///Returns a mutable reference to `members`.
17060        ///If the field is unset, it is first initialized with the default value.
17061        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
17062            &mut self.members
17063        }
17064        ///Sets `members` with the provided value.
17065        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
17066            self.members = field;
17067        }
17068        ///Sets `members` with the provided value.
17069        pub fn with_members(
17070            mut self,
17071            field: Vec<super::ValidatorCommitteeMember>,
17072        ) -> Self {
17073            self.set_members(field);
17074            self
17075        }
17076    }
17077    impl super::ValidatorCommitteeMember {
17078        pub const fn const_default() -> Self {
17079            Self {
17080                public_key: None,
17081                weight: None,
17082            }
17083        }
17084        #[doc(hidden)]
17085        pub fn default_instance() -> &'static Self {
17086            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
17087            &DEFAULT
17088        }
17089        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
17090        pub fn public_key_opt(&self) -> Option<&[u8]> {
17091            self.public_key.as_ref().map(|field| field as _)
17092        }
17093        ///Sets `public_key` with the provided value.
17094        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17095            self.public_key = Some(field.into().into());
17096        }
17097        ///Sets `public_key` with the provided value.
17098        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
17099            mut self,
17100            field: T,
17101        ) -> Self {
17102            self.set_public_key(field.into());
17103            self
17104        }
17105        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17106        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
17107            self.weight.as_mut().map(|field| field as _)
17108        }
17109        ///Returns a mutable reference to `weight`.
17110        ///If the field is unset, it is first initialized with the default value.
17111        pub fn weight_mut(&mut self) -> &mut u64 {
17112            self.weight.get_or_insert_default()
17113        }
17114        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
17115        pub fn weight_opt(&self) -> Option<u64> {
17116            self.weight.as_ref().map(|field| *field)
17117        }
17118        ///Sets `weight` with the provided value.
17119        pub fn set_weight(&mut self, field: u64) {
17120            self.weight = Some(field);
17121        }
17122        ///Sets `weight` with the provided value.
17123        pub fn with_weight(mut self, field: u64) -> Self {
17124            self.set_weight(field);
17125            self
17126        }
17127    }
17128    impl super::ValidatorExecutionTimeObservation {
17129        pub const fn const_default() -> Self {
17130            Self {
17131                validator: None,
17132                duration: None,
17133            }
17134        }
17135        #[doc(hidden)]
17136        pub fn default_instance() -> &'static Self {
17137            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
17138            &DEFAULT
17139        }
17140        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
17141        pub fn validator_opt(&self) -> Option<&[u8]> {
17142            self.validator.as_ref().map(|field| field as _)
17143        }
17144        ///Sets `validator` with the provided value.
17145        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17146            self.validator = Some(field.into().into());
17147        }
17148        ///Sets `validator` with the provided value.
17149        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
17150            mut self,
17151            field: T,
17152        ) -> Self {
17153            self.set_validator(field.into());
17154            self
17155        }
17156        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17157        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
17158            self.duration.as_mut().map(|field| field as _)
17159        }
17160        ///Returns a mutable reference to `duration`.
17161        ///If the field is unset, it is first initialized with the default value.
17162        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
17163            self.duration.get_or_insert_default()
17164        }
17165        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
17166        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
17167            self.duration.as_ref().map(|field| field as _)
17168        }
17169        ///Sets `duration` with the provided value.
17170        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
17171            self.duration = Some(field.into().into());
17172        }
17173        ///Sets `duration` with the provided value.
17174        pub fn with_duration<T: Into<::prost_types::Duration>>(
17175            mut self,
17176            field: T,
17177        ) -> Self {
17178            self.set_duration(field.into());
17179            self
17180        }
17181    }
17182    impl super::ValidatorReportRecord {
17183        pub const fn const_default() -> Self {
17184            Self {
17185                reported: None,
17186                reporters: Vec::new(),
17187            }
17188        }
17189        #[doc(hidden)]
17190        pub fn default_instance() -> &'static Self {
17191            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
17192            &DEFAULT
17193        }
17194        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17195        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
17196            self.reported.as_mut().map(|field| field as _)
17197        }
17198        ///Returns a mutable reference to `reported`.
17199        ///If the field is unset, it is first initialized with the default value.
17200        pub fn reported_mut(&mut self) -> &mut String {
17201            self.reported.get_or_insert_default()
17202        }
17203        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
17204        pub fn reported_opt(&self) -> Option<&str> {
17205            self.reported.as_ref().map(|field| field as _)
17206        }
17207        ///Sets `reported` with the provided value.
17208        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
17209            self.reported = Some(field.into().into());
17210        }
17211        ///Sets `reported` with the provided value.
17212        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
17213            self.set_reported(field.into());
17214            self
17215        }
17216        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
17217        pub fn reporters(&self) -> &[String] {
17218            &self.reporters
17219        }
17220        ///Returns a mutable reference to `reporters`.
17221        ///If the field is unset, it is first initialized with the default value.
17222        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
17223            &mut self.reporters
17224        }
17225        ///Sets `reporters` with the provided value.
17226        pub fn set_reporters(&mut self, field: Vec<String>) {
17227            self.reporters = field;
17228        }
17229        ///Sets `reporters` with the provided value.
17230        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
17231            self.set_reporters(field);
17232            self
17233        }
17234    }
17235    impl super::ValidatorSet {
17236        pub const fn const_default() -> Self {
17237            Self {
17238                total_stake: None,
17239                active_validators: Vec::new(),
17240                pending_active_validators: None,
17241                pending_removals: Vec::new(),
17242                staking_pool_mappings: None,
17243                inactive_validators: None,
17244                validator_candidates: None,
17245                at_risk_validators: std::collections::BTreeMap::new(),
17246                extra_fields: None,
17247            }
17248        }
17249        #[doc(hidden)]
17250        pub fn default_instance() -> &'static Self {
17251            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17252            &DEFAULT
17253        }
17254        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17255        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17256            self.total_stake.as_mut().map(|field| field as _)
17257        }
17258        ///Returns a mutable reference to `total_stake`.
17259        ///If the field is unset, it is first initialized with the default value.
17260        pub fn total_stake_mut(&mut self) -> &mut u64 {
17261            self.total_stake.get_or_insert_default()
17262        }
17263        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
17264        pub fn total_stake_opt(&self) -> Option<u64> {
17265            self.total_stake.as_ref().map(|field| *field)
17266        }
17267        ///Sets `total_stake` with the provided value.
17268        pub fn set_total_stake(&mut self, field: u64) {
17269            self.total_stake = Some(field);
17270        }
17271        ///Sets `total_stake` with the provided value.
17272        pub fn with_total_stake(mut self, field: u64) -> Self {
17273            self.set_total_stake(field);
17274            self
17275        }
17276        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
17277        pub fn active_validators(&self) -> &[super::Validator] {
17278            &self.active_validators
17279        }
17280        ///Returns a mutable reference to `active_validators`.
17281        ///If the field is unset, it is first initialized with the default value.
17282        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17283            &mut self.active_validators
17284        }
17285        ///Sets `active_validators` with the provided value.
17286        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17287            self.active_validators = field;
17288        }
17289        ///Sets `active_validators` with the provided value.
17290        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17291            self.set_active_validators(field);
17292            self
17293        }
17294        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
17295        pub fn pending_active_validators(&self) -> &super::MoveTable {
17296            self.pending_active_validators
17297                .as_ref()
17298                .map(|field| field as _)
17299                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17300        }
17301        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17302        pub fn pending_active_validators_opt_mut(
17303            &mut self,
17304        ) -> Option<&mut super::MoveTable> {
17305            self.pending_active_validators.as_mut().map(|field| field as _)
17306        }
17307        ///Returns a mutable reference to `pending_active_validators`.
17308        ///If the field is unset, it is first initialized with the default value.
17309        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17310            self.pending_active_validators.get_or_insert_default()
17311        }
17312        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17313        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17314            self.pending_active_validators.as_ref().map(|field| field as _)
17315        }
17316        ///Sets `pending_active_validators` with the provided value.
17317        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17318            &mut self,
17319            field: T,
17320        ) {
17321            self.pending_active_validators = Some(field.into().into());
17322        }
17323        ///Sets `pending_active_validators` with the provided value.
17324        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17325            mut self,
17326            field: T,
17327        ) -> Self {
17328            self.set_pending_active_validators(field.into());
17329            self
17330        }
17331        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
17332        pub fn pending_removals(&self) -> &[u64] {
17333            &self.pending_removals
17334        }
17335        ///Returns a mutable reference to `pending_removals`.
17336        ///If the field is unset, it is first initialized with the default value.
17337        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17338            &mut self.pending_removals
17339        }
17340        ///Sets `pending_removals` with the provided value.
17341        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17342            self.pending_removals = field;
17343        }
17344        ///Sets `pending_removals` with the provided value.
17345        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17346            self.set_pending_removals(field);
17347            self
17348        }
17349        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
17350        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17351            self.staking_pool_mappings
17352                .as_ref()
17353                .map(|field| field as _)
17354                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17355        }
17356        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17357        pub fn staking_pool_mappings_opt_mut(
17358            &mut self,
17359        ) -> Option<&mut super::MoveTable> {
17360            self.staking_pool_mappings.as_mut().map(|field| field as _)
17361        }
17362        ///Returns a mutable reference to `staking_pool_mappings`.
17363        ///If the field is unset, it is first initialized with the default value.
17364        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17365            self.staking_pool_mappings.get_or_insert_default()
17366        }
17367        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
17368        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17369            self.staking_pool_mappings.as_ref().map(|field| field as _)
17370        }
17371        ///Sets `staking_pool_mappings` with the provided value.
17372        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17373            &mut self,
17374            field: T,
17375        ) {
17376            self.staking_pool_mappings = Some(field.into().into());
17377        }
17378        ///Sets `staking_pool_mappings` with the provided value.
17379        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17380            mut self,
17381            field: T,
17382        ) -> Self {
17383            self.set_staking_pool_mappings(field.into());
17384            self
17385        }
17386        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17387        pub fn inactive_validators(&self) -> &super::MoveTable {
17388            self.inactive_validators
17389                .as_ref()
17390                .map(|field| field as _)
17391                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17392        }
17393        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17394        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17395            self.inactive_validators.as_mut().map(|field| field as _)
17396        }
17397        ///Returns a mutable reference to `inactive_validators`.
17398        ///If the field is unset, it is first initialized with the default value.
17399        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17400            self.inactive_validators.get_or_insert_default()
17401        }
17402        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17403        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17404            self.inactive_validators.as_ref().map(|field| field as _)
17405        }
17406        ///Sets `inactive_validators` with the provided value.
17407        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17408            self.inactive_validators = Some(field.into().into());
17409        }
17410        ///Sets `inactive_validators` with the provided value.
17411        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17412            mut self,
17413            field: T,
17414        ) -> Self {
17415            self.set_inactive_validators(field.into());
17416            self
17417        }
17418        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17419        pub fn validator_candidates(&self) -> &super::MoveTable {
17420            self.validator_candidates
17421                .as_ref()
17422                .map(|field| field as _)
17423                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17424        }
17425        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17426        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17427            self.validator_candidates.as_mut().map(|field| field as _)
17428        }
17429        ///Returns a mutable reference to `validator_candidates`.
17430        ///If the field is unset, it is first initialized with the default value.
17431        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17432            self.validator_candidates.get_or_insert_default()
17433        }
17434        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17435        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17436            self.validator_candidates.as_ref().map(|field| field as _)
17437        }
17438        ///Sets `validator_candidates` with the provided value.
17439        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17440            self.validator_candidates = Some(field.into().into());
17441        }
17442        ///Sets `validator_candidates` with the provided value.
17443        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17444            mut self,
17445            field: T,
17446        ) -> Self {
17447            self.set_validator_candidates(field.into());
17448            self
17449        }
17450        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17451        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17452            &self.at_risk_validators
17453        }
17454        ///Returns a mutable reference to `at_risk_validators`.
17455        ///If the field is unset, it is first initialized with the default value.
17456        pub fn at_risk_validators_mut(
17457            &mut self,
17458        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17459            &mut self.at_risk_validators
17460        }
17461        ///Sets `at_risk_validators` with the provided value.
17462        pub fn set_at_risk_validators(
17463            &mut self,
17464            field: ::std::collections::BTreeMap<String, u64>,
17465        ) {
17466            self.at_risk_validators = field;
17467        }
17468        ///Sets `at_risk_validators` with the provided value.
17469        pub fn with_at_risk_validators(
17470            mut self,
17471            field: ::std::collections::BTreeMap<String, u64>,
17472        ) -> Self {
17473            self.set_at_risk_validators(field);
17474            self
17475        }
17476        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17477        pub fn extra_fields(&self) -> &super::MoveTable {
17478            self.extra_fields
17479                .as_ref()
17480                .map(|field| field as _)
17481                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17482        }
17483        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17484        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17485            self.extra_fields.as_mut().map(|field| field as _)
17486        }
17487        ///Returns a mutable reference to `extra_fields`.
17488        ///If the field is unset, it is first initialized with the default value.
17489        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17490            self.extra_fields.get_or_insert_default()
17491        }
17492        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17493        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17494            self.extra_fields.as_ref().map(|field| field as _)
17495        }
17496        ///Sets `extra_fields` with the provided value.
17497        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17498            self.extra_fields = Some(field.into().into());
17499        }
17500        ///Sets `extra_fields` with the provided value.
17501        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17502            self.set_extra_fields(field.into());
17503            self
17504        }
17505    }
17506    impl super::VariantDescriptor {
17507        pub const fn const_default() -> Self {
17508            Self {
17509                name: None,
17510                position: None,
17511                fields: Vec::new(),
17512            }
17513        }
17514        #[doc(hidden)]
17515        pub fn default_instance() -> &'static Self {
17516            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17517            &DEFAULT
17518        }
17519        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17520        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17521            self.name.as_mut().map(|field| field as _)
17522        }
17523        ///Returns a mutable reference to `name`.
17524        ///If the field is unset, it is first initialized with the default value.
17525        pub fn name_mut(&mut self) -> &mut String {
17526            self.name.get_or_insert_default()
17527        }
17528        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17529        pub fn name_opt(&self) -> Option<&str> {
17530            self.name.as_ref().map(|field| field as _)
17531        }
17532        ///Sets `name` with the provided value.
17533        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17534            self.name = Some(field.into().into());
17535        }
17536        ///Sets `name` with the provided value.
17537        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17538            self.set_name(field.into());
17539            self
17540        }
17541        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17542        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17543            self.position.as_mut().map(|field| field as _)
17544        }
17545        ///Returns a mutable reference to `position`.
17546        ///If the field is unset, it is first initialized with the default value.
17547        pub fn position_mut(&mut self) -> &mut u32 {
17548            self.position.get_or_insert_default()
17549        }
17550        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17551        pub fn position_opt(&self) -> Option<u32> {
17552            self.position.as_ref().map(|field| *field)
17553        }
17554        ///Sets `position` with the provided value.
17555        pub fn set_position(&mut self, field: u32) {
17556            self.position = Some(field);
17557        }
17558        ///Sets `position` with the provided value.
17559        pub fn with_position(mut self, field: u32) -> Self {
17560            self.set_position(field);
17561            self
17562        }
17563        ///Returns the value of `fields`, or the default value if `fields` is unset.
17564        pub fn fields(&self) -> &[super::FieldDescriptor] {
17565            &self.fields
17566        }
17567        ///Returns a mutable reference to `fields`.
17568        ///If the field is unset, it is first initialized with the default value.
17569        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17570            &mut self.fields
17571        }
17572        ///Sets `fields` with the provided value.
17573        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17574            self.fields = field;
17575        }
17576        ///Sets `fields` with the provided value.
17577        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17578            self.set_fields(field);
17579            self
17580        }
17581    }
17582    impl super::VerifySignatureRequest {
17583        pub const fn const_default() -> Self {
17584            Self {
17585                message: None,
17586                signature: None,
17587                address: None,
17588                jwks: Vec::new(),
17589            }
17590        }
17591        #[doc(hidden)]
17592        pub fn default_instance() -> &'static Self {
17593            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17594            &DEFAULT
17595        }
17596        ///Returns the value of `message`, or the default value if `message` is unset.
17597        pub fn message(&self) -> &super::Bcs {
17598            self.message
17599                .as_ref()
17600                .map(|field| field as _)
17601                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17602        }
17603        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17604        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17605            self.message.as_mut().map(|field| field as _)
17606        }
17607        ///Returns a mutable reference to `message`.
17608        ///If the field is unset, it is first initialized with the default value.
17609        pub fn message_mut(&mut self) -> &mut super::Bcs {
17610            self.message.get_or_insert_default()
17611        }
17612        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17613        pub fn message_opt(&self) -> Option<&super::Bcs> {
17614            self.message.as_ref().map(|field| field as _)
17615        }
17616        ///Sets `message` with the provided value.
17617        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17618            self.message = Some(field.into().into());
17619        }
17620        ///Sets `message` with the provided value.
17621        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17622            self.set_message(field.into());
17623            self
17624        }
17625        ///Returns the value of `signature`, or the default value if `signature` is unset.
17626        pub fn signature(&self) -> &super::UserSignature {
17627            self.signature
17628                .as_ref()
17629                .map(|field| field as _)
17630                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17631        }
17632        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17633        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17634            self.signature.as_mut().map(|field| field as _)
17635        }
17636        ///Returns a mutable reference to `signature`.
17637        ///If the field is unset, it is first initialized with the default value.
17638        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17639            self.signature.get_or_insert_default()
17640        }
17641        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17642        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17643            self.signature.as_ref().map(|field| field as _)
17644        }
17645        ///Sets `signature` with the provided value.
17646        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17647            self.signature = Some(field.into().into());
17648        }
17649        ///Sets `signature` with the provided value.
17650        pub fn with_signature<T: Into<super::UserSignature>>(
17651            mut self,
17652            field: T,
17653        ) -> Self {
17654            self.set_signature(field.into());
17655            self
17656        }
17657        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17658        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17659            self.address.as_mut().map(|field| field as _)
17660        }
17661        ///Returns a mutable reference to `address`.
17662        ///If the field is unset, it is first initialized with the default value.
17663        pub fn address_mut(&mut self) -> &mut String {
17664            self.address.get_or_insert_default()
17665        }
17666        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17667        pub fn address_opt(&self) -> Option<&str> {
17668            self.address.as_ref().map(|field| field as _)
17669        }
17670        ///Sets `address` with the provided value.
17671        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17672            self.address = Some(field.into().into());
17673        }
17674        ///Sets `address` with the provided value.
17675        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17676            self.set_address(field.into());
17677            self
17678        }
17679        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17680        pub fn jwks(&self) -> &[super::ActiveJwk] {
17681            &self.jwks
17682        }
17683        ///Returns a mutable reference to `jwks`.
17684        ///If the field is unset, it is first initialized with the default value.
17685        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17686            &mut self.jwks
17687        }
17688        ///Sets `jwks` with the provided value.
17689        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17690            self.jwks = field;
17691        }
17692        ///Sets `jwks` with the provided value.
17693        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17694            self.set_jwks(field);
17695            self
17696        }
17697    }
17698    impl super::VerifySignatureResponse {
17699        pub const fn const_default() -> Self {
17700            Self {
17701                is_valid: None,
17702                reason: None,
17703            }
17704        }
17705        #[doc(hidden)]
17706        pub fn default_instance() -> &'static Self {
17707            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17708            &DEFAULT
17709        }
17710        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17711        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17712            self.is_valid.as_mut().map(|field| field as _)
17713        }
17714        ///Returns a mutable reference to `is_valid`.
17715        ///If the field is unset, it is first initialized with the default value.
17716        pub fn is_valid_mut(&mut self) -> &mut bool {
17717            self.is_valid.get_or_insert_default()
17718        }
17719        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17720        pub fn is_valid_opt(&self) -> Option<bool> {
17721            self.is_valid.as_ref().map(|field| *field)
17722        }
17723        ///Sets `is_valid` with the provided value.
17724        pub fn set_is_valid(&mut self, field: bool) {
17725            self.is_valid = Some(field);
17726        }
17727        ///Sets `is_valid` with the provided value.
17728        pub fn with_is_valid(mut self, field: bool) -> Self {
17729            self.set_is_valid(field);
17730            self
17731        }
17732        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17733        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17734            self.reason.as_mut().map(|field| field as _)
17735        }
17736        ///Returns a mutable reference to `reason`.
17737        ///If the field is unset, it is first initialized with the default value.
17738        pub fn reason_mut(&mut self) -> &mut String {
17739            self.reason.get_or_insert_default()
17740        }
17741        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17742        pub fn reason_opt(&self) -> Option<&str> {
17743            self.reason.as_ref().map(|field| field as _)
17744        }
17745        ///Sets `reason` with the provided value.
17746        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17747            self.reason = Some(field.into().into());
17748        }
17749        ///Sets `reason` with the provided value.
17750        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17751            self.set_reason(field.into());
17752            self
17753        }
17754    }
17755    impl super::VersionAssignment {
17756        pub const fn const_default() -> Self {
17757            Self {
17758                object_id: None,
17759                start_version: None,
17760                version: None,
17761            }
17762        }
17763        #[doc(hidden)]
17764        pub fn default_instance() -> &'static Self {
17765            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17766            &DEFAULT
17767        }
17768        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17769        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17770            self.object_id.as_mut().map(|field| field as _)
17771        }
17772        ///Returns a mutable reference to `object_id`.
17773        ///If the field is unset, it is first initialized with the default value.
17774        pub fn object_id_mut(&mut self) -> &mut String {
17775            self.object_id.get_or_insert_default()
17776        }
17777        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17778        pub fn object_id_opt(&self) -> Option<&str> {
17779            self.object_id.as_ref().map(|field| field as _)
17780        }
17781        ///Sets `object_id` with the provided value.
17782        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17783            self.object_id = Some(field.into().into());
17784        }
17785        ///Sets `object_id` with the provided value.
17786        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17787            self.set_object_id(field.into());
17788            self
17789        }
17790        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17791        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17792            self.start_version.as_mut().map(|field| field as _)
17793        }
17794        ///Returns a mutable reference to `start_version`.
17795        ///If the field is unset, it is first initialized with the default value.
17796        pub fn start_version_mut(&mut self) -> &mut u64 {
17797            self.start_version.get_or_insert_default()
17798        }
17799        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17800        pub fn start_version_opt(&self) -> Option<u64> {
17801            self.start_version.as_ref().map(|field| *field)
17802        }
17803        ///Sets `start_version` with the provided value.
17804        pub fn set_start_version(&mut self, field: u64) {
17805            self.start_version = Some(field);
17806        }
17807        ///Sets `start_version` with the provided value.
17808        pub fn with_start_version(mut self, field: u64) -> Self {
17809            self.set_start_version(field);
17810            self
17811        }
17812        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17813        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17814            self.version.as_mut().map(|field| field as _)
17815        }
17816        ///Returns a mutable reference to `version`.
17817        ///If the field is unset, it is first initialized with the default value.
17818        pub fn version_mut(&mut self) -> &mut u64 {
17819            self.version.get_or_insert_default()
17820        }
17821        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17822        pub fn version_opt(&self) -> Option<u64> {
17823            self.version.as_ref().map(|field| *field)
17824        }
17825        ///Sets `version` with the provided value.
17826        pub fn set_version(&mut self, field: u64) {
17827            self.version = Some(field);
17828        }
17829        ///Sets `version` with the provided value.
17830        pub fn with_version(mut self, field: u64) -> Self {
17831            self.set_version(field);
17832            self
17833        }
17834    }
17835    impl super::ZkLoginAuthenticator {
17836        pub const fn const_default() -> Self {
17837            Self {
17838                inputs: None,
17839                max_epoch: None,
17840                signature: None,
17841                public_identifier: None,
17842                jwk_id: None,
17843            }
17844        }
17845        #[doc(hidden)]
17846        pub fn default_instance() -> &'static Self {
17847            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17848            &DEFAULT
17849        }
17850        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17851        pub fn inputs(&self) -> &super::ZkLoginInputs {
17852            self.inputs
17853                .as_ref()
17854                .map(|field| field as _)
17855                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17856        }
17857        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17858        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17859            self.inputs.as_mut().map(|field| field as _)
17860        }
17861        ///Returns a mutable reference to `inputs`.
17862        ///If the field is unset, it is first initialized with the default value.
17863        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17864            self.inputs.get_or_insert_default()
17865        }
17866        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17867        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17868            self.inputs.as_ref().map(|field| field as _)
17869        }
17870        ///Sets `inputs` with the provided value.
17871        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17872            self.inputs = Some(field.into().into());
17873        }
17874        ///Sets `inputs` with the provided value.
17875        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17876            self.set_inputs(field.into());
17877            self
17878        }
17879        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17880        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17881            self.max_epoch.as_mut().map(|field| field as _)
17882        }
17883        ///Returns a mutable reference to `max_epoch`.
17884        ///If the field is unset, it is first initialized with the default value.
17885        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17886            self.max_epoch.get_or_insert_default()
17887        }
17888        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17889        pub fn max_epoch_opt(&self) -> Option<u64> {
17890            self.max_epoch.as_ref().map(|field| *field)
17891        }
17892        ///Sets `max_epoch` with the provided value.
17893        pub fn set_max_epoch(&mut self, field: u64) {
17894            self.max_epoch = Some(field);
17895        }
17896        ///Sets `max_epoch` with the provided value.
17897        pub fn with_max_epoch(mut self, field: u64) -> Self {
17898            self.set_max_epoch(field);
17899            self
17900        }
17901        ///Returns the value of `signature`, or the default value if `signature` is unset.
17902        pub fn signature(&self) -> &super::SimpleSignature {
17903            self.signature
17904                .as_ref()
17905                .map(|field| field as _)
17906                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17907        }
17908        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17909        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17910            self.signature.as_mut().map(|field| field as _)
17911        }
17912        ///Returns a mutable reference to `signature`.
17913        ///If the field is unset, it is first initialized with the default value.
17914        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17915            self.signature.get_or_insert_default()
17916        }
17917        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17918        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17919            self.signature.as_ref().map(|field| field as _)
17920        }
17921        ///Sets `signature` with the provided value.
17922        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17923            self.signature = Some(field.into().into());
17924        }
17925        ///Sets `signature` with the provided value.
17926        pub fn with_signature<T: Into<super::SimpleSignature>>(
17927            mut self,
17928            field: T,
17929        ) -> Self {
17930            self.set_signature(field.into());
17931            self
17932        }
17933        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17934        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17935            self.public_identifier
17936                .as_ref()
17937                .map(|field| field as _)
17938                .unwrap_or_else(|| {
17939                    super::ZkLoginPublicIdentifier::default_instance() as _
17940                })
17941        }
17942        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17943        pub fn public_identifier_opt_mut(
17944            &mut self,
17945        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17946            self.public_identifier.as_mut().map(|field| field as _)
17947        }
17948        ///Returns a mutable reference to `public_identifier`.
17949        ///If the field is unset, it is first initialized with the default value.
17950        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17951            self.public_identifier.get_or_insert_default()
17952        }
17953        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17954        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17955            self.public_identifier.as_ref().map(|field| field as _)
17956        }
17957        ///Sets `public_identifier` with the provided value.
17958        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17959            &mut self,
17960            field: T,
17961        ) {
17962            self.public_identifier = Some(field.into().into());
17963        }
17964        ///Sets `public_identifier` with the provided value.
17965        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17966            mut self,
17967            field: T,
17968        ) -> Self {
17969            self.set_public_identifier(field.into());
17970            self
17971        }
17972        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17973        pub fn jwk_id(&self) -> &super::JwkId {
17974            self.jwk_id
17975                .as_ref()
17976                .map(|field| field as _)
17977                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17978        }
17979        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17980        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17981            self.jwk_id.as_mut().map(|field| field as _)
17982        }
17983        ///Returns a mutable reference to `jwk_id`.
17984        ///If the field is unset, it is first initialized with the default value.
17985        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17986            self.jwk_id.get_or_insert_default()
17987        }
17988        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17989        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17990            self.jwk_id.as_ref().map(|field| field as _)
17991        }
17992        ///Sets `jwk_id` with the provided value.
17993        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17994            self.jwk_id = Some(field.into().into());
17995        }
17996        ///Sets `jwk_id` with the provided value.
17997        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17998            self.set_jwk_id(field.into());
17999            self
18000        }
18001    }
18002    impl super::ZkLoginClaim {
18003        pub const fn const_default() -> Self {
18004            Self {
18005                value: None,
18006                index_mod_4: None,
18007            }
18008        }
18009        #[doc(hidden)]
18010        pub fn default_instance() -> &'static Self {
18011            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
18012            &DEFAULT
18013        }
18014        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18015        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
18016            self.value.as_mut().map(|field| field as _)
18017        }
18018        ///Returns a mutable reference to `value`.
18019        ///If the field is unset, it is first initialized with the default value.
18020        pub fn value_mut(&mut self) -> &mut String {
18021            self.value.get_or_insert_default()
18022        }
18023        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
18024        pub fn value_opt(&self) -> Option<&str> {
18025            self.value.as_ref().map(|field| field as _)
18026        }
18027        ///Sets `value` with the provided value.
18028        pub fn set_value<T: Into<String>>(&mut self, field: T) {
18029            self.value = Some(field.into().into());
18030        }
18031        ///Sets `value` with the provided value.
18032        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
18033            self.set_value(field.into());
18034            self
18035        }
18036        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18037        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
18038            self.index_mod_4.as_mut().map(|field| field as _)
18039        }
18040        ///Returns a mutable reference to `index_mod_4`.
18041        ///If the field is unset, it is first initialized with the default value.
18042        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
18043            self.index_mod_4.get_or_insert_default()
18044        }
18045        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
18046        pub fn index_mod_4_opt(&self) -> Option<u32> {
18047            self.index_mod_4.as_ref().map(|field| *field)
18048        }
18049        ///Sets `index_mod_4` with the provided value.
18050        pub fn set_index_mod_4(&mut self, field: u32) {
18051            self.index_mod_4 = Some(field);
18052        }
18053        ///Sets `index_mod_4` with the provided value.
18054        pub fn with_index_mod_4(mut self, field: u32) -> Self {
18055            self.set_index_mod_4(field);
18056            self
18057        }
18058    }
18059    impl super::ZkLoginInputs {
18060        pub const fn const_default() -> Self {
18061            Self {
18062                proof_points: None,
18063                iss_base64_details: None,
18064                header_base64: None,
18065                address_seed: None,
18066            }
18067        }
18068        #[doc(hidden)]
18069        pub fn default_instance() -> &'static Self {
18070            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
18071            &DEFAULT
18072        }
18073        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
18074        pub fn proof_points(&self) -> &super::ZkLoginProof {
18075            self.proof_points
18076                .as_ref()
18077                .map(|field| field as _)
18078                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
18079        }
18080        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18081        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
18082            self.proof_points.as_mut().map(|field| field as _)
18083        }
18084        ///Returns a mutable reference to `proof_points`.
18085        ///If the field is unset, it is first initialized with the default value.
18086        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
18087            self.proof_points.get_or_insert_default()
18088        }
18089        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
18090        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
18091            self.proof_points.as_ref().map(|field| field as _)
18092        }
18093        ///Sets `proof_points` with the provided value.
18094        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
18095            self.proof_points = Some(field.into().into());
18096        }
18097        ///Sets `proof_points` with the provided value.
18098        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
18099            mut self,
18100            field: T,
18101        ) -> Self {
18102            self.set_proof_points(field.into());
18103            self
18104        }
18105        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
18106        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
18107            self.iss_base64_details
18108                .as_ref()
18109                .map(|field| field as _)
18110                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
18111        }
18112        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18113        pub fn iss_base64_details_opt_mut(
18114            &mut self,
18115        ) -> Option<&mut super::ZkLoginClaim> {
18116            self.iss_base64_details.as_mut().map(|field| field as _)
18117        }
18118        ///Returns a mutable reference to `iss_base64_details`.
18119        ///If the field is unset, it is first initialized with the default value.
18120        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
18121            self.iss_base64_details.get_or_insert_default()
18122        }
18123        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
18124        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
18125            self.iss_base64_details.as_ref().map(|field| field as _)
18126        }
18127        ///Sets `iss_base64_details` with the provided value.
18128        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18129            &mut self,
18130            field: T,
18131        ) {
18132            self.iss_base64_details = Some(field.into().into());
18133        }
18134        ///Sets `iss_base64_details` with the provided value.
18135        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18136            mut self,
18137            field: T,
18138        ) -> Self {
18139            self.set_iss_base64_details(field.into());
18140            self
18141        }
18142        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18143        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
18144            self.header_base64.as_mut().map(|field| field as _)
18145        }
18146        ///Returns a mutable reference to `header_base64`.
18147        ///If the field is unset, it is first initialized with the default value.
18148        pub fn header_base64_mut(&mut self) -> &mut String {
18149            self.header_base64.get_or_insert_default()
18150        }
18151        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
18152        pub fn header_base64_opt(&self) -> Option<&str> {
18153            self.header_base64.as_ref().map(|field| field as _)
18154        }
18155        ///Sets `header_base64` with the provided value.
18156        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
18157            self.header_base64 = Some(field.into().into());
18158        }
18159        ///Sets `header_base64` with the provided value.
18160        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
18161            self.set_header_base64(field.into());
18162            self
18163        }
18164        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18165        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18166            self.address_seed.as_mut().map(|field| field as _)
18167        }
18168        ///Returns a mutable reference to `address_seed`.
18169        ///If the field is unset, it is first initialized with the default value.
18170        pub fn address_seed_mut(&mut self) -> &mut String {
18171            self.address_seed.get_or_insert_default()
18172        }
18173        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18174        pub fn address_seed_opt(&self) -> Option<&str> {
18175            self.address_seed.as_ref().map(|field| field as _)
18176        }
18177        ///Sets `address_seed` with the provided value.
18178        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18179            self.address_seed = Some(field.into().into());
18180        }
18181        ///Sets `address_seed` with the provided value.
18182        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18183            self.set_address_seed(field.into());
18184            self
18185        }
18186    }
18187    impl super::ZkLoginProof {
18188        pub const fn const_default() -> Self {
18189            Self { a: None, b: None, c: None }
18190        }
18191        #[doc(hidden)]
18192        pub fn default_instance() -> &'static Self {
18193            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
18194            &DEFAULT
18195        }
18196        ///Returns the value of `a`, or the default value if `a` is unset.
18197        pub fn a(&self) -> &super::CircomG1 {
18198            self.a
18199                .as_ref()
18200                .map(|field| field as _)
18201                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18202        }
18203        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18204        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18205            self.a.as_mut().map(|field| field as _)
18206        }
18207        ///Returns a mutable reference to `a`.
18208        ///If the field is unset, it is first initialized with the default value.
18209        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
18210            self.a.get_or_insert_default()
18211        }
18212        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
18213        pub fn a_opt(&self) -> Option<&super::CircomG1> {
18214            self.a.as_ref().map(|field| field as _)
18215        }
18216        ///Sets `a` with the provided value.
18217        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
18218            self.a = Some(field.into().into());
18219        }
18220        ///Sets `a` with the provided value.
18221        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18222            self.set_a(field.into());
18223            self
18224        }
18225        ///Returns the value of `b`, or the default value if `b` is unset.
18226        pub fn b(&self) -> &super::CircomG2 {
18227            self.b
18228                .as_ref()
18229                .map(|field| field as _)
18230                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
18231        }
18232        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18233        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
18234            self.b.as_mut().map(|field| field as _)
18235        }
18236        ///Returns a mutable reference to `b`.
18237        ///If the field is unset, it is first initialized with the default value.
18238        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
18239            self.b.get_or_insert_default()
18240        }
18241        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
18242        pub fn b_opt(&self) -> Option<&super::CircomG2> {
18243            self.b.as_ref().map(|field| field as _)
18244        }
18245        ///Sets `b` with the provided value.
18246        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18247            self.b = Some(field.into().into());
18248        }
18249        ///Sets `b` with the provided value.
18250        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18251            self.set_b(field.into());
18252            self
18253        }
18254        ///Returns the value of `c`, or the default value if `c` is unset.
18255        pub fn c(&self) -> &super::CircomG1 {
18256            self.c
18257                .as_ref()
18258                .map(|field| field as _)
18259                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18260        }
18261        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18262        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18263            self.c.as_mut().map(|field| field as _)
18264        }
18265        ///Returns a mutable reference to `c`.
18266        ///If the field is unset, it is first initialized with the default value.
18267        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18268            self.c.get_or_insert_default()
18269        }
18270        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
18271        pub fn c_opt(&self) -> Option<&super::CircomG1> {
18272            self.c.as_ref().map(|field| field as _)
18273        }
18274        ///Sets `c` with the provided value.
18275        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18276            self.c = Some(field.into().into());
18277        }
18278        ///Sets `c` with the provided value.
18279        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18280            self.set_c(field.into());
18281            self
18282        }
18283    }
18284    impl super::ZkLoginPublicIdentifier {
18285        pub const fn const_default() -> Self {
18286            Self {
18287                iss: None,
18288                address_seed: None,
18289            }
18290        }
18291        #[doc(hidden)]
18292        pub fn default_instance() -> &'static Self {
18293            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18294            &DEFAULT
18295        }
18296        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18297        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18298            self.iss.as_mut().map(|field| field as _)
18299        }
18300        ///Returns a mutable reference to `iss`.
18301        ///If the field is unset, it is first initialized with the default value.
18302        pub fn iss_mut(&mut self) -> &mut String {
18303            self.iss.get_or_insert_default()
18304        }
18305        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
18306        pub fn iss_opt(&self) -> Option<&str> {
18307            self.iss.as_ref().map(|field| field as _)
18308        }
18309        ///Sets `iss` with the provided value.
18310        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18311            self.iss = Some(field.into().into());
18312        }
18313        ///Sets `iss` with the provided value.
18314        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18315            self.set_iss(field.into());
18316            self
18317        }
18318        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18319        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18320            self.address_seed.as_mut().map(|field| field as _)
18321        }
18322        ///Returns a mutable reference to `address_seed`.
18323        ///If the field is unset, it is first initialized with the default value.
18324        pub fn address_seed_mut(&mut self) -> &mut String {
18325            self.address_seed.get_or_insert_default()
18326        }
18327        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18328        pub fn address_seed_opt(&self) -> Option<&str> {
18329            self.address_seed.as_ref().map(|field| field as _)
18330        }
18331        ///Sets `address_seed` with the provided value.
18332        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18333            self.address_seed = Some(field.into().into());
18334        }
18335        ///Sets `address_seed` with the provided value.
18336        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18337            self.set_address_seed(field.into());
18338            self
18339        }
18340    }
18341}