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            }
12028        }
12029        #[doc(hidden)]
12030        pub fn default_instance() -> &'static Self {
12031            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
12032            &DEFAULT
12033        }
12034        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12035        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
12036            self.protocol_version.as_mut().map(|field| field as _)
12037        }
12038        ///Returns a mutable reference to `protocol_version`.
12039        ///If the field is unset, it is first initialized with the default value.
12040        pub fn protocol_version_mut(&mut self) -> &mut u64 {
12041            self.protocol_version.get_or_insert_default()
12042        }
12043        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12044        pub fn protocol_version_opt(&self) -> Option<u64> {
12045            self.protocol_version.as_ref().map(|field| *field)
12046        }
12047        ///Sets `protocol_version` with the provided value.
12048        pub fn set_protocol_version(&mut self, field: u64) {
12049            self.protocol_version = Some(field);
12050        }
12051        ///Sets `protocol_version` with the provided value.
12052        pub fn with_protocol_version(mut self, field: u64) -> Self {
12053            self.set_protocol_version(field);
12054            self
12055        }
12056        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
12057        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
12058            &self.feature_flags
12059        }
12060        ///Returns a mutable reference to `feature_flags`.
12061        ///If the field is unset, it is first initialized with the default value.
12062        pub fn feature_flags_mut(
12063            &mut self,
12064        ) -> &mut ::std::collections::BTreeMap<String, bool> {
12065            &mut self.feature_flags
12066        }
12067        ///Sets `feature_flags` with the provided value.
12068        pub fn set_feature_flags(
12069            &mut self,
12070            field: ::std::collections::BTreeMap<String, bool>,
12071        ) {
12072            self.feature_flags = field;
12073        }
12074        ///Sets `feature_flags` with the provided value.
12075        pub fn with_feature_flags(
12076            mut self,
12077            field: ::std::collections::BTreeMap<String, bool>,
12078        ) -> Self {
12079            self.set_feature_flags(field);
12080            self
12081        }
12082        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
12083        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
12084            &self.attributes
12085        }
12086        ///Returns a mutable reference to `attributes`.
12087        ///If the field is unset, it is first initialized with the default value.
12088        pub fn attributes_mut(
12089            &mut self,
12090        ) -> &mut ::std::collections::BTreeMap<String, String> {
12091            &mut self.attributes
12092        }
12093        ///Sets `attributes` with the provided value.
12094        pub fn set_attributes(
12095            &mut self,
12096            field: ::std::collections::BTreeMap<String, String>,
12097        ) {
12098            self.attributes = field;
12099        }
12100        ///Sets `attributes` with the provided value.
12101        pub fn with_attributes(
12102            mut self,
12103            field: ::std::collections::BTreeMap<String, String>,
12104        ) -> Self {
12105            self.set_attributes(field);
12106            self
12107        }
12108    }
12109    impl super::Publish {
12110        pub const fn const_default() -> Self {
12111            Self {
12112                modules: Vec::new(),
12113                dependencies: Vec::new(),
12114            }
12115        }
12116        #[doc(hidden)]
12117        pub fn default_instance() -> &'static Self {
12118            static DEFAULT: super::Publish = super::Publish::const_default();
12119            &DEFAULT
12120        }
12121        ///Returns the value of `modules`, or the default value if `modules` is unset.
12122        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12123            &self.modules
12124        }
12125        ///Returns a mutable reference to `modules`.
12126        ///If the field is unset, it is first initialized with the default value.
12127        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12128            &mut self.modules
12129        }
12130        ///Sets `modules` with the provided value.
12131        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12132            self.modules = field;
12133        }
12134        ///Sets `modules` with the provided value.
12135        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12136            self.set_modules(field);
12137            self
12138        }
12139        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
12140        pub fn dependencies(&self) -> &[String] {
12141            &self.dependencies
12142        }
12143        ///Returns a mutable reference to `dependencies`.
12144        ///If the field is unset, it is first initialized with the default value.
12145        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12146            &mut self.dependencies
12147        }
12148        ///Sets `dependencies` with the provided value.
12149        pub fn set_dependencies(&mut self, field: Vec<String>) {
12150            self.dependencies = field;
12151        }
12152        ///Sets `dependencies` with the provided value.
12153        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12154            self.set_dependencies(field);
12155            self
12156        }
12157    }
12158    impl super::RandomnessStateUpdate {
12159        pub const fn const_default() -> Self {
12160            Self {
12161                epoch: None,
12162                randomness_round: None,
12163                random_bytes: None,
12164                randomness_object_initial_shared_version: None,
12165            }
12166        }
12167        #[doc(hidden)]
12168        pub fn default_instance() -> &'static Self {
12169            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
12170            &DEFAULT
12171        }
12172        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12173        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
12174            self.epoch.as_mut().map(|field| field as _)
12175        }
12176        ///Returns a mutable reference to `epoch`.
12177        ///If the field is unset, it is first initialized with the default value.
12178        pub fn epoch_mut(&mut self) -> &mut u64 {
12179            self.epoch.get_or_insert_default()
12180        }
12181        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12182        pub fn epoch_opt(&self) -> Option<u64> {
12183            self.epoch.as_ref().map(|field| *field)
12184        }
12185        ///Sets `epoch` with the provided value.
12186        pub fn set_epoch(&mut self, field: u64) {
12187            self.epoch = Some(field);
12188        }
12189        ///Sets `epoch` with the provided value.
12190        pub fn with_epoch(mut self, field: u64) -> Self {
12191            self.set_epoch(field);
12192            self
12193        }
12194        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12195        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12196            self.randomness_round.as_mut().map(|field| field as _)
12197        }
12198        ///Returns a mutable reference to `randomness_round`.
12199        ///If the field is unset, it is first initialized with the default value.
12200        pub fn randomness_round_mut(&mut self) -> &mut u64 {
12201            self.randomness_round.get_or_insert_default()
12202        }
12203        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
12204        pub fn randomness_round_opt(&self) -> Option<u64> {
12205            self.randomness_round.as_ref().map(|field| *field)
12206        }
12207        ///Sets `randomness_round` with the provided value.
12208        pub fn set_randomness_round(&mut self, field: u64) {
12209            self.randomness_round = Some(field);
12210        }
12211        ///Sets `randomness_round` with the provided value.
12212        pub fn with_randomness_round(mut self, field: u64) -> Self {
12213            self.set_randomness_round(field);
12214            self
12215        }
12216        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
12217        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12218            self.random_bytes.as_ref().map(|field| field as _)
12219        }
12220        ///Sets `random_bytes` with the provided value.
12221        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12222            self.random_bytes = Some(field.into().into());
12223        }
12224        ///Sets `random_bytes` with the provided value.
12225        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12226            mut self,
12227            field: T,
12228        ) -> Self {
12229            self.set_random_bytes(field.into());
12230            self
12231        }
12232        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12233        pub fn randomness_object_initial_shared_version_opt_mut(
12234            &mut self,
12235        ) -> Option<&mut u64> {
12236            self.randomness_object_initial_shared_version
12237                .as_mut()
12238                .map(|field| field as _)
12239        }
12240        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
12241        ///If the field is unset, it is first initialized with the default value.
12242        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12243            self.randomness_object_initial_shared_version.get_or_insert_default()
12244        }
12245        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12246        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12247            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12248        }
12249        ///Sets `randomness_object_initial_shared_version` with the provided value.
12250        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12251            self.randomness_object_initial_shared_version = Some(field);
12252        }
12253        ///Sets `randomness_object_initial_shared_version` with the provided value.
12254        pub fn with_randomness_object_initial_shared_version(
12255            mut self,
12256            field: u64,
12257        ) -> Self {
12258            self.set_randomness_object_initial_shared_version(field);
12259            self
12260        }
12261    }
12262    impl super::RegulatedCoinMetadata {
12263        pub const fn const_default() -> Self {
12264            Self {
12265                id: None,
12266                coin_metadata_object: None,
12267                deny_cap_object: None,
12268                allow_global_pause: None,
12269                variant: None,
12270                coin_regulated_state: None,
12271            }
12272        }
12273        #[doc(hidden)]
12274        pub fn default_instance() -> &'static Self {
12275            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12276            &DEFAULT
12277        }
12278        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12279        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12280            self.id.as_mut().map(|field| field as _)
12281        }
12282        ///Returns a mutable reference to `id`.
12283        ///If the field is unset, it is first initialized with the default value.
12284        pub fn id_mut(&mut self) -> &mut String {
12285            self.id.get_or_insert_default()
12286        }
12287        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12288        pub fn id_opt(&self) -> Option<&str> {
12289            self.id.as_ref().map(|field| field as _)
12290        }
12291        ///Sets `id` with the provided value.
12292        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12293            self.id = Some(field.into().into());
12294        }
12295        ///Sets `id` with the provided value.
12296        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12297            self.set_id(field.into());
12298            self
12299        }
12300        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12301        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12302            self.coin_metadata_object.as_mut().map(|field| field as _)
12303        }
12304        ///Returns a mutable reference to `coin_metadata_object`.
12305        ///If the field is unset, it is first initialized with the default value.
12306        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12307            self.coin_metadata_object.get_or_insert_default()
12308        }
12309        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12310        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12311            self.coin_metadata_object.as_ref().map(|field| field as _)
12312        }
12313        ///Sets `coin_metadata_object` with the provided value.
12314        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12315            self.coin_metadata_object = Some(field.into().into());
12316        }
12317        ///Sets `coin_metadata_object` with the provided value.
12318        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12319            self.set_coin_metadata_object(field.into());
12320            self
12321        }
12322        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12323        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12324            self.deny_cap_object.as_mut().map(|field| field as _)
12325        }
12326        ///Returns a mutable reference to `deny_cap_object`.
12327        ///If the field is unset, it is first initialized with the default value.
12328        pub fn deny_cap_object_mut(&mut self) -> &mut String {
12329            self.deny_cap_object.get_or_insert_default()
12330        }
12331        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12332        pub fn deny_cap_object_opt(&self) -> Option<&str> {
12333            self.deny_cap_object.as_ref().map(|field| field as _)
12334        }
12335        ///Sets `deny_cap_object` with the provided value.
12336        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12337            self.deny_cap_object = Some(field.into().into());
12338        }
12339        ///Sets `deny_cap_object` with the provided value.
12340        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12341            self.set_deny_cap_object(field.into());
12342            self
12343        }
12344        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12345        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12346            self.allow_global_pause.as_mut().map(|field| field as _)
12347        }
12348        ///Returns a mutable reference to `allow_global_pause`.
12349        ///If the field is unset, it is first initialized with the default value.
12350        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12351            self.allow_global_pause.get_or_insert_default()
12352        }
12353        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
12354        pub fn allow_global_pause_opt(&self) -> Option<bool> {
12355            self.allow_global_pause.as_ref().map(|field| *field)
12356        }
12357        ///Sets `allow_global_pause` with the provided value.
12358        pub fn set_allow_global_pause(&mut self, field: bool) {
12359            self.allow_global_pause = Some(field);
12360        }
12361        ///Sets `allow_global_pause` with the provided value.
12362        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12363            self.set_allow_global_pause(field);
12364            self
12365        }
12366        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12367        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12368            self.variant.as_mut().map(|field| field as _)
12369        }
12370        ///Returns a mutable reference to `variant`.
12371        ///If the field is unset, it is first initialized with the default value.
12372        pub fn variant_mut(&mut self) -> &mut u32 {
12373            self.variant.get_or_insert_default()
12374        }
12375        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
12376        pub fn variant_opt(&self) -> Option<u32> {
12377            self.variant.as_ref().map(|field| *field)
12378        }
12379        ///Sets `variant` with the provided value.
12380        pub fn set_variant(&mut self, field: u32) {
12381            self.variant = Some(field);
12382        }
12383        ///Sets `variant` with the provided value.
12384        pub fn with_variant(mut self, field: u32) -> Self {
12385            self.set_variant(field);
12386            self
12387        }
12388        ///Sets `coin_regulated_state` with the provided value.
12389        pub fn with_coin_regulated_state<
12390            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12391        >(mut self, field: T) -> Self {
12392            self.set_coin_regulated_state(field.into());
12393            self
12394        }
12395    }
12396    impl super::ReverseLookupNameRequest {
12397        pub const fn const_default() -> Self {
12398            Self { address: None }
12399        }
12400        #[doc(hidden)]
12401        pub fn default_instance() -> &'static Self {
12402            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12403            &DEFAULT
12404        }
12405        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12406        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12407            self.address.as_mut().map(|field| field as _)
12408        }
12409        ///Returns a mutable reference to `address`.
12410        ///If the field is unset, it is first initialized with the default value.
12411        pub fn address_mut(&mut self) -> &mut String {
12412            self.address.get_or_insert_default()
12413        }
12414        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12415        pub fn address_opt(&self) -> Option<&str> {
12416            self.address.as_ref().map(|field| field as _)
12417        }
12418        ///Sets `address` with the provided value.
12419        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12420            self.address = Some(field.into().into());
12421        }
12422        ///Sets `address` with the provided value.
12423        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12424            self.set_address(field.into());
12425            self
12426        }
12427    }
12428    impl super::ReverseLookupNameResponse {
12429        pub const fn const_default() -> Self {
12430            Self { record: None }
12431        }
12432        #[doc(hidden)]
12433        pub fn default_instance() -> &'static Self {
12434            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12435            &DEFAULT
12436        }
12437        ///Returns the value of `record`, or the default value if `record` is unset.
12438        pub fn record(&self) -> &super::NameRecord {
12439            self.record
12440                .as_ref()
12441                .map(|field| field as _)
12442                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12443        }
12444        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12445        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12446            self.record.as_mut().map(|field| field as _)
12447        }
12448        ///Returns a mutable reference to `record`.
12449        ///If the field is unset, it is first initialized with the default value.
12450        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12451            self.record.get_or_insert_default()
12452        }
12453        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12454        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12455            self.record.as_ref().map(|field| field as _)
12456        }
12457        ///Sets `record` with the provided value.
12458        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12459            self.record = Some(field.into().into());
12460        }
12461        ///Sets `record` with the provided value.
12462        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12463            self.set_record(field.into());
12464            self
12465        }
12466    }
12467    impl super::SimpleSignature {
12468        pub const fn const_default() -> Self {
12469            Self {
12470                scheme: None,
12471                signature: None,
12472                public_key: None,
12473            }
12474        }
12475        #[doc(hidden)]
12476        pub fn default_instance() -> &'static Self {
12477            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12478            &DEFAULT
12479        }
12480        ///Sets `scheme` with the provided value.
12481        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12482            self.set_scheme(field.into());
12483            self
12484        }
12485        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12486        pub fn signature_opt(&self) -> Option<&[u8]> {
12487            self.signature.as_ref().map(|field| field as _)
12488        }
12489        ///Sets `signature` with the provided value.
12490        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12491            self.signature = Some(field.into().into());
12492        }
12493        ///Sets `signature` with the provided value.
12494        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12495            mut self,
12496            field: T,
12497        ) -> Self {
12498            self.set_signature(field.into());
12499            self
12500        }
12501        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12502        pub fn public_key_opt(&self) -> Option<&[u8]> {
12503            self.public_key.as_ref().map(|field| field as _)
12504        }
12505        ///Sets `public_key` with the provided value.
12506        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12507            self.public_key = Some(field.into().into());
12508        }
12509        ///Sets `public_key` with the provided value.
12510        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12511            mut self,
12512            field: T,
12513        ) -> Self {
12514            self.set_public_key(field.into());
12515            self
12516        }
12517    }
12518    impl super::SimulateTransactionRequest {
12519        pub const fn const_default() -> Self {
12520            Self {
12521                transaction: None,
12522                read_mask: None,
12523                checks: None,
12524                do_gas_selection: None,
12525            }
12526        }
12527        #[doc(hidden)]
12528        pub fn default_instance() -> &'static Self {
12529            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12530            &DEFAULT
12531        }
12532        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12533        pub fn transaction(&self) -> &super::Transaction {
12534            self.transaction
12535                .as_ref()
12536                .map(|field| field as _)
12537                .unwrap_or_else(|| super::Transaction::default_instance() as _)
12538        }
12539        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12540        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12541            self.transaction.as_mut().map(|field| field as _)
12542        }
12543        ///Returns a mutable reference to `transaction`.
12544        ///If the field is unset, it is first initialized with the default value.
12545        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12546            self.transaction.get_or_insert_default()
12547        }
12548        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12549        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12550            self.transaction.as_ref().map(|field| field as _)
12551        }
12552        ///Sets `transaction` with the provided value.
12553        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12554            self.transaction = Some(field.into().into());
12555        }
12556        ///Sets `transaction` with the provided value.
12557        pub fn with_transaction<T: Into<super::Transaction>>(
12558            mut self,
12559            field: T,
12560        ) -> Self {
12561            self.set_transaction(field.into());
12562            self
12563        }
12564        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12565        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12566            self.read_mask.as_mut().map(|field| field as _)
12567        }
12568        ///Returns a mutable reference to `read_mask`.
12569        ///If the field is unset, it is first initialized with the default value.
12570        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12571            self.read_mask.get_or_insert_default()
12572        }
12573        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12574        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12575            self.read_mask.as_ref().map(|field| field as _)
12576        }
12577        ///Sets `read_mask` with the provided value.
12578        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12579            self.read_mask = Some(field.into().into());
12580        }
12581        ///Sets `read_mask` with the provided value.
12582        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12583            mut self,
12584            field: T,
12585        ) -> Self {
12586            self.set_read_mask(field.into());
12587            self
12588        }
12589        ///Sets `checks` with the provided value.
12590        pub fn with_checks<
12591            T: Into<super::simulate_transaction_request::TransactionChecks>,
12592        >(mut self, field: T) -> Self {
12593            self.set_checks(field.into());
12594            self
12595        }
12596        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12597        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12598            self.do_gas_selection.as_mut().map(|field| field as _)
12599        }
12600        ///Returns a mutable reference to `do_gas_selection`.
12601        ///If the field is unset, it is first initialized with the default value.
12602        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12603            self.do_gas_selection.get_or_insert_default()
12604        }
12605        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12606        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12607            self.do_gas_selection.as_ref().map(|field| *field)
12608        }
12609        ///Sets `do_gas_selection` with the provided value.
12610        pub fn set_do_gas_selection(&mut self, field: bool) {
12611            self.do_gas_selection = Some(field);
12612        }
12613        ///Sets `do_gas_selection` with the provided value.
12614        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12615            self.set_do_gas_selection(field);
12616            self
12617        }
12618    }
12619    impl super::SimulateTransactionResponse {
12620        pub const fn const_default() -> Self {
12621            Self {
12622                transaction: None,
12623                command_outputs: Vec::new(),
12624                suggested_gas_price: None,
12625            }
12626        }
12627        #[doc(hidden)]
12628        pub fn default_instance() -> &'static Self {
12629            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12630            &DEFAULT
12631        }
12632        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12633        pub fn transaction(&self) -> &super::ExecutedTransaction {
12634            self.transaction
12635                .as_ref()
12636                .map(|field| field as _)
12637                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12638        }
12639        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12640        pub fn transaction_opt_mut(
12641            &mut self,
12642        ) -> Option<&mut super::ExecutedTransaction> {
12643            self.transaction.as_mut().map(|field| field as _)
12644        }
12645        ///Returns a mutable reference to `transaction`.
12646        ///If the field is unset, it is first initialized with the default value.
12647        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12648            self.transaction.get_or_insert_default()
12649        }
12650        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12651        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12652            self.transaction.as_ref().map(|field| field as _)
12653        }
12654        ///Sets `transaction` with the provided value.
12655        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12656            &mut self,
12657            field: T,
12658        ) {
12659            self.transaction = Some(field.into().into());
12660        }
12661        ///Sets `transaction` with the provided value.
12662        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12663            mut self,
12664            field: T,
12665        ) -> Self {
12666            self.set_transaction(field.into());
12667            self
12668        }
12669        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12670        pub fn command_outputs(&self) -> &[super::CommandResult] {
12671            &self.command_outputs
12672        }
12673        ///Returns a mutable reference to `command_outputs`.
12674        ///If the field is unset, it is first initialized with the default value.
12675        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12676            &mut self.command_outputs
12677        }
12678        ///Sets `command_outputs` with the provided value.
12679        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12680            self.command_outputs = field;
12681        }
12682        ///Sets `command_outputs` with the provided value.
12683        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12684            self.set_command_outputs(field);
12685            self
12686        }
12687        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12688        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
12689            self.suggested_gas_price.as_mut().map(|field| field as _)
12690        }
12691        ///Returns a mutable reference to `suggested_gas_price`.
12692        ///If the field is unset, it is first initialized with the default value.
12693        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
12694            self.suggested_gas_price.get_or_insert_default()
12695        }
12696        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
12697        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
12698            self.suggested_gas_price.as_ref().map(|field| *field)
12699        }
12700        ///Sets `suggested_gas_price` with the provided value.
12701        pub fn set_suggested_gas_price(&mut self, field: u64) {
12702            self.suggested_gas_price = Some(field);
12703        }
12704        ///Sets `suggested_gas_price` with the provided value.
12705        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
12706            self.set_suggested_gas_price(field);
12707            self
12708        }
12709    }
12710    impl super::SizeError {
12711        pub const fn const_default() -> Self {
12712            Self { size: None, max_size: None }
12713        }
12714        #[doc(hidden)]
12715        pub fn default_instance() -> &'static Self {
12716            static DEFAULT: super::SizeError = super::SizeError::const_default();
12717            &DEFAULT
12718        }
12719        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12720        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12721            self.size.as_mut().map(|field| field as _)
12722        }
12723        ///Returns a mutable reference to `size`.
12724        ///If the field is unset, it is first initialized with the default value.
12725        pub fn size_mut(&mut self) -> &mut u64 {
12726            self.size.get_or_insert_default()
12727        }
12728        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12729        pub fn size_opt(&self) -> Option<u64> {
12730            self.size.as_ref().map(|field| *field)
12731        }
12732        ///Sets `size` with the provided value.
12733        pub fn set_size(&mut self, field: u64) {
12734            self.size = Some(field);
12735        }
12736        ///Sets `size` with the provided value.
12737        pub fn with_size(mut self, field: u64) -> Self {
12738            self.set_size(field);
12739            self
12740        }
12741        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12742        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12743            self.max_size.as_mut().map(|field| field as _)
12744        }
12745        ///Returns a mutable reference to `max_size`.
12746        ///If the field is unset, it is first initialized with the default value.
12747        pub fn max_size_mut(&mut self) -> &mut u64 {
12748            self.max_size.get_or_insert_default()
12749        }
12750        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12751        pub fn max_size_opt(&self) -> Option<u64> {
12752            self.max_size.as_ref().map(|field| *field)
12753        }
12754        ///Sets `max_size` with the provided value.
12755        pub fn set_max_size(&mut self, field: u64) {
12756            self.max_size = Some(field);
12757        }
12758        ///Sets `max_size` with the provided value.
12759        pub fn with_max_size(mut self, field: u64) -> Self {
12760            self.set_max_size(field);
12761            self
12762        }
12763    }
12764    impl super::SplitCoins {
12765        pub const fn const_default() -> Self {
12766            Self {
12767                coin: None,
12768                amounts: Vec::new(),
12769            }
12770        }
12771        #[doc(hidden)]
12772        pub fn default_instance() -> &'static Self {
12773            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12774            &DEFAULT
12775        }
12776        ///Returns the value of `coin`, or the default value if `coin` is unset.
12777        pub fn coin(&self) -> &super::Argument {
12778            self.coin
12779                .as_ref()
12780                .map(|field| field as _)
12781                .unwrap_or_else(|| super::Argument::default_instance() as _)
12782        }
12783        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12784        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12785            self.coin.as_mut().map(|field| field as _)
12786        }
12787        ///Returns a mutable reference to `coin`.
12788        ///If the field is unset, it is first initialized with the default value.
12789        pub fn coin_mut(&mut self) -> &mut super::Argument {
12790            self.coin.get_or_insert_default()
12791        }
12792        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12793        pub fn coin_opt(&self) -> Option<&super::Argument> {
12794            self.coin.as_ref().map(|field| field as _)
12795        }
12796        ///Sets `coin` with the provided value.
12797        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12798            self.coin = Some(field.into().into());
12799        }
12800        ///Sets `coin` with the provided value.
12801        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12802            self.set_coin(field.into());
12803            self
12804        }
12805        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12806        pub fn amounts(&self) -> &[super::Argument] {
12807            &self.amounts
12808        }
12809        ///Returns a mutable reference to `amounts`.
12810        ///If the field is unset, it is first initialized with the default value.
12811        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12812            &mut self.amounts
12813        }
12814        ///Sets `amounts` with the provided value.
12815        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12816            self.amounts = field;
12817        }
12818        ///Sets `amounts` with the provided value.
12819        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12820            self.set_amounts(field);
12821            self
12822        }
12823    }
12824    impl super::StakeSubsidy {
12825        pub const fn const_default() -> Self {
12826            Self {
12827                balance: None,
12828                distribution_counter: None,
12829                current_distribution_amount: None,
12830                stake_subsidy_period_length: None,
12831                stake_subsidy_decrease_rate: None,
12832                extra_fields: None,
12833            }
12834        }
12835        #[doc(hidden)]
12836        pub fn default_instance() -> &'static Self {
12837            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12838            &DEFAULT
12839        }
12840        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12841        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12842            self.balance.as_mut().map(|field| field as _)
12843        }
12844        ///Returns a mutable reference to `balance`.
12845        ///If the field is unset, it is first initialized with the default value.
12846        pub fn balance_mut(&mut self) -> &mut u64 {
12847            self.balance.get_or_insert_default()
12848        }
12849        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12850        pub fn balance_opt(&self) -> Option<u64> {
12851            self.balance.as_ref().map(|field| *field)
12852        }
12853        ///Sets `balance` with the provided value.
12854        pub fn set_balance(&mut self, field: u64) {
12855            self.balance = Some(field);
12856        }
12857        ///Sets `balance` with the provided value.
12858        pub fn with_balance(mut self, field: u64) -> Self {
12859            self.set_balance(field);
12860            self
12861        }
12862        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12863        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12864            self.distribution_counter.as_mut().map(|field| field as _)
12865        }
12866        ///Returns a mutable reference to `distribution_counter`.
12867        ///If the field is unset, it is first initialized with the default value.
12868        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12869            self.distribution_counter.get_or_insert_default()
12870        }
12871        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12872        pub fn distribution_counter_opt(&self) -> Option<u64> {
12873            self.distribution_counter.as_ref().map(|field| *field)
12874        }
12875        ///Sets `distribution_counter` with the provided value.
12876        pub fn set_distribution_counter(&mut self, field: u64) {
12877            self.distribution_counter = Some(field);
12878        }
12879        ///Sets `distribution_counter` with the provided value.
12880        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12881            self.set_distribution_counter(field);
12882            self
12883        }
12884        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12885        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12886            self.current_distribution_amount.as_mut().map(|field| field as _)
12887        }
12888        ///Returns a mutable reference to `current_distribution_amount`.
12889        ///If the field is unset, it is first initialized with the default value.
12890        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12891            self.current_distribution_amount.get_or_insert_default()
12892        }
12893        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12894        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12895            self.current_distribution_amount.as_ref().map(|field| *field)
12896        }
12897        ///Sets `current_distribution_amount` with the provided value.
12898        pub fn set_current_distribution_amount(&mut self, field: u64) {
12899            self.current_distribution_amount = Some(field);
12900        }
12901        ///Sets `current_distribution_amount` with the provided value.
12902        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12903            self.set_current_distribution_amount(field);
12904            self
12905        }
12906        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12907        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12908            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12909        }
12910        ///Returns a mutable reference to `stake_subsidy_period_length`.
12911        ///If the field is unset, it is first initialized with the default value.
12912        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12913            self.stake_subsidy_period_length.get_or_insert_default()
12914        }
12915        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12916        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12917            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12918        }
12919        ///Sets `stake_subsidy_period_length` with the provided value.
12920        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12921            self.stake_subsidy_period_length = Some(field);
12922        }
12923        ///Sets `stake_subsidy_period_length` with the provided value.
12924        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12925            self.set_stake_subsidy_period_length(field);
12926            self
12927        }
12928        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12929        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12930            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12931        }
12932        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12933        ///If the field is unset, it is first initialized with the default value.
12934        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12935            self.stake_subsidy_decrease_rate.get_or_insert_default()
12936        }
12937        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12938        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12939            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12940        }
12941        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12942        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12943            self.stake_subsidy_decrease_rate = Some(field);
12944        }
12945        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12946        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12947            self.set_stake_subsidy_decrease_rate(field);
12948            self
12949        }
12950        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12951        pub fn extra_fields(&self) -> &super::MoveTable {
12952            self.extra_fields
12953                .as_ref()
12954                .map(|field| field as _)
12955                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12956        }
12957        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12958        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12959            self.extra_fields.as_mut().map(|field| field as _)
12960        }
12961        ///Returns a mutable reference to `extra_fields`.
12962        ///If the field is unset, it is first initialized with the default value.
12963        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12964            self.extra_fields.get_or_insert_default()
12965        }
12966        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12967        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12968            self.extra_fields.as_ref().map(|field| field as _)
12969        }
12970        ///Sets `extra_fields` with the provided value.
12971        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12972            self.extra_fields = Some(field.into().into());
12973        }
12974        ///Sets `extra_fields` with the provided value.
12975        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12976            self.set_extra_fields(field.into());
12977            self
12978        }
12979    }
12980    impl super::StakingPool {
12981        pub const fn const_default() -> Self {
12982            Self {
12983                id: None,
12984                activation_epoch: None,
12985                deactivation_epoch: None,
12986                sui_balance: None,
12987                rewards_pool: None,
12988                pool_token_balance: None,
12989                exchange_rates: None,
12990                pending_stake: None,
12991                pending_total_sui_withdraw: None,
12992                pending_pool_token_withdraw: None,
12993                extra_fields: None,
12994            }
12995        }
12996        #[doc(hidden)]
12997        pub fn default_instance() -> &'static Self {
12998            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12999            &DEFAULT
13000        }
13001        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13002        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13003            self.id.as_mut().map(|field| field as _)
13004        }
13005        ///Returns a mutable reference to `id`.
13006        ///If the field is unset, it is first initialized with the default value.
13007        pub fn id_mut(&mut self) -> &mut String {
13008            self.id.get_or_insert_default()
13009        }
13010        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13011        pub fn id_opt(&self) -> Option<&str> {
13012            self.id.as_ref().map(|field| field as _)
13013        }
13014        ///Sets `id` with the provided value.
13015        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13016            self.id = Some(field.into().into());
13017        }
13018        ///Sets `id` with the provided value.
13019        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13020            self.set_id(field.into());
13021            self
13022        }
13023        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13024        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13025            self.activation_epoch.as_mut().map(|field| field as _)
13026        }
13027        ///Returns a mutable reference to `activation_epoch`.
13028        ///If the field is unset, it is first initialized with the default value.
13029        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
13030            self.activation_epoch.get_or_insert_default()
13031        }
13032        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13033        pub fn activation_epoch_opt(&self) -> Option<u64> {
13034            self.activation_epoch.as_ref().map(|field| *field)
13035        }
13036        ///Sets `activation_epoch` with the provided value.
13037        pub fn set_activation_epoch(&mut self, field: u64) {
13038            self.activation_epoch = Some(field);
13039        }
13040        ///Sets `activation_epoch` with the provided value.
13041        pub fn with_activation_epoch(mut self, field: u64) -> Self {
13042            self.set_activation_epoch(field);
13043            self
13044        }
13045        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13046        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13047            self.deactivation_epoch.as_mut().map(|field| field as _)
13048        }
13049        ///Returns a mutable reference to `deactivation_epoch`.
13050        ///If the field is unset, it is first initialized with the default value.
13051        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
13052            self.deactivation_epoch.get_or_insert_default()
13053        }
13054        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13055        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
13056            self.deactivation_epoch.as_ref().map(|field| *field)
13057        }
13058        ///Sets `deactivation_epoch` with the provided value.
13059        pub fn set_deactivation_epoch(&mut self, field: u64) {
13060            self.deactivation_epoch = Some(field);
13061        }
13062        ///Sets `deactivation_epoch` with the provided value.
13063        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
13064            self.set_deactivation_epoch(field);
13065            self
13066        }
13067        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13068        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
13069            self.sui_balance.as_mut().map(|field| field as _)
13070        }
13071        ///Returns a mutable reference to `sui_balance`.
13072        ///If the field is unset, it is first initialized with the default value.
13073        pub fn sui_balance_mut(&mut self) -> &mut u64 {
13074            self.sui_balance.get_or_insert_default()
13075        }
13076        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13077        pub fn sui_balance_opt(&self) -> Option<u64> {
13078            self.sui_balance.as_ref().map(|field| *field)
13079        }
13080        ///Sets `sui_balance` with the provided value.
13081        pub fn set_sui_balance(&mut self, field: u64) {
13082            self.sui_balance = Some(field);
13083        }
13084        ///Sets `sui_balance` with the provided value.
13085        pub fn with_sui_balance(mut self, field: u64) -> Self {
13086            self.set_sui_balance(field);
13087            self
13088        }
13089        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13090        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
13091            self.rewards_pool.as_mut().map(|field| field as _)
13092        }
13093        ///Returns a mutable reference to `rewards_pool`.
13094        ///If the field is unset, it is first initialized with the default value.
13095        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
13096            self.rewards_pool.get_or_insert_default()
13097        }
13098        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
13099        pub fn rewards_pool_opt(&self) -> Option<u64> {
13100            self.rewards_pool.as_ref().map(|field| *field)
13101        }
13102        ///Sets `rewards_pool` with the provided value.
13103        pub fn set_rewards_pool(&mut self, field: u64) {
13104            self.rewards_pool = Some(field);
13105        }
13106        ///Sets `rewards_pool` with the provided value.
13107        pub fn with_rewards_pool(mut self, field: u64) -> Self {
13108            self.set_rewards_pool(field);
13109            self
13110        }
13111        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13112        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
13113            self.pool_token_balance.as_mut().map(|field| field as _)
13114        }
13115        ///Returns a mutable reference to `pool_token_balance`.
13116        ///If the field is unset, it is first initialized with the default value.
13117        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
13118            self.pool_token_balance.get_or_insert_default()
13119        }
13120        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13121        pub fn pool_token_balance_opt(&self) -> Option<u64> {
13122            self.pool_token_balance.as_ref().map(|field| *field)
13123        }
13124        ///Sets `pool_token_balance` with the provided value.
13125        pub fn set_pool_token_balance(&mut self, field: u64) {
13126            self.pool_token_balance = Some(field);
13127        }
13128        ///Sets `pool_token_balance` with the provided value.
13129        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
13130            self.set_pool_token_balance(field);
13131            self
13132        }
13133        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
13134        pub fn exchange_rates(&self) -> &super::MoveTable {
13135            self.exchange_rates
13136                .as_ref()
13137                .map(|field| field as _)
13138                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13139        }
13140        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13141        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13142            self.exchange_rates.as_mut().map(|field| field as _)
13143        }
13144        ///Returns a mutable reference to `exchange_rates`.
13145        ///If the field is unset, it is first initialized with the default value.
13146        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
13147            self.exchange_rates.get_or_insert_default()
13148        }
13149        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13150        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
13151            self.exchange_rates.as_ref().map(|field| field as _)
13152        }
13153        ///Sets `exchange_rates` with the provided value.
13154        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
13155            self.exchange_rates = Some(field.into().into());
13156        }
13157        ///Sets `exchange_rates` with the provided value.
13158        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
13159            mut self,
13160            field: T,
13161        ) -> Self {
13162            self.set_exchange_rates(field.into());
13163            self
13164        }
13165        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13166        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
13167            self.pending_stake.as_mut().map(|field| field as _)
13168        }
13169        ///Returns a mutable reference to `pending_stake`.
13170        ///If the field is unset, it is first initialized with the default value.
13171        pub fn pending_stake_mut(&mut self) -> &mut u64 {
13172            self.pending_stake.get_or_insert_default()
13173        }
13174        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13175        pub fn pending_stake_opt(&self) -> Option<u64> {
13176            self.pending_stake.as_ref().map(|field| *field)
13177        }
13178        ///Sets `pending_stake` with the provided value.
13179        pub fn set_pending_stake(&mut self, field: u64) {
13180            self.pending_stake = Some(field);
13181        }
13182        ///Sets `pending_stake` with the provided value.
13183        pub fn with_pending_stake(mut self, field: u64) -> Self {
13184            self.set_pending_stake(field);
13185            self
13186        }
13187        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13188        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13189            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
13190        }
13191        ///Returns a mutable reference to `pending_total_sui_withdraw`.
13192        ///If the field is unset, it is first initialized with the default value.
13193        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
13194            self.pending_total_sui_withdraw.get_or_insert_default()
13195        }
13196        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13197        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
13198            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
13199        }
13200        ///Sets `pending_total_sui_withdraw` with the provided value.
13201        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
13202            self.pending_total_sui_withdraw = Some(field);
13203        }
13204        ///Sets `pending_total_sui_withdraw` with the provided value.
13205        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
13206            self.set_pending_total_sui_withdraw(field);
13207            self
13208        }
13209        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13210        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13211            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
13212        }
13213        ///Returns a mutable reference to `pending_pool_token_withdraw`.
13214        ///If the field is unset, it is first initialized with the default value.
13215        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13216            self.pending_pool_token_withdraw.get_or_insert_default()
13217        }
13218        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
13219        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13220            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13221        }
13222        ///Sets `pending_pool_token_withdraw` with the provided value.
13223        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13224            self.pending_pool_token_withdraw = Some(field);
13225        }
13226        ///Sets `pending_pool_token_withdraw` with the provided value.
13227        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13228            self.set_pending_pool_token_withdraw(field);
13229            self
13230        }
13231        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13232        pub fn extra_fields(&self) -> &super::MoveTable {
13233            self.extra_fields
13234                .as_ref()
13235                .map(|field| field as _)
13236                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13237        }
13238        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13239        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13240            self.extra_fields.as_mut().map(|field| field as _)
13241        }
13242        ///Returns a mutable reference to `extra_fields`.
13243        ///If the field is unset, it is first initialized with the default value.
13244        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13245            self.extra_fields.get_or_insert_default()
13246        }
13247        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13248        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13249            self.extra_fields.as_ref().map(|field| field as _)
13250        }
13251        ///Sets `extra_fields` with the provided value.
13252        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13253            self.extra_fields = Some(field.into().into());
13254        }
13255        ///Sets `extra_fields` with the provided value.
13256        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13257            self.set_extra_fields(field.into());
13258            self
13259        }
13260    }
13261    impl super::StorageFund {
13262        pub const fn const_default() -> Self {
13263            Self {
13264                total_object_storage_rebates: None,
13265                non_refundable_balance: None,
13266            }
13267        }
13268        #[doc(hidden)]
13269        pub fn default_instance() -> &'static Self {
13270            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13271            &DEFAULT
13272        }
13273        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13274        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13275            self.total_object_storage_rebates.as_mut().map(|field| field as _)
13276        }
13277        ///Returns a mutable reference to `total_object_storage_rebates`.
13278        ///If the field is unset, it is first initialized with the default value.
13279        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13280            self.total_object_storage_rebates.get_or_insert_default()
13281        }
13282        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13283        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13284            self.total_object_storage_rebates.as_ref().map(|field| *field)
13285        }
13286        ///Sets `total_object_storage_rebates` with the provided value.
13287        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13288            self.total_object_storage_rebates = Some(field);
13289        }
13290        ///Sets `total_object_storage_rebates` with the provided value.
13291        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13292            self.set_total_object_storage_rebates(field);
13293            self
13294        }
13295        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13296        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13297            self.non_refundable_balance.as_mut().map(|field| field as _)
13298        }
13299        ///Returns a mutable reference to `non_refundable_balance`.
13300        ///If the field is unset, it is first initialized with the default value.
13301        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13302            self.non_refundable_balance.get_or_insert_default()
13303        }
13304        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13305        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13306            self.non_refundable_balance.as_ref().map(|field| *field)
13307        }
13308        ///Sets `non_refundable_balance` with the provided value.
13309        pub fn set_non_refundable_balance(&mut self, field: u64) {
13310            self.non_refundable_balance = Some(field);
13311        }
13312        ///Sets `non_refundable_balance` with the provided value.
13313        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13314            self.set_non_refundable_balance(field);
13315            self
13316        }
13317    }
13318    impl super::SubscribeCheckpointsRequest {
13319        pub const fn const_default() -> Self {
13320            Self { read_mask: None }
13321        }
13322        #[doc(hidden)]
13323        pub fn default_instance() -> &'static Self {
13324            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13325            &DEFAULT
13326        }
13327        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13328        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13329            self.read_mask.as_mut().map(|field| field as _)
13330        }
13331        ///Returns a mutable reference to `read_mask`.
13332        ///If the field is unset, it is first initialized with the default value.
13333        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13334            self.read_mask.get_or_insert_default()
13335        }
13336        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
13337        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13338            self.read_mask.as_ref().map(|field| field as _)
13339        }
13340        ///Sets `read_mask` with the provided value.
13341        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13342            self.read_mask = Some(field.into().into());
13343        }
13344        ///Sets `read_mask` with the provided value.
13345        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13346            mut self,
13347            field: T,
13348        ) -> Self {
13349            self.set_read_mask(field.into());
13350            self
13351        }
13352    }
13353    impl super::SubscribeCheckpointsResponse {
13354        pub const fn const_default() -> Self {
13355            Self {
13356                cursor: None,
13357                checkpoint: None,
13358            }
13359        }
13360        #[doc(hidden)]
13361        pub fn default_instance() -> &'static Self {
13362            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13363            &DEFAULT
13364        }
13365        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13366        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13367            self.cursor.as_mut().map(|field| field as _)
13368        }
13369        ///Returns a mutable reference to `cursor`.
13370        ///If the field is unset, it is first initialized with the default value.
13371        pub fn cursor_mut(&mut self) -> &mut u64 {
13372            self.cursor.get_or_insert_default()
13373        }
13374        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
13375        pub fn cursor_opt(&self) -> Option<u64> {
13376            self.cursor.as_ref().map(|field| *field)
13377        }
13378        ///Sets `cursor` with the provided value.
13379        pub fn set_cursor(&mut self, field: u64) {
13380            self.cursor = Some(field);
13381        }
13382        ///Sets `cursor` with the provided value.
13383        pub fn with_cursor(mut self, field: u64) -> Self {
13384            self.set_cursor(field);
13385            self
13386        }
13387        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
13388        pub fn checkpoint(&self) -> &super::Checkpoint {
13389            self.checkpoint
13390                .as_ref()
13391                .map(|field| field as _)
13392                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13393        }
13394        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13395        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13396            self.checkpoint.as_mut().map(|field| field as _)
13397        }
13398        ///Returns a mutable reference to `checkpoint`.
13399        ///If the field is unset, it is first initialized with the default value.
13400        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13401            self.checkpoint.get_or_insert_default()
13402        }
13403        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
13404        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13405            self.checkpoint.as_ref().map(|field| field as _)
13406        }
13407        ///Sets `checkpoint` with the provided value.
13408        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13409            self.checkpoint = Some(field.into().into());
13410        }
13411        ///Sets `checkpoint` with the provided value.
13412        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13413            self.set_checkpoint(field.into());
13414            self
13415        }
13416    }
13417    impl super::SystemPackage {
13418        pub const fn const_default() -> Self {
13419            Self {
13420                version: None,
13421                modules: Vec::new(),
13422                dependencies: Vec::new(),
13423            }
13424        }
13425        #[doc(hidden)]
13426        pub fn default_instance() -> &'static Self {
13427            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13428            &DEFAULT
13429        }
13430        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13431        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13432            self.version.as_mut().map(|field| field as _)
13433        }
13434        ///Returns a mutable reference to `version`.
13435        ///If the field is unset, it is first initialized with the default value.
13436        pub fn version_mut(&mut self) -> &mut u64 {
13437            self.version.get_or_insert_default()
13438        }
13439        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13440        pub fn version_opt(&self) -> Option<u64> {
13441            self.version.as_ref().map(|field| *field)
13442        }
13443        ///Sets `version` with the provided value.
13444        pub fn set_version(&mut self, field: u64) {
13445            self.version = Some(field);
13446        }
13447        ///Sets `version` with the provided value.
13448        pub fn with_version(mut self, field: u64) -> Self {
13449            self.set_version(field);
13450            self
13451        }
13452        ///Returns the value of `modules`, or the default value if `modules` is unset.
13453        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13454            &self.modules
13455        }
13456        ///Returns a mutable reference to `modules`.
13457        ///If the field is unset, it is first initialized with the default value.
13458        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13459            &mut self.modules
13460        }
13461        ///Sets `modules` with the provided value.
13462        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13463            self.modules = field;
13464        }
13465        ///Sets `modules` with the provided value.
13466        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13467            self.set_modules(field);
13468            self
13469        }
13470        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13471        pub fn dependencies(&self) -> &[String] {
13472            &self.dependencies
13473        }
13474        ///Returns a mutable reference to `dependencies`.
13475        ///If the field is unset, it is first initialized with the default value.
13476        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13477            &mut self.dependencies
13478        }
13479        ///Sets `dependencies` with the provided value.
13480        pub fn set_dependencies(&mut self, field: Vec<String>) {
13481            self.dependencies = field;
13482        }
13483        ///Sets `dependencies` with the provided value.
13484        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13485            self.set_dependencies(field);
13486            self
13487        }
13488    }
13489    impl super::SystemParameters {
13490        pub const fn const_default() -> Self {
13491            Self {
13492                epoch_duration_ms: None,
13493                stake_subsidy_start_epoch: None,
13494                min_validator_count: None,
13495                max_validator_count: None,
13496                min_validator_joining_stake: None,
13497                validator_low_stake_threshold: None,
13498                validator_very_low_stake_threshold: None,
13499                validator_low_stake_grace_period: None,
13500                extra_fields: None,
13501            }
13502        }
13503        #[doc(hidden)]
13504        pub fn default_instance() -> &'static Self {
13505            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13506            &DEFAULT
13507        }
13508        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13509        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13510            self.epoch_duration_ms.as_mut().map(|field| field as _)
13511        }
13512        ///Returns a mutable reference to `epoch_duration_ms`.
13513        ///If the field is unset, it is first initialized with the default value.
13514        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13515            self.epoch_duration_ms.get_or_insert_default()
13516        }
13517        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13518        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13519            self.epoch_duration_ms.as_ref().map(|field| *field)
13520        }
13521        ///Sets `epoch_duration_ms` with the provided value.
13522        pub fn set_epoch_duration_ms(&mut self, field: u64) {
13523            self.epoch_duration_ms = Some(field);
13524        }
13525        ///Sets `epoch_duration_ms` with the provided value.
13526        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13527            self.set_epoch_duration_ms(field);
13528            self
13529        }
13530        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13531        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13532            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13533        }
13534        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
13535        ///If the field is unset, it is first initialized with the default value.
13536        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13537            self.stake_subsidy_start_epoch.get_or_insert_default()
13538        }
13539        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13540        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13541            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13542        }
13543        ///Sets `stake_subsidy_start_epoch` with the provided value.
13544        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13545            self.stake_subsidy_start_epoch = Some(field);
13546        }
13547        ///Sets `stake_subsidy_start_epoch` with the provided value.
13548        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13549            self.set_stake_subsidy_start_epoch(field);
13550            self
13551        }
13552        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13553        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13554            self.min_validator_count.as_mut().map(|field| field as _)
13555        }
13556        ///Returns a mutable reference to `min_validator_count`.
13557        ///If the field is unset, it is first initialized with the default value.
13558        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13559            self.min_validator_count.get_or_insert_default()
13560        }
13561        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13562        pub fn min_validator_count_opt(&self) -> Option<u64> {
13563            self.min_validator_count.as_ref().map(|field| *field)
13564        }
13565        ///Sets `min_validator_count` with the provided value.
13566        pub fn set_min_validator_count(&mut self, field: u64) {
13567            self.min_validator_count = Some(field);
13568        }
13569        ///Sets `min_validator_count` with the provided value.
13570        pub fn with_min_validator_count(mut self, field: u64) -> Self {
13571            self.set_min_validator_count(field);
13572            self
13573        }
13574        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13575        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13576            self.max_validator_count.as_mut().map(|field| field as _)
13577        }
13578        ///Returns a mutable reference to `max_validator_count`.
13579        ///If the field is unset, it is first initialized with the default value.
13580        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13581            self.max_validator_count.get_or_insert_default()
13582        }
13583        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13584        pub fn max_validator_count_opt(&self) -> Option<u64> {
13585            self.max_validator_count.as_ref().map(|field| *field)
13586        }
13587        ///Sets `max_validator_count` with the provided value.
13588        pub fn set_max_validator_count(&mut self, field: u64) {
13589            self.max_validator_count = Some(field);
13590        }
13591        ///Sets `max_validator_count` with the provided value.
13592        pub fn with_max_validator_count(mut self, field: u64) -> Self {
13593            self.set_max_validator_count(field);
13594            self
13595        }
13596        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13597        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13598            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13599        }
13600        ///Returns a mutable reference to `min_validator_joining_stake`.
13601        ///If the field is unset, it is first initialized with the default value.
13602        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13603            self.min_validator_joining_stake.get_or_insert_default()
13604        }
13605        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13606        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13607            self.min_validator_joining_stake.as_ref().map(|field| *field)
13608        }
13609        ///Sets `min_validator_joining_stake` with the provided value.
13610        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13611            self.min_validator_joining_stake = Some(field);
13612        }
13613        ///Sets `min_validator_joining_stake` with the provided value.
13614        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13615            self.set_min_validator_joining_stake(field);
13616            self
13617        }
13618        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13619        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13620            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13621        }
13622        ///Returns a mutable reference to `validator_low_stake_threshold`.
13623        ///If the field is unset, it is first initialized with the default value.
13624        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13625            self.validator_low_stake_threshold.get_or_insert_default()
13626        }
13627        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13628        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13629            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13630        }
13631        ///Sets `validator_low_stake_threshold` with the provided value.
13632        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13633            self.validator_low_stake_threshold = Some(field);
13634        }
13635        ///Sets `validator_low_stake_threshold` with the provided value.
13636        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13637            self.set_validator_low_stake_threshold(field);
13638            self
13639        }
13640        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13641        pub fn validator_very_low_stake_threshold_opt_mut(
13642            &mut self,
13643        ) -> Option<&mut u64> {
13644            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13645        }
13646        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13647        ///If the field is unset, it is first initialized with the default value.
13648        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13649            self.validator_very_low_stake_threshold.get_or_insert_default()
13650        }
13651        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13652        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13653            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13654        }
13655        ///Sets `validator_very_low_stake_threshold` with the provided value.
13656        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13657            self.validator_very_low_stake_threshold = Some(field);
13658        }
13659        ///Sets `validator_very_low_stake_threshold` with the provided value.
13660        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13661            self.set_validator_very_low_stake_threshold(field);
13662            self
13663        }
13664        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13665        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13666            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13667        }
13668        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13669        ///If the field is unset, it is first initialized with the default value.
13670        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13671            self.validator_low_stake_grace_period.get_or_insert_default()
13672        }
13673        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13674        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13675            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13676        }
13677        ///Sets `validator_low_stake_grace_period` with the provided value.
13678        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13679            self.validator_low_stake_grace_period = Some(field);
13680        }
13681        ///Sets `validator_low_stake_grace_period` with the provided value.
13682        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13683            self.set_validator_low_stake_grace_period(field);
13684            self
13685        }
13686        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13687        pub fn extra_fields(&self) -> &super::MoveTable {
13688            self.extra_fields
13689                .as_ref()
13690                .map(|field| field as _)
13691                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13692        }
13693        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13694        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13695            self.extra_fields.as_mut().map(|field| field as _)
13696        }
13697        ///Returns a mutable reference to `extra_fields`.
13698        ///If the field is unset, it is first initialized with the default value.
13699        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13700            self.extra_fields.get_or_insert_default()
13701        }
13702        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13703        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13704            self.extra_fields.as_ref().map(|field| field as _)
13705        }
13706        ///Sets `extra_fields` with the provided value.
13707        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13708            self.extra_fields = Some(field.into().into());
13709        }
13710        ///Sets `extra_fields` with the provided value.
13711        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13712            self.set_extra_fields(field.into());
13713            self
13714        }
13715    }
13716    impl super::SystemState {
13717        pub const fn const_default() -> Self {
13718            Self {
13719                version: None,
13720                epoch: None,
13721                protocol_version: None,
13722                validators: None,
13723                storage_fund: None,
13724                parameters: None,
13725                reference_gas_price: None,
13726                validator_report_records: Vec::new(),
13727                stake_subsidy: None,
13728                safe_mode: None,
13729                safe_mode_storage_rewards: None,
13730                safe_mode_computation_rewards: None,
13731                safe_mode_storage_rebates: None,
13732                safe_mode_non_refundable_storage_fee: None,
13733                epoch_start_timestamp_ms: None,
13734                extra_fields: None,
13735            }
13736        }
13737        #[doc(hidden)]
13738        pub fn default_instance() -> &'static Self {
13739            static DEFAULT: super::SystemState = super::SystemState::const_default();
13740            &DEFAULT
13741        }
13742        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13743        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13744            self.version.as_mut().map(|field| field as _)
13745        }
13746        ///Returns a mutable reference to `version`.
13747        ///If the field is unset, it is first initialized with the default value.
13748        pub fn version_mut(&mut self) -> &mut u64 {
13749            self.version.get_or_insert_default()
13750        }
13751        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13752        pub fn version_opt(&self) -> Option<u64> {
13753            self.version.as_ref().map(|field| *field)
13754        }
13755        ///Sets `version` with the provided value.
13756        pub fn set_version(&mut self, field: u64) {
13757            self.version = Some(field);
13758        }
13759        ///Sets `version` with the provided value.
13760        pub fn with_version(mut self, field: u64) -> Self {
13761            self.set_version(field);
13762            self
13763        }
13764        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13765        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13766            self.epoch.as_mut().map(|field| field as _)
13767        }
13768        ///Returns a mutable reference to `epoch`.
13769        ///If the field is unset, it is first initialized with the default value.
13770        pub fn epoch_mut(&mut self) -> &mut u64 {
13771            self.epoch.get_or_insert_default()
13772        }
13773        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13774        pub fn epoch_opt(&self) -> Option<u64> {
13775            self.epoch.as_ref().map(|field| *field)
13776        }
13777        ///Sets `epoch` with the provided value.
13778        pub fn set_epoch(&mut self, field: u64) {
13779            self.epoch = Some(field);
13780        }
13781        ///Sets `epoch` with the provided value.
13782        pub fn with_epoch(mut self, field: u64) -> Self {
13783            self.set_epoch(field);
13784            self
13785        }
13786        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13787        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13788            self.protocol_version.as_mut().map(|field| field as _)
13789        }
13790        ///Returns a mutable reference to `protocol_version`.
13791        ///If the field is unset, it is first initialized with the default value.
13792        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13793            self.protocol_version.get_or_insert_default()
13794        }
13795        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13796        pub fn protocol_version_opt(&self) -> Option<u64> {
13797            self.protocol_version.as_ref().map(|field| *field)
13798        }
13799        ///Sets `protocol_version` with the provided value.
13800        pub fn set_protocol_version(&mut self, field: u64) {
13801            self.protocol_version = Some(field);
13802        }
13803        ///Sets `protocol_version` with the provided value.
13804        pub fn with_protocol_version(mut self, field: u64) -> Self {
13805            self.set_protocol_version(field);
13806            self
13807        }
13808        ///Returns the value of `validators`, or the default value if `validators` is unset.
13809        pub fn validators(&self) -> &super::ValidatorSet {
13810            self.validators
13811                .as_ref()
13812                .map(|field| field as _)
13813                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13814        }
13815        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13816        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13817            self.validators.as_mut().map(|field| field as _)
13818        }
13819        ///Returns a mutable reference to `validators`.
13820        ///If the field is unset, it is first initialized with the default value.
13821        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13822            self.validators.get_or_insert_default()
13823        }
13824        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13825        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13826            self.validators.as_ref().map(|field| field as _)
13827        }
13828        ///Sets `validators` with the provided value.
13829        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13830            self.validators = Some(field.into().into());
13831        }
13832        ///Sets `validators` with the provided value.
13833        pub fn with_validators<T: Into<super::ValidatorSet>>(
13834            mut self,
13835            field: T,
13836        ) -> Self {
13837            self.set_validators(field.into());
13838            self
13839        }
13840        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13841        pub fn storage_fund(&self) -> &super::StorageFund {
13842            self.storage_fund
13843                .as_ref()
13844                .map(|field| field as _)
13845                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13846        }
13847        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13848        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13849            self.storage_fund.as_mut().map(|field| field as _)
13850        }
13851        ///Returns a mutable reference to `storage_fund`.
13852        ///If the field is unset, it is first initialized with the default value.
13853        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13854            self.storage_fund.get_or_insert_default()
13855        }
13856        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13857        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13858            self.storage_fund.as_ref().map(|field| field as _)
13859        }
13860        ///Sets `storage_fund` with the provided value.
13861        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13862            self.storage_fund = Some(field.into().into());
13863        }
13864        ///Sets `storage_fund` with the provided value.
13865        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13866            mut self,
13867            field: T,
13868        ) -> Self {
13869            self.set_storage_fund(field.into());
13870            self
13871        }
13872        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13873        pub fn parameters(&self) -> &super::SystemParameters {
13874            self.parameters
13875                .as_ref()
13876                .map(|field| field as _)
13877                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13878        }
13879        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13880        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13881            self.parameters.as_mut().map(|field| field as _)
13882        }
13883        ///Returns a mutable reference to `parameters`.
13884        ///If the field is unset, it is first initialized with the default value.
13885        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13886            self.parameters.get_or_insert_default()
13887        }
13888        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13889        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13890            self.parameters.as_ref().map(|field| field as _)
13891        }
13892        ///Sets `parameters` with the provided value.
13893        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13894            self.parameters = Some(field.into().into());
13895        }
13896        ///Sets `parameters` with the provided value.
13897        pub fn with_parameters<T: Into<super::SystemParameters>>(
13898            mut self,
13899            field: T,
13900        ) -> Self {
13901            self.set_parameters(field.into());
13902            self
13903        }
13904        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13905        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13906            self.reference_gas_price.as_mut().map(|field| field as _)
13907        }
13908        ///Returns a mutable reference to `reference_gas_price`.
13909        ///If the field is unset, it is first initialized with the default value.
13910        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13911            self.reference_gas_price.get_or_insert_default()
13912        }
13913        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13914        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13915            self.reference_gas_price.as_ref().map(|field| *field)
13916        }
13917        ///Sets `reference_gas_price` with the provided value.
13918        pub fn set_reference_gas_price(&mut self, field: u64) {
13919            self.reference_gas_price = Some(field);
13920        }
13921        ///Sets `reference_gas_price` with the provided value.
13922        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13923            self.set_reference_gas_price(field);
13924            self
13925        }
13926        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13927        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13928            &self.validator_report_records
13929        }
13930        ///Returns a mutable reference to `validator_report_records`.
13931        ///If the field is unset, it is first initialized with the default value.
13932        pub fn validator_report_records_mut(
13933            &mut self,
13934        ) -> &mut Vec<super::ValidatorReportRecord> {
13935            &mut self.validator_report_records
13936        }
13937        ///Sets `validator_report_records` with the provided value.
13938        pub fn set_validator_report_records(
13939            &mut self,
13940            field: Vec<super::ValidatorReportRecord>,
13941        ) {
13942            self.validator_report_records = field;
13943        }
13944        ///Sets `validator_report_records` with the provided value.
13945        pub fn with_validator_report_records(
13946            mut self,
13947            field: Vec<super::ValidatorReportRecord>,
13948        ) -> Self {
13949            self.set_validator_report_records(field);
13950            self
13951        }
13952        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13953        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13954            self.stake_subsidy
13955                .as_ref()
13956                .map(|field| field as _)
13957                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13958        }
13959        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13960        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13961            self.stake_subsidy.as_mut().map(|field| field as _)
13962        }
13963        ///Returns a mutable reference to `stake_subsidy`.
13964        ///If the field is unset, it is first initialized with the default value.
13965        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13966            self.stake_subsidy.get_or_insert_default()
13967        }
13968        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13969        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13970            self.stake_subsidy.as_ref().map(|field| field as _)
13971        }
13972        ///Sets `stake_subsidy` with the provided value.
13973        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13974            self.stake_subsidy = Some(field.into().into());
13975        }
13976        ///Sets `stake_subsidy` with the provided value.
13977        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13978            mut self,
13979            field: T,
13980        ) -> Self {
13981            self.set_stake_subsidy(field.into());
13982            self
13983        }
13984        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13985        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13986            self.safe_mode.as_mut().map(|field| field as _)
13987        }
13988        ///Returns a mutable reference to `safe_mode`.
13989        ///If the field is unset, it is first initialized with the default value.
13990        pub fn safe_mode_mut(&mut self) -> &mut bool {
13991            self.safe_mode.get_or_insert_default()
13992        }
13993        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13994        pub fn safe_mode_opt(&self) -> Option<bool> {
13995            self.safe_mode.as_ref().map(|field| *field)
13996        }
13997        ///Sets `safe_mode` with the provided value.
13998        pub fn set_safe_mode(&mut self, field: bool) {
13999            self.safe_mode = Some(field);
14000        }
14001        ///Sets `safe_mode` with the provided value.
14002        pub fn with_safe_mode(mut self, field: bool) -> Self {
14003            self.set_safe_mode(field);
14004            self
14005        }
14006        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14007        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14008            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
14009        }
14010        ///Returns a mutable reference to `safe_mode_storage_rewards`.
14011        ///If the field is unset, it is first initialized with the default value.
14012        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
14013            self.safe_mode_storage_rewards.get_or_insert_default()
14014        }
14015        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
14016        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
14017            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
14018        }
14019        ///Sets `safe_mode_storage_rewards` with the provided value.
14020        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
14021            self.safe_mode_storage_rewards = Some(field);
14022        }
14023        ///Sets `safe_mode_storage_rewards` with the provided value.
14024        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
14025            self.set_safe_mode_storage_rewards(field);
14026            self
14027        }
14028        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14029        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14030            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
14031        }
14032        ///Returns a mutable reference to `safe_mode_computation_rewards`.
14033        ///If the field is unset, it is first initialized with the default value.
14034        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
14035            self.safe_mode_computation_rewards.get_or_insert_default()
14036        }
14037        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
14038        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
14039            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
14040        }
14041        ///Sets `safe_mode_computation_rewards` with the provided value.
14042        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
14043            self.safe_mode_computation_rewards = Some(field);
14044        }
14045        ///Sets `safe_mode_computation_rewards` with the provided value.
14046        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
14047            self.set_safe_mode_computation_rewards(field);
14048            self
14049        }
14050        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14051        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14052            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
14053        }
14054        ///Returns a mutable reference to `safe_mode_storage_rebates`.
14055        ///If the field is unset, it is first initialized with the default value.
14056        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
14057            self.safe_mode_storage_rebates.get_or_insert_default()
14058        }
14059        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14060        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
14061            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
14062        }
14063        ///Sets `safe_mode_storage_rebates` with the provided value.
14064        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
14065            self.safe_mode_storage_rebates = Some(field);
14066        }
14067        ///Sets `safe_mode_storage_rebates` with the provided value.
14068        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
14069            self.set_safe_mode_storage_rebates(field);
14070            self
14071        }
14072        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14073        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
14074            &mut self,
14075        ) -> Option<&mut u64> {
14076            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
14077        }
14078        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
14079        ///If the field is unset, it is first initialized with the default value.
14080        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
14081            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
14082        }
14083        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
14084        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
14085            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
14086        }
14087        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
14088        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
14089            self.safe_mode_non_refundable_storage_fee = Some(field);
14090        }
14091        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
14092        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
14093            self.set_safe_mode_non_refundable_storage_fee(field);
14094            self
14095        }
14096        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14097        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
14098            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
14099        }
14100        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
14101        ///If the field is unset, it is first initialized with the default value.
14102        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
14103            self.epoch_start_timestamp_ms.get_or_insert_default()
14104        }
14105        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
14106        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
14107            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
14108        }
14109        ///Sets `epoch_start_timestamp_ms` with the provided value.
14110        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
14111            self.epoch_start_timestamp_ms = Some(field);
14112        }
14113        ///Sets `epoch_start_timestamp_ms` with the provided value.
14114        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
14115            self.set_epoch_start_timestamp_ms(field);
14116            self
14117        }
14118        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14119        pub fn extra_fields(&self) -> &super::MoveTable {
14120            self.extra_fields
14121                .as_ref()
14122                .map(|field| field as _)
14123                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14124        }
14125        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14126        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14127            self.extra_fields.as_mut().map(|field| field as _)
14128        }
14129        ///Returns a mutable reference to `extra_fields`.
14130        ///If the field is unset, it is first initialized with the default value.
14131        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14132            self.extra_fields.get_or_insert_default()
14133        }
14134        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14135        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14136            self.extra_fields.as_ref().map(|field| field as _)
14137        }
14138        ///Sets `extra_fields` with the provided value.
14139        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14140            self.extra_fields = Some(field.into().into());
14141        }
14142        ///Sets `extra_fields` with the provided value.
14143        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14144            self.set_extra_fields(field.into());
14145            self
14146        }
14147    }
14148    impl super::Transaction {
14149        pub const fn const_default() -> Self {
14150            Self {
14151                bcs: None,
14152                digest: None,
14153                version: None,
14154                kind: None,
14155                sender: None,
14156                gas_payment: None,
14157                expiration: None,
14158            }
14159        }
14160        #[doc(hidden)]
14161        pub fn default_instance() -> &'static Self {
14162            static DEFAULT: super::Transaction = super::Transaction::const_default();
14163            &DEFAULT
14164        }
14165        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14166        pub fn bcs(&self) -> &super::Bcs {
14167            self.bcs
14168                .as_ref()
14169                .map(|field| field as _)
14170                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14171        }
14172        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14173        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14174            self.bcs.as_mut().map(|field| field as _)
14175        }
14176        ///Returns a mutable reference to `bcs`.
14177        ///If the field is unset, it is first initialized with the default value.
14178        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14179            self.bcs.get_or_insert_default()
14180        }
14181        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14182        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14183            self.bcs.as_ref().map(|field| field as _)
14184        }
14185        ///Sets `bcs` with the provided value.
14186        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14187            self.bcs = Some(field.into().into());
14188        }
14189        ///Sets `bcs` with the provided value.
14190        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14191            self.set_bcs(field.into());
14192            self
14193        }
14194        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14195        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14196            self.digest.as_mut().map(|field| field as _)
14197        }
14198        ///Returns a mutable reference to `digest`.
14199        ///If the field is unset, it is first initialized with the default value.
14200        pub fn digest_mut(&mut self) -> &mut String {
14201            self.digest.get_or_insert_default()
14202        }
14203        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14204        pub fn digest_opt(&self) -> Option<&str> {
14205            self.digest.as_ref().map(|field| field as _)
14206        }
14207        ///Sets `digest` with the provided value.
14208        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14209            self.digest = Some(field.into().into());
14210        }
14211        ///Sets `digest` with the provided value.
14212        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14213            self.set_digest(field.into());
14214            self
14215        }
14216        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14217        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14218            self.version.as_mut().map(|field| field as _)
14219        }
14220        ///Returns a mutable reference to `version`.
14221        ///If the field is unset, it is first initialized with the default value.
14222        pub fn version_mut(&mut self) -> &mut i32 {
14223            self.version.get_or_insert_default()
14224        }
14225        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14226        pub fn version_opt(&self) -> Option<i32> {
14227            self.version.as_ref().map(|field| *field)
14228        }
14229        ///Sets `version` with the provided value.
14230        pub fn set_version(&mut self, field: i32) {
14231            self.version = Some(field);
14232        }
14233        ///Sets `version` with the provided value.
14234        pub fn with_version(mut self, field: i32) -> Self {
14235            self.set_version(field);
14236            self
14237        }
14238        ///Returns the value of `kind`, or the default value if `kind` is unset.
14239        pub fn kind(&self) -> &super::TransactionKind {
14240            self.kind
14241                .as_ref()
14242                .map(|field| field as _)
14243                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14244        }
14245        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14246        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14247            self.kind.as_mut().map(|field| field as _)
14248        }
14249        ///Returns a mutable reference to `kind`.
14250        ///If the field is unset, it is first initialized with the default value.
14251        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14252            self.kind.get_or_insert_default()
14253        }
14254        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
14255        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14256            self.kind.as_ref().map(|field| field as _)
14257        }
14258        ///Sets `kind` with the provided value.
14259        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14260            self.kind = Some(field.into().into());
14261        }
14262        ///Sets `kind` with the provided value.
14263        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14264            self.set_kind(field.into());
14265            self
14266        }
14267        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14268        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14269            self.sender.as_mut().map(|field| field as _)
14270        }
14271        ///Returns a mutable reference to `sender`.
14272        ///If the field is unset, it is first initialized with the default value.
14273        pub fn sender_mut(&mut self) -> &mut String {
14274            self.sender.get_or_insert_default()
14275        }
14276        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
14277        pub fn sender_opt(&self) -> Option<&str> {
14278            self.sender.as_ref().map(|field| field as _)
14279        }
14280        ///Sets `sender` with the provided value.
14281        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14282            self.sender = Some(field.into().into());
14283        }
14284        ///Sets `sender` with the provided value.
14285        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14286            self.set_sender(field.into());
14287            self
14288        }
14289        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
14290        pub fn gas_payment(&self) -> &super::GasPayment {
14291            self.gas_payment
14292                .as_ref()
14293                .map(|field| field as _)
14294                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14295        }
14296        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14297        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14298            self.gas_payment.as_mut().map(|field| field as _)
14299        }
14300        ///Returns a mutable reference to `gas_payment`.
14301        ///If the field is unset, it is first initialized with the default value.
14302        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14303            self.gas_payment.get_or_insert_default()
14304        }
14305        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
14306        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14307            self.gas_payment.as_ref().map(|field| field as _)
14308        }
14309        ///Sets `gas_payment` with the provided value.
14310        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14311            self.gas_payment = Some(field.into().into());
14312        }
14313        ///Sets `gas_payment` with the provided value.
14314        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14315            self.set_gas_payment(field.into());
14316            self
14317        }
14318        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
14319        pub fn expiration(&self) -> &super::TransactionExpiration {
14320            self.expiration
14321                .as_ref()
14322                .map(|field| field as _)
14323                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14324        }
14325        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14326        pub fn expiration_opt_mut(
14327            &mut self,
14328        ) -> Option<&mut super::TransactionExpiration> {
14329            self.expiration.as_mut().map(|field| field as _)
14330        }
14331        ///Returns a mutable reference to `expiration`.
14332        ///If the field is unset, it is first initialized with the default value.
14333        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14334            self.expiration.get_or_insert_default()
14335        }
14336        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
14337        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14338            self.expiration.as_ref().map(|field| field as _)
14339        }
14340        ///Sets `expiration` with the provided value.
14341        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14342            &mut self,
14343            field: T,
14344        ) {
14345            self.expiration = Some(field.into().into());
14346        }
14347        ///Sets `expiration` with the provided value.
14348        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14349            mut self,
14350            field: T,
14351        ) -> Self {
14352            self.set_expiration(field.into());
14353            self
14354        }
14355    }
14356    impl super::TransactionEffects {
14357        pub const fn const_default() -> Self {
14358            Self {
14359                bcs: None,
14360                digest: None,
14361                version: None,
14362                status: None,
14363                epoch: None,
14364                gas_used: None,
14365                transaction_digest: None,
14366                gas_object: None,
14367                events_digest: None,
14368                dependencies: Vec::new(),
14369                lamport_version: None,
14370                changed_objects: Vec::new(),
14371                unchanged_consensus_objects: Vec::new(),
14372                auxiliary_data_digest: None,
14373                unchanged_loaded_runtime_objects: Vec::new(),
14374            }
14375        }
14376        #[doc(hidden)]
14377        pub fn default_instance() -> &'static Self {
14378            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14379            &DEFAULT
14380        }
14381        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14382        pub fn bcs(&self) -> &super::Bcs {
14383            self.bcs
14384                .as_ref()
14385                .map(|field| field as _)
14386                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14387        }
14388        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14389        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14390            self.bcs.as_mut().map(|field| field as _)
14391        }
14392        ///Returns a mutable reference to `bcs`.
14393        ///If the field is unset, it is first initialized with the default value.
14394        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14395            self.bcs.get_or_insert_default()
14396        }
14397        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14398        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14399            self.bcs.as_ref().map(|field| field as _)
14400        }
14401        ///Sets `bcs` with the provided value.
14402        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14403            self.bcs = Some(field.into().into());
14404        }
14405        ///Sets `bcs` with the provided value.
14406        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14407            self.set_bcs(field.into());
14408            self
14409        }
14410        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14411        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14412            self.digest.as_mut().map(|field| field as _)
14413        }
14414        ///Returns a mutable reference to `digest`.
14415        ///If the field is unset, it is first initialized with the default value.
14416        pub fn digest_mut(&mut self) -> &mut String {
14417            self.digest.get_or_insert_default()
14418        }
14419        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14420        pub fn digest_opt(&self) -> Option<&str> {
14421            self.digest.as_ref().map(|field| field as _)
14422        }
14423        ///Sets `digest` with the provided value.
14424        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14425            self.digest = Some(field.into().into());
14426        }
14427        ///Sets `digest` with the provided value.
14428        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14429            self.set_digest(field.into());
14430            self
14431        }
14432        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14433        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14434            self.version.as_mut().map(|field| field as _)
14435        }
14436        ///Returns a mutable reference to `version`.
14437        ///If the field is unset, it is first initialized with the default value.
14438        pub fn version_mut(&mut self) -> &mut i32 {
14439            self.version.get_or_insert_default()
14440        }
14441        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14442        pub fn version_opt(&self) -> Option<i32> {
14443            self.version.as_ref().map(|field| *field)
14444        }
14445        ///Sets `version` with the provided value.
14446        pub fn set_version(&mut self, field: i32) {
14447            self.version = Some(field);
14448        }
14449        ///Sets `version` with the provided value.
14450        pub fn with_version(mut self, field: i32) -> Self {
14451            self.set_version(field);
14452            self
14453        }
14454        ///Returns the value of `status`, or the default value if `status` is unset.
14455        pub fn status(&self) -> &super::ExecutionStatus {
14456            self.status
14457                .as_ref()
14458                .map(|field| field as _)
14459                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14460        }
14461        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14462        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14463            self.status.as_mut().map(|field| field as _)
14464        }
14465        ///Returns a mutable reference to `status`.
14466        ///If the field is unset, it is first initialized with the default value.
14467        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14468            self.status.get_or_insert_default()
14469        }
14470        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
14471        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14472            self.status.as_ref().map(|field| field as _)
14473        }
14474        ///Sets `status` with the provided value.
14475        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14476            self.status = Some(field.into().into());
14477        }
14478        ///Sets `status` with the provided value.
14479        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14480            self.set_status(field.into());
14481            self
14482        }
14483        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14484        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14485            self.epoch.as_mut().map(|field| field as _)
14486        }
14487        ///Returns a mutable reference to `epoch`.
14488        ///If the field is unset, it is first initialized with the default value.
14489        pub fn epoch_mut(&mut self) -> &mut u64 {
14490            self.epoch.get_or_insert_default()
14491        }
14492        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14493        pub fn epoch_opt(&self) -> Option<u64> {
14494            self.epoch.as_ref().map(|field| *field)
14495        }
14496        ///Sets `epoch` with the provided value.
14497        pub fn set_epoch(&mut self, field: u64) {
14498            self.epoch = Some(field);
14499        }
14500        ///Sets `epoch` with the provided value.
14501        pub fn with_epoch(mut self, field: u64) -> Self {
14502            self.set_epoch(field);
14503            self
14504        }
14505        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
14506        pub fn gas_used(&self) -> &super::GasCostSummary {
14507            self.gas_used
14508                .as_ref()
14509                .map(|field| field as _)
14510                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14511        }
14512        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14513        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14514            self.gas_used.as_mut().map(|field| field as _)
14515        }
14516        ///Returns a mutable reference to `gas_used`.
14517        ///If the field is unset, it is first initialized with the default value.
14518        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14519            self.gas_used.get_or_insert_default()
14520        }
14521        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
14522        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14523            self.gas_used.as_ref().map(|field| field as _)
14524        }
14525        ///Sets `gas_used` with the provided value.
14526        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14527            self.gas_used = Some(field.into().into());
14528        }
14529        ///Sets `gas_used` with the provided value.
14530        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14531            mut self,
14532            field: T,
14533        ) -> Self {
14534            self.set_gas_used(field.into());
14535            self
14536        }
14537        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14538        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14539            self.transaction_digest.as_mut().map(|field| field as _)
14540        }
14541        ///Returns a mutable reference to `transaction_digest`.
14542        ///If the field is unset, it is first initialized with the default value.
14543        pub fn transaction_digest_mut(&mut self) -> &mut String {
14544            self.transaction_digest.get_or_insert_default()
14545        }
14546        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14547        pub fn transaction_digest_opt(&self) -> Option<&str> {
14548            self.transaction_digest.as_ref().map(|field| field as _)
14549        }
14550        ///Sets `transaction_digest` with the provided value.
14551        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14552            self.transaction_digest = Some(field.into().into());
14553        }
14554        ///Sets `transaction_digest` with the provided value.
14555        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14556            self.set_transaction_digest(field.into());
14557            self
14558        }
14559        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14560        pub fn gas_object(&self) -> &super::ChangedObject {
14561            self.gas_object
14562                .as_ref()
14563                .map(|field| field as _)
14564                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14565        }
14566        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14567        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14568            self.gas_object.as_mut().map(|field| field as _)
14569        }
14570        ///Returns a mutable reference to `gas_object`.
14571        ///If the field is unset, it is first initialized with the default value.
14572        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14573            self.gas_object.get_or_insert_default()
14574        }
14575        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14576        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14577            self.gas_object.as_ref().map(|field| field as _)
14578        }
14579        ///Sets `gas_object` with the provided value.
14580        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14581            self.gas_object = Some(field.into().into());
14582        }
14583        ///Sets `gas_object` with the provided value.
14584        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14585            mut self,
14586            field: T,
14587        ) -> Self {
14588            self.set_gas_object(field.into());
14589            self
14590        }
14591        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14592        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14593            self.events_digest.as_mut().map(|field| field as _)
14594        }
14595        ///Returns a mutable reference to `events_digest`.
14596        ///If the field is unset, it is first initialized with the default value.
14597        pub fn events_digest_mut(&mut self) -> &mut String {
14598            self.events_digest.get_or_insert_default()
14599        }
14600        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14601        pub fn events_digest_opt(&self) -> Option<&str> {
14602            self.events_digest.as_ref().map(|field| field as _)
14603        }
14604        ///Sets `events_digest` with the provided value.
14605        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14606            self.events_digest = Some(field.into().into());
14607        }
14608        ///Sets `events_digest` with the provided value.
14609        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14610            self.set_events_digest(field.into());
14611            self
14612        }
14613        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14614        pub fn dependencies(&self) -> &[String] {
14615            &self.dependencies
14616        }
14617        ///Returns a mutable reference to `dependencies`.
14618        ///If the field is unset, it is first initialized with the default value.
14619        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14620            &mut self.dependencies
14621        }
14622        ///Sets `dependencies` with the provided value.
14623        pub fn set_dependencies(&mut self, field: Vec<String>) {
14624            self.dependencies = field;
14625        }
14626        ///Sets `dependencies` with the provided value.
14627        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14628            self.set_dependencies(field);
14629            self
14630        }
14631        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14632        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14633            self.lamport_version.as_mut().map(|field| field as _)
14634        }
14635        ///Returns a mutable reference to `lamport_version`.
14636        ///If the field is unset, it is first initialized with the default value.
14637        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14638            self.lamport_version.get_or_insert_default()
14639        }
14640        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14641        pub fn lamport_version_opt(&self) -> Option<u64> {
14642            self.lamport_version.as_ref().map(|field| *field)
14643        }
14644        ///Sets `lamport_version` with the provided value.
14645        pub fn set_lamport_version(&mut self, field: u64) {
14646            self.lamport_version = Some(field);
14647        }
14648        ///Sets `lamport_version` with the provided value.
14649        pub fn with_lamport_version(mut self, field: u64) -> Self {
14650            self.set_lamport_version(field);
14651            self
14652        }
14653        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14654        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14655            &self.changed_objects
14656        }
14657        ///Returns a mutable reference to `changed_objects`.
14658        ///If the field is unset, it is first initialized with the default value.
14659        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14660            &mut self.changed_objects
14661        }
14662        ///Sets `changed_objects` with the provided value.
14663        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14664            self.changed_objects = field;
14665        }
14666        ///Sets `changed_objects` with the provided value.
14667        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14668            self.set_changed_objects(field);
14669            self
14670        }
14671        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14672        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14673            &self.unchanged_consensus_objects
14674        }
14675        ///Returns a mutable reference to `unchanged_consensus_objects`.
14676        ///If the field is unset, it is first initialized with the default value.
14677        pub fn unchanged_consensus_objects_mut(
14678            &mut self,
14679        ) -> &mut Vec<super::UnchangedConsensusObject> {
14680            &mut self.unchanged_consensus_objects
14681        }
14682        ///Sets `unchanged_consensus_objects` with the provided value.
14683        pub fn set_unchanged_consensus_objects(
14684            &mut self,
14685            field: Vec<super::UnchangedConsensusObject>,
14686        ) {
14687            self.unchanged_consensus_objects = field;
14688        }
14689        ///Sets `unchanged_consensus_objects` with the provided value.
14690        pub fn with_unchanged_consensus_objects(
14691            mut self,
14692            field: Vec<super::UnchangedConsensusObject>,
14693        ) -> Self {
14694            self.set_unchanged_consensus_objects(field);
14695            self
14696        }
14697        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14698        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14699            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14700        }
14701        ///Returns a mutable reference to `auxiliary_data_digest`.
14702        ///If the field is unset, it is first initialized with the default value.
14703        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14704            self.auxiliary_data_digest.get_or_insert_default()
14705        }
14706        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14707        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14708            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14709        }
14710        ///Sets `auxiliary_data_digest` with the provided value.
14711        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14712            self.auxiliary_data_digest = Some(field.into().into());
14713        }
14714        ///Sets `auxiliary_data_digest` with the provided value.
14715        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14716            self.set_auxiliary_data_digest(field.into());
14717            self
14718        }
14719        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14720        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14721            &self.unchanged_loaded_runtime_objects
14722        }
14723        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14724        ///If the field is unset, it is first initialized with the default value.
14725        pub fn unchanged_loaded_runtime_objects_mut(
14726            &mut self,
14727        ) -> &mut Vec<super::ObjectReference> {
14728            &mut self.unchanged_loaded_runtime_objects
14729        }
14730        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14731        pub fn set_unchanged_loaded_runtime_objects(
14732            &mut self,
14733            field: Vec<super::ObjectReference>,
14734        ) {
14735            self.unchanged_loaded_runtime_objects = field;
14736        }
14737        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14738        pub fn with_unchanged_loaded_runtime_objects(
14739            mut self,
14740            field: Vec<super::ObjectReference>,
14741        ) -> Self {
14742            self.set_unchanged_loaded_runtime_objects(field);
14743            self
14744        }
14745    }
14746    impl super::TransactionEvents {
14747        pub const fn const_default() -> Self {
14748            Self {
14749                bcs: None,
14750                digest: None,
14751                events: Vec::new(),
14752            }
14753        }
14754        #[doc(hidden)]
14755        pub fn default_instance() -> &'static Self {
14756            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14757            &DEFAULT
14758        }
14759        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14760        pub fn bcs(&self) -> &super::Bcs {
14761            self.bcs
14762                .as_ref()
14763                .map(|field| field as _)
14764                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14765        }
14766        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14767        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14768            self.bcs.as_mut().map(|field| field as _)
14769        }
14770        ///Returns a mutable reference to `bcs`.
14771        ///If the field is unset, it is first initialized with the default value.
14772        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14773            self.bcs.get_or_insert_default()
14774        }
14775        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14776        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14777            self.bcs.as_ref().map(|field| field as _)
14778        }
14779        ///Sets `bcs` with the provided value.
14780        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14781            self.bcs = Some(field.into().into());
14782        }
14783        ///Sets `bcs` with the provided value.
14784        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14785            self.set_bcs(field.into());
14786            self
14787        }
14788        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14789        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14790            self.digest.as_mut().map(|field| field as _)
14791        }
14792        ///Returns a mutable reference to `digest`.
14793        ///If the field is unset, it is first initialized with the default value.
14794        pub fn digest_mut(&mut self) -> &mut String {
14795            self.digest.get_or_insert_default()
14796        }
14797        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14798        pub fn digest_opt(&self) -> Option<&str> {
14799            self.digest.as_ref().map(|field| field as _)
14800        }
14801        ///Sets `digest` with the provided value.
14802        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14803            self.digest = Some(field.into().into());
14804        }
14805        ///Sets `digest` with the provided value.
14806        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14807            self.set_digest(field.into());
14808            self
14809        }
14810        ///Returns the value of `events`, or the default value if `events` is unset.
14811        pub fn events(&self) -> &[super::Event] {
14812            &self.events
14813        }
14814        ///Returns a mutable reference to `events`.
14815        ///If the field is unset, it is first initialized with the default value.
14816        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14817            &mut self.events
14818        }
14819        ///Sets `events` with the provided value.
14820        pub fn set_events(&mut self, field: Vec<super::Event>) {
14821            self.events = field;
14822        }
14823        ///Sets `events` with the provided value.
14824        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14825            self.set_events(field);
14826            self
14827        }
14828    }
14829    impl super::TransactionExpiration {
14830        pub const fn const_default() -> Self {
14831            Self {
14832                kind: None,
14833                epoch: None,
14834                min_epoch: None,
14835                min_timestamp: None,
14836                max_timestamp: None,
14837                chain: None,
14838                nonce: None,
14839            }
14840        }
14841        #[doc(hidden)]
14842        pub fn default_instance() -> &'static Self {
14843            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14844            &DEFAULT
14845        }
14846        ///Sets `kind` with the provided value.
14847        pub fn with_kind<
14848            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14849        >(mut self, field: T) -> Self {
14850            self.set_kind(field.into());
14851            self
14852        }
14853        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14854        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14855            self.epoch.as_mut().map(|field| field as _)
14856        }
14857        ///Returns a mutable reference to `epoch`.
14858        ///If the field is unset, it is first initialized with the default value.
14859        pub fn epoch_mut(&mut self) -> &mut u64 {
14860            self.epoch.get_or_insert_default()
14861        }
14862        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14863        pub fn epoch_opt(&self) -> Option<u64> {
14864            self.epoch.as_ref().map(|field| *field)
14865        }
14866        ///Sets `epoch` with the provided value.
14867        pub fn set_epoch(&mut self, field: u64) {
14868            self.epoch = Some(field);
14869        }
14870        ///Sets `epoch` with the provided value.
14871        pub fn with_epoch(mut self, field: u64) -> Self {
14872            self.set_epoch(field);
14873            self
14874        }
14875        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14876        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14877            self.min_epoch.as_mut().map(|field| field as _)
14878        }
14879        ///Returns a mutable reference to `min_epoch`.
14880        ///If the field is unset, it is first initialized with the default value.
14881        pub fn min_epoch_mut(&mut self) -> &mut u64 {
14882            self.min_epoch.get_or_insert_default()
14883        }
14884        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14885        pub fn min_epoch_opt(&self) -> Option<u64> {
14886            self.min_epoch.as_ref().map(|field| *field)
14887        }
14888        ///Sets `min_epoch` with the provided value.
14889        pub fn set_min_epoch(&mut self, field: u64) {
14890            self.min_epoch = Some(field);
14891        }
14892        ///Sets `min_epoch` with the provided value.
14893        pub fn with_min_epoch(mut self, field: u64) -> Self {
14894            self.set_min_epoch(field);
14895            self
14896        }
14897        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14898        pub fn min_timestamp_opt_mut(
14899            &mut self,
14900        ) -> Option<&mut ::prost_types::Timestamp> {
14901            self.min_timestamp.as_mut().map(|field| field as _)
14902        }
14903        ///Returns a mutable reference to `min_timestamp`.
14904        ///If the field is unset, it is first initialized with the default value.
14905        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14906            self.min_timestamp.get_or_insert_default()
14907        }
14908        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14909        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14910            self.min_timestamp.as_ref().map(|field| field as _)
14911        }
14912        ///Sets `min_timestamp` with the provided value.
14913        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14914            &mut self,
14915            field: T,
14916        ) {
14917            self.min_timestamp = Some(field.into().into());
14918        }
14919        ///Sets `min_timestamp` with the provided value.
14920        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14921            mut self,
14922            field: T,
14923        ) -> Self {
14924            self.set_min_timestamp(field.into());
14925            self
14926        }
14927        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14928        pub fn max_timestamp_opt_mut(
14929            &mut self,
14930        ) -> Option<&mut ::prost_types::Timestamp> {
14931            self.max_timestamp.as_mut().map(|field| field as _)
14932        }
14933        ///Returns a mutable reference to `max_timestamp`.
14934        ///If the field is unset, it is first initialized with the default value.
14935        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14936            self.max_timestamp.get_or_insert_default()
14937        }
14938        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14939        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14940            self.max_timestamp.as_ref().map(|field| field as _)
14941        }
14942        ///Sets `max_timestamp` with the provided value.
14943        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14944            &mut self,
14945            field: T,
14946        ) {
14947            self.max_timestamp = Some(field.into().into());
14948        }
14949        ///Sets `max_timestamp` with the provided value.
14950        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14951            mut self,
14952            field: T,
14953        ) -> Self {
14954            self.set_max_timestamp(field.into());
14955            self
14956        }
14957        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14958        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14959            self.chain.as_mut().map(|field| field as _)
14960        }
14961        ///Returns a mutable reference to `chain`.
14962        ///If the field is unset, it is first initialized with the default value.
14963        pub fn chain_mut(&mut self) -> &mut String {
14964            self.chain.get_or_insert_default()
14965        }
14966        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
14967        pub fn chain_opt(&self) -> Option<&str> {
14968            self.chain.as_ref().map(|field| field as _)
14969        }
14970        ///Sets `chain` with the provided value.
14971        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14972            self.chain = Some(field.into().into());
14973        }
14974        ///Sets `chain` with the provided value.
14975        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14976            self.set_chain(field.into());
14977            self
14978        }
14979        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14980        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14981            self.nonce.as_mut().map(|field| field as _)
14982        }
14983        ///Returns a mutable reference to `nonce`.
14984        ///If the field is unset, it is first initialized with the default value.
14985        pub fn nonce_mut(&mut self) -> &mut u32 {
14986            self.nonce.get_or_insert_default()
14987        }
14988        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
14989        pub fn nonce_opt(&self) -> Option<u32> {
14990            self.nonce.as_ref().map(|field| *field)
14991        }
14992        ///Sets `nonce` with the provided value.
14993        pub fn set_nonce(&mut self, field: u32) {
14994            self.nonce = Some(field);
14995        }
14996        ///Sets `nonce` with the provided value.
14997        pub fn with_nonce(mut self, field: u32) -> Self {
14998            self.set_nonce(field);
14999            self
15000        }
15001    }
15002    impl super::TransactionKind {
15003        pub const fn const_default() -> Self {
15004            Self { kind: None, data: None }
15005        }
15006        #[doc(hidden)]
15007        pub fn default_instance() -> &'static Self {
15008            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
15009            &DEFAULT
15010        }
15011        ///Sets `kind` with the provided value.
15012        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
15013            mut self,
15014            field: T,
15015        ) -> Self {
15016            self.set_kind(field.into());
15017            self
15018        }
15019        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
15020        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
15021            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15022                .data
15023            {
15024                field as _
15025            } else {
15026                super::ProgrammableTransaction::default_instance() as _
15027            }
15028        }
15029        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15030        pub fn programmable_transaction_opt(
15031            &self,
15032        ) -> Option<&super::ProgrammableTransaction> {
15033            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15034                .data
15035            {
15036                Some(field as _)
15037            } else {
15038                None
15039            }
15040        }
15041        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15042        pub fn programmable_transaction_opt_mut(
15043            &mut self,
15044        ) -> Option<&mut super::ProgrammableTransaction> {
15045            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
15046                .data
15047            {
15048                Some(field as _)
15049            } else {
15050                None
15051            }
15052        }
15053        ///Returns a mutable reference to `programmable_transaction`.
15054        ///If the field is unset, it is first initialized with the default value.
15055        ///If any other oneof field in the same oneof is set, it will be cleared.
15056        pub fn programmable_transaction_mut(
15057            &mut self,
15058        ) -> &mut super::ProgrammableTransaction {
15059            if self.programmable_transaction_opt_mut().is_none() {
15060                self.data = Some(
15061                    super::transaction_kind::Data::ProgrammableTransaction(
15062                        super::ProgrammableTransaction::default(),
15063                    ),
15064                );
15065            }
15066            self.programmable_transaction_opt_mut().unwrap()
15067        }
15068        ///Sets `programmable_transaction` with the provided value.
15069        ///If any other oneof field in the same oneof is set, it will be cleared.
15070        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15071            &mut self,
15072            field: T,
15073        ) {
15074            self.data = Some(
15075                super::transaction_kind::Data::ProgrammableTransaction(
15076                    field.into().into(),
15077                ),
15078            );
15079        }
15080        ///Sets `programmable_transaction` with the provided value.
15081        ///If any other oneof field in the same oneof is set, it will be cleared.
15082        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15083            mut self,
15084            field: T,
15085        ) -> Self {
15086            self.set_programmable_transaction(field.into());
15087            self
15088        }
15089        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
15090        pub fn change_epoch(&self) -> &super::ChangeEpoch {
15091            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15092                field as _
15093            } else {
15094                super::ChangeEpoch::default_instance() as _
15095            }
15096        }
15097        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15098        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
15099            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15100                Some(field as _)
15101            } else {
15102                None
15103            }
15104        }
15105        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15106        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
15107            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
15108                .data
15109            {
15110                Some(field as _)
15111            } else {
15112                None
15113            }
15114        }
15115        ///Returns a mutable reference to `change_epoch`.
15116        ///If the field is unset, it is first initialized with the default value.
15117        ///If any other oneof field in the same oneof is set, it will be cleared.
15118        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
15119            if self.change_epoch_opt_mut().is_none() {
15120                self.data = Some(
15121                    super::transaction_kind::Data::ChangeEpoch(
15122                        super::ChangeEpoch::default(),
15123                    ),
15124                );
15125            }
15126            self.change_epoch_opt_mut().unwrap()
15127        }
15128        ///Sets `change_epoch` with the provided value.
15129        ///If any other oneof field in the same oneof is set, it will be cleared.
15130        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
15131            self.data = Some(
15132                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
15133            );
15134        }
15135        ///Sets `change_epoch` with the provided value.
15136        ///If any other oneof field in the same oneof is set, it will be cleared.
15137        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
15138            mut self,
15139            field: T,
15140        ) -> Self {
15141            self.set_change_epoch(field.into());
15142            self
15143        }
15144        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
15145        pub fn genesis(&self) -> &super::GenesisTransaction {
15146            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15147                field as _
15148            } else {
15149                super::GenesisTransaction::default_instance() as _
15150            }
15151        }
15152        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
15153        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
15154            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15155                Some(field as _)
15156            } else {
15157                None
15158            }
15159        }
15160        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15161        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
15162            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
15163                Some(field as _)
15164            } else {
15165                None
15166            }
15167        }
15168        ///Returns a mutable reference to `genesis`.
15169        ///If the field is unset, it is first initialized with the default value.
15170        ///If any other oneof field in the same oneof is set, it will be cleared.
15171        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
15172            if self.genesis_opt_mut().is_none() {
15173                self.data = Some(
15174                    super::transaction_kind::Data::Genesis(
15175                        super::GenesisTransaction::default(),
15176                    ),
15177                );
15178            }
15179            self.genesis_opt_mut().unwrap()
15180        }
15181        ///Sets `genesis` with the provided value.
15182        ///If any other oneof field in the same oneof is set, it will be cleared.
15183        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
15184            self.data = Some(
15185                super::transaction_kind::Data::Genesis(field.into().into()),
15186            );
15187        }
15188        ///Sets `genesis` with the provided value.
15189        ///If any other oneof field in the same oneof is set, it will be cleared.
15190        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
15191            mut self,
15192            field: T,
15193        ) -> Self {
15194            self.set_genesis(field.into());
15195            self
15196        }
15197        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
15198        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
15199            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15200                .data
15201            {
15202                field as _
15203            } else {
15204                super::ConsensusCommitPrologue::default_instance() as _
15205            }
15206        }
15207        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
15208        pub fn consensus_commit_prologue_opt(
15209            &self,
15210        ) -> Option<&super::ConsensusCommitPrologue> {
15211            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15212                .data
15213            {
15214                Some(field as _)
15215            } else {
15216                None
15217            }
15218        }
15219        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15220        pub fn consensus_commit_prologue_opt_mut(
15221            &mut self,
15222        ) -> Option<&mut super::ConsensusCommitPrologue> {
15223            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15224                .data
15225            {
15226                Some(field as _)
15227            } else {
15228                None
15229            }
15230        }
15231        ///Returns a mutable reference to `consensus_commit_prologue`.
15232        ///If the field is unset, it is first initialized with the default value.
15233        ///If any other oneof field in the same oneof is set, it will be cleared.
15234        pub fn consensus_commit_prologue_mut(
15235            &mut self,
15236        ) -> &mut super::ConsensusCommitPrologue {
15237            if self.consensus_commit_prologue_opt_mut().is_none() {
15238                self.data = Some(
15239                    super::transaction_kind::Data::ConsensusCommitPrologue(
15240                        super::ConsensusCommitPrologue::default(),
15241                    ),
15242                );
15243            }
15244            self.consensus_commit_prologue_opt_mut().unwrap()
15245        }
15246        ///Sets `consensus_commit_prologue` with the provided value.
15247        ///If any other oneof field in the same oneof is set, it will be cleared.
15248        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15249            &mut self,
15250            field: T,
15251        ) {
15252            self.data = Some(
15253                super::transaction_kind::Data::ConsensusCommitPrologue(
15254                    field.into().into(),
15255                ),
15256            );
15257        }
15258        ///Sets `consensus_commit_prologue` with the provided value.
15259        ///If any other oneof field in the same oneof is set, it will be cleared.
15260        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15261            mut self,
15262            field: T,
15263        ) -> Self {
15264            self.set_consensus_commit_prologue(field.into());
15265            self
15266        }
15267        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
15268        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15269            if let Some(
15270                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15271            ) = &self.data
15272            {
15273                field as _
15274            } else {
15275                super::AuthenticatorStateUpdate::default_instance() as _
15276            }
15277        }
15278        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15279        pub fn authenticator_state_update_opt(
15280            &self,
15281        ) -> Option<&super::AuthenticatorStateUpdate> {
15282            if let Some(
15283                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15284            ) = &self.data
15285            {
15286                Some(field as _)
15287            } else {
15288                None
15289            }
15290        }
15291        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15292        pub fn authenticator_state_update_opt_mut(
15293            &mut self,
15294        ) -> Option<&mut super::AuthenticatorStateUpdate> {
15295            if let Some(
15296                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15297            ) = &mut self.data
15298            {
15299                Some(field as _)
15300            } else {
15301                None
15302            }
15303        }
15304        ///Returns a mutable reference to `authenticator_state_update`.
15305        ///If the field is unset, it is first initialized with the default value.
15306        ///If any other oneof field in the same oneof is set, it will be cleared.
15307        pub fn authenticator_state_update_mut(
15308            &mut self,
15309        ) -> &mut super::AuthenticatorStateUpdate {
15310            if self.authenticator_state_update_opt_mut().is_none() {
15311                self.data = Some(
15312                    super::transaction_kind::Data::AuthenticatorStateUpdate(
15313                        super::AuthenticatorStateUpdate::default(),
15314                    ),
15315                );
15316            }
15317            self.authenticator_state_update_opt_mut().unwrap()
15318        }
15319        ///Sets `authenticator_state_update` with the provided value.
15320        ///If any other oneof field in the same oneof is set, it will be cleared.
15321        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15322            &mut self,
15323            field: T,
15324        ) {
15325            self.data = Some(
15326                super::transaction_kind::Data::AuthenticatorStateUpdate(
15327                    field.into().into(),
15328                ),
15329            );
15330        }
15331        ///Sets `authenticator_state_update` with the provided value.
15332        ///If any other oneof field in the same oneof is set, it will be cleared.
15333        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15334            mut self,
15335            field: T,
15336        ) -> Self {
15337            self.set_authenticator_state_update(field.into());
15338            self
15339        }
15340        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
15341        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15342            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15343                field as _
15344            } else {
15345                super::EndOfEpochTransaction::default_instance() as _
15346            }
15347        }
15348        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15349        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15350            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15351                Some(field as _)
15352            } else {
15353                None
15354            }
15355        }
15356        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15357        pub fn end_of_epoch_opt_mut(
15358            &mut self,
15359        ) -> Option<&mut super::EndOfEpochTransaction> {
15360            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15361                .data
15362            {
15363                Some(field as _)
15364            } else {
15365                None
15366            }
15367        }
15368        ///Returns a mutable reference to `end_of_epoch`.
15369        ///If the field is unset, it is first initialized with the default value.
15370        ///If any other oneof field in the same oneof is set, it will be cleared.
15371        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15372            if self.end_of_epoch_opt_mut().is_none() {
15373                self.data = Some(
15374                    super::transaction_kind::Data::EndOfEpoch(
15375                        super::EndOfEpochTransaction::default(),
15376                    ),
15377                );
15378            }
15379            self.end_of_epoch_opt_mut().unwrap()
15380        }
15381        ///Sets `end_of_epoch` with the provided value.
15382        ///If any other oneof field in the same oneof is set, it will be cleared.
15383        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15384            &mut self,
15385            field: T,
15386        ) {
15387            self.data = Some(
15388                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15389            );
15390        }
15391        ///Sets `end_of_epoch` with the provided value.
15392        ///If any other oneof field in the same oneof is set, it will be cleared.
15393        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15394            mut self,
15395            field: T,
15396        ) -> Self {
15397            self.set_end_of_epoch(field.into());
15398            self
15399        }
15400        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
15401        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15402            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15403                .data
15404            {
15405                field as _
15406            } else {
15407                super::RandomnessStateUpdate::default_instance() as _
15408            }
15409        }
15410        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15411        pub fn randomness_state_update_opt(
15412            &self,
15413        ) -> Option<&super::RandomnessStateUpdate> {
15414            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15415                .data
15416            {
15417                Some(field as _)
15418            } else {
15419                None
15420            }
15421        }
15422        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15423        pub fn randomness_state_update_opt_mut(
15424            &mut self,
15425        ) -> Option<&mut super::RandomnessStateUpdate> {
15426            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15427                .data
15428            {
15429                Some(field as _)
15430            } else {
15431                None
15432            }
15433        }
15434        ///Returns a mutable reference to `randomness_state_update`.
15435        ///If the field is unset, it is first initialized with the default value.
15436        ///If any other oneof field in the same oneof is set, it will be cleared.
15437        pub fn randomness_state_update_mut(
15438            &mut self,
15439        ) -> &mut super::RandomnessStateUpdate {
15440            if self.randomness_state_update_opt_mut().is_none() {
15441                self.data = Some(
15442                    super::transaction_kind::Data::RandomnessStateUpdate(
15443                        super::RandomnessStateUpdate::default(),
15444                    ),
15445                );
15446            }
15447            self.randomness_state_update_opt_mut().unwrap()
15448        }
15449        ///Sets `randomness_state_update` with the provided value.
15450        ///If any other oneof field in the same oneof is set, it will be cleared.
15451        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15452            &mut self,
15453            field: T,
15454        ) {
15455            self.data = Some(
15456                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15457            );
15458        }
15459        ///Sets `randomness_state_update` with the provided value.
15460        ///If any other oneof field in the same oneof is set, it will be cleared.
15461        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15462            mut self,
15463            field: T,
15464        ) -> Self {
15465            self.set_randomness_state_update(field.into());
15466            self
15467        }
15468    }
15469    impl super::TransferObjects {
15470        pub const fn const_default() -> Self {
15471            Self {
15472                objects: Vec::new(),
15473                address: None,
15474            }
15475        }
15476        #[doc(hidden)]
15477        pub fn default_instance() -> &'static Self {
15478            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15479            &DEFAULT
15480        }
15481        ///Returns the value of `objects`, or the default value if `objects` is unset.
15482        pub fn objects(&self) -> &[super::Argument] {
15483            &self.objects
15484        }
15485        ///Returns a mutable reference to `objects`.
15486        ///If the field is unset, it is first initialized with the default value.
15487        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15488            &mut self.objects
15489        }
15490        ///Sets `objects` with the provided value.
15491        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15492            self.objects = field;
15493        }
15494        ///Sets `objects` with the provided value.
15495        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15496            self.set_objects(field);
15497            self
15498        }
15499        ///Returns the value of `address`, or the default value if `address` is unset.
15500        pub fn address(&self) -> &super::Argument {
15501            self.address
15502                .as_ref()
15503                .map(|field| field as _)
15504                .unwrap_or_else(|| super::Argument::default_instance() as _)
15505        }
15506        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15507        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15508            self.address.as_mut().map(|field| field as _)
15509        }
15510        ///Returns a mutable reference to `address`.
15511        ///If the field is unset, it is first initialized with the default value.
15512        pub fn address_mut(&mut self) -> &mut super::Argument {
15513            self.address.get_or_insert_default()
15514        }
15515        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15516        pub fn address_opt(&self) -> Option<&super::Argument> {
15517            self.address.as_ref().map(|field| field as _)
15518        }
15519        ///Sets `address` with the provided value.
15520        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15521            self.address = Some(field.into().into());
15522        }
15523        ///Sets `address` with the provided value.
15524        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15525            self.set_address(field.into());
15526            self
15527        }
15528    }
15529    impl super::TypeArgumentError {
15530        pub const fn const_default() -> Self {
15531            Self {
15532                type_argument: None,
15533                kind: None,
15534            }
15535        }
15536        #[doc(hidden)]
15537        pub fn default_instance() -> &'static Self {
15538            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15539            &DEFAULT
15540        }
15541        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15542        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15543            self.type_argument.as_mut().map(|field| field as _)
15544        }
15545        ///Returns a mutable reference to `type_argument`.
15546        ///If the field is unset, it is first initialized with the default value.
15547        pub fn type_argument_mut(&mut self) -> &mut u32 {
15548            self.type_argument.get_or_insert_default()
15549        }
15550        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15551        pub fn type_argument_opt(&self) -> Option<u32> {
15552            self.type_argument.as_ref().map(|field| *field)
15553        }
15554        ///Sets `type_argument` with the provided value.
15555        pub fn set_type_argument(&mut self, field: u32) {
15556            self.type_argument = Some(field);
15557        }
15558        ///Sets `type_argument` with the provided value.
15559        pub fn with_type_argument(mut self, field: u32) -> Self {
15560            self.set_type_argument(field);
15561            self
15562        }
15563        ///Sets `kind` with the provided value.
15564        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15565            mut self,
15566            field: T,
15567        ) -> Self {
15568            self.set_kind(field.into());
15569            self
15570        }
15571    }
15572    impl super::TypeOrigin {
15573        pub const fn const_default() -> Self {
15574            Self {
15575                module_name: None,
15576                datatype_name: None,
15577                package_id: None,
15578            }
15579        }
15580        #[doc(hidden)]
15581        pub fn default_instance() -> &'static Self {
15582            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15583            &DEFAULT
15584        }
15585        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15586        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15587            self.module_name.as_mut().map(|field| field as _)
15588        }
15589        ///Returns a mutable reference to `module_name`.
15590        ///If the field is unset, it is first initialized with the default value.
15591        pub fn module_name_mut(&mut self) -> &mut String {
15592            self.module_name.get_or_insert_default()
15593        }
15594        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15595        pub fn module_name_opt(&self) -> Option<&str> {
15596            self.module_name.as_ref().map(|field| field as _)
15597        }
15598        ///Sets `module_name` with the provided value.
15599        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15600            self.module_name = Some(field.into().into());
15601        }
15602        ///Sets `module_name` with the provided value.
15603        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15604            self.set_module_name(field.into());
15605            self
15606        }
15607        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15608        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15609            self.datatype_name.as_mut().map(|field| field as _)
15610        }
15611        ///Returns a mutable reference to `datatype_name`.
15612        ///If the field is unset, it is first initialized with the default value.
15613        pub fn datatype_name_mut(&mut self) -> &mut String {
15614            self.datatype_name.get_or_insert_default()
15615        }
15616        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15617        pub fn datatype_name_opt(&self) -> Option<&str> {
15618            self.datatype_name.as_ref().map(|field| field as _)
15619        }
15620        ///Sets `datatype_name` with the provided value.
15621        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15622            self.datatype_name = Some(field.into().into());
15623        }
15624        ///Sets `datatype_name` with the provided value.
15625        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15626            self.set_datatype_name(field.into());
15627            self
15628        }
15629        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15630        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15631            self.package_id.as_mut().map(|field| field as _)
15632        }
15633        ///Returns a mutable reference to `package_id`.
15634        ///If the field is unset, it is first initialized with the default value.
15635        pub fn package_id_mut(&mut self) -> &mut String {
15636            self.package_id.get_or_insert_default()
15637        }
15638        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15639        pub fn package_id_opt(&self) -> Option<&str> {
15640            self.package_id.as_ref().map(|field| field as _)
15641        }
15642        ///Sets `package_id` with the provided value.
15643        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15644            self.package_id = Some(field.into().into());
15645        }
15646        ///Sets `package_id` with the provided value.
15647        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15648            self.set_package_id(field.into());
15649            self
15650        }
15651    }
15652    impl super::TypeParameter {
15653        pub const fn const_default() -> Self {
15654            Self {
15655                constraints: Vec::new(),
15656                is_phantom: None,
15657            }
15658        }
15659        #[doc(hidden)]
15660        pub fn default_instance() -> &'static Self {
15661            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15662            &DEFAULT
15663        }
15664        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15665        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15666            self.is_phantom.as_mut().map(|field| field as _)
15667        }
15668        ///Returns a mutable reference to `is_phantom`.
15669        ///If the field is unset, it is first initialized with the default value.
15670        pub fn is_phantom_mut(&mut self) -> &mut bool {
15671            self.is_phantom.get_or_insert_default()
15672        }
15673        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15674        pub fn is_phantom_opt(&self) -> Option<bool> {
15675            self.is_phantom.as_ref().map(|field| *field)
15676        }
15677        ///Sets `is_phantom` with the provided value.
15678        pub fn set_is_phantom(&mut self, field: bool) {
15679            self.is_phantom = Some(field);
15680        }
15681        ///Sets `is_phantom` with the provided value.
15682        pub fn with_is_phantom(mut self, field: bool) -> Self {
15683            self.set_is_phantom(field);
15684            self
15685        }
15686    }
15687    impl super::UnchangedConsensusObject {
15688        pub const fn const_default() -> Self {
15689            Self {
15690                kind: None,
15691                object_id: None,
15692                version: None,
15693                digest: None,
15694                object_type: None,
15695            }
15696        }
15697        #[doc(hidden)]
15698        pub fn default_instance() -> &'static Self {
15699            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15700            &DEFAULT
15701        }
15702        ///Sets `kind` with the provided value.
15703        pub fn with_kind<
15704            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15705        >(mut self, field: T) -> Self {
15706            self.set_kind(field.into());
15707            self
15708        }
15709        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15710        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15711            self.object_id.as_mut().map(|field| field as _)
15712        }
15713        ///Returns a mutable reference to `object_id`.
15714        ///If the field is unset, it is first initialized with the default value.
15715        pub fn object_id_mut(&mut self) -> &mut String {
15716            self.object_id.get_or_insert_default()
15717        }
15718        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15719        pub fn object_id_opt(&self) -> Option<&str> {
15720            self.object_id.as_ref().map(|field| field as _)
15721        }
15722        ///Sets `object_id` with the provided value.
15723        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15724            self.object_id = Some(field.into().into());
15725        }
15726        ///Sets `object_id` with the provided value.
15727        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15728            self.set_object_id(field.into());
15729            self
15730        }
15731        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15732        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15733            self.version.as_mut().map(|field| field as _)
15734        }
15735        ///Returns a mutable reference to `version`.
15736        ///If the field is unset, it is first initialized with the default value.
15737        pub fn version_mut(&mut self) -> &mut u64 {
15738            self.version.get_or_insert_default()
15739        }
15740        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15741        pub fn version_opt(&self) -> Option<u64> {
15742            self.version.as_ref().map(|field| *field)
15743        }
15744        ///Sets `version` with the provided value.
15745        pub fn set_version(&mut self, field: u64) {
15746            self.version = Some(field);
15747        }
15748        ///Sets `version` with the provided value.
15749        pub fn with_version(mut self, field: u64) -> Self {
15750            self.set_version(field);
15751            self
15752        }
15753        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15754        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15755            self.digest.as_mut().map(|field| field as _)
15756        }
15757        ///Returns a mutable reference to `digest`.
15758        ///If the field is unset, it is first initialized with the default value.
15759        pub fn digest_mut(&mut self) -> &mut String {
15760            self.digest.get_or_insert_default()
15761        }
15762        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15763        pub fn digest_opt(&self) -> Option<&str> {
15764            self.digest.as_ref().map(|field| field as _)
15765        }
15766        ///Sets `digest` with the provided value.
15767        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15768            self.digest = Some(field.into().into());
15769        }
15770        ///Sets `digest` with the provided value.
15771        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15772            self.set_digest(field.into());
15773            self
15774        }
15775        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15776        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15777            self.object_type.as_mut().map(|field| field as _)
15778        }
15779        ///Returns a mutable reference to `object_type`.
15780        ///If the field is unset, it is first initialized with the default value.
15781        pub fn object_type_mut(&mut self) -> &mut String {
15782            self.object_type.get_or_insert_default()
15783        }
15784        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15785        pub fn object_type_opt(&self) -> Option<&str> {
15786            self.object_type.as_ref().map(|field| field as _)
15787        }
15788        ///Sets `object_type` with the provided value.
15789        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15790            self.object_type = Some(field.into().into());
15791        }
15792        ///Sets `object_type` with the provided value.
15793        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15794            self.set_object_type(field.into());
15795            self
15796        }
15797    }
15798    impl super::Upgrade {
15799        pub const fn const_default() -> Self {
15800            Self {
15801                modules: Vec::new(),
15802                dependencies: Vec::new(),
15803                package: None,
15804                ticket: None,
15805            }
15806        }
15807        #[doc(hidden)]
15808        pub fn default_instance() -> &'static Self {
15809            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15810            &DEFAULT
15811        }
15812        ///Returns the value of `modules`, or the default value if `modules` is unset.
15813        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15814            &self.modules
15815        }
15816        ///Returns a mutable reference to `modules`.
15817        ///If the field is unset, it is first initialized with the default value.
15818        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15819            &mut self.modules
15820        }
15821        ///Sets `modules` with the provided value.
15822        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15823            self.modules = field;
15824        }
15825        ///Sets `modules` with the provided value.
15826        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15827            self.set_modules(field);
15828            self
15829        }
15830        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15831        pub fn dependencies(&self) -> &[String] {
15832            &self.dependencies
15833        }
15834        ///Returns a mutable reference to `dependencies`.
15835        ///If the field is unset, it is first initialized with the default value.
15836        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15837            &mut self.dependencies
15838        }
15839        ///Sets `dependencies` with the provided value.
15840        pub fn set_dependencies(&mut self, field: Vec<String>) {
15841            self.dependencies = field;
15842        }
15843        ///Sets `dependencies` with the provided value.
15844        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15845            self.set_dependencies(field);
15846            self
15847        }
15848        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15849        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15850            self.package.as_mut().map(|field| field as _)
15851        }
15852        ///Returns a mutable reference to `package`.
15853        ///If the field is unset, it is first initialized with the default value.
15854        pub fn package_mut(&mut self) -> &mut String {
15855            self.package.get_or_insert_default()
15856        }
15857        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15858        pub fn package_opt(&self) -> Option<&str> {
15859            self.package.as_ref().map(|field| field as _)
15860        }
15861        ///Sets `package` with the provided value.
15862        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15863            self.package = Some(field.into().into());
15864        }
15865        ///Sets `package` with the provided value.
15866        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15867            self.set_package(field.into());
15868            self
15869        }
15870        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15871        pub fn ticket(&self) -> &super::Argument {
15872            self.ticket
15873                .as_ref()
15874                .map(|field| field as _)
15875                .unwrap_or_else(|| super::Argument::default_instance() as _)
15876        }
15877        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15878        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15879            self.ticket.as_mut().map(|field| field as _)
15880        }
15881        ///Returns a mutable reference to `ticket`.
15882        ///If the field is unset, it is first initialized with the default value.
15883        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15884            self.ticket.get_or_insert_default()
15885        }
15886        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15887        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15888            self.ticket.as_ref().map(|field| field as _)
15889        }
15890        ///Sets `ticket` with the provided value.
15891        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15892            self.ticket = Some(field.into().into());
15893        }
15894        ///Sets `ticket` with the provided value.
15895        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15896            self.set_ticket(field.into());
15897            self
15898        }
15899    }
15900    impl super::UserSignature {
15901        pub const fn const_default() -> Self {
15902            Self {
15903                bcs: None,
15904                scheme: None,
15905                signature: None,
15906            }
15907        }
15908        #[doc(hidden)]
15909        pub fn default_instance() -> &'static Self {
15910            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15911            &DEFAULT
15912        }
15913        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15914        pub fn bcs(&self) -> &super::Bcs {
15915            self.bcs
15916                .as_ref()
15917                .map(|field| field as _)
15918                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15919        }
15920        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15921        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15922            self.bcs.as_mut().map(|field| field as _)
15923        }
15924        ///Returns a mutable reference to `bcs`.
15925        ///If the field is unset, it is first initialized with the default value.
15926        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15927            self.bcs.get_or_insert_default()
15928        }
15929        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15930        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15931            self.bcs.as_ref().map(|field| field as _)
15932        }
15933        ///Sets `bcs` with the provided value.
15934        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15935            self.bcs = Some(field.into().into());
15936        }
15937        ///Sets `bcs` with the provided value.
15938        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15939            self.set_bcs(field.into());
15940            self
15941        }
15942        ///Sets `scheme` with the provided value.
15943        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15944            self.set_scheme(field.into());
15945            self
15946        }
15947        ///Returns the value of `simple`, or the default value if `simple` is unset.
15948        pub fn simple(&self) -> &super::SimpleSignature {
15949            if let Some(super::user_signature::Signature::Simple(field)) = &self
15950                .signature
15951            {
15952                field as _
15953            } else {
15954                super::SimpleSignature::default_instance() as _
15955            }
15956        }
15957        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15958        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15959            if let Some(super::user_signature::Signature::Simple(field)) = &self
15960                .signature
15961            {
15962                Some(field as _)
15963            } else {
15964                None
15965            }
15966        }
15967        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15968        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15969            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15970                .signature
15971            {
15972                Some(field as _)
15973            } else {
15974                None
15975            }
15976        }
15977        ///Returns a mutable reference to `simple`.
15978        ///If the field is unset, it is first initialized with the default value.
15979        ///If any other oneof field in the same oneof is set, it will be cleared.
15980        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15981            if self.simple_opt_mut().is_none() {
15982                self.signature = Some(
15983                    super::user_signature::Signature::Simple(
15984                        super::SimpleSignature::default(),
15985                    ),
15986                );
15987            }
15988            self.simple_opt_mut().unwrap()
15989        }
15990        ///Sets `simple` with the provided value.
15991        ///If any other oneof field in the same oneof is set, it will be cleared.
15992        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15993            self.signature = Some(
15994                super::user_signature::Signature::Simple(field.into().into()),
15995            );
15996        }
15997        ///Sets `simple` with the provided value.
15998        ///If any other oneof field in the same oneof is set, it will be cleared.
15999        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
16000            self.set_simple(field.into());
16001            self
16002        }
16003        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
16004        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
16005            if let Some(super::user_signature::Signature::Multisig(field)) = &self
16006                .signature
16007            {
16008                field as _
16009            } else {
16010                super::MultisigAggregatedSignature::default_instance() as _
16011            }
16012        }
16013        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
16014        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
16015            if let Some(super::user_signature::Signature::Multisig(field)) = &self
16016                .signature
16017            {
16018                Some(field as _)
16019            } else {
16020                None
16021            }
16022        }
16023        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16024        pub fn multisig_opt_mut(
16025            &mut self,
16026        ) -> Option<&mut super::MultisigAggregatedSignature> {
16027            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
16028                .signature
16029            {
16030                Some(field as _)
16031            } else {
16032                None
16033            }
16034        }
16035        ///Returns a mutable reference to `multisig`.
16036        ///If the field is unset, it is first initialized with the default value.
16037        ///If any other oneof field in the same oneof is set, it will be cleared.
16038        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
16039            if self.multisig_opt_mut().is_none() {
16040                self.signature = Some(
16041                    super::user_signature::Signature::Multisig(
16042                        super::MultisigAggregatedSignature::default(),
16043                    ),
16044                );
16045            }
16046            self.multisig_opt_mut().unwrap()
16047        }
16048        ///Sets `multisig` with the provided value.
16049        ///If any other oneof field in the same oneof is set, it will be cleared.
16050        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
16051            &mut self,
16052            field: T,
16053        ) {
16054            self.signature = Some(
16055                super::user_signature::Signature::Multisig(field.into().into()),
16056            );
16057        }
16058        ///Sets `multisig` with the provided value.
16059        ///If any other oneof field in the same oneof is set, it will be cleared.
16060        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
16061            mut self,
16062            field: T,
16063        ) -> Self {
16064            self.set_multisig(field.into());
16065            self
16066        }
16067        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
16068        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
16069            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16070                .signature
16071            {
16072                field as _
16073            } else {
16074                super::ZkLoginAuthenticator::default_instance() as _
16075            }
16076        }
16077        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
16078        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
16079            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16080                .signature
16081            {
16082                Some(field as _)
16083            } else {
16084                None
16085            }
16086        }
16087        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16088        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
16089            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
16090                .signature
16091            {
16092                Some(field as _)
16093            } else {
16094                None
16095            }
16096        }
16097        ///Returns a mutable reference to `zklogin`.
16098        ///If the field is unset, it is first initialized with the default value.
16099        ///If any other oneof field in the same oneof is set, it will be cleared.
16100        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
16101            if self.zklogin_opt_mut().is_none() {
16102                self.signature = Some(
16103                    super::user_signature::Signature::Zklogin(
16104                        super::ZkLoginAuthenticator::default(),
16105                    ),
16106                );
16107            }
16108            self.zklogin_opt_mut().unwrap()
16109        }
16110        ///Sets `zklogin` with the provided value.
16111        ///If any other oneof field in the same oneof is set, it will be cleared.
16112        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
16113            self.signature = Some(
16114                super::user_signature::Signature::Zklogin(field.into().into()),
16115            );
16116        }
16117        ///Sets `zklogin` with the provided value.
16118        ///If any other oneof field in the same oneof is set, it will be cleared.
16119        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
16120            mut self,
16121            field: T,
16122        ) -> Self {
16123            self.set_zklogin(field.into());
16124            self
16125        }
16126        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
16127        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
16128            if let Some(super::user_signature::Signature::Passkey(field)) = &self
16129                .signature
16130            {
16131                field as _
16132            } else {
16133                super::PasskeyAuthenticator::default_instance() as _
16134            }
16135        }
16136        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
16137        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
16138            if let Some(super::user_signature::Signature::Passkey(field)) = &self
16139                .signature
16140            {
16141                Some(field as _)
16142            } else {
16143                None
16144            }
16145        }
16146        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16147        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
16148            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
16149                .signature
16150            {
16151                Some(field as _)
16152            } else {
16153                None
16154            }
16155        }
16156        ///Returns a mutable reference to `passkey`.
16157        ///If the field is unset, it is first initialized with the default value.
16158        ///If any other oneof field in the same oneof is set, it will be cleared.
16159        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
16160            if self.passkey_opt_mut().is_none() {
16161                self.signature = Some(
16162                    super::user_signature::Signature::Passkey(
16163                        super::PasskeyAuthenticator::default(),
16164                    ),
16165                );
16166            }
16167            self.passkey_opt_mut().unwrap()
16168        }
16169        ///Sets `passkey` with the provided value.
16170        ///If any other oneof field in the same oneof is set, it will be cleared.
16171        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
16172            self.signature = Some(
16173                super::user_signature::Signature::Passkey(field.into().into()),
16174            );
16175        }
16176        ///Sets `passkey` with the provided value.
16177        ///If any other oneof field in the same oneof is set, it will be cleared.
16178        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
16179            mut self,
16180            field: T,
16181        ) -> Self {
16182            self.set_passkey(field.into());
16183            self
16184        }
16185    }
16186    impl super::Validator {
16187        pub const fn const_default() -> Self {
16188            Self {
16189                name: None,
16190                address: None,
16191                description: None,
16192                image_url: None,
16193                project_url: None,
16194                protocol_public_key: None,
16195                proof_of_possession: None,
16196                network_public_key: None,
16197                worker_public_key: None,
16198                network_address: None,
16199                p2p_address: None,
16200                primary_address: None,
16201                worker_address: None,
16202                next_epoch_protocol_public_key: None,
16203                next_epoch_proof_of_possession: None,
16204                next_epoch_network_public_key: None,
16205                next_epoch_worker_public_key: None,
16206                next_epoch_network_address: None,
16207                next_epoch_p2p_address: None,
16208                next_epoch_primary_address: None,
16209                next_epoch_worker_address: None,
16210                metadata_extra_fields: None,
16211                voting_power: None,
16212                operation_cap_id: None,
16213                gas_price: None,
16214                staking_pool: None,
16215                commission_rate: None,
16216                next_epoch_stake: None,
16217                next_epoch_gas_price: None,
16218                next_epoch_commission_rate: None,
16219                extra_fields: None,
16220            }
16221        }
16222        #[doc(hidden)]
16223        pub fn default_instance() -> &'static Self {
16224            static DEFAULT: super::Validator = super::Validator::const_default();
16225            &DEFAULT
16226        }
16227        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16228        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16229            self.name.as_mut().map(|field| field as _)
16230        }
16231        ///Returns a mutable reference to `name`.
16232        ///If the field is unset, it is first initialized with the default value.
16233        pub fn name_mut(&mut self) -> &mut String {
16234            self.name.get_or_insert_default()
16235        }
16236        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
16237        pub fn name_opt(&self) -> Option<&str> {
16238            self.name.as_ref().map(|field| field as _)
16239        }
16240        ///Sets `name` with the provided value.
16241        pub fn set_name<T: Into<String>>(&mut self, field: T) {
16242            self.name = Some(field.into().into());
16243        }
16244        ///Sets `name` with the provided value.
16245        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16246            self.set_name(field.into());
16247            self
16248        }
16249        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16250        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16251            self.address.as_mut().map(|field| field as _)
16252        }
16253        ///Returns a mutable reference to `address`.
16254        ///If the field is unset, it is first initialized with the default value.
16255        pub fn address_mut(&mut self) -> &mut String {
16256            self.address.get_or_insert_default()
16257        }
16258        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16259        pub fn address_opt(&self) -> Option<&str> {
16260            self.address.as_ref().map(|field| field as _)
16261        }
16262        ///Sets `address` with the provided value.
16263        pub fn set_address<T: Into<String>>(&mut self, field: T) {
16264            self.address = Some(field.into().into());
16265        }
16266        ///Sets `address` with the provided value.
16267        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16268            self.set_address(field.into());
16269            self
16270        }
16271        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16272        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16273            self.description.as_mut().map(|field| field as _)
16274        }
16275        ///Returns a mutable reference to `description`.
16276        ///If the field is unset, it is first initialized with the default value.
16277        pub fn description_mut(&mut self) -> &mut String {
16278            self.description.get_or_insert_default()
16279        }
16280        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
16281        pub fn description_opt(&self) -> Option<&str> {
16282            self.description.as_ref().map(|field| field as _)
16283        }
16284        ///Sets `description` with the provided value.
16285        pub fn set_description<T: Into<String>>(&mut self, field: T) {
16286            self.description = Some(field.into().into());
16287        }
16288        ///Sets `description` with the provided value.
16289        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16290            self.set_description(field.into());
16291            self
16292        }
16293        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16294        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16295            self.image_url.as_mut().map(|field| field as _)
16296        }
16297        ///Returns a mutable reference to `image_url`.
16298        ///If the field is unset, it is first initialized with the default value.
16299        pub fn image_url_mut(&mut self) -> &mut String {
16300            self.image_url.get_or_insert_default()
16301        }
16302        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16303        pub fn image_url_opt(&self) -> Option<&str> {
16304            self.image_url.as_ref().map(|field| field as _)
16305        }
16306        ///Sets `image_url` with the provided value.
16307        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16308            self.image_url = Some(field.into().into());
16309        }
16310        ///Sets `image_url` with the provided value.
16311        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16312            self.set_image_url(field.into());
16313            self
16314        }
16315        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16316        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16317            self.project_url.as_mut().map(|field| field as _)
16318        }
16319        ///Returns a mutable reference to `project_url`.
16320        ///If the field is unset, it is first initialized with the default value.
16321        pub fn project_url_mut(&mut self) -> &mut String {
16322            self.project_url.get_or_insert_default()
16323        }
16324        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16325        pub fn project_url_opt(&self) -> Option<&str> {
16326            self.project_url.as_ref().map(|field| field as _)
16327        }
16328        ///Sets `project_url` with the provided value.
16329        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16330            self.project_url = Some(field.into().into());
16331        }
16332        ///Sets `project_url` with the provided value.
16333        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16334            self.set_project_url(field.into());
16335            self
16336        }
16337        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16338        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16339            self.protocol_public_key.as_ref().map(|field| field as _)
16340        }
16341        ///Sets `protocol_public_key` with the provided value.
16342        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16343            &mut self,
16344            field: T,
16345        ) {
16346            self.protocol_public_key = Some(field.into().into());
16347        }
16348        ///Sets `protocol_public_key` with the provided value.
16349        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16350            mut self,
16351            field: T,
16352        ) -> Self {
16353            self.set_protocol_public_key(field.into());
16354            self
16355        }
16356        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16357        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16358            self.proof_of_possession.as_ref().map(|field| field as _)
16359        }
16360        ///Sets `proof_of_possession` with the provided value.
16361        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16362            &mut self,
16363            field: T,
16364        ) {
16365            self.proof_of_possession = Some(field.into().into());
16366        }
16367        ///Sets `proof_of_possession` with the provided value.
16368        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16369            mut self,
16370            field: T,
16371        ) -> Self {
16372            self.set_proof_of_possession(field.into());
16373            self
16374        }
16375        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16376        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16377            self.network_public_key.as_ref().map(|field| field as _)
16378        }
16379        ///Sets `network_public_key` with the provided value.
16380        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16381            &mut self,
16382            field: T,
16383        ) {
16384            self.network_public_key = Some(field.into().into());
16385        }
16386        ///Sets `network_public_key` with the provided value.
16387        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16388            mut self,
16389            field: T,
16390        ) -> Self {
16391            self.set_network_public_key(field.into());
16392            self
16393        }
16394        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16395        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16396            self.worker_public_key.as_ref().map(|field| field as _)
16397        }
16398        ///Sets `worker_public_key` with the provided value.
16399        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16400            &mut self,
16401            field: T,
16402        ) {
16403            self.worker_public_key = Some(field.into().into());
16404        }
16405        ///Sets `worker_public_key` with the provided value.
16406        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16407            mut self,
16408            field: T,
16409        ) -> Self {
16410            self.set_worker_public_key(field.into());
16411            self
16412        }
16413        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16414        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16415            self.network_address.as_mut().map(|field| field as _)
16416        }
16417        ///Returns a mutable reference to `network_address`.
16418        ///If the field is unset, it is first initialized with the default value.
16419        pub fn network_address_mut(&mut self) -> &mut String {
16420            self.network_address.get_or_insert_default()
16421        }
16422        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16423        pub fn network_address_opt(&self) -> Option<&str> {
16424            self.network_address.as_ref().map(|field| field as _)
16425        }
16426        ///Sets `network_address` with the provided value.
16427        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16428            self.network_address = Some(field.into().into());
16429        }
16430        ///Sets `network_address` with the provided value.
16431        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16432            self.set_network_address(field.into());
16433            self
16434        }
16435        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16436        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16437            self.p2p_address.as_mut().map(|field| field as _)
16438        }
16439        ///Returns a mutable reference to `p2p_address`.
16440        ///If the field is unset, it is first initialized with the default value.
16441        pub fn p2p_address_mut(&mut self) -> &mut String {
16442            self.p2p_address.get_or_insert_default()
16443        }
16444        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16445        pub fn p2p_address_opt(&self) -> Option<&str> {
16446            self.p2p_address.as_ref().map(|field| field as _)
16447        }
16448        ///Sets `p2p_address` with the provided value.
16449        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16450            self.p2p_address = Some(field.into().into());
16451        }
16452        ///Sets `p2p_address` with the provided value.
16453        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16454            self.set_p2p_address(field.into());
16455            self
16456        }
16457        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16458        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16459            self.primary_address.as_mut().map(|field| field as _)
16460        }
16461        ///Returns a mutable reference to `primary_address`.
16462        ///If the field is unset, it is first initialized with the default value.
16463        pub fn primary_address_mut(&mut self) -> &mut String {
16464            self.primary_address.get_or_insert_default()
16465        }
16466        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16467        pub fn primary_address_opt(&self) -> Option<&str> {
16468            self.primary_address.as_ref().map(|field| field as _)
16469        }
16470        ///Sets `primary_address` with the provided value.
16471        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16472            self.primary_address = Some(field.into().into());
16473        }
16474        ///Sets `primary_address` with the provided value.
16475        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16476            self.set_primary_address(field.into());
16477            self
16478        }
16479        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16480        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16481            self.worker_address.as_mut().map(|field| field as _)
16482        }
16483        ///Returns a mutable reference to `worker_address`.
16484        ///If the field is unset, it is first initialized with the default value.
16485        pub fn worker_address_mut(&mut self) -> &mut String {
16486            self.worker_address.get_or_insert_default()
16487        }
16488        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16489        pub fn worker_address_opt(&self) -> Option<&str> {
16490            self.worker_address.as_ref().map(|field| field as _)
16491        }
16492        ///Sets `worker_address` with the provided value.
16493        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16494            self.worker_address = Some(field.into().into());
16495        }
16496        ///Sets `worker_address` with the provided value.
16497        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16498            self.set_worker_address(field.into());
16499            self
16500        }
16501        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16502        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16503            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16504        }
16505        ///Sets `next_epoch_protocol_public_key` with the provided value.
16506        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16507            &mut self,
16508            field: T,
16509        ) {
16510            self.next_epoch_protocol_public_key = Some(field.into().into());
16511        }
16512        ///Sets `next_epoch_protocol_public_key` with the provided value.
16513        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16514            mut self,
16515            field: T,
16516        ) -> Self {
16517            self.set_next_epoch_protocol_public_key(field.into());
16518            self
16519        }
16520        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16521        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16522            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16523        }
16524        ///Sets `next_epoch_proof_of_possession` with the provided value.
16525        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16526            &mut self,
16527            field: T,
16528        ) {
16529            self.next_epoch_proof_of_possession = Some(field.into().into());
16530        }
16531        ///Sets `next_epoch_proof_of_possession` with the provided value.
16532        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16533            mut self,
16534            field: T,
16535        ) -> Self {
16536            self.set_next_epoch_proof_of_possession(field.into());
16537            self
16538        }
16539        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16540        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16541            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16542        }
16543        ///Sets `next_epoch_network_public_key` with the provided value.
16544        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16545            &mut self,
16546            field: T,
16547        ) {
16548            self.next_epoch_network_public_key = Some(field.into().into());
16549        }
16550        ///Sets `next_epoch_network_public_key` with the provided value.
16551        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16552            mut self,
16553            field: T,
16554        ) -> Self {
16555            self.set_next_epoch_network_public_key(field.into());
16556            self
16557        }
16558        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16559        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16560            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16561        }
16562        ///Sets `next_epoch_worker_public_key` with the provided value.
16563        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16564            &mut self,
16565            field: T,
16566        ) {
16567            self.next_epoch_worker_public_key = Some(field.into().into());
16568        }
16569        ///Sets `next_epoch_worker_public_key` with the provided value.
16570        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16571            mut self,
16572            field: T,
16573        ) -> Self {
16574            self.set_next_epoch_worker_public_key(field.into());
16575            self
16576        }
16577        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16578        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16579            self.next_epoch_network_address.as_mut().map(|field| field as _)
16580        }
16581        ///Returns a mutable reference to `next_epoch_network_address`.
16582        ///If the field is unset, it is first initialized with the default value.
16583        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16584            self.next_epoch_network_address.get_or_insert_default()
16585        }
16586        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16587        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16588            self.next_epoch_network_address.as_ref().map(|field| field as _)
16589        }
16590        ///Sets `next_epoch_network_address` with the provided value.
16591        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16592            self.next_epoch_network_address = Some(field.into().into());
16593        }
16594        ///Sets `next_epoch_network_address` with the provided value.
16595        pub fn with_next_epoch_network_address<T: Into<String>>(
16596            mut self,
16597            field: T,
16598        ) -> Self {
16599            self.set_next_epoch_network_address(field.into());
16600            self
16601        }
16602        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16603        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16604            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16605        }
16606        ///Returns a mutable reference to `next_epoch_p2p_address`.
16607        ///If the field is unset, it is first initialized with the default value.
16608        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16609            self.next_epoch_p2p_address.get_or_insert_default()
16610        }
16611        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16612        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16613            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16614        }
16615        ///Sets `next_epoch_p2p_address` with the provided value.
16616        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16617            self.next_epoch_p2p_address = Some(field.into().into());
16618        }
16619        ///Sets `next_epoch_p2p_address` with the provided value.
16620        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16621            self.set_next_epoch_p2p_address(field.into());
16622            self
16623        }
16624        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16625        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16626            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16627        }
16628        ///Returns a mutable reference to `next_epoch_primary_address`.
16629        ///If the field is unset, it is first initialized with the default value.
16630        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16631            self.next_epoch_primary_address.get_or_insert_default()
16632        }
16633        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16634        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16635            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16636        }
16637        ///Sets `next_epoch_primary_address` with the provided value.
16638        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16639            self.next_epoch_primary_address = Some(field.into().into());
16640        }
16641        ///Sets `next_epoch_primary_address` with the provided value.
16642        pub fn with_next_epoch_primary_address<T: Into<String>>(
16643            mut self,
16644            field: T,
16645        ) -> Self {
16646            self.set_next_epoch_primary_address(field.into());
16647            self
16648        }
16649        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16650        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16651            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16652        }
16653        ///Returns a mutable reference to `next_epoch_worker_address`.
16654        ///If the field is unset, it is first initialized with the default value.
16655        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16656            self.next_epoch_worker_address.get_or_insert_default()
16657        }
16658        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16659        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16660            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16661        }
16662        ///Sets `next_epoch_worker_address` with the provided value.
16663        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16664            self.next_epoch_worker_address = Some(field.into().into());
16665        }
16666        ///Sets `next_epoch_worker_address` with the provided value.
16667        pub fn with_next_epoch_worker_address<T: Into<String>>(
16668            mut self,
16669            field: T,
16670        ) -> Self {
16671            self.set_next_epoch_worker_address(field.into());
16672            self
16673        }
16674        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16675        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16676            self.metadata_extra_fields
16677                .as_ref()
16678                .map(|field| field as _)
16679                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16680        }
16681        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16682        pub fn metadata_extra_fields_opt_mut(
16683            &mut self,
16684        ) -> Option<&mut super::MoveTable> {
16685            self.metadata_extra_fields.as_mut().map(|field| field as _)
16686        }
16687        ///Returns a mutable reference to `metadata_extra_fields`.
16688        ///If the field is unset, it is first initialized with the default value.
16689        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16690            self.metadata_extra_fields.get_or_insert_default()
16691        }
16692        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16693        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16694            self.metadata_extra_fields.as_ref().map(|field| field as _)
16695        }
16696        ///Sets `metadata_extra_fields` with the provided value.
16697        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16698            &mut self,
16699            field: T,
16700        ) {
16701            self.metadata_extra_fields = Some(field.into().into());
16702        }
16703        ///Sets `metadata_extra_fields` with the provided value.
16704        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16705            mut self,
16706            field: T,
16707        ) -> Self {
16708            self.set_metadata_extra_fields(field.into());
16709            self
16710        }
16711        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16712        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16713            self.voting_power.as_mut().map(|field| field as _)
16714        }
16715        ///Returns a mutable reference to `voting_power`.
16716        ///If the field is unset, it is first initialized with the default value.
16717        pub fn voting_power_mut(&mut self) -> &mut u64 {
16718            self.voting_power.get_or_insert_default()
16719        }
16720        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16721        pub fn voting_power_opt(&self) -> Option<u64> {
16722            self.voting_power.as_ref().map(|field| *field)
16723        }
16724        ///Sets `voting_power` with the provided value.
16725        pub fn set_voting_power(&mut self, field: u64) {
16726            self.voting_power = Some(field);
16727        }
16728        ///Sets `voting_power` with the provided value.
16729        pub fn with_voting_power(mut self, field: u64) -> Self {
16730            self.set_voting_power(field);
16731            self
16732        }
16733        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16734        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16735            self.operation_cap_id.as_mut().map(|field| field as _)
16736        }
16737        ///Returns a mutable reference to `operation_cap_id`.
16738        ///If the field is unset, it is first initialized with the default value.
16739        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16740            self.operation_cap_id.get_or_insert_default()
16741        }
16742        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16743        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16744            self.operation_cap_id.as_ref().map(|field| field as _)
16745        }
16746        ///Sets `operation_cap_id` with the provided value.
16747        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16748            self.operation_cap_id = Some(field.into().into());
16749        }
16750        ///Sets `operation_cap_id` with the provided value.
16751        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16752            self.set_operation_cap_id(field.into());
16753            self
16754        }
16755        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16756        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16757            self.gas_price.as_mut().map(|field| field as _)
16758        }
16759        ///Returns a mutable reference to `gas_price`.
16760        ///If the field is unset, it is first initialized with the default value.
16761        pub fn gas_price_mut(&mut self) -> &mut u64 {
16762            self.gas_price.get_or_insert_default()
16763        }
16764        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16765        pub fn gas_price_opt(&self) -> Option<u64> {
16766            self.gas_price.as_ref().map(|field| *field)
16767        }
16768        ///Sets `gas_price` with the provided value.
16769        pub fn set_gas_price(&mut self, field: u64) {
16770            self.gas_price = Some(field);
16771        }
16772        ///Sets `gas_price` with the provided value.
16773        pub fn with_gas_price(mut self, field: u64) -> Self {
16774            self.set_gas_price(field);
16775            self
16776        }
16777        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16778        pub fn staking_pool(&self) -> &super::StakingPool {
16779            self.staking_pool
16780                .as_ref()
16781                .map(|field| field as _)
16782                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16783        }
16784        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16785        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16786            self.staking_pool.as_mut().map(|field| field as _)
16787        }
16788        ///Returns a mutable reference to `staking_pool`.
16789        ///If the field is unset, it is first initialized with the default value.
16790        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16791            self.staking_pool.get_or_insert_default()
16792        }
16793        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16794        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16795            self.staking_pool.as_ref().map(|field| field as _)
16796        }
16797        ///Sets `staking_pool` with the provided value.
16798        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16799            self.staking_pool = Some(field.into().into());
16800        }
16801        ///Sets `staking_pool` with the provided value.
16802        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16803            mut self,
16804            field: T,
16805        ) -> Self {
16806            self.set_staking_pool(field.into());
16807            self
16808        }
16809        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16810        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16811            self.commission_rate.as_mut().map(|field| field as _)
16812        }
16813        ///Returns a mutable reference to `commission_rate`.
16814        ///If the field is unset, it is first initialized with the default value.
16815        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16816            self.commission_rate.get_or_insert_default()
16817        }
16818        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16819        pub fn commission_rate_opt(&self) -> Option<u64> {
16820            self.commission_rate.as_ref().map(|field| *field)
16821        }
16822        ///Sets `commission_rate` with the provided value.
16823        pub fn set_commission_rate(&mut self, field: u64) {
16824            self.commission_rate = Some(field);
16825        }
16826        ///Sets `commission_rate` with the provided value.
16827        pub fn with_commission_rate(mut self, field: u64) -> Self {
16828            self.set_commission_rate(field);
16829            self
16830        }
16831        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16832        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16833            self.next_epoch_stake.as_mut().map(|field| field as _)
16834        }
16835        ///Returns a mutable reference to `next_epoch_stake`.
16836        ///If the field is unset, it is first initialized with the default value.
16837        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16838            self.next_epoch_stake.get_or_insert_default()
16839        }
16840        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16841        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16842            self.next_epoch_stake.as_ref().map(|field| *field)
16843        }
16844        ///Sets `next_epoch_stake` with the provided value.
16845        pub fn set_next_epoch_stake(&mut self, field: u64) {
16846            self.next_epoch_stake = Some(field);
16847        }
16848        ///Sets `next_epoch_stake` with the provided value.
16849        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16850            self.set_next_epoch_stake(field);
16851            self
16852        }
16853        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16854        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16855            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16856        }
16857        ///Returns a mutable reference to `next_epoch_gas_price`.
16858        ///If the field is unset, it is first initialized with the default value.
16859        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16860            self.next_epoch_gas_price.get_or_insert_default()
16861        }
16862        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16863        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16864            self.next_epoch_gas_price.as_ref().map(|field| *field)
16865        }
16866        ///Sets `next_epoch_gas_price` with the provided value.
16867        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16868            self.next_epoch_gas_price = Some(field);
16869        }
16870        ///Sets `next_epoch_gas_price` with the provided value.
16871        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16872            self.set_next_epoch_gas_price(field);
16873            self
16874        }
16875        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16876        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16877            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16878        }
16879        ///Returns a mutable reference to `next_epoch_commission_rate`.
16880        ///If the field is unset, it is first initialized with the default value.
16881        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16882            self.next_epoch_commission_rate.get_or_insert_default()
16883        }
16884        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16885        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16886            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16887        }
16888        ///Sets `next_epoch_commission_rate` with the provided value.
16889        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16890            self.next_epoch_commission_rate = Some(field);
16891        }
16892        ///Sets `next_epoch_commission_rate` with the provided value.
16893        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16894            self.set_next_epoch_commission_rate(field);
16895            self
16896        }
16897        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16898        pub fn extra_fields(&self) -> &super::MoveTable {
16899            self.extra_fields
16900                .as_ref()
16901                .map(|field| field as _)
16902                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16903        }
16904        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16905        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16906            self.extra_fields.as_mut().map(|field| field as _)
16907        }
16908        ///Returns a mutable reference to `extra_fields`.
16909        ///If the field is unset, it is first initialized with the default value.
16910        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16911            self.extra_fields.get_or_insert_default()
16912        }
16913        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16914        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16915            self.extra_fields.as_ref().map(|field| field as _)
16916        }
16917        ///Sets `extra_fields` with the provided value.
16918        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16919            self.extra_fields = Some(field.into().into());
16920        }
16921        ///Sets `extra_fields` with the provided value.
16922        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16923            self.set_extra_fields(field.into());
16924            self
16925        }
16926    }
16927    impl super::ValidatorAggregatedSignature {
16928        pub const fn const_default() -> Self {
16929            Self {
16930                epoch: None,
16931                signature: None,
16932                bitmap: None,
16933            }
16934        }
16935        #[doc(hidden)]
16936        pub fn default_instance() -> &'static Self {
16937            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16938            &DEFAULT
16939        }
16940        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16941        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16942            self.epoch.as_mut().map(|field| field as _)
16943        }
16944        ///Returns a mutable reference to `epoch`.
16945        ///If the field is unset, it is first initialized with the default value.
16946        pub fn epoch_mut(&mut self) -> &mut u64 {
16947            self.epoch.get_or_insert_default()
16948        }
16949        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16950        pub fn epoch_opt(&self) -> Option<u64> {
16951            self.epoch.as_ref().map(|field| *field)
16952        }
16953        ///Sets `epoch` with the provided value.
16954        pub fn set_epoch(&mut self, field: u64) {
16955            self.epoch = Some(field);
16956        }
16957        ///Sets `epoch` with the provided value.
16958        pub fn with_epoch(mut self, field: u64) -> Self {
16959            self.set_epoch(field);
16960            self
16961        }
16962        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16963        pub fn signature_opt(&self) -> Option<&[u8]> {
16964            self.signature.as_ref().map(|field| field as _)
16965        }
16966        ///Sets `signature` with the provided value.
16967        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16968            self.signature = Some(field.into().into());
16969        }
16970        ///Sets `signature` with the provided value.
16971        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16972            mut self,
16973            field: T,
16974        ) -> Self {
16975            self.set_signature(field.into());
16976            self
16977        }
16978        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16979        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16980            self.bitmap.as_ref().map(|field| field as _)
16981        }
16982        ///Sets `bitmap` with the provided value.
16983        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16984            self.bitmap = Some(field.into().into());
16985        }
16986        ///Sets `bitmap` with the provided value.
16987        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16988            self.set_bitmap(field.into());
16989            self
16990        }
16991    }
16992    impl super::ValidatorCommittee {
16993        pub const fn const_default() -> Self {
16994            Self {
16995                epoch: None,
16996                members: Vec::new(),
16997            }
16998        }
16999        #[doc(hidden)]
17000        pub fn default_instance() -> &'static Self {
17001            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
17002            &DEFAULT
17003        }
17004        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17005        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
17006            self.epoch.as_mut().map(|field| field as _)
17007        }
17008        ///Returns a mutable reference to `epoch`.
17009        ///If the field is unset, it is first initialized with the default value.
17010        pub fn epoch_mut(&mut self) -> &mut u64 {
17011            self.epoch.get_or_insert_default()
17012        }
17013        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17014        pub fn epoch_opt(&self) -> Option<u64> {
17015            self.epoch.as_ref().map(|field| *field)
17016        }
17017        ///Sets `epoch` with the provided value.
17018        pub fn set_epoch(&mut self, field: u64) {
17019            self.epoch = Some(field);
17020        }
17021        ///Sets `epoch` with the provided value.
17022        pub fn with_epoch(mut self, field: u64) -> Self {
17023            self.set_epoch(field);
17024            self
17025        }
17026        ///Returns the value of `members`, or the default value if `members` is unset.
17027        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
17028            &self.members
17029        }
17030        ///Returns a mutable reference to `members`.
17031        ///If the field is unset, it is first initialized with the default value.
17032        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
17033            &mut self.members
17034        }
17035        ///Sets `members` with the provided value.
17036        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
17037            self.members = field;
17038        }
17039        ///Sets `members` with the provided value.
17040        pub fn with_members(
17041            mut self,
17042            field: Vec<super::ValidatorCommitteeMember>,
17043        ) -> Self {
17044            self.set_members(field);
17045            self
17046        }
17047    }
17048    impl super::ValidatorCommitteeMember {
17049        pub const fn const_default() -> Self {
17050            Self {
17051                public_key: None,
17052                weight: None,
17053            }
17054        }
17055        #[doc(hidden)]
17056        pub fn default_instance() -> &'static Self {
17057            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
17058            &DEFAULT
17059        }
17060        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
17061        pub fn public_key_opt(&self) -> Option<&[u8]> {
17062            self.public_key.as_ref().map(|field| field as _)
17063        }
17064        ///Sets `public_key` with the provided value.
17065        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17066            self.public_key = Some(field.into().into());
17067        }
17068        ///Sets `public_key` with the provided value.
17069        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
17070            mut self,
17071            field: T,
17072        ) -> Self {
17073            self.set_public_key(field.into());
17074            self
17075        }
17076        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17077        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
17078            self.weight.as_mut().map(|field| field as _)
17079        }
17080        ///Returns a mutable reference to `weight`.
17081        ///If the field is unset, it is first initialized with the default value.
17082        pub fn weight_mut(&mut self) -> &mut u64 {
17083            self.weight.get_or_insert_default()
17084        }
17085        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
17086        pub fn weight_opt(&self) -> Option<u64> {
17087            self.weight.as_ref().map(|field| *field)
17088        }
17089        ///Sets `weight` with the provided value.
17090        pub fn set_weight(&mut self, field: u64) {
17091            self.weight = Some(field);
17092        }
17093        ///Sets `weight` with the provided value.
17094        pub fn with_weight(mut self, field: u64) -> Self {
17095            self.set_weight(field);
17096            self
17097        }
17098    }
17099    impl super::ValidatorExecutionTimeObservation {
17100        pub const fn const_default() -> Self {
17101            Self {
17102                validator: None,
17103                duration: None,
17104            }
17105        }
17106        #[doc(hidden)]
17107        pub fn default_instance() -> &'static Self {
17108            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
17109            &DEFAULT
17110        }
17111        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
17112        pub fn validator_opt(&self) -> Option<&[u8]> {
17113            self.validator.as_ref().map(|field| field as _)
17114        }
17115        ///Sets `validator` with the provided value.
17116        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17117            self.validator = Some(field.into().into());
17118        }
17119        ///Sets `validator` with the provided value.
17120        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
17121            mut self,
17122            field: T,
17123        ) -> Self {
17124            self.set_validator(field.into());
17125            self
17126        }
17127        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17128        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
17129            self.duration.as_mut().map(|field| field as _)
17130        }
17131        ///Returns a mutable reference to `duration`.
17132        ///If the field is unset, it is first initialized with the default value.
17133        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
17134            self.duration.get_or_insert_default()
17135        }
17136        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
17137        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
17138            self.duration.as_ref().map(|field| field as _)
17139        }
17140        ///Sets `duration` with the provided value.
17141        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
17142            self.duration = Some(field.into().into());
17143        }
17144        ///Sets `duration` with the provided value.
17145        pub fn with_duration<T: Into<::prost_types::Duration>>(
17146            mut self,
17147            field: T,
17148        ) -> Self {
17149            self.set_duration(field.into());
17150            self
17151        }
17152    }
17153    impl super::ValidatorReportRecord {
17154        pub const fn const_default() -> Self {
17155            Self {
17156                reported: None,
17157                reporters: Vec::new(),
17158            }
17159        }
17160        #[doc(hidden)]
17161        pub fn default_instance() -> &'static Self {
17162            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
17163            &DEFAULT
17164        }
17165        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17166        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
17167            self.reported.as_mut().map(|field| field as _)
17168        }
17169        ///Returns a mutable reference to `reported`.
17170        ///If the field is unset, it is first initialized with the default value.
17171        pub fn reported_mut(&mut self) -> &mut String {
17172            self.reported.get_or_insert_default()
17173        }
17174        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
17175        pub fn reported_opt(&self) -> Option<&str> {
17176            self.reported.as_ref().map(|field| field as _)
17177        }
17178        ///Sets `reported` with the provided value.
17179        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
17180            self.reported = Some(field.into().into());
17181        }
17182        ///Sets `reported` with the provided value.
17183        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
17184            self.set_reported(field.into());
17185            self
17186        }
17187        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
17188        pub fn reporters(&self) -> &[String] {
17189            &self.reporters
17190        }
17191        ///Returns a mutable reference to `reporters`.
17192        ///If the field is unset, it is first initialized with the default value.
17193        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
17194            &mut self.reporters
17195        }
17196        ///Sets `reporters` with the provided value.
17197        pub fn set_reporters(&mut self, field: Vec<String>) {
17198            self.reporters = field;
17199        }
17200        ///Sets `reporters` with the provided value.
17201        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
17202            self.set_reporters(field);
17203            self
17204        }
17205    }
17206    impl super::ValidatorSet {
17207        pub const fn const_default() -> Self {
17208            Self {
17209                total_stake: None,
17210                active_validators: Vec::new(),
17211                pending_active_validators: None,
17212                pending_removals: Vec::new(),
17213                staking_pool_mappings: None,
17214                inactive_validators: None,
17215                validator_candidates: None,
17216                at_risk_validators: std::collections::BTreeMap::new(),
17217                extra_fields: None,
17218            }
17219        }
17220        #[doc(hidden)]
17221        pub fn default_instance() -> &'static Self {
17222            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17223            &DEFAULT
17224        }
17225        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17226        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17227            self.total_stake.as_mut().map(|field| field as _)
17228        }
17229        ///Returns a mutable reference to `total_stake`.
17230        ///If the field is unset, it is first initialized with the default value.
17231        pub fn total_stake_mut(&mut self) -> &mut u64 {
17232            self.total_stake.get_or_insert_default()
17233        }
17234        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
17235        pub fn total_stake_opt(&self) -> Option<u64> {
17236            self.total_stake.as_ref().map(|field| *field)
17237        }
17238        ///Sets `total_stake` with the provided value.
17239        pub fn set_total_stake(&mut self, field: u64) {
17240            self.total_stake = Some(field);
17241        }
17242        ///Sets `total_stake` with the provided value.
17243        pub fn with_total_stake(mut self, field: u64) -> Self {
17244            self.set_total_stake(field);
17245            self
17246        }
17247        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
17248        pub fn active_validators(&self) -> &[super::Validator] {
17249            &self.active_validators
17250        }
17251        ///Returns a mutable reference to `active_validators`.
17252        ///If the field is unset, it is first initialized with the default value.
17253        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17254            &mut self.active_validators
17255        }
17256        ///Sets `active_validators` with the provided value.
17257        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17258            self.active_validators = field;
17259        }
17260        ///Sets `active_validators` with the provided value.
17261        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17262            self.set_active_validators(field);
17263            self
17264        }
17265        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
17266        pub fn pending_active_validators(&self) -> &super::MoveTable {
17267            self.pending_active_validators
17268                .as_ref()
17269                .map(|field| field as _)
17270                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17271        }
17272        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17273        pub fn pending_active_validators_opt_mut(
17274            &mut self,
17275        ) -> Option<&mut super::MoveTable> {
17276            self.pending_active_validators.as_mut().map(|field| field as _)
17277        }
17278        ///Returns a mutable reference to `pending_active_validators`.
17279        ///If the field is unset, it is first initialized with the default value.
17280        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17281            self.pending_active_validators.get_or_insert_default()
17282        }
17283        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17284        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17285            self.pending_active_validators.as_ref().map(|field| field as _)
17286        }
17287        ///Sets `pending_active_validators` with the provided value.
17288        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17289            &mut self,
17290            field: T,
17291        ) {
17292            self.pending_active_validators = Some(field.into().into());
17293        }
17294        ///Sets `pending_active_validators` with the provided value.
17295        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17296            mut self,
17297            field: T,
17298        ) -> Self {
17299            self.set_pending_active_validators(field.into());
17300            self
17301        }
17302        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
17303        pub fn pending_removals(&self) -> &[u64] {
17304            &self.pending_removals
17305        }
17306        ///Returns a mutable reference to `pending_removals`.
17307        ///If the field is unset, it is first initialized with the default value.
17308        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17309            &mut self.pending_removals
17310        }
17311        ///Sets `pending_removals` with the provided value.
17312        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17313            self.pending_removals = field;
17314        }
17315        ///Sets `pending_removals` with the provided value.
17316        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17317            self.set_pending_removals(field);
17318            self
17319        }
17320        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
17321        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17322            self.staking_pool_mappings
17323                .as_ref()
17324                .map(|field| field as _)
17325                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17326        }
17327        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17328        pub fn staking_pool_mappings_opt_mut(
17329            &mut self,
17330        ) -> Option<&mut super::MoveTable> {
17331            self.staking_pool_mappings.as_mut().map(|field| field as _)
17332        }
17333        ///Returns a mutable reference to `staking_pool_mappings`.
17334        ///If the field is unset, it is first initialized with the default value.
17335        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17336            self.staking_pool_mappings.get_or_insert_default()
17337        }
17338        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
17339        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17340            self.staking_pool_mappings.as_ref().map(|field| field as _)
17341        }
17342        ///Sets `staking_pool_mappings` with the provided value.
17343        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17344            &mut self,
17345            field: T,
17346        ) {
17347            self.staking_pool_mappings = Some(field.into().into());
17348        }
17349        ///Sets `staking_pool_mappings` with the provided value.
17350        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17351            mut self,
17352            field: T,
17353        ) -> Self {
17354            self.set_staking_pool_mappings(field.into());
17355            self
17356        }
17357        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17358        pub fn inactive_validators(&self) -> &super::MoveTable {
17359            self.inactive_validators
17360                .as_ref()
17361                .map(|field| field as _)
17362                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17363        }
17364        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17365        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17366            self.inactive_validators.as_mut().map(|field| field as _)
17367        }
17368        ///Returns a mutable reference to `inactive_validators`.
17369        ///If the field is unset, it is first initialized with the default value.
17370        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17371            self.inactive_validators.get_or_insert_default()
17372        }
17373        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17374        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17375            self.inactive_validators.as_ref().map(|field| field as _)
17376        }
17377        ///Sets `inactive_validators` with the provided value.
17378        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17379            self.inactive_validators = Some(field.into().into());
17380        }
17381        ///Sets `inactive_validators` with the provided value.
17382        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17383            mut self,
17384            field: T,
17385        ) -> Self {
17386            self.set_inactive_validators(field.into());
17387            self
17388        }
17389        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17390        pub fn validator_candidates(&self) -> &super::MoveTable {
17391            self.validator_candidates
17392                .as_ref()
17393                .map(|field| field as _)
17394                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17395        }
17396        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17397        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17398            self.validator_candidates.as_mut().map(|field| field as _)
17399        }
17400        ///Returns a mutable reference to `validator_candidates`.
17401        ///If the field is unset, it is first initialized with the default value.
17402        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17403            self.validator_candidates.get_or_insert_default()
17404        }
17405        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17406        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17407            self.validator_candidates.as_ref().map(|field| field as _)
17408        }
17409        ///Sets `validator_candidates` with the provided value.
17410        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17411            self.validator_candidates = Some(field.into().into());
17412        }
17413        ///Sets `validator_candidates` with the provided value.
17414        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17415            mut self,
17416            field: T,
17417        ) -> Self {
17418            self.set_validator_candidates(field.into());
17419            self
17420        }
17421        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17422        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17423            &self.at_risk_validators
17424        }
17425        ///Returns a mutable reference to `at_risk_validators`.
17426        ///If the field is unset, it is first initialized with the default value.
17427        pub fn at_risk_validators_mut(
17428            &mut self,
17429        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17430            &mut self.at_risk_validators
17431        }
17432        ///Sets `at_risk_validators` with the provided value.
17433        pub fn set_at_risk_validators(
17434            &mut self,
17435            field: ::std::collections::BTreeMap<String, u64>,
17436        ) {
17437            self.at_risk_validators = field;
17438        }
17439        ///Sets `at_risk_validators` with the provided value.
17440        pub fn with_at_risk_validators(
17441            mut self,
17442            field: ::std::collections::BTreeMap<String, u64>,
17443        ) -> Self {
17444            self.set_at_risk_validators(field);
17445            self
17446        }
17447        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17448        pub fn extra_fields(&self) -> &super::MoveTable {
17449            self.extra_fields
17450                .as_ref()
17451                .map(|field| field as _)
17452                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17453        }
17454        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17455        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17456            self.extra_fields.as_mut().map(|field| field as _)
17457        }
17458        ///Returns a mutable reference to `extra_fields`.
17459        ///If the field is unset, it is first initialized with the default value.
17460        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17461            self.extra_fields.get_or_insert_default()
17462        }
17463        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17464        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17465            self.extra_fields.as_ref().map(|field| field as _)
17466        }
17467        ///Sets `extra_fields` with the provided value.
17468        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17469            self.extra_fields = Some(field.into().into());
17470        }
17471        ///Sets `extra_fields` with the provided value.
17472        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17473            self.set_extra_fields(field.into());
17474            self
17475        }
17476    }
17477    impl super::VariantDescriptor {
17478        pub const fn const_default() -> Self {
17479            Self {
17480                name: None,
17481                position: None,
17482                fields: Vec::new(),
17483            }
17484        }
17485        #[doc(hidden)]
17486        pub fn default_instance() -> &'static Self {
17487            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17488            &DEFAULT
17489        }
17490        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17491        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17492            self.name.as_mut().map(|field| field as _)
17493        }
17494        ///Returns a mutable reference to `name`.
17495        ///If the field is unset, it is first initialized with the default value.
17496        pub fn name_mut(&mut self) -> &mut String {
17497            self.name.get_or_insert_default()
17498        }
17499        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17500        pub fn name_opt(&self) -> Option<&str> {
17501            self.name.as_ref().map(|field| field as _)
17502        }
17503        ///Sets `name` with the provided value.
17504        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17505            self.name = Some(field.into().into());
17506        }
17507        ///Sets `name` with the provided value.
17508        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17509            self.set_name(field.into());
17510            self
17511        }
17512        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17513        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17514            self.position.as_mut().map(|field| field as _)
17515        }
17516        ///Returns a mutable reference to `position`.
17517        ///If the field is unset, it is first initialized with the default value.
17518        pub fn position_mut(&mut self) -> &mut u32 {
17519            self.position.get_or_insert_default()
17520        }
17521        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17522        pub fn position_opt(&self) -> Option<u32> {
17523            self.position.as_ref().map(|field| *field)
17524        }
17525        ///Sets `position` with the provided value.
17526        pub fn set_position(&mut self, field: u32) {
17527            self.position = Some(field);
17528        }
17529        ///Sets `position` with the provided value.
17530        pub fn with_position(mut self, field: u32) -> Self {
17531            self.set_position(field);
17532            self
17533        }
17534        ///Returns the value of `fields`, or the default value if `fields` is unset.
17535        pub fn fields(&self) -> &[super::FieldDescriptor] {
17536            &self.fields
17537        }
17538        ///Returns a mutable reference to `fields`.
17539        ///If the field is unset, it is first initialized with the default value.
17540        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17541            &mut self.fields
17542        }
17543        ///Sets `fields` with the provided value.
17544        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17545            self.fields = field;
17546        }
17547        ///Sets `fields` with the provided value.
17548        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17549            self.set_fields(field);
17550            self
17551        }
17552    }
17553    impl super::VerifySignatureRequest {
17554        pub const fn const_default() -> Self {
17555            Self {
17556                message: None,
17557                signature: None,
17558                address: None,
17559                jwks: Vec::new(),
17560            }
17561        }
17562        #[doc(hidden)]
17563        pub fn default_instance() -> &'static Self {
17564            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17565            &DEFAULT
17566        }
17567        ///Returns the value of `message`, or the default value if `message` is unset.
17568        pub fn message(&self) -> &super::Bcs {
17569            self.message
17570                .as_ref()
17571                .map(|field| field as _)
17572                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17573        }
17574        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17575        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17576            self.message.as_mut().map(|field| field as _)
17577        }
17578        ///Returns a mutable reference to `message`.
17579        ///If the field is unset, it is first initialized with the default value.
17580        pub fn message_mut(&mut self) -> &mut super::Bcs {
17581            self.message.get_or_insert_default()
17582        }
17583        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17584        pub fn message_opt(&self) -> Option<&super::Bcs> {
17585            self.message.as_ref().map(|field| field as _)
17586        }
17587        ///Sets `message` with the provided value.
17588        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17589            self.message = Some(field.into().into());
17590        }
17591        ///Sets `message` with the provided value.
17592        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17593            self.set_message(field.into());
17594            self
17595        }
17596        ///Returns the value of `signature`, or the default value if `signature` is unset.
17597        pub fn signature(&self) -> &super::UserSignature {
17598            self.signature
17599                .as_ref()
17600                .map(|field| field as _)
17601                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17602        }
17603        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17604        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17605            self.signature.as_mut().map(|field| field as _)
17606        }
17607        ///Returns a mutable reference to `signature`.
17608        ///If the field is unset, it is first initialized with the default value.
17609        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17610            self.signature.get_or_insert_default()
17611        }
17612        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17613        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17614            self.signature.as_ref().map(|field| field as _)
17615        }
17616        ///Sets `signature` with the provided value.
17617        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17618            self.signature = Some(field.into().into());
17619        }
17620        ///Sets `signature` with the provided value.
17621        pub fn with_signature<T: Into<super::UserSignature>>(
17622            mut self,
17623            field: T,
17624        ) -> Self {
17625            self.set_signature(field.into());
17626            self
17627        }
17628        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17629        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17630            self.address.as_mut().map(|field| field as _)
17631        }
17632        ///Returns a mutable reference to `address`.
17633        ///If the field is unset, it is first initialized with the default value.
17634        pub fn address_mut(&mut self) -> &mut String {
17635            self.address.get_or_insert_default()
17636        }
17637        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17638        pub fn address_opt(&self) -> Option<&str> {
17639            self.address.as_ref().map(|field| field as _)
17640        }
17641        ///Sets `address` with the provided value.
17642        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17643            self.address = Some(field.into().into());
17644        }
17645        ///Sets `address` with the provided value.
17646        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17647            self.set_address(field.into());
17648            self
17649        }
17650        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17651        pub fn jwks(&self) -> &[super::ActiveJwk] {
17652            &self.jwks
17653        }
17654        ///Returns a mutable reference to `jwks`.
17655        ///If the field is unset, it is first initialized with the default value.
17656        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17657            &mut self.jwks
17658        }
17659        ///Sets `jwks` with the provided value.
17660        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17661            self.jwks = field;
17662        }
17663        ///Sets `jwks` with the provided value.
17664        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17665            self.set_jwks(field);
17666            self
17667        }
17668    }
17669    impl super::VerifySignatureResponse {
17670        pub const fn const_default() -> Self {
17671            Self {
17672                is_valid: None,
17673                reason: None,
17674            }
17675        }
17676        #[doc(hidden)]
17677        pub fn default_instance() -> &'static Self {
17678            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17679            &DEFAULT
17680        }
17681        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17682        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17683            self.is_valid.as_mut().map(|field| field as _)
17684        }
17685        ///Returns a mutable reference to `is_valid`.
17686        ///If the field is unset, it is first initialized with the default value.
17687        pub fn is_valid_mut(&mut self) -> &mut bool {
17688            self.is_valid.get_or_insert_default()
17689        }
17690        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17691        pub fn is_valid_opt(&self) -> Option<bool> {
17692            self.is_valid.as_ref().map(|field| *field)
17693        }
17694        ///Sets `is_valid` with the provided value.
17695        pub fn set_is_valid(&mut self, field: bool) {
17696            self.is_valid = Some(field);
17697        }
17698        ///Sets `is_valid` with the provided value.
17699        pub fn with_is_valid(mut self, field: bool) -> Self {
17700            self.set_is_valid(field);
17701            self
17702        }
17703        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17704        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17705            self.reason.as_mut().map(|field| field as _)
17706        }
17707        ///Returns a mutable reference to `reason`.
17708        ///If the field is unset, it is first initialized with the default value.
17709        pub fn reason_mut(&mut self) -> &mut String {
17710            self.reason.get_or_insert_default()
17711        }
17712        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17713        pub fn reason_opt(&self) -> Option<&str> {
17714            self.reason.as_ref().map(|field| field as _)
17715        }
17716        ///Sets `reason` with the provided value.
17717        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17718            self.reason = Some(field.into().into());
17719        }
17720        ///Sets `reason` with the provided value.
17721        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17722            self.set_reason(field.into());
17723            self
17724        }
17725    }
17726    impl super::VersionAssignment {
17727        pub const fn const_default() -> Self {
17728            Self {
17729                object_id: None,
17730                start_version: None,
17731                version: None,
17732            }
17733        }
17734        #[doc(hidden)]
17735        pub fn default_instance() -> &'static Self {
17736            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17737            &DEFAULT
17738        }
17739        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17740        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17741            self.object_id.as_mut().map(|field| field as _)
17742        }
17743        ///Returns a mutable reference to `object_id`.
17744        ///If the field is unset, it is first initialized with the default value.
17745        pub fn object_id_mut(&mut self) -> &mut String {
17746            self.object_id.get_or_insert_default()
17747        }
17748        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17749        pub fn object_id_opt(&self) -> Option<&str> {
17750            self.object_id.as_ref().map(|field| field as _)
17751        }
17752        ///Sets `object_id` with the provided value.
17753        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17754            self.object_id = Some(field.into().into());
17755        }
17756        ///Sets `object_id` with the provided value.
17757        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17758            self.set_object_id(field.into());
17759            self
17760        }
17761        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17762        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17763            self.start_version.as_mut().map(|field| field as _)
17764        }
17765        ///Returns a mutable reference to `start_version`.
17766        ///If the field is unset, it is first initialized with the default value.
17767        pub fn start_version_mut(&mut self) -> &mut u64 {
17768            self.start_version.get_or_insert_default()
17769        }
17770        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17771        pub fn start_version_opt(&self) -> Option<u64> {
17772            self.start_version.as_ref().map(|field| *field)
17773        }
17774        ///Sets `start_version` with the provided value.
17775        pub fn set_start_version(&mut self, field: u64) {
17776            self.start_version = Some(field);
17777        }
17778        ///Sets `start_version` with the provided value.
17779        pub fn with_start_version(mut self, field: u64) -> Self {
17780            self.set_start_version(field);
17781            self
17782        }
17783        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17784        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17785            self.version.as_mut().map(|field| field as _)
17786        }
17787        ///Returns a mutable reference to `version`.
17788        ///If the field is unset, it is first initialized with the default value.
17789        pub fn version_mut(&mut self) -> &mut u64 {
17790            self.version.get_or_insert_default()
17791        }
17792        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17793        pub fn version_opt(&self) -> Option<u64> {
17794            self.version.as_ref().map(|field| *field)
17795        }
17796        ///Sets `version` with the provided value.
17797        pub fn set_version(&mut self, field: u64) {
17798            self.version = Some(field);
17799        }
17800        ///Sets `version` with the provided value.
17801        pub fn with_version(mut self, field: u64) -> Self {
17802            self.set_version(field);
17803            self
17804        }
17805    }
17806    impl super::ZkLoginAuthenticator {
17807        pub const fn const_default() -> Self {
17808            Self {
17809                inputs: None,
17810                max_epoch: None,
17811                signature: None,
17812                public_identifier: None,
17813                jwk_id: None,
17814            }
17815        }
17816        #[doc(hidden)]
17817        pub fn default_instance() -> &'static Self {
17818            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17819            &DEFAULT
17820        }
17821        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17822        pub fn inputs(&self) -> &super::ZkLoginInputs {
17823            self.inputs
17824                .as_ref()
17825                .map(|field| field as _)
17826                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17827        }
17828        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17829        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17830            self.inputs.as_mut().map(|field| field as _)
17831        }
17832        ///Returns a mutable reference to `inputs`.
17833        ///If the field is unset, it is first initialized with the default value.
17834        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17835            self.inputs.get_or_insert_default()
17836        }
17837        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17838        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17839            self.inputs.as_ref().map(|field| field as _)
17840        }
17841        ///Sets `inputs` with the provided value.
17842        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17843            self.inputs = Some(field.into().into());
17844        }
17845        ///Sets `inputs` with the provided value.
17846        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17847            self.set_inputs(field.into());
17848            self
17849        }
17850        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17851        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17852            self.max_epoch.as_mut().map(|field| field as _)
17853        }
17854        ///Returns a mutable reference to `max_epoch`.
17855        ///If the field is unset, it is first initialized with the default value.
17856        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17857            self.max_epoch.get_or_insert_default()
17858        }
17859        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17860        pub fn max_epoch_opt(&self) -> Option<u64> {
17861            self.max_epoch.as_ref().map(|field| *field)
17862        }
17863        ///Sets `max_epoch` with the provided value.
17864        pub fn set_max_epoch(&mut self, field: u64) {
17865            self.max_epoch = Some(field);
17866        }
17867        ///Sets `max_epoch` with the provided value.
17868        pub fn with_max_epoch(mut self, field: u64) -> Self {
17869            self.set_max_epoch(field);
17870            self
17871        }
17872        ///Returns the value of `signature`, or the default value if `signature` is unset.
17873        pub fn signature(&self) -> &super::SimpleSignature {
17874            self.signature
17875                .as_ref()
17876                .map(|field| field as _)
17877                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17878        }
17879        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17880        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17881            self.signature.as_mut().map(|field| field as _)
17882        }
17883        ///Returns a mutable reference to `signature`.
17884        ///If the field is unset, it is first initialized with the default value.
17885        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17886            self.signature.get_or_insert_default()
17887        }
17888        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17889        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17890            self.signature.as_ref().map(|field| field as _)
17891        }
17892        ///Sets `signature` with the provided value.
17893        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17894            self.signature = Some(field.into().into());
17895        }
17896        ///Sets `signature` with the provided value.
17897        pub fn with_signature<T: Into<super::SimpleSignature>>(
17898            mut self,
17899            field: T,
17900        ) -> Self {
17901            self.set_signature(field.into());
17902            self
17903        }
17904        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17905        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17906            self.public_identifier
17907                .as_ref()
17908                .map(|field| field as _)
17909                .unwrap_or_else(|| {
17910                    super::ZkLoginPublicIdentifier::default_instance() as _
17911                })
17912        }
17913        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17914        pub fn public_identifier_opt_mut(
17915            &mut self,
17916        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17917            self.public_identifier.as_mut().map(|field| field as _)
17918        }
17919        ///Returns a mutable reference to `public_identifier`.
17920        ///If the field is unset, it is first initialized with the default value.
17921        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17922            self.public_identifier.get_or_insert_default()
17923        }
17924        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17925        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17926            self.public_identifier.as_ref().map(|field| field as _)
17927        }
17928        ///Sets `public_identifier` with the provided value.
17929        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17930            &mut self,
17931            field: T,
17932        ) {
17933            self.public_identifier = Some(field.into().into());
17934        }
17935        ///Sets `public_identifier` with the provided value.
17936        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17937            mut self,
17938            field: T,
17939        ) -> Self {
17940            self.set_public_identifier(field.into());
17941            self
17942        }
17943        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17944        pub fn jwk_id(&self) -> &super::JwkId {
17945            self.jwk_id
17946                .as_ref()
17947                .map(|field| field as _)
17948                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17949        }
17950        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17951        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17952            self.jwk_id.as_mut().map(|field| field as _)
17953        }
17954        ///Returns a mutable reference to `jwk_id`.
17955        ///If the field is unset, it is first initialized with the default value.
17956        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17957            self.jwk_id.get_or_insert_default()
17958        }
17959        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17960        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17961            self.jwk_id.as_ref().map(|field| field as _)
17962        }
17963        ///Sets `jwk_id` with the provided value.
17964        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17965            self.jwk_id = Some(field.into().into());
17966        }
17967        ///Sets `jwk_id` with the provided value.
17968        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17969            self.set_jwk_id(field.into());
17970            self
17971        }
17972    }
17973    impl super::ZkLoginClaim {
17974        pub const fn const_default() -> Self {
17975            Self {
17976                value: None,
17977                index_mod_4: None,
17978            }
17979        }
17980        #[doc(hidden)]
17981        pub fn default_instance() -> &'static Self {
17982            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17983            &DEFAULT
17984        }
17985        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17986        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17987            self.value.as_mut().map(|field| field as _)
17988        }
17989        ///Returns a mutable reference to `value`.
17990        ///If the field is unset, it is first initialized with the default value.
17991        pub fn value_mut(&mut self) -> &mut String {
17992            self.value.get_or_insert_default()
17993        }
17994        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17995        pub fn value_opt(&self) -> Option<&str> {
17996            self.value.as_ref().map(|field| field as _)
17997        }
17998        ///Sets `value` with the provided value.
17999        pub fn set_value<T: Into<String>>(&mut self, field: T) {
18000            self.value = Some(field.into().into());
18001        }
18002        ///Sets `value` with the provided value.
18003        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
18004            self.set_value(field.into());
18005            self
18006        }
18007        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18008        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
18009            self.index_mod_4.as_mut().map(|field| field as _)
18010        }
18011        ///Returns a mutable reference to `index_mod_4`.
18012        ///If the field is unset, it is first initialized with the default value.
18013        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
18014            self.index_mod_4.get_or_insert_default()
18015        }
18016        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
18017        pub fn index_mod_4_opt(&self) -> Option<u32> {
18018            self.index_mod_4.as_ref().map(|field| *field)
18019        }
18020        ///Sets `index_mod_4` with the provided value.
18021        pub fn set_index_mod_4(&mut self, field: u32) {
18022            self.index_mod_4 = Some(field);
18023        }
18024        ///Sets `index_mod_4` with the provided value.
18025        pub fn with_index_mod_4(mut self, field: u32) -> Self {
18026            self.set_index_mod_4(field);
18027            self
18028        }
18029    }
18030    impl super::ZkLoginInputs {
18031        pub const fn const_default() -> Self {
18032            Self {
18033                proof_points: None,
18034                iss_base64_details: None,
18035                header_base64: None,
18036                address_seed: None,
18037            }
18038        }
18039        #[doc(hidden)]
18040        pub fn default_instance() -> &'static Self {
18041            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
18042            &DEFAULT
18043        }
18044        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
18045        pub fn proof_points(&self) -> &super::ZkLoginProof {
18046            self.proof_points
18047                .as_ref()
18048                .map(|field| field as _)
18049                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
18050        }
18051        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18052        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
18053            self.proof_points.as_mut().map(|field| field as _)
18054        }
18055        ///Returns a mutable reference to `proof_points`.
18056        ///If the field is unset, it is first initialized with the default value.
18057        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
18058            self.proof_points.get_or_insert_default()
18059        }
18060        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
18061        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
18062            self.proof_points.as_ref().map(|field| field as _)
18063        }
18064        ///Sets `proof_points` with the provided value.
18065        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
18066            self.proof_points = Some(field.into().into());
18067        }
18068        ///Sets `proof_points` with the provided value.
18069        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
18070            mut self,
18071            field: T,
18072        ) -> Self {
18073            self.set_proof_points(field.into());
18074            self
18075        }
18076        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
18077        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
18078            self.iss_base64_details
18079                .as_ref()
18080                .map(|field| field as _)
18081                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
18082        }
18083        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18084        pub fn iss_base64_details_opt_mut(
18085            &mut self,
18086        ) -> Option<&mut super::ZkLoginClaim> {
18087            self.iss_base64_details.as_mut().map(|field| field as _)
18088        }
18089        ///Returns a mutable reference to `iss_base64_details`.
18090        ///If the field is unset, it is first initialized with the default value.
18091        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
18092            self.iss_base64_details.get_or_insert_default()
18093        }
18094        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
18095        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
18096            self.iss_base64_details.as_ref().map(|field| field as _)
18097        }
18098        ///Sets `iss_base64_details` with the provided value.
18099        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18100            &mut self,
18101            field: T,
18102        ) {
18103            self.iss_base64_details = Some(field.into().into());
18104        }
18105        ///Sets `iss_base64_details` with the provided value.
18106        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18107            mut self,
18108            field: T,
18109        ) -> Self {
18110            self.set_iss_base64_details(field.into());
18111            self
18112        }
18113        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18114        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
18115            self.header_base64.as_mut().map(|field| field as _)
18116        }
18117        ///Returns a mutable reference to `header_base64`.
18118        ///If the field is unset, it is first initialized with the default value.
18119        pub fn header_base64_mut(&mut self) -> &mut String {
18120            self.header_base64.get_or_insert_default()
18121        }
18122        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
18123        pub fn header_base64_opt(&self) -> Option<&str> {
18124            self.header_base64.as_ref().map(|field| field as _)
18125        }
18126        ///Sets `header_base64` with the provided value.
18127        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
18128            self.header_base64 = Some(field.into().into());
18129        }
18130        ///Sets `header_base64` with the provided value.
18131        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
18132            self.set_header_base64(field.into());
18133            self
18134        }
18135        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18136        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18137            self.address_seed.as_mut().map(|field| field as _)
18138        }
18139        ///Returns a mutable reference to `address_seed`.
18140        ///If the field is unset, it is first initialized with the default value.
18141        pub fn address_seed_mut(&mut self) -> &mut String {
18142            self.address_seed.get_or_insert_default()
18143        }
18144        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18145        pub fn address_seed_opt(&self) -> Option<&str> {
18146            self.address_seed.as_ref().map(|field| field as _)
18147        }
18148        ///Sets `address_seed` with the provided value.
18149        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18150            self.address_seed = Some(field.into().into());
18151        }
18152        ///Sets `address_seed` with the provided value.
18153        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18154            self.set_address_seed(field.into());
18155            self
18156        }
18157    }
18158    impl super::ZkLoginProof {
18159        pub const fn const_default() -> Self {
18160            Self { a: None, b: None, c: None }
18161        }
18162        #[doc(hidden)]
18163        pub fn default_instance() -> &'static Self {
18164            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
18165            &DEFAULT
18166        }
18167        ///Returns the value of `a`, or the default value if `a` is unset.
18168        pub fn a(&self) -> &super::CircomG1 {
18169            self.a
18170                .as_ref()
18171                .map(|field| field as _)
18172                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18173        }
18174        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18175        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18176            self.a.as_mut().map(|field| field as _)
18177        }
18178        ///Returns a mutable reference to `a`.
18179        ///If the field is unset, it is first initialized with the default value.
18180        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
18181            self.a.get_or_insert_default()
18182        }
18183        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
18184        pub fn a_opt(&self) -> Option<&super::CircomG1> {
18185            self.a.as_ref().map(|field| field as _)
18186        }
18187        ///Sets `a` with the provided value.
18188        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
18189            self.a = Some(field.into().into());
18190        }
18191        ///Sets `a` with the provided value.
18192        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18193            self.set_a(field.into());
18194            self
18195        }
18196        ///Returns the value of `b`, or the default value if `b` is unset.
18197        pub fn b(&self) -> &super::CircomG2 {
18198            self.b
18199                .as_ref()
18200                .map(|field| field as _)
18201                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
18202        }
18203        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18204        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
18205            self.b.as_mut().map(|field| field as _)
18206        }
18207        ///Returns a mutable reference to `b`.
18208        ///If the field is unset, it is first initialized with the default value.
18209        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
18210            self.b.get_or_insert_default()
18211        }
18212        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
18213        pub fn b_opt(&self) -> Option<&super::CircomG2> {
18214            self.b.as_ref().map(|field| field as _)
18215        }
18216        ///Sets `b` with the provided value.
18217        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18218            self.b = Some(field.into().into());
18219        }
18220        ///Sets `b` with the provided value.
18221        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18222            self.set_b(field.into());
18223            self
18224        }
18225        ///Returns the value of `c`, or the default value if `c` is unset.
18226        pub fn c(&self) -> &super::CircomG1 {
18227            self.c
18228                .as_ref()
18229                .map(|field| field as _)
18230                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18231        }
18232        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18233        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18234            self.c.as_mut().map(|field| field as _)
18235        }
18236        ///Returns a mutable reference to `c`.
18237        ///If the field is unset, it is first initialized with the default value.
18238        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18239            self.c.get_or_insert_default()
18240        }
18241        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
18242        pub fn c_opt(&self) -> Option<&super::CircomG1> {
18243            self.c.as_ref().map(|field| field as _)
18244        }
18245        ///Sets `c` with the provided value.
18246        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18247            self.c = Some(field.into().into());
18248        }
18249        ///Sets `c` with the provided value.
18250        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18251            self.set_c(field.into());
18252            self
18253        }
18254    }
18255    impl super::ZkLoginPublicIdentifier {
18256        pub const fn const_default() -> Self {
18257            Self {
18258                iss: None,
18259                address_seed: None,
18260            }
18261        }
18262        #[doc(hidden)]
18263        pub fn default_instance() -> &'static Self {
18264            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18265            &DEFAULT
18266        }
18267        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18268        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18269            self.iss.as_mut().map(|field| field as _)
18270        }
18271        ///Returns a mutable reference to `iss`.
18272        ///If the field is unset, it is first initialized with the default value.
18273        pub fn iss_mut(&mut self) -> &mut String {
18274            self.iss.get_or_insert_default()
18275        }
18276        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
18277        pub fn iss_opt(&self) -> Option<&str> {
18278            self.iss.as_ref().map(|field| field as _)
18279        }
18280        ///Sets `iss` with the provided value.
18281        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18282            self.iss = Some(field.into().into());
18283        }
18284        ///Sets `iss` with the provided value.
18285        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18286            self.set_iss(field.into());
18287            self
18288        }
18289        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18290        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18291            self.address_seed.as_mut().map(|field| field as _)
18292        }
18293        ///Returns a mutable reference to `address_seed`.
18294        ///If the field is unset, it is first initialized with the default value.
18295        pub fn address_seed_mut(&mut self) -> &mut String {
18296            self.address_seed.get_or_insert_default()
18297        }
18298        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
18299        pub fn address_seed_opt(&self) -> Option<&str> {
18300            self.address_seed.as_ref().map(|field| field as _)
18301        }
18302        ///Sets `address_seed` with the provided value.
18303        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18304            self.address_seed = Some(field.into().into());
18305        }
18306        ///Sets `address_seed` with the provided value.
18307        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18308            self.set_address_seed(field.into());
18309            self
18310        }
18311    }
18312}