Skip to main content

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

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::AccumulatorWrite {
4        pub const fn const_default() -> Self {
5            Self {
6                address: None,
7                accumulator_type: None,
8                operation: None,
9                value_kind: None,
10                integer_value: None,
11                integer_tuple: Vec::new(),
12                event_digest_value: Vec::new(),
13            }
14        }
15        #[doc(hidden)]
16        pub fn default_instance() -> &'static Self {
17            static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
18            &DEFAULT
19        }
20        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
22            self.address.as_mut().map(|field| field as _)
23        }
24        ///Returns a mutable reference to `address`.
25        ///If the field is unset, it is first initialized with the default value.
26        pub fn address_mut(&mut self) -> &mut String {
27            self.address.get_or_insert_default()
28        }
29        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
30        pub fn address_opt(&self) -> Option<&str> {
31            self.address.as_ref().map(|field| field as _)
32        }
33        ///Sets `address` with the provided value.
34        pub fn set_address<T: Into<String>>(&mut self, field: T) {
35            self.address = Some(field.into().into());
36        }
37        ///Sets `address` with the provided value.
38        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
39            self.set_address(field.into());
40            self
41        }
42        ///If `accumulator_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
43        pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
44            self.accumulator_type.as_mut().map(|field| field as _)
45        }
46        ///Returns a mutable reference to `accumulator_type`.
47        ///If the field is unset, it is first initialized with the default value.
48        pub fn accumulator_type_mut(&mut self) -> &mut String {
49            self.accumulator_type.get_or_insert_default()
50        }
51        ///If `accumulator_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
52        pub fn accumulator_type_opt(&self) -> Option<&str> {
53            self.accumulator_type.as_ref().map(|field| field as _)
54        }
55        ///Sets `accumulator_type` with the provided value.
56        pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
57            self.accumulator_type = Some(field.into().into());
58        }
59        ///Sets `accumulator_type` with the provided value.
60        pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
61            self.set_accumulator_type(field.into());
62            self
63        }
64        ///Sets `operation` with the provided value.
65        pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
66            mut self,
67            field: T,
68        ) -> Self {
69            self.set_operation(field.into());
70            self
71        }
72        ///Sets `value_kind` with the provided value.
73        pub fn with_value_kind<T: Into<super::accumulator_write::AccumulatorValue>>(
74            mut self,
75            field: T,
76        ) -> Self {
77            self.set_value_kind(field.into());
78            self
79        }
80        ///If `integer_value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
81        pub fn integer_value_opt_mut(&mut self) -> Option<&mut u64> {
82            self.integer_value.as_mut().map(|field| field as _)
83        }
84        ///Returns a mutable reference to `integer_value`.
85        ///If the field is unset, it is first initialized with the default value.
86        pub fn integer_value_mut(&mut self) -> &mut u64 {
87            self.integer_value.get_or_insert_default()
88        }
89        ///If `integer_value` is set, returns [`Some`] with the value; otherwise returns [`None`].
90        pub fn integer_value_opt(&self) -> Option<u64> {
91            self.integer_value.as_ref().map(|field| *field)
92        }
93        ///Sets `integer_value` with the provided value.
94        pub fn set_integer_value(&mut self, field: u64) {
95            self.integer_value = Some(field);
96        }
97        ///Sets `integer_value` with the provided value.
98        pub fn with_integer_value(mut self, field: u64) -> Self {
99            self.set_integer_value(field);
100            self
101        }
102        ///Returns the value of `integer_tuple`, or the default value if `integer_tuple` is unset.
103        pub fn integer_tuple(&self) -> &[u64] {
104            &self.integer_tuple
105        }
106        ///Returns a mutable reference to `integer_tuple`.
107        ///If the field is unset, it is first initialized with the default value.
108        pub fn integer_tuple_mut(&mut self) -> &mut Vec<u64> {
109            &mut self.integer_tuple
110        }
111        ///Sets `integer_tuple` with the provided value.
112        pub fn set_integer_tuple(&mut self, field: Vec<u64>) {
113            self.integer_tuple = field;
114        }
115        ///Sets `integer_tuple` with the provided value.
116        pub fn with_integer_tuple(mut self, field: Vec<u64>) -> Self {
117            self.set_integer_tuple(field);
118            self
119        }
120        ///Returns the value of `event_digest_value`, or the default value if `event_digest_value` is unset.
121        pub fn event_digest_value(&self) -> &[super::EventDigestEntry] {
122            &self.event_digest_value
123        }
124        ///Returns a mutable reference to `event_digest_value`.
125        ///If the field is unset, it is first initialized with the default value.
126        pub fn event_digest_value_mut(&mut self) -> &mut Vec<super::EventDigestEntry> {
127            &mut self.event_digest_value
128        }
129        ///Sets `event_digest_value` with the provided value.
130        pub fn set_event_digest_value(&mut self, field: Vec<super::EventDigestEntry>) {
131            self.event_digest_value = field;
132        }
133        ///Sets `event_digest_value` with the provided value.
134        pub fn with_event_digest_value(
135            mut self,
136            field: Vec<super::EventDigestEntry>,
137        ) -> Self {
138            self.set_event_digest_value(field);
139            self
140        }
141    }
142    impl super::ActiveJwk {
143        pub const fn const_default() -> Self {
144            Self {
145                id: None,
146                jwk: None,
147                epoch: None,
148            }
149        }
150        #[doc(hidden)]
151        pub fn default_instance() -> &'static Self {
152            static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
153            &DEFAULT
154        }
155        ///Returns the value of `id`, or the default value if `id` is unset.
156        pub fn id(&self) -> &super::JwkId {
157            self.id
158                .as_ref()
159                .map(|field| field as _)
160                .unwrap_or_else(|| super::JwkId::default_instance() as _)
161        }
162        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
163        pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
164            self.id.as_mut().map(|field| field as _)
165        }
166        ///Returns a mutable reference to `id`.
167        ///If the field is unset, it is first initialized with the default value.
168        pub fn id_mut(&mut self) -> &mut super::JwkId {
169            self.id.get_or_insert_default()
170        }
171        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
172        pub fn id_opt(&self) -> Option<&super::JwkId> {
173            self.id.as_ref().map(|field| field as _)
174        }
175        ///Sets `id` with the provided value.
176        pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
177            self.id = Some(field.into().into());
178        }
179        ///Sets `id` with the provided value.
180        pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
181            self.set_id(field.into());
182            self
183        }
184        ///Returns the value of `jwk`, or the default value if `jwk` is unset.
185        pub fn jwk(&self) -> &super::Jwk {
186            self.jwk
187                .as_ref()
188                .map(|field| field as _)
189                .unwrap_or_else(|| super::Jwk::default_instance() as _)
190        }
191        ///If `jwk` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
192        pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
193            self.jwk.as_mut().map(|field| field as _)
194        }
195        ///Returns a mutable reference to `jwk`.
196        ///If the field is unset, it is first initialized with the default value.
197        pub fn jwk_mut(&mut self) -> &mut super::Jwk {
198            self.jwk.get_or_insert_default()
199        }
200        ///If `jwk` is set, returns [`Some`] with the value; otherwise returns [`None`].
201        pub fn jwk_opt(&self) -> Option<&super::Jwk> {
202            self.jwk.as_ref().map(|field| field as _)
203        }
204        ///Sets `jwk` with the provided value.
205        pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
206            self.jwk = Some(field.into().into());
207        }
208        ///Sets `jwk` with the provided value.
209        pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
210            self.set_jwk(field.into());
211            self
212        }
213        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
214        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
215            self.epoch.as_mut().map(|field| field as _)
216        }
217        ///Returns a mutable reference to `epoch`.
218        ///If the field is unset, it is first initialized with the default value.
219        pub fn epoch_mut(&mut self) -> &mut u64 {
220            self.epoch.get_or_insert_default()
221        }
222        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
223        pub fn epoch_opt(&self) -> Option<u64> {
224            self.epoch.as_ref().map(|field| *field)
225        }
226        ///Sets `epoch` with the provided value.
227        pub fn set_epoch(&mut self, field: u64) {
228            self.epoch = Some(field);
229        }
230        ///Sets `epoch` with the provided value.
231        pub fn with_epoch(mut self, field: u64) -> Self {
232            self.set_epoch(field);
233            self
234        }
235    }
236    impl super::AddressAliasesVersion {
237        pub const fn const_default() -> Self {
238            Self { version: None }
239        }
240        #[doc(hidden)]
241        pub fn default_instance() -> &'static Self {
242            static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
243            &DEFAULT
244        }
245        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
246        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
247            self.version.as_mut().map(|field| field as _)
248        }
249        ///Returns a mutable reference to `version`.
250        ///If the field is unset, it is first initialized with the default value.
251        pub fn version_mut(&mut self) -> &mut u64 {
252            self.version.get_or_insert_default()
253        }
254        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
255        pub fn version_opt(&self) -> Option<u64> {
256            self.version.as_ref().map(|field| *field)
257        }
258        ///Sets `version` with the provided value.
259        pub fn set_version(&mut self, field: u64) {
260            self.version = Some(field);
261        }
262        ///Sets `version` with the provided value.
263        pub fn with_version(mut self, field: u64) -> Self {
264            self.set_version(field);
265            self
266        }
267    }
268    impl super::AffectedAddressFilter {
269        pub const fn const_default() -> Self {
270            Self { address: None }
271        }
272        #[doc(hidden)]
273        pub fn default_instance() -> &'static Self {
274            static DEFAULT: super::AffectedAddressFilter = super::AffectedAddressFilter::const_default();
275            &DEFAULT
276        }
277        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
278        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
279            self.address.as_mut().map(|field| field as _)
280        }
281        ///Returns a mutable reference to `address`.
282        ///If the field is unset, it is first initialized with the default value.
283        pub fn address_mut(&mut self) -> &mut String {
284            self.address.get_or_insert_default()
285        }
286        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
287        pub fn address_opt(&self) -> Option<&str> {
288            self.address.as_ref().map(|field| field as _)
289        }
290        ///Sets `address` with the provided value.
291        pub fn set_address<T: Into<String>>(&mut self, field: T) {
292            self.address = Some(field.into().into());
293        }
294        ///Sets `address` with the provided value.
295        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
296            self.set_address(field.into());
297            self
298        }
299    }
300    impl super::AffectedObjectFilter {
301        pub const fn const_default() -> Self {
302            Self { object_id: None }
303        }
304        #[doc(hidden)]
305        pub fn default_instance() -> &'static Self {
306            static DEFAULT: super::AffectedObjectFilter = super::AffectedObjectFilter::const_default();
307            &DEFAULT
308        }
309        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
310        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
311            self.object_id.as_mut().map(|field| field as _)
312        }
313        ///Returns a mutable reference to `object_id`.
314        ///If the field is unset, it is first initialized with the default value.
315        pub fn object_id_mut(&mut self) -> &mut String {
316            self.object_id.get_or_insert_default()
317        }
318        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
319        pub fn object_id_opt(&self) -> Option<&str> {
320            self.object_id.as_ref().map(|field| field as _)
321        }
322        ///Sets `object_id` with the provided value.
323        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
324            self.object_id = Some(field.into().into());
325        }
326        ///Sets `object_id` with the provided value.
327        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
328            self.set_object_id(field.into());
329            self
330        }
331    }
332    impl super::AllowedProposers {
333        pub const fn const_default() -> Self {
334            Self {
335                epoch: None,
336                proposers: Vec::new(),
337            }
338        }
339        #[doc(hidden)]
340        pub fn default_instance() -> &'static Self {
341            static DEFAULT: super::AllowedProposers = super::AllowedProposers::const_default();
342            &DEFAULT
343        }
344        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
345        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
346            self.epoch.as_mut().map(|field| field as _)
347        }
348        ///Returns a mutable reference to `epoch`.
349        ///If the field is unset, it is first initialized with the default value.
350        pub fn epoch_mut(&mut self) -> &mut u64 {
351            self.epoch.get_or_insert_default()
352        }
353        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
354        pub fn epoch_opt(&self) -> Option<u64> {
355            self.epoch.as_ref().map(|field| *field)
356        }
357        ///Sets `epoch` with the provided value.
358        pub fn set_epoch(&mut self, field: u64) {
359            self.epoch = Some(field);
360        }
361        ///Sets `epoch` with the provided value.
362        pub fn with_epoch(mut self, field: u64) -> Self {
363            self.set_epoch(field);
364            self
365        }
366        ///Returns the value of `proposers`, or the default value if `proposers` is unset.
367        pub fn proposers(&self) -> &[u32] {
368            &self.proposers
369        }
370        ///Returns a mutable reference to `proposers`.
371        ///If the field is unset, it is first initialized with the default value.
372        pub fn proposers_mut(&mut self) -> &mut Vec<u32> {
373            &mut self.proposers
374        }
375        ///Sets `proposers` with the provided value.
376        pub fn set_proposers(&mut self, field: Vec<u32>) {
377            self.proposers = field;
378        }
379        ///Sets `proposers` with the provided value.
380        pub fn with_proposers(mut self, field: Vec<u32>) -> Self {
381            self.set_proposers(field);
382            self
383        }
384    }
385    impl super::Argument {
386        pub const fn const_default() -> Self {
387            Self {
388                kind: None,
389                input: None,
390                result: None,
391                subresult: None,
392            }
393        }
394        #[doc(hidden)]
395        pub fn default_instance() -> &'static Self {
396            static DEFAULT: super::Argument = super::Argument::const_default();
397            &DEFAULT
398        }
399        ///Sets `kind` with the provided value.
400        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
401            mut self,
402            field: T,
403        ) -> Self {
404            self.set_kind(field.into());
405            self
406        }
407        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
408        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
409            self.input.as_mut().map(|field| field as _)
410        }
411        ///Returns a mutable reference to `input`.
412        ///If the field is unset, it is first initialized with the default value.
413        pub fn input_mut(&mut self) -> &mut u32 {
414            self.input.get_or_insert_default()
415        }
416        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
417        pub fn input_opt(&self) -> Option<u32> {
418            self.input.as_ref().map(|field| *field)
419        }
420        ///Sets `input` with the provided value.
421        pub fn set_input(&mut self, field: u32) {
422            self.input = Some(field);
423        }
424        ///Sets `input` with the provided value.
425        pub fn with_input(mut self, field: u32) -> Self {
426            self.set_input(field);
427            self
428        }
429        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
430        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
431            self.result.as_mut().map(|field| field as _)
432        }
433        ///Returns a mutable reference to `result`.
434        ///If the field is unset, it is first initialized with the default value.
435        pub fn result_mut(&mut self) -> &mut u32 {
436            self.result.get_or_insert_default()
437        }
438        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
439        pub fn result_opt(&self) -> Option<u32> {
440            self.result.as_ref().map(|field| *field)
441        }
442        ///Sets `result` with the provided value.
443        pub fn set_result(&mut self, field: u32) {
444            self.result = Some(field);
445        }
446        ///Sets `result` with the provided value.
447        pub fn with_result(mut self, field: u32) -> Self {
448            self.set_result(field);
449            self
450        }
451        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
452        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
453            self.subresult.as_mut().map(|field| field as _)
454        }
455        ///Returns a mutable reference to `subresult`.
456        ///If the field is unset, it is first initialized with the default value.
457        pub fn subresult_mut(&mut self) -> &mut u32 {
458            self.subresult.get_or_insert_default()
459        }
460        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
461        pub fn subresult_opt(&self) -> Option<u32> {
462            self.subresult.as_ref().map(|field| *field)
463        }
464        ///Sets `subresult` with the provided value.
465        pub fn set_subresult(&mut self, field: u32) {
466            self.subresult = Some(field);
467        }
468        ///Sets `subresult` with the provided value.
469        pub fn with_subresult(mut self, field: u32) -> Self {
470            self.set_subresult(field);
471            self
472        }
473    }
474    impl super::AuthenticatorStateExpire {
475        pub const fn const_default() -> Self {
476            Self {
477                min_epoch: None,
478                authenticator_object_initial_shared_version: None,
479            }
480        }
481        #[doc(hidden)]
482        pub fn default_instance() -> &'static Self {
483            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
484            &DEFAULT
485        }
486        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
487        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
488            self.min_epoch.as_mut().map(|field| field as _)
489        }
490        ///Returns a mutable reference to `min_epoch`.
491        ///If the field is unset, it is first initialized with the default value.
492        pub fn min_epoch_mut(&mut self) -> &mut u64 {
493            self.min_epoch.get_or_insert_default()
494        }
495        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
496        pub fn min_epoch_opt(&self) -> Option<u64> {
497            self.min_epoch.as_ref().map(|field| *field)
498        }
499        ///Sets `min_epoch` with the provided value.
500        pub fn set_min_epoch(&mut self, field: u64) {
501            self.min_epoch = Some(field);
502        }
503        ///Sets `min_epoch` with the provided value.
504        pub fn with_min_epoch(mut self, field: u64) -> Self {
505            self.set_min_epoch(field);
506            self
507        }
508        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
509        pub fn authenticator_object_initial_shared_version_opt_mut(
510            &mut self,
511        ) -> Option<&mut u64> {
512            self.authenticator_object_initial_shared_version
513                .as_mut()
514                .map(|field| field as _)
515        }
516        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
517        ///If the field is unset, it is first initialized with the default value.
518        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
519            self.authenticator_object_initial_shared_version.get_or_insert_default()
520        }
521        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
522        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
523            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
524        }
525        ///Sets `authenticator_object_initial_shared_version` with the provided value.
526        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
527            self.authenticator_object_initial_shared_version = Some(field);
528        }
529        ///Sets `authenticator_object_initial_shared_version` with the provided value.
530        pub fn with_authenticator_object_initial_shared_version(
531            mut self,
532            field: u64,
533        ) -> Self {
534            self.set_authenticator_object_initial_shared_version(field);
535            self
536        }
537    }
538    impl super::AuthenticatorStateUpdate {
539        pub const fn const_default() -> Self {
540            Self {
541                epoch: None,
542                round: None,
543                new_active_jwks: Vec::new(),
544                authenticator_object_initial_shared_version: None,
545            }
546        }
547        #[doc(hidden)]
548        pub fn default_instance() -> &'static Self {
549            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
550            &DEFAULT
551        }
552        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
553        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
554            self.epoch.as_mut().map(|field| field as _)
555        }
556        ///Returns a mutable reference to `epoch`.
557        ///If the field is unset, it is first initialized with the default value.
558        pub fn epoch_mut(&mut self) -> &mut u64 {
559            self.epoch.get_or_insert_default()
560        }
561        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
562        pub fn epoch_opt(&self) -> Option<u64> {
563            self.epoch.as_ref().map(|field| *field)
564        }
565        ///Sets `epoch` with the provided value.
566        pub fn set_epoch(&mut self, field: u64) {
567            self.epoch = Some(field);
568        }
569        ///Sets `epoch` with the provided value.
570        pub fn with_epoch(mut self, field: u64) -> Self {
571            self.set_epoch(field);
572            self
573        }
574        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
575        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
576            self.round.as_mut().map(|field| field as _)
577        }
578        ///Returns a mutable reference to `round`.
579        ///If the field is unset, it is first initialized with the default value.
580        pub fn round_mut(&mut self) -> &mut u64 {
581            self.round.get_or_insert_default()
582        }
583        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
584        pub fn round_opt(&self) -> Option<u64> {
585            self.round.as_ref().map(|field| *field)
586        }
587        ///Sets `round` with the provided value.
588        pub fn set_round(&mut self, field: u64) {
589            self.round = Some(field);
590        }
591        ///Sets `round` with the provided value.
592        pub fn with_round(mut self, field: u64) -> Self {
593            self.set_round(field);
594            self
595        }
596        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
597        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
598            &self.new_active_jwks
599        }
600        ///Returns a mutable reference to `new_active_jwks`.
601        ///If the field is unset, it is first initialized with the default value.
602        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
603            &mut self.new_active_jwks
604        }
605        ///Sets `new_active_jwks` with the provided value.
606        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
607            self.new_active_jwks = field;
608        }
609        ///Sets `new_active_jwks` with the provided value.
610        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
611            self.set_new_active_jwks(field);
612            self
613        }
614        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
615        pub fn authenticator_object_initial_shared_version_opt_mut(
616            &mut self,
617        ) -> Option<&mut u64> {
618            self.authenticator_object_initial_shared_version
619                .as_mut()
620                .map(|field| field as _)
621        }
622        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
623        ///If the field is unset, it is first initialized with the default value.
624        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
625            self.authenticator_object_initial_shared_version.get_or_insert_default()
626        }
627        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
628        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
629            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
630        }
631        ///Sets `authenticator_object_initial_shared_version` with the provided value.
632        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
633            self.authenticator_object_initial_shared_version = Some(field);
634        }
635        ///Sets `authenticator_object_initial_shared_version` with the provided value.
636        pub fn with_authenticator_object_initial_shared_version(
637            mut self,
638            field: u64,
639        ) -> Self {
640            self.set_authenticator_object_initial_shared_version(field);
641            self
642        }
643    }
644    impl super::Balance {
645        pub const fn const_default() -> Self {
646            Self {
647                coin_type: None,
648                balance: None,
649                address_balance: None,
650                coin_balance: None,
651            }
652        }
653        #[doc(hidden)]
654        pub fn default_instance() -> &'static Self {
655            static DEFAULT: super::Balance = super::Balance::const_default();
656            &DEFAULT
657        }
658        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
659        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
660            self.coin_type.as_mut().map(|field| field as _)
661        }
662        ///Returns a mutable reference to `coin_type`.
663        ///If the field is unset, it is first initialized with the default value.
664        pub fn coin_type_mut(&mut self) -> &mut String {
665            self.coin_type.get_or_insert_default()
666        }
667        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
668        pub fn coin_type_opt(&self) -> Option<&str> {
669            self.coin_type.as_ref().map(|field| field as _)
670        }
671        ///Sets `coin_type` with the provided value.
672        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
673            self.coin_type = Some(field.into().into());
674        }
675        ///Sets `coin_type` with the provided value.
676        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
677            self.set_coin_type(field.into());
678            self
679        }
680        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
681        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
682            self.balance.as_mut().map(|field| field as _)
683        }
684        ///Returns a mutable reference to `balance`.
685        ///If the field is unset, it is first initialized with the default value.
686        pub fn balance_mut(&mut self) -> &mut u64 {
687            self.balance.get_or_insert_default()
688        }
689        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
690        pub fn balance_opt(&self) -> Option<u64> {
691            self.balance.as_ref().map(|field| *field)
692        }
693        ///Sets `balance` with the provided value.
694        pub fn set_balance(&mut self, field: u64) {
695            self.balance = Some(field);
696        }
697        ///Sets `balance` with the provided value.
698        pub fn with_balance(mut self, field: u64) -> Self {
699            self.set_balance(field);
700            self
701        }
702        ///If `address_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
703        pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
704            self.address_balance.as_mut().map(|field| field as _)
705        }
706        ///Returns a mutable reference to `address_balance`.
707        ///If the field is unset, it is first initialized with the default value.
708        pub fn address_balance_mut(&mut self) -> &mut u64 {
709            self.address_balance.get_or_insert_default()
710        }
711        ///If `address_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
712        pub fn address_balance_opt(&self) -> Option<u64> {
713            self.address_balance.as_ref().map(|field| *field)
714        }
715        ///Sets `address_balance` with the provided value.
716        pub fn set_address_balance(&mut self, field: u64) {
717            self.address_balance = Some(field);
718        }
719        ///Sets `address_balance` with the provided value.
720        pub fn with_address_balance(mut self, field: u64) -> Self {
721            self.set_address_balance(field);
722            self
723        }
724        ///If `coin_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
725        pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
726            self.coin_balance.as_mut().map(|field| field as _)
727        }
728        ///Returns a mutable reference to `coin_balance`.
729        ///If the field is unset, it is first initialized with the default value.
730        pub fn coin_balance_mut(&mut self) -> &mut u64 {
731            self.coin_balance.get_or_insert_default()
732        }
733        ///If `coin_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
734        pub fn coin_balance_opt(&self) -> Option<u64> {
735            self.coin_balance.as_ref().map(|field| *field)
736        }
737        ///Sets `coin_balance` with the provided value.
738        pub fn set_coin_balance(&mut self, field: u64) {
739            self.coin_balance = Some(field);
740        }
741        ///Sets `coin_balance` with the provided value.
742        pub fn with_coin_balance(mut self, field: u64) -> Self {
743            self.set_coin_balance(field);
744            self
745        }
746    }
747    impl super::BalanceChange {
748        pub const fn const_default() -> Self {
749            Self {
750                address: None,
751                coin_type: None,
752                amount: None,
753            }
754        }
755        #[doc(hidden)]
756        pub fn default_instance() -> &'static Self {
757            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
758            &DEFAULT
759        }
760        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
761        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
762            self.address.as_mut().map(|field| field as _)
763        }
764        ///Returns a mutable reference to `address`.
765        ///If the field is unset, it is first initialized with the default value.
766        pub fn address_mut(&mut self) -> &mut String {
767            self.address.get_or_insert_default()
768        }
769        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
770        pub fn address_opt(&self) -> Option<&str> {
771            self.address.as_ref().map(|field| field as _)
772        }
773        ///Sets `address` with the provided value.
774        pub fn set_address<T: Into<String>>(&mut self, field: T) {
775            self.address = Some(field.into().into());
776        }
777        ///Sets `address` with the provided value.
778        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
779            self.set_address(field.into());
780            self
781        }
782        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
783        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
784            self.coin_type.as_mut().map(|field| field as _)
785        }
786        ///Returns a mutable reference to `coin_type`.
787        ///If the field is unset, it is first initialized with the default value.
788        pub fn coin_type_mut(&mut self) -> &mut String {
789            self.coin_type.get_or_insert_default()
790        }
791        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
792        pub fn coin_type_opt(&self) -> Option<&str> {
793            self.coin_type.as_ref().map(|field| field as _)
794        }
795        ///Sets `coin_type` with the provided value.
796        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
797            self.coin_type = Some(field.into().into());
798        }
799        ///Sets `coin_type` with the provided value.
800        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
801            self.set_coin_type(field.into());
802            self
803        }
804        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
805        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
806            self.amount.as_mut().map(|field| field as _)
807        }
808        ///Returns a mutable reference to `amount`.
809        ///If the field is unset, it is first initialized with the default value.
810        pub fn amount_mut(&mut self) -> &mut String {
811            self.amount.get_or_insert_default()
812        }
813        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
814        pub fn amount_opt(&self) -> Option<&str> {
815            self.amount.as_ref().map(|field| field as _)
816        }
817        ///Sets `amount` with the provided value.
818        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
819            self.amount = Some(field.into().into());
820        }
821        ///Sets `amount` with the provided value.
822        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
823            self.set_amount(field.into());
824            self
825        }
826    }
827    impl super::BatchGetObjectsRequest {
828        pub const fn const_default() -> Self {
829            Self {
830                requests: Vec::new(),
831                read_mask: None,
832            }
833        }
834        #[doc(hidden)]
835        pub fn default_instance() -> &'static Self {
836            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
837            &DEFAULT
838        }
839        ///Returns the value of `requests`, or the default value if `requests` is unset.
840        pub fn requests(&self) -> &[super::GetObjectRequest] {
841            &self.requests
842        }
843        ///Returns a mutable reference to `requests`.
844        ///If the field is unset, it is first initialized with the default value.
845        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
846            &mut self.requests
847        }
848        ///Sets `requests` with the provided value.
849        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
850            self.requests = field;
851        }
852        ///Sets `requests` with the provided value.
853        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
854            self.set_requests(field);
855            self
856        }
857        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
858        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
859            self.read_mask.as_mut().map(|field| field as _)
860        }
861        ///Returns a mutable reference to `read_mask`.
862        ///If the field is unset, it is first initialized with the default value.
863        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
864            self.read_mask.get_or_insert_default()
865        }
866        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
867        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
868            self.read_mask.as_ref().map(|field| field as _)
869        }
870        ///Sets `read_mask` with the provided value.
871        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
872            self.read_mask = Some(field.into().into());
873        }
874        ///Sets `read_mask` with the provided value.
875        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
876            mut self,
877            field: T,
878        ) -> Self {
879            self.set_read_mask(field.into());
880            self
881        }
882    }
883    impl super::BatchGetObjectsResponse {
884        pub const fn const_default() -> Self {
885            Self { objects: Vec::new() }
886        }
887        #[doc(hidden)]
888        pub fn default_instance() -> &'static Self {
889            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
890            &DEFAULT
891        }
892        ///Returns the value of `objects`, or the default value if `objects` is unset.
893        pub fn objects(&self) -> &[super::GetObjectResult] {
894            &self.objects
895        }
896        ///Returns a mutable reference to `objects`.
897        ///If the field is unset, it is first initialized with the default value.
898        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
899            &mut self.objects
900        }
901        ///Sets `objects` with the provided value.
902        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
903            self.objects = field;
904        }
905        ///Sets `objects` with the provided value.
906        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
907            self.set_objects(field);
908            self
909        }
910    }
911    impl super::BatchGetTransactionsRequest {
912        pub const fn const_default() -> Self {
913            Self {
914                digests: Vec::new(),
915                read_mask: None,
916            }
917        }
918        #[doc(hidden)]
919        pub fn default_instance() -> &'static Self {
920            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
921            &DEFAULT
922        }
923        ///Returns the value of `digests`, or the default value if `digests` is unset.
924        pub fn digests(&self) -> &[String] {
925            &self.digests
926        }
927        ///Returns a mutable reference to `digests`.
928        ///If the field is unset, it is first initialized with the default value.
929        pub fn digests_mut(&mut self) -> &mut Vec<String> {
930            &mut self.digests
931        }
932        ///Sets `digests` with the provided value.
933        pub fn set_digests(&mut self, field: Vec<String>) {
934            self.digests = field;
935        }
936        ///Sets `digests` with the provided value.
937        pub fn with_digests(mut self, field: Vec<String>) -> Self {
938            self.set_digests(field);
939            self
940        }
941        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
942        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
943            self.read_mask.as_mut().map(|field| field as _)
944        }
945        ///Returns a mutable reference to `read_mask`.
946        ///If the field is unset, it is first initialized with the default value.
947        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
948            self.read_mask.get_or_insert_default()
949        }
950        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
951        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
952            self.read_mask.as_ref().map(|field| field as _)
953        }
954        ///Sets `read_mask` with the provided value.
955        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
956            self.read_mask = Some(field.into().into());
957        }
958        ///Sets `read_mask` with the provided value.
959        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
960            mut self,
961            field: T,
962        ) -> Self {
963            self.set_read_mask(field.into());
964            self
965        }
966    }
967    impl super::BatchGetTransactionsResponse {
968        pub const fn const_default() -> Self {
969            Self { transactions: Vec::new() }
970        }
971        #[doc(hidden)]
972        pub fn default_instance() -> &'static Self {
973            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
974            &DEFAULT
975        }
976        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
977        pub fn transactions(&self) -> &[super::GetTransactionResult] {
978            &self.transactions
979        }
980        ///Returns a mutable reference to `transactions`.
981        ///If the field is unset, it is first initialized with the default value.
982        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
983            &mut self.transactions
984        }
985        ///Sets `transactions` with the provided value.
986        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
987            self.transactions = field;
988        }
989        ///Sets `transactions` with the provided value.
990        pub fn with_transactions(
991            mut self,
992            field: Vec<super::GetTransactionResult>,
993        ) -> Self {
994            self.set_transactions(field);
995            self
996        }
997    }
998    impl super::Bcs {
999        pub const fn const_default() -> Self {
1000            Self { name: None, value: None }
1001        }
1002        #[doc(hidden)]
1003        pub fn default_instance() -> &'static Self {
1004            static DEFAULT: super::Bcs = super::Bcs::const_default();
1005            &DEFAULT
1006        }
1007        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1008        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
1009            self.name.as_mut().map(|field| field as _)
1010        }
1011        ///Returns a mutable reference to `name`.
1012        ///If the field is unset, it is first initialized with the default value.
1013        pub fn name_mut(&mut self) -> &mut String {
1014            self.name.get_or_insert_default()
1015        }
1016        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
1017        pub fn name_opt(&self) -> Option<&str> {
1018            self.name.as_ref().map(|field| field as _)
1019        }
1020        ///Sets `name` with the provided value.
1021        pub fn set_name<T: Into<String>>(&mut self, field: T) {
1022            self.name = Some(field.into().into());
1023        }
1024        ///Sets `name` with the provided value.
1025        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
1026            self.set_name(field.into());
1027            self
1028        }
1029        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
1030        pub fn value_opt(&self) -> Option<&[u8]> {
1031            self.value.as_ref().map(|field| field as _)
1032        }
1033        ///Sets `value` with the provided value.
1034        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
1035            self.value = Some(field.into().into());
1036        }
1037        ///Sets `value` with the provided value.
1038        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
1039            self.set_value(field.into());
1040            self
1041        }
1042    }
1043    impl super::CanceledTransaction {
1044        pub const fn const_default() -> Self {
1045            Self {
1046                digest: None,
1047                version_assignments: Vec::new(),
1048            }
1049        }
1050        #[doc(hidden)]
1051        pub fn default_instance() -> &'static Self {
1052            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
1053            &DEFAULT
1054        }
1055        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1056        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1057            self.digest.as_mut().map(|field| field as _)
1058        }
1059        ///Returns a mutable reference to `digest`.
1060        ///If the field is unset, it is first initialized with the default value.
1061        pub fn digest_mut(&mut self) -> &mut String {
1062            self.digest.get_or_insert_default()
1063        }
1064        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1065        pub fn digest_opt(&self) -> Option<&str> {
1066            self.digest.as_ref().map(|field| field as _)
1067        }
1068        ///Sets `digest` with the provided value.
1069        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1070            self.digest = Some(field.into().into());
1071        }
1072        ///Sets `digest` with the provided value.
1073        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1074            self.set_digest(field.into());
1075            self
1076        }
1077        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
1078        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
1079            &self.version_assignments
1080        }
1081        ///Returns a mutable reference to `version_assignments`.
1082        ///If the field is unset, it is first initialized with the default value.
1083        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
1084            &mut self.version_assignments
1085        }
1086        ///Sets `version_assignments` with the provided value.
1087        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
1088            self.version_assignments = field;
1089        }
1090        ///Sets `version_assignments` with the provided value.
1091        pub fn with_version_assignments(
1092            mut self,
1093            field: Vec<super::VersionAssignment>,
1094        ) -> Self {
1095            self.set_version_assignments(field);
1096            self
1097        }
1098    }
1099    impl super::ChangeEpoch {
1100        pub const fn const_default() -> Self {
1101            Self {
1102                epoch: None,
1103                protocol_version: None,
1104                storage_charge: None,
1105                computation_charge: None,
1106                storage_rebate: None,
1107                non_refundable_storage_fee: None,
1108                epoch_start_timestamp: None,
1109                system_packages: Vec::new(),
1110            }
1111        }
1112        #[doc(hidden)]
1113        pub fn default_instance() -> &'static Self {
1114            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
1115            &DEFAULT
1116        }
1117        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1118        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1119            self.epoch.as_mut().map(|field| field as _)
1120        }
1121        ///Returns a mutable reference to `epoch`.
1122        ///If the field is unset, it is first initialized with the default value.
1123        pub fn epoch_mut(&mut self) -> &mut u64 {
1124            self.epoch.get_or_insert_default()
1125        }
1126        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1127        pub fn epoch_opt(&self) -> Option<u64> {
1128            self.epoch.as_ref().map(|field| *field)
1129        }
1130        ///Sets `epoch` with the provided value.
1131        pub fn set_epoch(&mut self, field: u64) {
1132            self.epoch = Some(field);
1133        }
1134        ///Sets `epoch` with the provided value.
1135        pub fn with_epoch(mut self, field: u64) -> Self {
1136            self.set_epoch(field);
1137            self
1138        }
1139        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1140        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1141            self.protocol_version.as_mut().map(|field| field as _)
1142        }
1143        ///Returns a mutable reference to `protocol_version`.
1144        ///If the field is unset, it is first initialized with the default value.
1145        pub fn protocol_version_mut(&mut self) -> &mut u64 {
1146            self.protocol_version.get_or_insert_default()
1147        }
1148        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1149        pub fn protocol_version_opt(&self) -> Option<u64> {
1150            self.protocol_version.as_ref().map(|field| *field)
1151        }
1152        ///Sets `protocol_version` with the provided value.
1153        pub fn set_protocol_version(&mut self, field: u64) {
1154            self.protocol_version = Some(field);
1155        }
1156        ///Sets `protocol_version` with the provided value.
1157        pub fn with_protocol_version(mut self, field: u64) -> Self {
1158            self.set_protocol_version(field);
1159            self
1160        }
1161        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1162        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1163            self.storage_charge.as_mut().map(|field| field as _)
1164        }
1165        ///Returns a mutable reference to `storage_charge`.
1166        ///If the field is unset, it is first initialized with the default value.
1167        pub fn storage_charge_mut(&mut self) -> &mut u64 {
1168            self.storage_charge.get_or_insert_default()
1169        }
1170        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1171        pub fn storage_charge_opt(&self) -> Option<u64> {
1172            self.storage_charge.as_ref().map(|field| *field)
1173        }
1174        ///Sets `storage_charge` with the provided value.
1175        pub fn set_storage_charge(&mut self, field: u64) {
1176            self.storage_charge = Some(field);
1177        }
1178        ///Sets `storage_charge` with the provided value.
1179        pub fn with_storage_charge(mut self, field: u64) -> Self {
1180            self.set_storage_charge(field);
1181            self
1182        }
1183        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1184        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1185            self.computation_charge.as_mut().map(|field| field as _)
1186        }
1187        ///Returns a mutable reference to `computation_charge`.
1188        ///If the field is unset, it is first initialized with the default value.
1189        pub fn computation_charge_mut(&mut self) -> &mut u64 {
1190            self.computation_charge.get_or_insert_default()
1191        }
1192        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
1193        pub fn computation_charge_opt(&self) -> Option<u64> {
1194            self.computation_charge.as_ref().map(|field| *field)
1195        }
1196        ///Sets `computation_charge` with the provided value.
1197        pub fn set_computation_charge(&mut self, field: u64) {
1198            self.computation_charge = Some(field);
1199        }
1200        ///Sets `computation_charge` with the provided value.
1201        pub fn with_computation_charge(mut self, field: u64) -> Self {
1202            self.set_computation_charge(field);
1203            self
1204        }
1205        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1206        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1207            self.storage_rebate.as_mut().map(|field| field as _)
1208        }
1209        ///Returns a mutable reference to `storage_rebate`.
1210        ///If the field is unset, it is first initialized with the default value.
1211        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1212            self.storage_rebate.get_or_insert_default()
1213        }
1214        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
1215        pub fn storage_rebate_opt(&self) -> Option<u64> {
1216            self.storage_rebate.as_ref().map(|field| *field)
1217        }
1218        ///Sets `storage_rebate` with the provided value.
1219        pub fn set_storage_rebate(&mut self, field: u64) {
1220            self.storage_rebate = Some(field);
1221        }
1222        ///Sets `storage_rebate` with the provided value.
1223        pub fn with_storage_rebate(mut self, field: u64) -> Self {
1224            self.set_storage_rebate(field);
1225            self
1226        }
1227        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1228        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1229            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1230        }
1231        ///Returns a mutable reference to `non_refundable_storage_fee`.
1232        ///If the field is unset, it is first initialized with the default value.
1233        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1234            self.non_refundable_storage_fee.get_or_insert_default()
1235        }
1236        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
1237        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1238            self.non_refundable_storage_fee.as_ref().map(|field| *field)
1239        }
1240        ///Sets `non_refundable_storage_fee` with the provided value.
1241        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1242            self.non_refundable_storage_fee = Some(field);
1243        }
1244        ///Sets `non_refundable_storage_fee` with the provided value.
1245        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1246            self.set_non_refundable_storage_fee(field);
1247            self
1248        }
1249        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1250        pub fn epoch_start_timestamp_opt_mut(
1251            &mut self,
1252        ) -> Option<&mut ::prost_types::Timestamp> {
1253            self.epoch_start_timestamp.as_mut().map(|field| field as _)
1254        }
1255        ///Returns a mutable reference to `epoch_start_timestamp`.
1256        ///If the field is unset, it is first initialized with the default value.
1257        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1258            self.epoch_start_timestamp.get_or_insert_default()
1259        }
1260        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1261        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1262            self.epoch_start_timestamp.as_ref().map(|field| field as _)
1263        }
1264        ///Sets `epoch_start_timestamp` with the provided value.
1265        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1266            &mut self,
1267            field: T,
1268        ) {
1269            self.epoch_start_timestamp = Some(field.into().into());
1270        }
1271        ///Sets `epoch_start_timestamp` with the provided value.
1272        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1273            mut self,
1274            field: T,
1275        ) -> Self {
1276            self.set_epoch_start_timestamp(field.into());
1277            self
1278        }
1279        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
1280        pub fn system_packages(&self) -> &[super::SystemPackage] {
1281            &self.system_packages
1282        }
1283        ///Returns a mutable reference to `system_packages`.
1284        ///If the field is unset, it is first initialized with the default value.
1285        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1286            &mut self.system_packages
1287        }
1288        ///Sets `system_packages` with the provided value.
1289        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1290            self.system_packages = field;
1291        }
1292        ///Sets `system_packages` with the provided value.
1293        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1294            self.set_system_packages(field);
1295            self
1296        }
1297    }
1298    impl super::ChangedObject {
1299        pub const fn const_default() -> Self {
1300            Self {
1301                object_id: None,
1302                input_state: None,
1303                input_version: None,
1304                input_digest: None,
1305                input_owner: None,
1306                output_state: None,
1307                output_version: None,
1308                output_digest: None,
1309                output_owner: None,
1310                accumulator_write: None,
1311                id_operation: None,
1312                object_type: None,
1313            }
1314        }
1315        #[doc(hidden)]
1316        pub fn default_instance() -> &'static Self {
1317            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1318            &DEFAULT
1319        }
1320        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1321        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1322            self.object_id.as_mut().map(|field| field as _)
1323        }
1324        ///Returns a mutable reference to `object_id`.
1325        ///If the field is unset, it is first initialized with the default value.
1326        pub fn object_id_mut(&mut self) -> &mut String {
1327            self.object_id.get_or_insert_default()
1328        }
1329        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1330        pub fn object_id_opt(&self) -> Option<&str> {
1331            self.object_id.as_ref().map(|field| field as _)
1332        }
1333        ///Sets `object_id` with the provided value.
1334        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1335            self.object_id = Some(field.into().into());
1336        }
1337        ///Sets `object_id` with the provided value.
1338        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1339            self.set_object_id(field.into());
1340            self
1341        }
1342        ///Sets `input_state` with the provided value.
1343        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1344            mut self,
1345            field: T,
1346        ) -> Self {
1347            self.set_input_state(field.into());
1348            self
1349        }
1350        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1351        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1352            self.input_version.as_mut().map(|field| field as _)
1353        }
1354        ///Returns a mutable reference to `input_version`.
1355        ///If the field is unset, it is first initialized with the default value.
1356        pub fn input_version_mut(&mut self) -> &mut u64 {
1357            self.input_version.get_or_insert_default()
1358        }
1359        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1360        pub fn input_version_opt(&self) -> Option<u64> {
1361            self.input_version.as_ref().map(|field| *field)
1362        }
1363        ///Sets `input_version` with the provided value.
1364        pub fn set_input_version(&mut self, field: u64) {
1365            self.input_version = Some(field);
1366        }
1367        ///Sets `input_version` with the provided value.
1368        pub fn with_input_version(mut self, field: u64) -> Self {
1369            self.set_input_version(field);
1370            self
1371        }
1372        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1373        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1374            self.input_digest.as_mut().map(|field| field as _)
1375        }
1376        ///Returns a mutable reference to `input_digest`.
1377        ///If the field is unset, it is first initialized with the default value.
1378        pub fn input_digest_mut(&mut self) -> &mut String {
1379            self.input_digest.get_or_insert_default()
1380        }
1381        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1382        pub fn input_digest_opt(&self) -> Option<&str> {
1383            self.input_digest.as_ref().map(|field| field as _)
1384        }
1385        ///Sets `input_digest` with the provided value.
1386        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1387            self.input_digest = Some(field.into().into());
1388        }
1389        ///Sets `input_digest` with the provided value.
1390        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1391            self.set_input_digest(field.into());
1392            self
1393        }
1394        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1395        pub fn input_owner(&self) -> &super::Owner {
1396            self.input_owner
1397                .as_ref()
1398                .map(|field| field as _)
1399                .unwrap_or_else(|| super::Owner::default_instance() as _)
1400        }
1401        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1402        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1403            self.input_owner.as_mut().map(|field| field as _)
1404        }
1405        ///Returns a mutable reference to `input_owner`.
1406        ///If the field is unset, it is first initialized with the default value.
1407        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1408            self.input_owner.get_or_insert_default()
1409        }
1410        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1411        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1412            self.input_owner.as_ref().map(|field| field as _)
1413        }
1414        ///Sets `input_owner` with the provided value.
1415        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1416            self.input_owner = Some(field.into().into());
1417        }
1418        ///Sets `input_owner` with the provided value.
1419        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1420            self.set_input_owner(field.into());
1421            self
1422        }
1423        ///Sets `output_state` with the provided value.
1424        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1425            mut self,
1426            field: T,
1427        ) -> Self {
1428            self.set_output_state(field.into());
1429            self
1430        }
1431        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1432        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1433            self.output_version.as_mut().map(|field| field as _)
1434        }
1435        ///Returns a mutable reference to `output_version`.
1436        ///If the field is unset, it is first initialized with the default value.
1437        pub fn output_version_mut(&mut self) -> &mut u64 {
1438            self.output_version.get_or_insert_default()
1439        }
1440        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1441        pub fn output_version_opt(&self) -> Option<u64> {
1442            self.output_version.as_ref().map(|field| *field)
1443        }
1444        ///Sets `output_version` with the provided value.
1445        pub fn set_output_version(&mut self, field: u64) {
1446            self.output_version = Some(field);
1447        }
1448        ///Sets `output_version` with the provided value.
1449        pub fn with_output_version(mut self, field: u64) -> Self {
1450            self.set_output_version(field);
1451            self
1452        }
1453        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1454        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1455            self.output_digest.as_mut().map(|field| field as _)
1456        }
1457        ///Returns a mutable reference to `output_digest`.
1458        ///If the field is unset, it is first initialized with the default value.
1459        pub fn output_digest_mut(&mut self) -> &mut String {
1460            self.output_digest.get_or_insert_default()
1461        }
1462        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1463        pub fn output_digest_opt(&self) -> Option<&str> {
1464            self.output_digest.as_ref().map(|field| field as _)
1465        }
1466        ///Sets `output_digest` with the provided value.
1467        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1468            self.output_digest = Some(field.into().into());
1469        }
1470        ///Sets `output_digest` with the provided value.
1471        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1472            self.set_output_digest(field.into());
1473            self
1474        }
1475        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1476        pub fn output_owner(&self) -> &super::Owner {
1477            self.output_owner
1478                .as_ref()
1479                .map(|field| field as _)
1480                .unwrap_or_else(|| super::Owner::default_instance() as _)
1481        }
1482        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1483        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1484            self.output_owner.as_mut().map(|field| field as _)
1485        }
1486        ///Returns a mutable reference to `output_owner`.
1487        ///If the field is unset, it is first initialized with the default value.
1488        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1489            self.output_owner.get_or_insert_default()
1490        }
1491        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1492        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1493            self.output_owner.as_ref().map(|field| field as _)
1494        }
1495        ///Sets `output_owner` with the provided value.
1496        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1497            self.output_owner = Some(field.into().into());
1498        }
1499        ///Sets `output_owner` with the provided value.
1500        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1501            self.set_output_owner(field.into());
1502            self
1503        }
1504        ///Returns the value of `accumulator_write`, or the default value if `accumulator_write` is unset.
1505        pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1506            self.accumulator_write
1507                .as_ref()
1508                .map(|field| field as _)
1509                .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1510        }
1511        ///If `accumulator_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1512        pub fn accumulator_write_opt_mut(
1513            &mut self,
1514        ) -> Option<&mut super::AccumulatorWrite> {
1515            self.accumulator_write.as_mut().map(|field| field as _)
1516        }
1517        ///Returns a mutable reference to `accumulator_write`.
1518        ///If the field is unset, it is first initialized with the default value.
1519        pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1520            self.accumulator_write.get_or_insert_default()
1521        }
1522        ///If `accumulator_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
1523        pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1524            self.accumulator_write.as_ref().map(|field| field as _)
1525        }
1526        ///Sets `accumulator_write` with the provided value.
1527        pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1528            &mut self,
1529            field: T,
1530        ) {
1531            self.accumulator_write = Some(field.into().into());
1532        }
1533        ///Sets `accumulator_write` with the provided value.
1534        pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1535            mut self,
1536            field: T,
1537        ) -> Self {
1538            self.set_accumulator_write(field.into());
1539            self
1540        }
1541        ///Sets `id_operation` with the provided value.
1542        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1543            mut self,
1544            field: T,
1545        ) -> Self {
1546            self.set_id_operation(field.into());
1547            self
1548        }
1549        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1550        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1551            self.object_type.as_mut().map(|field| field as _)
1552        }
1553        ///Returns a mutable reference to `object_type`.
1554        ///If the field is unset, it is first initialized with the default value.
1555        pub fn object_type_mut(&mut self) -> &mut String {
1556            self.object_type.get_or_insert_default()
1557        }
1558        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1559        pub fn object_type_opt(&self) -> Option<&str> {
1560            self.object_type.as_ref().map(|field| field as _)
1561        }
1562        ///Sets `object_type` with the provided value.
1563        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1564            self.object_type = Some(field.into().into());
1565        }
1566        ///Sets `object_type` with the provided value.
1567        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1568            self.set_object_type(field.into());
1569            self
1570        }
1571    }
1572    impl super::Checkpoint {
1573        pub const fn const_default() -> Self {
1574            Self {
1575                sequence_number: None,
1576                digest: None,
1577                summary: None,
1578                signature: None,
1579                contents: None,
1580                transactions: Vec::new(),
1581                objects: None,
1582            }
1583        }
1584        #[doc(hidden)]
1585        pub fn default_instance() -> &'static Self {
1586            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1587            &DEFAULT
1588        }
1589        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1590        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1591            self.sequence_number.as_mut().map(|field| field as _)
1592        }
1593        ///Returns a mutable reference to `sequence_number`.
1594        ///If the field is unset, it is first initialized with the default value.
1595        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1596            self.sequence_number.get_or_insert_default()
1597        }
1598        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1599        pub fn sequence_number_opt(&self) -> Option<u64> {
1600            self.sequence_number.as_ref().map(|field| *field)
1601        }
1602        ///Sets `sequence_number` with the provided value.
1603        pub fn set_sequence_number(&mut self, field: u64) {
1604            self.sequence_number = Some(field);
1605        }
1606        ///Sets `sequence_number` with the provided value.
1607        pub fn with_sequence_number(mut self, field: u64) -> Self {
1608            self.set_sequence_number(field);
1609            self
1610        }
1611        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1612        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1613            self.digest.as_mut().map(|field| field as _)
1614        }
1615        ///Returns a mutable reference to `digest`.
1616        ///If the field is unset, it is first initialized with the default value.
1617        pub fn digest_mut(&mut self) -> &mut String {
1618            self.digest.get_or_insert_default()
1619        }
1620        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1621        pub fn digest_opt(&self) -> Option<&str> {
1622            self.digest.as_ref().map(|field| field as _)
1623        }
1624        ///Sets `digest` with the provided value.
1625        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1626            self.digest = Some(field.into().into());
1627        }
1628        ///Sets `digest` with the provided value.
1629        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1630            self.set_digest(field.into());
1631            self
1632        }
1633        ///Returns the value of `summary`, or the default value if `summary` is unset.
1634        pub fn summary(&self) -> &super::CheckpointSummary {
1635            self.summary
1636                .as_ref()
1637                .map(|field| field as _)
1638                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1639        }
1640        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1641        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1642            self.summary.as_mut().map(|field| field as _)
1643        }
1644        ///Returns a mutable reference to `summary`.
1645        ///If the field is unset, it is first initialized with the default value.
1646        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1647            self.summary.get_or_insert_default()
1648        }
1649        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1650        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1651            self.summary.as_ref().map(|field| field as _)
1652        }
1653        ///Sets `summary` with the provided value.
1654        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1655            self.summary = Some(field.into().into());
1656        }
1657        ///Sets `summary` with the provided value.
1658        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1659            mut self,
1660            field: T,
1661        ) -> Self {
1662            self.set_summary(field.into());
1663            self
1664        }
1665        ///Returns the value of `signature`, or the default value if `signature` is unset.
1666        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1667            self.signature
1668                .as_ref()
1669                .map(|field| field as _)
1670                .unwrap_or_else(|| {
1671                    super::ValidatorAggregatedSignature::default_instance() as _
1672                })
1673        }
1674        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1675        pub fn signature_opt_mut(
1676            &mut self,
1677        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1678            self.signature.as_mut().map(|field| field as _)
1679        }
1680        ///Returns a mutable reference to `signature`.
1681        ///If the field is unset, it is first initialized with the default value.
1682        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1683            self.signature.get_or_insert_default()
1684        }
1685        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1686        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1687            self.signature.as_ref().map(|field| field as _)
1688        }
1689        ///Sets `signature` with the provided value.
1690        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1691            &mut self,
1692            field: T,
1693        ) {
1694            self.signature = Some(field.into().into());
1695        }
1696        ///Sets `signature` with the provided value.
1697        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1698            mut self,
1699            field: T,
1700        ) -> Self {
1701            self.set_signature(field.into());
1702            self
1703        }
1704        ///Returns the value of `contents`, or the default value if `contents` is unset.
1705        pub fn contents(&self) -> &super::CheckpointContents {
1706            self.contents
1707                .as_ref()
1708                .map(|field| field as _)
1709                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1710        }
1711        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1712        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1713            self.contents.as_mut().map(|field| field as _)
1714        }
1715        ///Returns a mutable reference to `contents`.
1716        ///If the field is unset, it is first initialized with the default value.
1717        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1718            self.contents.get_or_insert_default()
1719        }
1720        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1721        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1722            self.contents.as_ref().map(|field| field as _)
1723        }
1724        ///Sets `contents` with the provided value.
1725        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1726            self.contents = Some(field.into().into());
1727        }
1728        ///Sets `contents` with the provided value.
1729        pub fn with_contents<T: Into<super::CheckpointContents>>(
1730            mut self,
1731            field: T,
1732        ) -> Self {
1733            self.set_contents(field.into());
1734            self
1735        }
1736        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1737        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1738            &self.transactions
1739        }
1740        ///Returns a mutable reference to `transactions`.
1741        ///If the field is unset, it is first initialized with the default value.
1742        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1743            &mut self.transactions
1744        }
1745        ///Sets `transactions` with the provided value.
1746        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1747            self.transactions = field;
1748        }
1749        ///Sets `transactions` with the provided value.
1750        pub fn with_transactions(
1751            mut self,
1752            field: Vec<super::ExecutedTransaction>,
1753        ) -> Self {
1754            self.set_transactions(field);
1755            self
1756        }
1757        ///Returns the value of `objects`, or the default value if `objects` is unset.
1758        pub fn objects(&self) -> &super::ObjectSet {
1759            self.objects
1760                .as_ref()
1761                .map(|field| field as _)
1762                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1763        }
1764        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1765        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1766            self.objects.as_mut().map(|field| field as _)
1767        }
1768        ///Returns a mutable reference to `objects`.
1769        ///If the field is unset, it is first initialized with the default value.
1770        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1771            self.objects.get_or_insert_default()
1772        }
1773        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1774        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1775            self.objects.as_ref().map(|field| field as _)
1776        }
1777        ///Sets `objects` with the provided value.
1778        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1779            self.objects = Some(field.into().into());
1780        }
1781        ///Sets `objects` with the provided value.
1782        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1783            self.set_objects(field.into());
1784            self
1785        }
1786    }
1787    impl super::CheckpointCommitment {
1788        pub const fn const_default() -> Self {
1789            Self { kind: None, digest: None }
1790        }
1791        #[doc(hidden)]
1792        pub fn default_instance() -> &'static Self {
1793            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1794            &DEFAULT
1795        }
1796        ///Sets `kind` with the provided value.
1797        pub fn with_kind<
1798            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1799        >(mut self, field: T) -> Self {
1800            self.set_kind(field.into());
1801            self
1802        }
1803        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1804        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1805            self.digest.as_mut().map(|field| field as _)
1806        }
1807        ///Returns a mutable reference to `digest`.
1808        ///If the field is unset, it is first initialized with the default value.
1809        pub fn digest_mut(&mut self) -> &mut String {
1810            self.digest.get_or_insert_default()
1811        }
1812        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1813        pub fn digest_opt(&self) -> Option<&str> {
1814            self.digest.as_ref().map(|field| field as _)
1815        }
1816        ///Sets `digest` with the provided value.
1817        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1818            self.digest = Some(field.into().into());
1819        }
1820        ///Sets `digest` with the provided value.
1821        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1822            self.set_digest(field.into());
1823            self
1824        }
1825    }
1826    impl super::CheckpointContents {
1827        pub const fn const_default() -> Self {
1828            Self {
1829                bcs: None,
1830                digest: None,
1831                version: None,
1832                transactions: Vec::new(),
1833            }
1834        }
1835        #[doc(hidden)]
1836        pub fn default_instance() -> &'static Self {
1837            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1838            &DEFAULT
1839        }
1840        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1841        pub fn bcs(&self) -> &super::Bcs {
1842            self.bcs
1843                .as_ref()
1844                .map(|field| field as _)
1845                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1846        }
1847        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1848        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1849            self.bcs.as_mut().map(|field| field as _)
1850        }
1851        ///Returns a mutable reference to `bcs`.
1852        ///If the field is unset, it is first initialized with the default value.
1853        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1854            self.bcs.get_or_insert_default()
1855        }
1856        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1857        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1858            self.bcs.as_ref().map(|field| field as _)
1859        }
1860        ///Sets `bcs` with the provided value.
1861        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1862            self.bcs = Some(field.into().into());
1863        }
1864        ///Sets `bcs` with the provided value.
1865        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1866            self.set_bcs(field.into());
1867            self
1868        }
1869        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1870        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1871            self.digest.as_mut().map(|field| field as _)
1872        }
1873        ///Returns a mutable reference to `digest`.
1874        ///If the field is unset, it is first initialized with the default value.
1875        pub fn digest_mut(&mut self) -> &mut String {
1876            self.digest.get_or_insert_default()
1877        }
1878        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1879        pub fn digest_opt(&self) -> Option<&str> {
1880            self.digest.as_ref().map(|field| field as _)
1881        }
1882        ///Sets `digest` with the provided value.
1883        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1884            self.digest = Some(field.into().into());
1885        }
1886        ///Sets `digest` with the provided value.
1887        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1888            self.set_digest(field.into());
1889            self
1890        }
1891        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1892        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1893            self.version.as_mut().map(|field| field as _)
1894        }
1895        ///Returns a mutable reference to `version`.
1896        ///If the field is unset, it is first initialized with the default value.
1897        pub fn version_mut(&mut self) -> &mut i32 {
1898            self.version.get_or_insert_default()
1899        }
1900        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1901        pub fn version_opt(&self) -> Option<i32> {
1902            self.version.as_ref().map(|field| *field)
1903        }
1904        ///Sets `version` with the provided value.
1905        pub fn set_version(&mut self, field: i32) {
1906            self.version = Some(field);
1907        }
1908        ///Sets `version` with the provided value.
1909        pub fn with_version(mut self, field: i32) -> Self {
1910            self.set_version(field);
1911            self
1912        }
1913        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1914        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1915            &self.transactions
1916        }
1917        ///Returns a mutable reference to `transactions`.
1918        ///If the field is unset, it is first initialized with the default value.
1919        pub fn transactions_mut(
1920            &mut self,
1921        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1922            &mut self.transactions
1923        }
1924        ///Sets `transactions` with the provided value.
1925        pub fn set_transactions(
1926            &mut self,
1927            field: Vec<super::CheckpointedTransactionInfo>,
1928        ) {
1929            self.transactions = field;
1930        }
1931        ///Sets `transactions` with the provided value.
1932        pub fn with_transactions(
1933            mut self,
1934            field: Vec<super::CheckpointedTransactionInfo>,
1935        ) -> Self {
1936            self.set_transactions(field);
1937            self
1938        }
1939    }
1940    impl super::CheckpointSummary {
1941        pub const fn const_default() -> Self {
1942            Self {
1943                bcs: None,
1944                digest: None,
1945                epoch: None,
1946                sequence_number: None,
1947                total_network_transactions: None,
1948                content_digest: None,
1949                previous_digest: None,
1950                epoch_rolling_gas_cost_summary: None,
1951                timestamp: None,
1952                commitments: Vec::new(),
1953                end_of_epoch_data: None,
1954                version_specific_data: None,
1955            }
1956        }
1957        #[doc(hidden)]
1958        pub fn default_instance() -> &'static Self {
1959            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1960            &DEFAULT
1961        }
1962        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1963        pub fn bcs(&self) -> &super::Bcs {
1964            self.bcs
1965                .as_ref()
1966                .map(|field| field as _)
1967                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1968        }
1969        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1970        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1971            self.bcs.as_mut().map(|field| field as _)
1972        }
1973        ///Returns a mutable reference to `bcs`.
1974        ///If the field is unset, it is first initialized with the default value.
1975        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1976            self.bcs.get_or_insert_default()
1977        }
1978        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1979        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1980            self.bcs.as_ref().map(|field| field as _)
1981        }
1982        ///Sets `bcs` with the provided value.
1983        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1984            self.bcs = Some(field.into().into());
1985        }
1986        ///Sets `bcs` with the provided value.
1987        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1988            self.set_bcs(field.into());
1989            self
1990        }
1991        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1992        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1993            self.digest.as_mut().map(|field| field as _)
1994        }
1995        ///Returns a mutable reference to `digest`.
1996        ///If the field is unset, it is first initialized with the default value.
1997        pub fn digest_mut(&mut self) -> &mut String {
1998            self.digest.get_or_insert_default()
1999        }
2000        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
2001        pub fn digest_opt(&self) -> Option<&str> {
2002            self.digest.as_ref().map(|field| field as _)
2003        }
2004        ///Sets `digest` with the provided value.
2005        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
2006            self.digest = Some(field.into().into());
2007        }
2008        ///Sets `digest` with the provided value.
2009        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
2010            self.set_digest(field.into());
2011            self
2012        }
2013        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2014        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
2015            self.epoch.as_mut().map(|field| field as _)
2016        }
2017        ///Returns a mutable reference to `epoch`.
2018        ///If the field is unset, it is first initialized with the default value.
2019        pub fn epoch_mut(&mut self) -> &mut u64 {
2020            self.epoch.get_or_insert_default()
2021        }
2022        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
2023        pub fn epoch_opt(&self) -> Option<u64> {
2024            self.epoch.as_ref().map(|field| *field)
2025        }
2026        ///Sets `epoch` with the provided value.
2027        pub fn set_epoch(&mut self, field: u64) {
2028            self.epoch = Some(field);
2029        }
2030        ///Sets `epoch` with the provided value.
2031        pub fn with_epoch(mut self, field: u64) -> Self {
2032            self.set_epoch(field);
2033            self
2034        }
2035        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2036        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
2037            self.sequence_number.as_mut().map(|field| field as _)
2038        }
2039        ///Returns a mutable reference to `sequence_number`.
2040        ///If the field is unset, it is first initialized with the default value.
2041        pub fn sequence_number_mut(&mut self) -> &mut u64 {
2042            self.sequence_number.get_or_insert_default()
2043        }
2044        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2045        pub fn sequence_number_opt(&self) -> Option<u64> {
2046            self.sequence_number.as_ref().map(|field| *field)
2047        }
2048        ///Sets `sequence_number` with the provided value.
2049        pub fn set_sequence_number(&mut self, field: u64) {
2050            self.sequence_number = Some(field);
2051        }
2052        ///Sets `sequence_number` with the provided value.
2053        pub fn with_sequence_number(mut self, field: u64) -> Self {
2054            self.set_sequence_number(field);
2055            self
2056        }
2057        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2058        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
2059            self.total_network_transactions.as_mut().map(|field| field as _)
2060        }
2061        ///Returns a mutable reference to `total_network_transactions`.
2062        ///If the field is unset, it is first initialized with the default value.
2063        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
2064            self.total_network_transactions.get_or_insert_default()
2065        }
2066        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
2067        pub fn total_network_transactions_opt(&self) -> Option<u64> {
2068            self.total_network_transactions.as_ref().map(|field| *field)
2069        }
2070        ///Sets `total_network_transactions` with the provided value.
2071        pub fn set_total_network_transactions(&mut self, field: u64) {
2072            self.total_network_transactions = Some(field);
2073        }
2074        ///Sets `total_network_transactions` with the provided value.
2075        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
2076            self.set_total_network_transactions(field);
2077            self
2078        }
2079        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2080        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
2081            self.content_digest.as_mut().map(|field| field as _)
2082        }
2083        ///Returns a mutable reference to `content_digest`.
2084        ///If the field is unset, it is first initialized with the default value.
2085        pub fn content_digest_mut(&mut self) -> &mut String {
2086            self.content_digest.get_or_insert_default()
2087        }
2088        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
2089        pub fn content_digest_opt(&self) -> Option<&str> {
2090            self.content_digest.as_ref().map(|field| field as _)
2091        }
2092        ///Sets `content_digest` with the provided value.
2093        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
2094            self.content_digest = Some(field.into().into());
2095        }
2096        ///Sets `content_digest` with the provided value.
2097        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
2098            self.set_content_digest(field.into());
2099            self
2100        }
2101        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2102        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
2103            self.previous_digest.as_mut().map(|field| field as _)
2104        }
2105        ///Returns a mutable reference to `previous_digest`.
2106        ///If the field is unset, it is first initialized with the default value.
2107        pub fn previous_digest_mut(&mut self) -> &mut String {
2108            self.previous_digest.get_or_insert_default()
2109        }
2110        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
2111        pub fn previous_digest_opt(&self) -> Option<&str> {
2112            self.previous_digest.as_ref().map(|field| field as _)
2113        }
2114        ///Sets `previous_digest` with the provided value.
2115        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
2116            self.previous_digest = Some(field.into().into());
2117        }
2118        ///Sets `previous_digest` with the provided value.
2119        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2120            self.set_previous_digest(field.into());
2121            self
2122        }
2123        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
2124        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2125            self.epoch_rolling_gas_cost_summary
2126                .as_ref()
2127                .map(|field| field as _)
2128                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2129        }
2130        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2131        pub fn epoch_rolling_gas_cost_summary_opt_mut(
2132            &mut self,
2133        ) -> Option<&mut super::GasCostSummary> {
2134            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2135        }
2136        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
2137        ///If the field is unset, it is first initialized with the default value.
2138        pub fn epoch_rolling_gas_cost_summary_mut(
2139            &mut self,
2140        ) -> &mut super::GasCostSummary {
2141            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2142        }
2143        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
2144        pub fn epoch_rolling_gas_cost_summary_opt(
2145            &self,
2146        ) -> Option<&super::GasCostSummary> {
2147            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2148        }
2149        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
2150        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2151            &mut self,
2152            field: T,
2153        ) {
2154            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2155        }
2156        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
2157        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2158            mut self,
2159            field: T,
2160        ) -> Self {
2161            self.set_epoch_rolling_gas_cost_summary(field.into());
2162            self
2163        }
2164        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2165        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2166            self.timestamp.as_mut().map(|field| field as _)
2167        }
2168        ///Returns a mutable reference to `timestamp`.
2169        ///If the field is unset, it is first initialized with the default value.
2170        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2171            self.timestamp.get_or_insert_default()
2172        }
2173        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
2174        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2175            self.timestamp.as_ref().map(|field| field as _)
2176        }
2177        ///Sets `timestamp` with the provided value.
2178        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2179            self.timestamp = Some(field.into().into());
2180        }
2181        ///Sets `timestamp` with the provided value.
2182        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2183            mut self,
2184            field: T,
2185        ) -> Self {
2186            self.set_timestamp(field.into());
2187            self
2188        }
2189        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
2190        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2191            &self.commitments
2192        }
2193        ///Returns a mutable reference to `commitments`.
2194        ///If the field is unset, it is first initialized with the default value.
2195        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2196            &mut self.commitments
2197        }
2198        ///Sets `commitments` with the provided value.
2199        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2200            self.commitments = field;
2201        }
2202        ///Sets `commitments` with the provided value.
2203        pub fn with_commitments(
2204            mut self,
2205            field: Vec<super::CheckpointCommitment>,
2206        ) -> Self {
2207            self.set_commitments(field);
2208            self
2209        }
2210        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
2211        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2212            self.end_of_epoch_data
2213                .as_ref()
2214                .map(|field| field as _)
2215                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2216        }
2217        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2218        pub fn end_of_epoch_data_opt_mut(
2219            &mut self,
2220        ) -> Option<&mut super::EndOfEpochData> {
2221            self.end_of_epoch_data.as_mut().map(|field| field as _)
2222        }
2223        ///Returns a mutable reference to `end_of_epoch_data`.
2224        ///If the field is unset, it is first initialized with the default value.
2225        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2226            self.end_of_epoch_data.get_or_insert_default()
2227        }
2228        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2229        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2230            self.end_of_epoch_data.as_ref().map(|field| field as _)
2231        }
2232        ///Sets `end_of_epoch_data` with the provided value.
2233        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2234            &mut self,
2235            field: T,
2236        ) {
2237            self.end_of_epoch_data = Some(field.into().into());
2238        }
2239        ///Sets `end_of_epoch_data` with the provided value.
2240        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2241            mut self,
2242            field: T,
2243        ) -> Self {
2244            self.set_end_of_epoch_data(field.into());
2245            self
2246        }
2247        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2248        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2249            self.version_specific_data.as_ref().map(|field| field as _)
2250        }
2251        ///Sets `version_specific_data` with the provided value.
2252        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2253            &mut self,
2254            field: T,
2255        ) {
2256            self.version_specific_data = Some(field.into().into());
2257        }
2258        ///Sets `version_specific_data` with the provided value.
2259        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2260            mut self,
2261            field: T,
2262        ) -> Self {
2263            self.set_version_specific_data(field.into());
2264            self
2265        }
2266    }
2267    impl super::CheckpointedTransactionInfo {
2268        pub const fn const_default() -> Self {
2269            Self {
2270                transaction: None,
2271                effects: None,
2272                signatures: Vec::new(),
2273                address_aliases_versions: Vec::new(),
2274            }
2275        }
2276        #[doc(hidden)]
2277        pub fn default_instance() -> &'static Self {
2278            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2279            &DEFAULT
2280        }
2281        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2282        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2283            self.transaction.as_mut().map(|field| field as _)
2284        }
2285        ///Returns a mutable reference to `transaction`.
2286        ///If the field is unset, it is first initialized with the default value.
2287        pub fn transaction_mut(&mut self) -> &mut String {
2288            self.transaction.get_or_insert_default()
2289        }
2290        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2291        pub fn transaction_opt(&self) -> Option<&str> {
2292            self.transaction.as_ref().map(|field| field as _)
2293        }
2294        ///Sets `transaction` with the provided value.
2295        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2296            self.transaction = Some(field.into().into());
2297        }
2298        ///Sets `transaction` with the provided value.
2299        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2300            self.set_transaction(field.into());
2301            self
2302        }
2303        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2304        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2305            self.effects.as_mut().map(|field| field as _)
2306        }
2307        ///Returns a mutable reference to `effects`.
2308        ///If the field is unset, it is first initialized with the default value.
2309        pub fn effects_mut(&mut self) -> &mut String {
2310            self.effects.get_or_insert_default()
2311        }
2312        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2313        pub fn effects_opt(&self) -> Option<&str> {
2314            self.effects.as_ref().map(|field| field as _)
2315        }
2316        ///Sets `effects` with the provided value.
2317        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2318            self.effects = Some(field.into().into());
2319        }
2320        ///Sets `effects` with the provided value.
2321        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2322            self.set_effects(field.into());
2323            self
2324        }
2325        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
2326        pub fn signatures(&self) -> &[super::UserSignature] {
2327            &self.signatures
2328        }
2329        ///Returns a mutable reference to `signatures`.
2330        ///If the field is unset, it is first initialized with the default value.
2331        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2332            &mut self.signatures
2333        }
2334        ///Sets `signatures` with the provided value.
2335        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2336            self.signatures = field;
2337        }
2338        ///Sets `signatures` with the provided value.
2339        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2340            self.set_signatures(field);
2341            self
2342        }
2343        ///Returns the value of `address_aliases_versions`, or the default value if `address_aliases_versions` is unset.
2344        pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2345            &self.address_aliases_versions
2346        }
2347        ///Returns a mutable reference to `address_aliases_versions`.
2348        ///If the field is unset, it is first initialized with the default value.
2349        pub fn address_aliases_versions_mut(
2350            &mut self,
2351        ) -> &mut Vec<super::AddressAliasesVersion> {
2352            &mut self.address_aliases_versions
2353        }
2354        ///Sets `address_aliases_versions` with the provided value.
2355        pub fn set_address_aliases_versions(
2356            &mut self,
2357            field: Vec<super::AddressAliasesVersion>,
2358        ) {
2359            self.address_aliases_versions = field;
2360        }
2361        ///Sets `address_aliases_versions` with the provided value.
2362        pub fn with_address_aliases_versions(
2363            mut self,
2364            field: Vec<super::AddressAliasesVersion>,
2365        ) -> Self {
2366            self.set_address_aliases_versions(field);
2367            self
2368        }
2369    }
2370    impl super::CircomG1 {
2371        pub const fn const_default() -> Self {
2372            Self {
2373                e0: None,
2374                e1: None,
2375                e2: None,
2376            }
2377        }
2378        #[doc(hidden)]
2379        pub fn default_instance() -> &'static Self {
2380            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2381            &DEFAULT
2382        }
2383        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2384        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2385            self.e0.as_mut().map(|field| field as _)
2386        }
2387        ///Returns a mutable reference to `e0`.
2388        ///If the field is unset, it is first initialized with the default value.
2389        pub fn e0_mut(&mut self) -> &mut String {
2390            self.e0.get_or_insert_default()
2391        }
2392        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2393        pub fn e0_opt(&self) -> Option<&str> {
2394            self.e0.as_ref().map(|field| field as _)
2395        }
2396        ///Sets `e0` with the provided value.
2397        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2398            self.e0 = Some(field.into().into());
2399        }
2400        ///Sets `e0` with the provided value.
2401        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2402            self.set_e0(field.into());
2403            self
2404        }
2405        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2406        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2407            self.e1.as_mut().map(|field| field as _)
2408        }
2409        ///Returns a mutable reference to `e1`.
2410        ///If the field is unset, it is first initialized with the default value.
2411        pub fn e1_mut(&mut self) -> &mut String {
2412            self.e1.get_or_insert_default()
2413        }
2414        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2415        pub fn e1_opt(&self) -> Option<&str> {
2416            self.e1.as_ref().map(|field| field as _)
2417        }
2418        ///Sets `e1` with the provided value.
2419        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2420            self.e1 = Some(field.into().into());
2421        }
2422        ///Sets `e1` with the provided value.
2423        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2424            self.set_e1(field.into());
2425            self
2426        }
2427        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2428        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2429            self.e2.as_mut().map(|field| field as _)
2430        }
2431        ///Returns a mutable reference to `e2`.
2432        ///If the field is unset, it is first initialized with the default value.
2433        pub fn e2_mut(&mut self) -> &mut String {
2434            self.e2.get_or_insert_default()
2435        }
2436        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2437        pub fn e2_opt(&self) -> Option<&str> {
2438            self.e2.as_ref().map(|field| field as _)
2439        }
2440        ///Sets `e2` with the provided value.
2441        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2442            self.e2 = Some(field.into().into());
2443        }
2444        ///Sets `e2` with the provided value.
2445        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2446            self.set_e2(field.into());
2447            self
2448        }
2449    }
2450    impl super::CircomG2 {
2451        pub const fn const_default() -> Self {
2452            Self {
2453                e00: None,
2454                e01: None,
2455                e10: None,
2456                e11: None,
2457                e20: None,
2458                e21: None,
2459            }
2460        }
2461        #[doc(hidden)]
2462        pub fn default_instance() -> &'static Self {
2463            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2464            &DEFAULT
2465        }
2466        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2467        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2468            self.e00.as_mut().map(|field| field as _)
2469        }
2470        ///Returns a mutable reference to `e00`.
2471        ///If the field is unset, it is first initialized with the default value.
2472        pub fn e00_mut(&mut self) -> &mut String {
2473            self.e00.get_or_insert_default()
2474        }
2475        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2476        pub fn e00_opt(&self) -> Option<&str> {
2477            self.e00.as_ref().map(|field| field as _)
2478        }
2479        ///Sets `e00` with the provided value.
2480        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2481            self.e00 = Some(field.into().into());
2482        }
2483        ///Sets `e00` with the provided value.
2484        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2485            self.set_e00(field.into());
2486            self
2487        }
2488        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2489        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2490            self.e01.as_mut().map(|field| field as _)
2491        }
2492        ///Returns a mutable reference to `e01`.
2493        ///If the field is unset, it is first initialized with the default value.
2494        pub fn e01_mut(&mut self) -> &mut String {
2495            self.e01.get_or_insert_default()
2496        }
2497        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2498        pub fn e01_opt(&self) -> Option<&str> {
2499            self.e01.as_ref().map(|field| field as _)
2500        }
2501        ///Sets `e01` with the provided value.
2502        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2503            self.e01 = Some(field.into().into());
2504        }
2505        ///Sets `e01` with the provided value.
2506        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2507            self.set_e01(field.into());
2508            self
2509        }
2510        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2511        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2512            self.e10.as_mut().map(|field| field as _)
2513        }
2514        ///Returns a mutable reference to `e10`.
2515        ///If the field is unset, it is first initialized with the default value.
2516        pub fn e10_mut(&mut self) -> &mut String {
2517            self.e10.get_or_insert_default()
2518        }
2519        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2520        pub fn e10_opt(&self) -> Option<&str> {
2521            self.e10.as_ref().map(|field| field as _)
2522        }
2523        ///Sets `e10` with the provided value.
2524        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2525            self.e10 = Some(field.into().into());
2526        }
2527        ///Sets `e10` with the provided value.
2528        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2529            self.set_e10(field.into());
2530            self
2531        }
2532        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2533        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2534            self.e11.as_mut().map(|field| field as _)
2535        }
2536        ///Returns a mutable reference to `e11`.
2537        ///If the field is unset, it is first initialized with the default value.
2538        pub fn e11_mut(&mut self) -> &mut String {
2539            self.e11.get_or_insert_default()
2540        }
2541        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2542        pub fn e11_opt(&self) -> Option<&str> {
2543            self.e11.as_ref().map(|field| field as _)
2544        }
2545        ///Sets `e11` with the provided value.
2546        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2547            self.e11 = Some(field.into().into());
2548        }
2549        ///Sets `e11` with the provided value.
2550        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2551            self.set_e11(field.into());
2552            self
2553        }
2554        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2555        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2556            self.e20.as_mut().map(|field| field as _)
2557        }
2558        ///Returns a mutable reference to `e20`.
2559        ///If the field is unset, it is first initialized with the default value.
2560        pub fn e20_mut(&mut self) -> &mut String {
2561            self.e20.get_or_insert_default()
2562        }
2563        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2564        pub fn e20_opt(&self) -> Option<&str> {
2565            self.e20.as_ref().map(|field| field as _)
2566        }
2567        ///Sets `e20` with the provided value.
2568        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2569            self.e20 = Some(field.into().into());
2570        }
2571        ///Sets `e20` with the provided value.
2572        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2573            self.set_e20(field.into());
2574            self
2575        }
2576        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2577        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2578            self.e21.as_mut().map(|field| field as _)
2579        }
2580        ///Returns a mutable reference to `e21`.
2581        ///If the field is unset, it is first initialized with the default value.
2582        pub fn e21_mut(&mut self) -> &mut String {
2583            self.e21.get_or_insert_default()
2584        }
2585        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2586        pub fn e21_opt(&self) -> Option<&str> {
2587            self.e21.as_ref().map(|field| field as _)
2588        }
2589        ///Sets `e21` with the provided value.
2590        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2591            self.e21 = Some(field.into().into());
2592        }
2593        ///Sets `e21` with the provided value.
2594        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2595            self.set_e21(field.into());
2596            self
2597        }
2598    }
2599    impl super::CleverError {
2600        pub const fn const_default() -> Self {
2601            Self {
2602                error_code: None,
2603                line_number: None,
2604                constant_name: None,
2605                constant_type: None,
2606                value: None,
2607            }
2608        }
2609        #[doc(hidden)]
2610        pub fn default_instance() -> &'static Self {
2611            static DEFAULT: super::CleverError = super::CleverError::const_default();
2612            &DEFAULT
2613        }
2614        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2615        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2616            self.error_code.as_mut().map(|field| field as _)
2617        }
2618        ///Returns a mutable reference to `error_code`.
2619        ///If the field is unset, it is first initialized with the default value.
2620        pub fn error_code_mut(&mut self) -> &mut u64 {
2621            self.error_code.get_or_insert_default()
2622        }
2623        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2624        pub fn error_code_opt(&self) -> Option<u64> {
2625            self.error_code.as_ref().map(|field| *field)
2626        }
2627        ///Sets `error_code` with the provided value.
2628        pub fn set_error_code(&mut self, field: u64) {
2629            self.error_code = Some(field);
2630        }
2631        ///Sets `error_code` with the provided value.
2632        pub fn with_error_code(mut self, field: u64) -> Self {
2633            self.set_error_code(field);
2634            self
2635        }
2636        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2637        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2638            self.line_number.as_mut().map(|field| field as _)
2639        }
2640        ///Returns a mutable reference to `line_number`.
2641        ///If the field is unset, it is first initialized with the default value.
2642        pub fn line_number_mut(&mut self) -> &mut u64 {
2643            self.line_number.get_or_insert_default()
2644        }
2645        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2646        pub fn line_number_opt(&self) -> Option<u64> {
2647            self.line_number.as_ref().map(|field| *field)
2648        }
2649        ///Sets `line_number` with the provided value.
2650        pub fn set_line_number(&mut self, field: u64) {
2651            self.line_number = Some(field);
2652        }
2653        ///Sets `line_number` with the provided value.
2654        pub fn with_line_number(mut self, field: u64) -> Self {
2655            self.set_line_number(field);
2656            self
2657        }
2658        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2659        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2660            self.constant_name.as_mut().map(|field| field as _)
2661        }
2662        ///Returns a mutable reference to `constant_name`.
2663        ///If the field is unset, it is first initialized with the default value.
2664        pub fn constant_name_mut(&mut self) -> &mut String {
2665            self.constant_name.get_or_insert_default()
2666        }
2667        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2668        pub fn constant_name_opt(&self) -> Option<&str> {
2669            self.constant_name.as_ref().map(|field| field as _)
2670        }
2671        ///Sets `constant_name` with the provided value.
2672        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2673            self.constant_name = Some(field.into().into());
2674        }
2675        ///Sets `constant_name` with the provided value.
2676        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2677            self.set_constant_name(field.into());
2678            self
2679        }
2680        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2681        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2682            self.constant_type.as_mut().map(|field| field as _)
2683        }
2684        ///Returns a mutable reference to `constant_type`.
2685        ///If the field is unset, it is first initialized with the default value.
2686        pub fn constant_type_mut(&mut self) -> &mut String {
2687            self.constant_type.get_or_insert_default()
2688        }
2689        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2690        pub fn constant_type_opt(&self) -> Option<&str> {
2691            self.constant_type.as_ref().map(|field| field as _)
2692        }
2693        ///Sets `constant_type` with the provided value.
2694        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2695            self.constant_type = Some(field.into().into());
2696        }
2697        ///Sets `constant_type` with the provided value.
2698        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2699            self.set_constant_type(field.into());
2700            self
2701        }
2702        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2703        pub fn rendered(&self) -> &str {
2704            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2705                field as _
2706            } else {
2707                ""
2708            }
2709        }
2710        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2711        pub fn rendered_opt(&self) -> Option<&str> {
2712            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2713                Some(field as _)
2714            } else {
2715                None
2716            }
2717        }
2718        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2719        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2720            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2721                Some(field as _)
2722            } else {
2723                None
2724            }
2725        }
2726        ///Returns a mutable reference to `rendered`.
2727        ///If the field is unset, it is first initialized with the default value.
2728        ///If any other oneof field in the same oneof is set, it will be cleared.
2729        pub fn rendered_mut(&mut self) -> &mut String {
2730            if self.rendered_opt_mut().is_none() {
2731                self.value = Some(
2732                    super::clever_error::Value::Rendered(String::default()),
2733                );
2734            }
2735            self.rendered_opt_mut().unwrap()
2736        }
2737        ///Sets `rendered` with the provided value.
2738        ///If any other oneof field in the same oneof is set, it will be cleared.
2739        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2740            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2741        }
2742        ///Sets `rendered` with the provided value.
2743        ///If any other oneof field in the same oneof is set, it will be cleared.
2744        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2745            self.set_rendered(field.into());
2746            self
2747        }
2748        ///Returns the value of `raw`, or the default value if `raw` is unset.
2749        pub fn raw(&self) -> &[u8] {
2750            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2751                field as _
2752            } else {
2753                &[]
2754            }
2755        }
2756        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2757        pub fn raw_opt(&self) -> Option<&[u8]> {
2758            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2759                Some(field as _)
2760            } else {
2761                None
2762            }
2763        }
2764        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2765        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2766            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2767                Some(field as _)
2768            } else {
2769                None
2770            }
2771        }
2772        ///Returns a mutable reference to `raw`.
2773        ///If the field is unset, it is first initialized with the default value.
2774        ///If any other oneof field in the same oneof is set, it will be cleared.
2775        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2776            if self.raw_opt_mut().is_none() {
2777                self.value = Some(
2778                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2779                );
2780            }
2781            self.raw_opt_mut().unwrap()
2782        }
2783        ///Sets `raw` with the provided value.
2784        ///If any other oneof field in the same oneof is set, it will be cleared.
2785        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2786            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2787        }
2788        ///Sets `raw` with the provided value.
2789        ///If any other oneof field in the same oneof is set, it will be cleared.
2790        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2791            self.set_raw(field.into());
2792            self
2793        }
2794    }
2795    impl super::CoinDenyListError {
2796        pub const fn const_default() -> Self {
2797            Self {
2798                address: None,
2799                coin_type: None,
2800            }
2801        }
2802        #[doc(hidden)]
2803        pub fn default_instance() -> &'static Self {
2804            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2805            &DEFAULT
2806        }
2807        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2808        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2809            self.address.as_mut().map(|field| field as _)
2810        }
2811        ///Returns a mutable reference to `address`.
2812        ///If the field is unset, it is first initialized with the default value.
2813        pub fn address_mut(&mut self) -> &mut String {
2814            self.address.get_or_insert_default()
2815        }
2816        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2817        pub fn address_opt(&self) -> Option<&str> {
2818            self.address.as_ref().map(|field| field as _)
2819        }
2820        ///Sets `address` with the provided value.
2821        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2822            self.address = Some(field.into().into());
2823        }
2824        ///Sets `address` with the provided value.
2825        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2826            self.set_address(field.into());
2827            self
2828        }
2829        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2830        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2831            self.coin_type.as_mut().map(|field| field as _)
2832        }
2833        ///Returns a mutable reference to `coin_type`.
2834        ///If the field is unset, it is first initialized with the default value.
2835        pub fn coin_type_mut(&mut self) -> &mut String {
2836            self.coin_type.get_or_insert_default()
2837        }
2838        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2839        pub fn coin_type_opt(&self) -> Option<&str> {
2840            self.coin_type.as_ref().map(|field| field as _)
2841        }
2842        ///Sets `coin_type` with the provided value.
2843        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2844            self.coin_type = Some(field.into().into());
2845        }
2846        ///Sets `coin_type` with the provided value.
2847        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2848            self.set_coin_type(field.into());
2849            self
2850        }
2851    }
2852    impl super::CoinMetadata {
2853        pub const fn const_default() -> Self {
2854            Self {
2855                id: None,
2856                decimals: None,
2857                name: None,
2858                symbol: None,
2859                description: None,
2860                icon_url: None,
2861                metadata_cap_id: None,
2862                metadata_cap_state: None,
2863            }
2864        }
2865        #[doc(hidden)]
2866        pub fn default_instance() -> &'static Self {
2867            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2868            &DEFAULT
2869        }
2870        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2871        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2872            self.id.as_mut().map(|field| field as _)
2873        }
2874        ///Returns a mutable reference to `id`.
2875        ///If the field is unset, it is first initialized with the default value.
2876        pub fn id_mut(&mut self) -> &mut String {
2877            self.id.get_or_insert_default()
2878        }
2879        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2880        pub fn id_opt(&self) -> Option<&str> {
2881            self.id.as_ref().map(|field| field as _)
2882        }
2883        ///Sets `id` with the provided value.
2884        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2885            self.id = Some(field.into().into());
2886        }
2887        ///Sets `id` with the provided value.
2888        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2889            self.set_id(field.into());
2890            self
2891        }
2892        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2893        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2894            self.decimals.as_mut().map(|field| field as _)
2895        }
2896        ///Returns a mutable reference to `decimals`.
2897        ///If the field is unset, it is first initialized with the default value.
2898        pub fn decimals_mut(&mut self) -> &mut u32 {
2899            self.decimals.get_or_insert_default()
2900        }
2901        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2902        pub fn decimals_opt(&self) -> Option<u32> {
2903            self.decimals.as_ref().map(|field| *field)
2904        }
2905        ///Sets `decimals` with the provided value.
2906        pub fn set_decimals(&mut self, field: u32) {
2907            self.decimals = Some(field);
2908        }
2909        ///Sets `decimals` with the provided value.
2910        pub fn with_decimals(mut self, field: u32) -> Self {
2911            self.set_decimals(field);
2912            self
2913        }
2914        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2915        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2916            self.name.as_mut().map(|field| field as _)
2917        }
2918        ///Returns a mutable reference to `name`.
2919        ///If the field is unset, it is first initialized with the default value.
2920        pub fn name_mut(&mut self) -> &mut String {
2921            self.name.get_or_insert_default()
2922        }
2923        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2924        pub fn name_opt(&self) -> Option<&str> {
2925            self.name.as_ref().map(|field| field as _)
2926        }
2927        ///Sets `name` with the provided value.
2928        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2929            self.name = Some(field.into().into());
2930        }
2931        ///Sets `name` with the provided value.
2932        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2933            self.set_name(field.into());
2934            self
2935        }
2936        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2937        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2938            self.symbol.as_mut().map(|field| field as _)
2939        }
2940        ///Returns a mutable reference to `symbol`.
2941        ///If the field is unset, it is first initialized with the default value.
2942        pub fn symbol_mut(&mut self) -> &mut String {
2943            self.symbol.get_or_insert_default()
2944        }
2945        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2946        pub fn symbol_opt(&self) -> Option<&str> {
2947            self.symbol.as_ref().map(|field| field as _)
2948        }
2949        ///Sets `symbol` with the provided value.
2950        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2951            self.symbol = Some(field.into().into());
2952        }
2953        ///Sets `symbol` with the provided value.
2954        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2955            self.set_symbol(field.into());
2956            self
2957        }
2958        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2959        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2960            self.description.as_mut().map(|field| field as _)
2961        }
2962        ///Returns a mutable reference to `description`.
2963        ///If the field is unset, it is first initialized with the default value.
2964        pub fn description_mut(&mut self) -> &mut String {
2965            self.description.get_or_insert_default()
2966        }
2967        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2968        pub fn description_opt(&self) -> Option<&str> {
2969            self.description.as_ref().map(|field| field as _)
2970        }
2971        ///Sets `description` with the provided value.
2972        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2973            self.description = Some(field.into().into());
2974        }
2975        ///Sets `description` with the provided value.
2976        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2977            self.set_description(field.into());
2978            self
2979        }
2980        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2981        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2982            self.icon_url.as_mut().map(|field| field as _)
2983        }
2984        ///Returns a mutable reference to `icon_url`.
2985        ///If the field is unset, it is first initialized with the default value.
2986        pub fn icon_url_mut(&mut self) -> &mut String {
2987            self.icon_url.get_or_insert_default()
2988        }
2989        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2990        pub fn icon_url_opt(&self) -> Option<&str> {
2991            self.icon_url.as_ref().map(|field| field as _)
2992        }
2993        ///Sets `icon_url` with the provided value.
2994        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2995            self.icon_url = Some(field.into().into());
2996        }
2997        ///Sets `icon_url` with the provided value.
2998        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2999            self.set_icon_url(field.into());
3000            self
3001        }
3002        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3003        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
3004            self.metadata_cap_id.as_mut().map(|field| field as _)
3005        }
3006        ///Returns a mutable reference to `metadata_cap_id`.
3007        ///If the field is unset, it is first initialized with the default value.
3008        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
3009            self.metadata_cap_id.get_or_insert_default()
3010        }
3011        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3012        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
3013            self.metadata_cap_id.as_ref().map(|field| field as _)
3014        }
3015        ///Sets `metadata_cap_id` with the provided value.
3016        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
3017            self.metadata_cap_id = Some(field.into().into());
3018        }
3019        ///Sets `metadata_cap_id` with the provided value.
3020        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
3021            self.set_metadata_cap_id(field.into());
3022            self
3023        }
3024        ///Sets `metadata_cap_state` with the provided value.
3025        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
3026            mut self,
3027            field: T,
3028        ) -> Self {
3029            self.set_metadata_cap_state(field.into());
3030            self
3031        }
3032    }
3033    impl super::CoinTreasury {
3034        pub const fn const_default() -> Self {
3035            Self {
3036                id: None,
3037                total_supply: None,
3038                supply_state: None,
3039            }
3040        }
3041        #[doc(hidden)]
3042        pub fn default_instance() -> &'static Self {
3043            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
3044            &DEFAULT
3045        }
3046        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3047        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
3048            self.id.as_mut().map(|field| field as _)
3049        }
3050        ///Returns a mutable reference to `id`.
3051        ///If the field is unset, it is first initialized with the default value.
3052        pub fn id_mut(&mut self) -> &mut String {
3053            self.id.get_or_insert_default()
3054        }
3055        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3056        pub fn id_opt(&self) -> Option<&str> {
3057            self.id.as_ref().map(|field| field as _)
3058        }
3059        ///Sets `id` with the provided value.
3060        pub fn set_id<T: Into<String>>(&mut self, field: T) {
3061            self.id = Some(field.into().into());
3062        }
3063        ///Sets `id` with the provided value.
3064        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
3065            self.set_id(field.into());
3066            self
3067        }
3068        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3069        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
3070            self.total_supply.as_mut().map(|field| field as _)
3071        }
3072        ///Returns a mutable reference to `total_supply`.
3073        ///If the field is unset, it is first initialized with the default value.
3074        pub fn total_supply_mut(&mut self) -> &mut u64 {
3075            self.total_supply.get_or_insert_default()
3076        }
3077        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
3078        pub fn total_supply_opt(&self) -> Option<u64> {
3079            self.total_supply.as_ref().map(|field| *field)
3080        }
3081        ///Sets `total_supply` with the provided value.
3082        pub fn set_total_supply(&mut self, field: u64) {
3083            self.total_supply = Some(field);
3084        }
3085        ///Sets `total_supply` with the provided value.
3086        pub fn with_total_supply(mut self, field: u64) -> Self {
3087            self.set_total_supply(field);
3088            self
3089        }
3090        ///Sets `supply_state` with the provided value.
3091        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
3092            mut self,
3093            field: T,
3094        ) -> Self {
3095            self.set_supply_state(field.into());
3096            self
3097        }
3098    }
3099    impl super::Command {
3100        pub const fn const_default() -> Self {
3101            Self { command: None }
3102        }
3103        #[doc(hidden)]
3104        pub fn default_instance() -> &'static Self {
3105            static DEFAULT: super::Command = super::Command::const_default();
3106            &DEFAULT
3107        }
3108        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
3109        pub fn move_call(&self) -> &super::MoveCall {
3110            if let Some(super::command::Command::MoveCall(field)) = &self.command {
3111                field as _
3112            } else {
3113                super::MoveCall::default_instance() as _
3114            }
3115        }
3116        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
3117        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3118            if let Some(super::command::Command::MoveCall(field)) = &self.command {
3119                Some(field as _)
3120            } else {
3121                None
3122            }
3123        }
3124        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3125        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3126            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3127                Some(field as _)
3128            } else {
3129                None
3130            }
3131        }
3132        ///Returns a mutable reference to `move_call`.
3133        ///If the field is unset, it is first initialized with the default value.
3134        ///If any other oneof field in the same oneof is set, it will be cleared.
3135        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3136            if self.move_call_opt_mut().is_none() {
3137                self.command = Some(
3138                    super::command::Command::MoveCall(super::MoveCall::default()),
3139                );
3140            }
3141            self.move_call_opt_mut().unwrap()
3142        }
3143        ///Sets `move_call` with the provided value.
3144        ///If any other oneof field in the same oneof is set, it will be cleared.
3145        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3146            self.command = Some(super::command::Command::MoveCall(field.into().into()));
3147        }
3148        ///Sets `move_call` with the provided value.
3149        ///If any other oneof field in the same oneof is set, it will be cleared.
3150        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3151            self.set_move_call(field.into());
3152            self
3153        }
3154        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
3155        pub fn transfer_objects(&self) -> &super::TransferObjects {
3156            if let Some(super::command::Command::TransferObjects(field)) = &self.command
3157            {
3158                field as _
3159            } else {
3160                super::TransferObjects::default_instance() as _
3161            }
3162        }
3163        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
3164        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3165            if let Some(super::command::Command::TransferObjects(field)) = &self.command
3166            {
3167                Some(field as _)
3168            } else {
3169                None
3170            }
3171        }
3172        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3173        pub fn transfer_objects_opt_mut(
3174            &mut self,
3175        ) -> Option<&mut super::TransferObjects> {
3176            if let Some(super::command::Command::TransferObjects(field)) = &mut self
3177                .command
3178            {
3179                Some(field as _)
3180            } else {
3181                None
3182            }
3183        }
3184        ///Returns a mutable reference to `transfer_objects`.
3185        ///If the field is unset, it is first initialized with the default value.
3186        ///If any other oneof field in the same oneof is set, it will be cleared.
3187        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3188            if self.transfer_objects_opt_mut().is_none() {
3189                self.command = Some(
3190                    super::command::Command::TransferObjects(
3191                        super::TransferObjects::default(),
3192                    ),
3193                );
3194            }
3195            self.transfer_objects_opt_mut().unwrap()
3196        }
3197        ///Sets `transfer_objects` with the provided value.
3198        ///If any other oneof field in the same oneof is set, it will be cleared.
3199        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3200            &mut self,
3201            field: T,
3202        ) {
3203            self.command = Some(
3204                super::command::Command::TransferObjects(field.into().into()),
3205            );
3206        }
3207        ///Sets `transfer_objects` with the provided value.
3208        ///If any other oneof field in the same oneof is set, it will be cleared.
3209        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3210            mut self,
3211            field: T,
3212        ) -> Self {
3213            self.set_transfer_objects(field.into());
3214            self
3215        }
3216        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
3217        pub fn split_coins(&self) -> &super::SplitCoins {
3218            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3219                field as _
3220            } else {
3221                super::SplitCoins::default_instance() as _
3222            }
3223        }
3224        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3225        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3226            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3227                Some(field as _)
3228            } else {
3229                None
3230            }
3231        }
3232        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3233        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3234            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3235                Some(field as _)
3236            } else {
3237                None
3238            }
3239        }
3240        ///Returns a mutable reference to `split_coins`.
3241        ///If the field is unset, it is first initialized with the default value.
3242        ///If any other oneof field in the same oneof is set, it will be cleared.
3243        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3244            if self.split_coins_opt_mut().is_none() {
3245                self.command = Some(
3246                    super::command::Command::SplitCoins(super::SplitCoins::default()),
3247                );
3248            }
3249            self.split_coins_opt_mut().unwrap()
3250        }
3251        ///Sets `split_coins` with the provided value.
3252        ///If any other oneof field in the same oneof is set, it will be cleared.
3253        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3254            self.command = Some(
3255                super::command::Command::SplitCoins(field.into().into()),
3256            );
3257        }
3258        ///Sets `split_coins` with the provided value.
3259        ///If any other oneof field in the same oneof is set, it will be cleared.
3260        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3261            self.set_split_coins(field.into());
3262            self
3263        }
3264        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
3265        pub fn merge_coins(&self) -> &super::MergeCoins {
3266            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3267                field as _
3268            } else {
3269                super::MergeCoins::default_instance() as _
3270            }
3271        }
3272        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3273        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3274            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3275                Some(field as _)
3276            } else {
3277                None
3278            }
3279        }
3280        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3281        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3282            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3283                Some(field as _)
3284            } else {
3285                None
3286            }
3287        }
3288        ///Returns a mutable reference to `merge_coins`.
3289        ///If the field is unset, it is first initialized with the default value.
3290        ///If any other oneof field in the same oneof is set, it will be cleared.
3291        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3292            if self.merge_coins_opt_mut().is_none() {
3293                self.command = Some(
3294                    super::command::Command::MergeCoins(super::MergeCoins::default()),
3295                );
3296            }
3297            self.merge_coins_opt_mut().unwrap()
3298        }
3299        ///Sets `merge_coins` with the provided value.
3300        ///If any other oneof field in the same oneof is set, it will be cleared.
3301        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3302            self.command = Some(
3303                super::command::Command::MergeCoins(field.into().into()),
3304            );
3305        }
3306        ///Sets `merge_coins` with the provided value.
3307        ///If any other oneof field in the same oneof is set, it will be cleared.
3308        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3309            self.set_merge_coins(field.into());
3310            self
3311        }
3312        ///Returns the value of `publish`, or the default value if `publish` is unset.
3313        pub fn publish(&self) -> &super::Publish {
3314            if let Some(super::command::Command::Publish(field)) = &self.command {
3315                field as _
3316            } else {
3317                super::Publish::default_instance() as _
3318            }
3319        }
3320        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
3321        pub fn publish_opt(&self) -> Option<&super::Publish> {
3322            if let Some(super::command::Command::Publish(field)) = &self.command {
3323                Some(field as _)
3324            } else {
3325                None
3326            }
3327        }
3328        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3329        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3330            if let Some(super::command::Command::Publish(field)) = &mut self.command {
3331                Some(field as _)
3332            } else {
3333                None
3334            }
3335        }
3336        ///Returns a mutable reference to `publish`.
3337        ///If the field is unset, it is first initialized with the default value.
3338        ///If any other oneof field in the same oneof is set, it will be cleared.
3339        pub fn publish_mut(&mut self) -> &mut super::Publish {
3340            if self.publish_opt_mut().is_none() {
3341                self.command = Some(
3342                    super::command::Command::Publish(super::Publish::default()),
3343                );
3344            }
3345            self.publish_opt_mut().unwrap()
3346        }
3347        ///Sets `publish` with the provided value.
3348        ///If any other oneof field in the same oneof is set, it will be cleared.
3349        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3350            self.command = Some(super::command::Command::Publish(field.into().into()));
3351        }
3352        ///Sets `publish` with the provided value.
3353        ///If any other oneof field in the same oneof is set, it will be cleared.
3354        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3355            self.set_publish(field.into());
3356            self
3357        }
3358        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
3359        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3360            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3361                field as _
3362            } else {
3363                super::MakeMoveVector::default_instance() as _
3364            }
3365        }
3366        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
3367        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3368            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3369                Some(field as _)
3370            } else {
3371                None
3372            }
3373        }
3374        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3375        pub fn make_move_vector_opt_mut(
3376            &mut self,
3377        ) -> Option<&mut super::MakeMoveVector> {
3378            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3379                .command
3380            {
3381                Some(field as _)
3382            } else {
3383                None
3384            }
3385        }
3386        ///Returns a mutable reference to `make_move_vector`.
3387        ///If the field is unset, it is first initialized with the default value.
3388        ///If any other oneof field in the same oneof is set, it will be cleared.
3389        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3390            if self.make_move_vector_opt_mut().is_none() {
3391                self.command = Some(
3392                    super::command::Command::MakeMoveVector(
3393                        super::MakeMoveVector::default(),
3394                    ),
3395                );
3396            }
3397            self.make_move_vector_opt_mut().unwrap()
3398        }
3399        ///Sets `make_move_vector` with the provided value.
3400        ///If any other oneof field in the same oneof is set, it will be cleared.
3401        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3402            &mut self,
3403            field: T,
3404        ) {
3405            self.command = Some(
3406                super::command::Command::MakeMoveVector(field.into().into()),
3407            );
3408        }
3409        ///Sets `make_move_vector` with the provided value.
3410        ///If any other oneof field in the same oneof is set, it will be cleared.
3411        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3412            mut self,
3413            field: T,
3414        ) -> Self {
3415            self.set_make_move_vector(field.into());
3416            self
3417        }
3418        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3419        pub fn upgrade(&self) -> &super::Upgrade {
3420            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3421                field as _
3422            } else {
3423                super::Upgrade::default_instance() as _
3424            }
3425        }
3426        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3427        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3428            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3429                Some(field as _)
3430            } else {
3431                None
3432            }
3433        }
3434        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3435        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3436            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3437                Some(field as _)
3438            } else {
3439                None
3440            }
3441        }
3442        ///Returns a mutable reference to `upgrade`.
3443        ///If the field is unset, it is first initialized with the default value.
3444        ///If any other oneof field in the same oneof is set, it will be cleared.
3445        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3446            if self.upgrade_opt_mut().is_none() {
3447                self.command = Some(
3448                    super::command::Command::Upgrade(super::Upgrade::default()),
3449                );
3450            }
3451            self.upgrade_opt_mut().unwrap()
3452        }
3453        ///Sets `upgrade` with the provided value.
3454        ///If any other oneof field in the same oneof is set, it will be cleared.
3455        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3456            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3457        }
3458        ///Sets `upgrade` with the provided value.
3459        ///If any other oneof field in the same oneof is set, it will be cleared.
3460        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3461            self.set_upgrade(field.into());
3462            self
3463        }
3464    }
3465    impl super::CommandArgumentError {
3466        pub const fn const_default() -> Self {
3467            Self {
3468                argument: None,
3469                kind: None,
3470                index_error: None,
3471            }
3472        }
3473        #[doc(hidden)]
3474        pub fn default_instance() -> &'static Self {
3475            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3476            &DEFAULT
3477        }
3478        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3479        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3480            self.argument.as_mut().map(|field| field as _)
3481        }
3482        ///Returns a mutable reference to `argument`.
3483        ///If the field is unset, it is first initialized with the default value.
3484        pub fn argument_mut(&mut self) -> &mut u32 {
3485            self.argument.get_or_insert_default()
3486        }
3487        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3488        pub fn argument_opt(&self) -> Option<u32> {
3489            self.argument.as_ref().map(|field| *field)
3490        }
3491        ///Sets `argument` with the provided value.
3492        pub fn set_argument(&mut self, field: u32) {
3493            self.argument = Some(field);
3494        }
3495        ///Sets `argument` with the provided value.
3496        pub fn with_argument(mut self, field: u32) -> Self {
3497            self.set_argument(field);
3498            self
3499        }
3500        ///Sets `kind` with the provided value.
3501        pub fn with_kind<
3502            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3503        >(mut self, field: T) -> Self {
3504            self.set_kind(field.into());
3505            self
3506        }
3507        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3508        pub fn index_error(&self) -> &super::IndexError {
3509            self.index_error
3510                .as_ref()
3511                .map(|field| field as _)
3512                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3513        }
3514        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3515        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3516            self.index_error.as_mut().map(|field| field as _)
3517        }
3518        ///Returns a mutable reference to `index_error`.
3519        ///If the field is unset, it is first initialized with the default value.
3520        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3521            self.index_error.get_or_insert_default()
3522        }
3523        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3524        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3525            self.index_error.as_ref().map(|field| field as _)
3526        }
3527        ///Sets `index_error` with the provided value.
3528        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3529            self.index_error = Some(field.into().into());
3530        }
3531        ///Sets `index_error` with the provided value.
3532        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3533            self.set_index_error(field.into());
3534            self
3535        }
3536    }
3537    impl super::CommandOutput {
3538        pub const fn const_default() -> Self {
3539            Self {
3540                argument: None,
3541                value: None,
3542                json: None,
3543            }
3544        }
3545        #[doc(hidden)]
3546        pub fn default_instance() -> &'static Self {
3547            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3548            &DEFAULT
3549        }
3550        ///Returns the value of `argument`, or the default value if `argument` is unset.
3551        pub fn argument(&self) -> &super::Argument {
3552            self.argument
3553                .as_ref()
3554                .map(|field| field as _)
3555                .unwrap_or_else(|| super::Argument::default_instance() as _)
3556        }
3557        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3558        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3559            self.argument.as_mut().map(|field| field as _)
3560        }
3561        ///Returns a mutable reference to `argument`.
3562        ///If the field is unset, it is first initialized with the default value.
3563        pub fn argument_mut(&mut self) -> &mut super::Argument {
3564            self.argument.get_or_insert_default()
3565        }
3566        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3567        pub fn argument_opt(&self) -> Option<&super::Argument> {
3568            self.argument.as_ref().map(|field| field as _)
3569        }
3570        ///Sets `argument` with the provided value.
3571        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3572            self.argument = Some(field.into().into());
3573        }
3574        ///Sets `argument` with the provided value.
3575        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3576            self.set_argument(field.into());
3577            self
3578        }
3579        ///Returns the value of `value`, or the default value if `value` is unset.
3580        pub fn value(&self) -> &super::Bcs {
3581            self.value
3582                .as_ref()
3583                .map(|field| field as _)
3584                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3585        }
3586        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3587        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3588            self.value.as_mut().map(|field| field as _)
3589        }
3590        ///Returns a mutable reference to `value`.
3591        ///If the field is unset, it is first initialized with the default value.
3592        pub fn value_mut(&mut self) -> &mut super::Bcs {
3593            self.value.get_or_insert_default()
3594        }
3595        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3596        pub fn value_opt(&self) -> Option<&super::Bcs> {
3597            self.value.as_ref().map(|field| field as _)
3598        }
3599        ///Sets `value` with the provided value.
3600        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3601            self.value = Some(field.into().into());
3602        }
3603        ///Sets `value` with the provided value.
3604        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3605            self.set_value(field.into());
3606            self
3607        }
3608        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3609        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3610            self.json.as_mut().map(|field| field as _)
3611        }
3612        ///Returns a mutable reference to `json`.
3613        ///If the field is unset, it is first initialized with the default value.
3614        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3615            self.json.get_or_insert_default()
3616        }
3617        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3618        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3619            self.json.as_ref().map(|field| field as _)
3620        }
3621        ///Sets `json` with the provided value.
3622        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3623            self.json = Some(field.into().into());
3624        }
3625        ///Sets `json` with the provided value.
3626        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3627            self.set_json(field.into());
3628            self
3629        }
3630    }
3631    impl super::CommandResult {
3632        pub const fn const_default() -> Self {
3633            Self {
3634                return_values: Vec::new(),
3635                mutated_by_ref: Vec::new(),
3636            }
3637        }
3638        #[doc(hidden)]
3639        pub fn default_instance() -> &'static Self {
3640            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3641            &DEFAULT
3642        }
3643        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3644        pub fn return_values(&self) -> &[super::CommandOutput] {
3645            &self.return_values
3646        }
3647        ///Returns a mutable reference to `return_values`.
3648        ///If the field is unset, it is first initialized with the default value.
3649        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3650            &mut self.return_values
3651        }
3652        ///Sets `return_values` with the provided value.
3653        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3654            self.return_values = field;
3655        }
3656        ///Sets `return_values` with the provided value.
3657        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3658            self.set_return_values(field);
3659            self
3660        }
3661        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3662        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3663            &self.mutated_by_ref
3664        }
3665        ///Returns a mutable reference to `mutated_by_ref`.
3666        ///If the field is unset, it is first initialized with the default value.
3667        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3668            &mut self.mutated_by_ref
3669        }
3670        ///Sets `mutated_by_ref` with the provided value.
3671        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3672            self.mutated_by_ref = field;
3673        }
3674        ///Sets `mutated_by_ref` with the provided value.
3675        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3676            self.set_mutated_by_ref(field);
3677            self
3678        }
3679    }
3680    impl super::CongestedObjects {
3681        pub const fn const_default() -> Self {
3682            Self { objects: Vec::new() }
3683        }
3684        #[doc(hidden)]
3685        pub fn default_instance() -> &'static Self {
3686            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3687            &DEFAULT
3688        }
3689        ///Returns the value of `objects`, or the default value if `objects` is unset.
3690        pub fn objects(&self) -> &[String] {
3691            &self.objects
3692        }
3693        ///Returns a mutable reference to `objects`.
3694        ///If the field is unset, it is first initialized with the default value.
3695        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3696            &mut self.objects
3697        }
3698        ///Sets `objects` with the provided value.
3699        pub fn set_objects(&mut self, field: Vec<String>) {
3700            self.objects = field;
3701        }
3702        ///Sets `objects` with the provided value.
3703        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3704            self.set_objects(field);
3705            self
3706        }
3707    }
3708    impl super::ConsensusCommitPrologue {
3709        pub const fn const_default() -> Self {
3710            Self {
3711                epoch: None,
3712                round: None,
3713                commit_timestamp: None,
3714                consensus_commit_digest: None,
3715                sub_dag_index: None,
3716                consensus_determined_version_assignments: None,
3717                additional_state_digest: None,
3718            }
3719        }
3720        #[doc(hidden)]
3721        pub fn default_instance() -> &'static Self {
3722            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3723            &DEFAULT
3724        }
3725        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3726        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3727            self.epoch.as_mut().map(|field| field as _)
3728        }
3729        ///Returns a mutable reference to `epoch`.
3730        ///If the field is unset, it is first initialized with the default value.
3731        pub fn epoch_mut(&mut self) -> &mut u64 {
3732            self.epoch.get_or_insert_default()
3733        }
3734        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3735        pub fn epoch_opt(&self) -> Option<u64> {
3736            self.epoch.as_ref().map(|field| *field)
3737        }
3738        ///Sets `epoch` with the provided value.
3739        pub fn set_epoch(&mut self, field: u64) {
3740            self.epoch = Some(field);
3741        }
3742        ///Sets `epoch` with the provided value.
3743        pub fn with_epoch(mut self, field: u64) -> Self {
3744            self.set_epoch(field);
3745            self
3746        }
3747        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3748        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3749            self.round.as_mut().map(|field| field as _)
3750        }
3751        ///Returns a mutable reference to `round`.
3752        ///If the field is unset, it is first initialized with the default value.
3753        pub fn round_mut(&mut self) -> &mut u64 {
3754            self.round.get_or_insert_default()
3755        }
3756        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3757        pub fn round_opt(&self) -> Option<u64> {
3758            self.round.as_ref().map(|field| *field)
3759        }
3760        ///Sets `round` with the provided value.
3761        pub fn set_round(&mut self, field: u64) {
3762            self.round = Some(field);
3763        }
3764        ///Sets `round` with the provided value.
3765        pub fn with_round(mut self, field: u64) -> Self {
3766            self.set_round(field);
3767            self
3768        }
3769        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3770        pub fn commit_timestamp_opt_mut(
3771            &mut self,
3772        ) -> Option<&mut ::prost_types::Timestamp> {
3773            self.commit_timestamp.as_mut().map(|field| field as _)
3774        }
3775        ///Returns a mutable reference to `commit_timestamp`.
3776        ///If the field is unset, it is first initialized with the default value.
3777        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3778            self.commit_timestamp.get_or_insert_default()
3779        }
3780        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3781        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3782            self.commit_timestamp.as_ref().map(|field| field as _)
3783        }
3784        ///Sets `commit_timestamp` with the provided value.
3785        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3786            &mut self,
3787            field: T,
3788        ) {
3789            self.commit_timestamp = Some(field.into().into());
3790        }
3791        ///Sets `commit_timestamp` with the provided value.
3792        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3793            mut self,
3794            field: T,
3795        ) -> Self {
3796            self.set_commit_timestamp(field.into());
3797            self
3798        }
3799        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3800        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3801            self.consensus_commit_digest.as_mut().map(|field| field as _)
3802        }
3803        ///Returns a mutable reference to `consensus_commit_digest`.
3804        ///If the field is unset, it is first initialized with the default value.
3805        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3806            self.consensus_commit_digest.get_or_insert_default()
3807        }
3808        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3809        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3810            self.consensus_commit_digest.as_ref().map(|field| field as _)
3811        }
3812        ///Sets `consensus_commit_digest` with the provided value.
3813        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3814            self.consensus_commit_digest = Some(field.into().into());
3815        }
3816        ///Sets `consensus_commit_digest` with the provided value.
3817        pub fn with_consensus_commit_digest<T: Into<String>>(
3818            mut self,
3819            field: T,
3820        ) -> Self {
3821            self.set_consensus_commit_digest(field.into());
3822            self
3823        }
3824        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3825        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3826            self.sub_dag_index.as_mut().map(|field| field as _)
3827        }
3828        ///Returns a mutable reference to `sub_dag_index`.
3829        ///If the field is unset, it is first initialized with the default value.
3830        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3831            self.sub_dag_index.get_or_insert_default()
3832        }
3833        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3834        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3835            self.sub_dag_index.as_ref().map(|field| *field)
3836        }
3837        ///Sets `sub_dag_index` with the provided value.
3838        pub fn set_sub_dag_index(&mut self, field: u64) {
3839            self.sub_dag_index = Some(field);
3840        }
3841        ///Sets `sub_dag_index` with the provided value.
3842        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3843            self.set_sub_dag_index(field);
3844            self
3845        }
3846        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3847        pub fn consensus_determined_version_assignments(
3848            &self,
3849        ) -> &super::ConsensusDeterminedVersionAssignments {
3850            self.consensus_determined_version_assignments
3851                .as_ref()
3852                .map(|field| field as _)
3853                .unwrap_or_else(|| {
3854                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3855                })
3856        }
3857        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3858        pub fn consensus_determined_version_assignments_opt_mut(
3859            &mut self,
3860        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3861            self.consensus_determined_version_assignments
3862                .as_mut()
3863                .map(|field| field as _)
3864        }
3865        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3866        ///If the field is unset, it is first initialized with the default value.
3867        pub fn consensus_determined_version_assignments_mut(
3868            &mut self,
3869        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3870            self.consensus_determined_version_assignments.get_or_insert_default()
3871        }
3872        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3873        pub fn consensus_determined_version_assignments_opt(
3874            &self,
3875        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3876            self.consensus_determined_version_assignments
3877                .as_ref()
3878                .map(|field| field as _)
3879        }
3880        ///Sets `consensus_determined_version_assignments` with the provided value.
3881        pub fn set_consensus_determined_version_assignments<
3882            T: Into<super::ConsensusDeterminedVersionAssignments>,
3883        >(&mut self, field: T) {
3884            self.consensus_determined_version_assignments = Some(field.into().into());
3885        }
3886        ///Sets `consensus_determined_version_assignments` with the provided value.
3887        pub fn with_consensus_determined_version_assignments<
3888            T: Into<super::ConsensusDeterminedVersionAssignments>,
3889        >(mut self, field: T) -> Self {
3890            self.set_consensus_determined_version_assignments(field.into());
3891            self
3892        }
3893        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3894        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3895            self.additional_state_digest.as_mut().map(|field| field as _)
3896        }
3897        ///Returns a mutable reference to `additional_state_digest`.
3898        ///If the field is unset, it is first initialized with the default value.
3899        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3900            self.additional_state_digest.get_or_insert_default()
3901        }
3902        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3903        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3904            self.additional_state_digest.as_ref().map(|field| field as _)
3905        }
3906        ///Sets `additional_state_digest` with the provided value.
3907        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3908            self.additional_state_digest = Some(field.into().into());
3909        }
3910        ///Sets `additional_state_digest` with the provided value.
3911        pub fn with_additional_state_digest<T: Into<String>>(
3912            mut self,
3913            field: T,
3914        ) -> Self {
3915            self.set_additional_state_digest(field.into());
3916            self
3917        }
3918    }
3919    impl super::ConsensusDeterminedVersionAssignments {
3920        pub const fn const_default() -> Self {
3921            Self {
3922                version: None,
3923                canceled_transactions: Vec::new(),
3924            }
3925        }
3926        #[doc(hidden)]
3927        pub fn default_instance() -> &'static Self {
3928            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3929            &DEFAULT
3930        }
3931        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3932        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3933            self.version.as_mut().map(|field| field as _)
3934        }
3935        ///Returns a mutable reference to `version`.
3936        ///If the field is unset, it is first initialized with the default value.
3937        pub fn version_mut(&mut self) -> &mut i32 {
3938            self.version.get_or_insert_default()
3939        }
3940        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3941        pub fn version_opt(&self) -> Option<i32> {
3942            self.version.as_ref().map(|field| *field)
3943        }
3944        ///Sets `version` with the provided value.
3945        pub fn set_version(&mut self, field: i32) {
3946            self.version = Some(field);
3947        }
3948        ///Sets `version` with the provided value.
3949        pub fn with_version(mut self, field: i32) -> Self {
3950            self.set_version(field);
3951            self
3952        }
3953        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3954        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3955            &self.canceled_transactions
3956        }
3957        ///Returns a mutable reference to `canceled_transactions`.
3958        ///If the field is unset, it is first initialized with the default value.
3959        pub fn canceled_transactions_mut(
3960            &mut self,
3961        ) -> &mut Vec<super::CanceledTransaction> {
3962            &mut self.canceled_transactions
3963        }
3964        ///Sets `canceled_transactions` with the provided value.
3965        pub fn set_canceled_transactions(
3966            &mut self,
3967            field: Vec<super::CanceledTransaction>,
3968        ) {
3969            self.canceled_transactions = field;
3970        }
3971        ///Sets `canceled_transactions` with the provided value.
3972        pub fn with_canceled_transactions(
3973            mut self,
3974            field: Vec<super::CanceledTransaction>,
3975        ) -> Self {
3976            self.set_canceled_transactions(field);
3977            self
3978        }
3979    }
3980    impl super::DatatypeDescriptor {
3981        pub const fn const_default() -> Self {
3982            Self {
3983                type_name: None,
3984                defining_id: None,
3985                module: None,
3986                name: None,
3987                abilities: Vec::new(),
3988                type_parameters: Vec::new(),
3989                kind: None,
3990                fields: Vec::new(),
3991                variants: Vec::new(),
3992            }
3993        }
3994        #[doc(hidden)]
3995        pub fn default_instance() -> &'static Self {
3996            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3997            &DEFAULT
3998        }
3999        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4000        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
4001            self.type_name.as_mut().map(|field| field as _)
4002        }
4003        ///Returns a mutable reference to `type_name`.
4004        ///If the field is unset, it is first initialized with the default value.
4005        pub fn type_name_mut(&mut self) -> &mut String {
4006            self.type_name.get_or_insert_default()
4007        }
4008        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4009        pub fn type_name_opt(&self) -> Option<&str> {
4010            self.type_name.as_ref().map(|field| field as _)
4011        }
4012        ///Sets `type_name` with the provided value.
4013        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
4014            self.type_name = Some(field.into().into());
4015        }
4016        ///Sets `type_name` with the provided value.
4017        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
4018            self.set_type_name(field.into());
4019            self
4020        }
4021        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4022        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
4023            self.defining_id.as_mut().map(|field| field as _)
4024        }
4025        ///Returns a mutable reference to `defining_id`.
4026        ///If the field is unset, it is first initialized with the default value.
4027        pub fn defining_id_mut(&mut self) -> &mut String {
4028            self.defining_id.get_or_insert_default()
4029        }
4030        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4031        pub fn defining_id_opt(&self) -> Option<&str> {
4032            self.defining_id.as_ref().map(|field| field as _)
4033        }
4034        ///Sets `defining_id` with the provided value.
4035        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
4036            self.defining_id = Some(field.into().into());
4037        }
4038        ///Sets `defining_id` with the provided value.
4039        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
4040            self.set_defining_id(field.into());
4041            self
4042        }
4043        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4044        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4045            self.module.as_mut().map(|field| field as _)
4046        }
4047        ///Returns a mutable reference to `module`.
4048        ///If the field is unset, it is first initialized with the default value.
4049        pub fn module_mut(&mut self) -> &mut String {
4050            self.module.get_or_insert_default()
4051        }
4052        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4053        pub fn module_opt(&self) -> Option<&str> {
4054            self.module.as_ref().map(|field| field as _)
4055        }
4056        ///Sets `module` with the provided value.
4057        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4058            self.module = Some(field.into().into());
4059        }
4060        ///Sets `module` with the provided value.
4061        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4062            self.set_module(field.into());
4063            self
4064        }
4065        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4066        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
4067            self.name.as_mut().map(|field| field as _)
4068        }
4069        ///Returns a mutable reference to `name`.
4070        ///If the field is unset, it is first initialized with the default value.
4071        pub fn name_mut(&mut self) -> &mut String {
4072            self.name.get_or_insert_default()
4073        }
4074        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4075        pub fn name_opt(&self) -> Option<&str> {
4076            self.name.as_ref().map(|field| field as _)
4077        }
4078        ///Sets `name` with the provided value.
4079        pub fn set_name<T: Into<String>>(&mut self, field: T) {
4080            self.name = Some(field.into().into());
4081        }
4082        ///Sets `name` with the provided value.
4083        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
4084            self.set_name(field.into());
4085            self
4086        }
4087        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
4088        pub fn type_parameters(&self) -> &[super::TypeParameter] {
4089            &self.type_parameters
4090        }
4091        ///Returns a mutable reference to `type_parameters`.
4092        ///If the field is unset, it is first initialized with the default value.
4093        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
4094            &mut self.type_parameters
4095        }
4096        ///Sets `type_parameters` with the provided value.
4097        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
4098            self.type_parameters = field;
4099        }
4100        ///Sets `type_parameters` with the provided value.
4101        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
4102            self.set_type_parameters(field);
4103            self
4104        }
4105        ///Sets `kind` with the provided value.
4106        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
4107            mut self,
4108            field: T,
4109        ) -> Self {
4110            self.set_kind(field.into());
4111            self
4112        }
4113        ///Returns the value of `fields`, or the default value if `fields` is unset.
4114        pub fn fields(&self) -> &[super::FieldDescriptor] {
4115            &self.fields
4116        }
4117        ///Returns a mutable reference to `fields`.
4118        ///If the field is unset, it is first initialized with the default value.
4119        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4120            &mut self.fields
4121        }
4122        ///Sets `fields` with the provided value.
4123        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4124            self.fields = field;
4125        }
4126        ///Sets `fields` with the provided value.
4127        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4128            self.set_fields(field);
4129            self
4130        }
4131        ///Returns the value of `variants`, or the default value if `variants` is unset.
4132        pub fn variants(&self) -> &[super::VariantDescriptor] {
4133            &self.variants
4134        }
4135        ///Returns a mutable reference to `variants`.
4136        ///If the field is unset, it is first initialized with the default value.
4137        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4138            &mut self.variants
4139        }
4140        ///Sets `variants` with the provided value.
4141        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4142            self.variants = field;
4143        }
4144        ///Sets `variants` with the provided value.
4145        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4146            self.set_variants(field);
4147            self
4148        }
4149    }
4150    impl super::Display {
4151        pub const fn const_default() -> Self {
4152            Self { output: None, errors: None }
4153        }
4154        #[doc(hidden)]
4155        pub fn default_instance() -> &'static Self {
4156            static DEFAULT: super::Display = super::Display::const_default();
4157            &DEFAULT
4158        }
4159        ///If `output` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4160        pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4161            self.output.as_mut().map(|field| field as _)
4162        }
4163        ///Returns a mutable reference to `output`.
4164        ///If the field is unset, it is first initialized with the default value.
4165        pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4166            self.output.get_or_insert_default()
4167        }
4168        ///If `output` is set, returns [`Some`] with the value; otherwise returns [`None`].
4169        pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4170            self.output.as_ref().map(|field| field as _)
4171        }
4172        ///Sets `output` with the provided value.
4173        pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4174            self.output = Some(field.into().into());
4175        }
4176        ///Sets `output` with the provided value.
4177        pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4178            self.set_output(field.into());
4179            self
4180        }
4181        ///If `errors` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4182        pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4183            self.errors.as_mut().map(|field| field as _)
4184        }
4185        ///Returns a mutable reference to `errors`.
4186        ///If the field is unset, it is first initialized with the default value.
4187        pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4188            self.errors.get_or_insert_default()
4189        }
4190        ///If `errors` is set, returns [`Some`] with the value; otherwise returns [`None`].
4191        pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4192            self.errors.as_ref().map(|field| field as _)
4193        }
4194        ///Sets `errors` with the provided value.
4195        pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4196            self.errors = Some(field.into().into());
4197        }
4198        ///Sets `errors` with the provided value.
4199        pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4200            self.set_errors(field.into());
4201            self
4202        }
4203    }
4204    impl super::DynamicField {
4205        pub const fn const_default() -> Self {
4206            Self {
4207                kind: None,
4208                parent: None,
4209                field_id: None,
4210                field_object: None,
4211                name: None,
4212                value: None,
4213                value_type: None,
4214                child_id: None,
4215                child_object: None,
4216            }
4217        }
4218        #[doc(hidden)]
4219        pub fn default_instance() -> &'static Self {
4220            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4221            &DEFAULT
4222        }
4223        ///Sets `kind` with the provided value.
4224        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4225            mut self,
4226            field: T,
4227        ) -> Self {
4228            self.set_kind(field.into());
4229            self
4230        }
4231        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4232        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4233            self.parent.as_mut().map(|field| field as _)
4234        }
4235        ///Returns a mutable reference to `parent`.
4236        ///If the field is unset, it is first initialized with the default value.
4237        pub fn parent_mut(&mut self) -> &mut String {
4238            self.parent.get_or_insert_default()
4239        }
4240        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
4241        pub fn parent_opt(&self) -> Option<&str> {
4242            self.parent.as_ref().map(|field| field as _)
4243        }
4244        ///Sets `parent` with the provided value.
4245        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4246            self.parent = Some(field.into().into());
4247        }
4248        ///Sets `parent` with the provided value.
4249        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4250            self.set_parent(field.into());
4251            self
4252        }
4253        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4254        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4255            self.field_id.as_mut().map(|field| field as _)
4256        }
4257        ///Returns a mutable reference to `field_id`.
4258        ///If the field is unset, it is first initialized with the default value.
4259        pub fn field_id_mut(&mut self) -> &mut String {
4260            self.field_id.get_or_insert_default()
4261        }
4262        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4263        pub fn field_id_opt(&self) -> Option<&str> {
4264            self.field_id.as_ref().map(|field| field as _)
4265        }
4266        ///Sets `field_id` with the provided value.
4267        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4268            self.field_id = Some(field.into().into());
4269        }
4270        ///Sets `field_id` with the provided value.
4271        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4272            self.set_field_id(field.into());
4273            self
4274        }
4275        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4276        pub fn field_object(&self) -> &super::Object {
4277            self.field_object
4278                .as_ref()
4279                .map(|field| field as _)
4280                .unwrap_or_else(|| super::Object::default_instance() as _)
4281        }
4282        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4283        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4284            self.field_object.as_mut().map(|field| field as _)
4285        }
4286        ///Returns a mutable reference to `field_object`.
4287        ///If the field is unset, it is first initialized with the default value.
4288        pub fn field_object_mut(&mut self) -> &mut super::Object {
4289            self.field_object.get_or_insert_default()
4290        }
4291        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4292        pub fn field_object_opt(&self) -> Option<&super::Object> {
4293            self.field_object.as_ref().map(|field| field as _)
4294        }
4295        ///Sets `field_object` with the provided value.
4296        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4297            self.field_object = Some(field.into().into());
4298        }
4299        ///Sets `field_object` with the provided value.
4300        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4301            self.set_field_object(field.into());
4302            self
4303        }
4304        ///Returns the value of `name`, or the default value if `name` is unset.
4305        pub fn name(&self) -> &super::Bcs {
4306            self.name
4307                .as_ref()
4308                .map(|field| field as _)
4309                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4310        }
4311        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4312        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4313            self.name.as_mut().map(|field| field as _)
4314        }
4315        ///Returns a mutable reference to `name`.
4316        ///If the field is unset, it is first initialized with the default value.
4317        pub fn name_mut(&mut self) -> &mut super::Bcs {
4318            self.name.get_or_insert_default()
4319        }
4320        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4321        pub fn name_opt(&self) -> Option<&super::Bcs> {
4322            self.name.as_ref().map(|field| field as _)
4323        }
4324        ///Sets `name` with the provided value.
4325        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4326            self.name = Some(field.into().into());
4327        }
4328        ///Sets `name` with the provided value.
4329        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4330            self.set_name(field.into());
4331            self
4332        }
4333        ///Returns the value of `value`, or the default value if `value` is unset.
4334        pub fn value(&self) -> &super::Bcs {
4335            self.value
4336                .as_ref()
4337                .map(|field| field as _)
4338                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4339        }
4340        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4341        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4342            self.value.as_mut().map(|field| field as _)
4343        }
4344        ///Returns a mutable reference to `value`.
4345        ///If the field is unset, it is first initialized with the default value.
4346        pub fn value_mut(&mut self) -> &mut super::Bcs {
4347            self.value.get_or_insert_default()
4348        }
4349        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4350        pub fn value_opt(&self) -> Option<&super::Bcs> {
4351            self.value.as_ref().map(|field| field as _)
4352        }
4353        ///Sets `value` with the provided value.
4354        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4355            self.value = Some(field.into().into());
4356        }
4357        ///Sets `value` with the provided value.
4358        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4359            self.set_value(field.into());
4360            self
4361        }
4362        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4363        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4364            self.value_type.as_mut().map(|field| field as _)
4365        }
4366        ///Returns a mutable reference to `value_type`.
4367        ///If the field is unset, it is first initialized with the default value.
4368        pub fn value_type_mut(&mut self) -> &mut String {
4369            self.value_type.get_or_insert_default()
4370        }
4371        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4372        pub fn value_type_opt(&self) -> Option<&str> {
4373            self.value_type.as_ref().map(|field| field as _)
4374        }
4375        ///Sets `value_type` with the provided value.
4376        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4377            self.value_type = Some(field.into().into());
4378        }
4379        ///Sets `value_type` with the provided value.
4380        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4381            self.set_value_type(field.into());
4382            self
4383        }
4384        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4385        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4386            self.child_id.as_mut().map(|field| field as _)
4387        }
4388        ///Returns a mutable reference to `child_id`.
4389        ///If the field is unset, it is first initialized with the default value.
4390        pub fn child_id_mut(&mut self) -> &mut String {
4391            self.child_id.get_or_insert_default()
4392        }
4393        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4394        pub fn child_id_opt(&self) -> Option<&str> {
4395            self.child_id.as_ref().map(|field| field as _)
4396        }
4397        ///Sets `child_id` with the provided value.
4398        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4399            self.child_id = Some(field.into().into());
4400        }
4401        ///Sets `child_id` with the provided value.
4402        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4403            self.set_child_id(field.into());
4404            self
4405        }
4406        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4407        pub fn child_object(&self) -> &super::Object {
4408            self.child_object
4409                .as_ref()
4410                .map(|field| field as _)
4411                .unwrap_or_else(|| super::Object::default_instance() as _)
4412        }
4413        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4414        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4415            self.child_object.as_mut().map(|field| field as _)
4416        }
4417        ///Returns a mutable reference to `child_object`.
4418        ///If the field is unset, it is first initialized with the default value.
4419        pub fn child_object_mut(&mut self) -> &mut super::Object {
4420            self.child_object.get_or_insert_default()
4421        }
4422        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4423        pub fn child_object_opt(&self) -> Option<&super::Object> {
4424            self.child_object.as_ref().map(|field| field as _)
4425        }
4426        ///Sets `child_object` with the provided value.
4427        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4428            self.child_object = Some(field.into().into());
4429        }
4430        ///Sets `child_object` with the provided value.
4431        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4432            self.set_child_object(field.into());
4433            self
4434        }
4435    }
4436    impl super::EmitModuleFilter {
4437        pub const fn const_default() -> Self {
4438            Self { module: None }
4439        }
4440        #[doc(hidden)]
4441        pub fn default_instance() -> &'static Self {
4442            static DEFAULT: super::EmitModuleFilter = super::EmitModuleFilter::const_default();
4443            &DEFAULT
4444        }
4445        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4446        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4447            self.module.as_mut().map(|field| field as _)
4448        }
4449        ///Returns a mutable reference to `module`.
4450        ///If the field is unset, it is first initialized with the default value.
4451        pub fn module_mut(&mut self) -> &mut String {
4452            self.module.get_or_insert_default()
4453        }
4454        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4455        pub fn module_opt(&self) -> Option<&str> {
4456            self.module.as_ref().map(|field| field as _)
4457        }
4458        ///Sets `module` with the provided value.
4459        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4460            self.module = Some(field.into().into());
4461        }
4462        ///Sets `module` with the provided value.
4463        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4464            self.set_module(field.into());
4465            self
4466        }
4467    }
4468    impl super::EndOfEpochData {
4469        pub const fn const_default() -> Self {
4470            Self {
4471                next_epoch_committee: Vec::new(),
4472                next_epoch_protocol_version: None,
4473                epoch_commitments: Vec::new(),
4474            }
4475        }
4476        #[doc(hidden)]
4477        pub fn default_instance() -> &'static Self {
4478            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4479            &DEFAULT
4480        }
4481        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4482        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4483            &self.next_epoch_committee
4484        }
4485        ///Returns a mutable reference to `next_epoch_committee`.
4486        ///If the field is unset, it is first initialized with the default value.
4487        pub fn next_epoch_committee_mut(
4488            &mut self,
4489        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4490            &mut self.next_epoch_committee
4491        }
4492        ///Sets `next_epoch_committee` with the provided value.
4493        pub fn set_next_epoch_committee(
4494            &mut self,
4495            field: Vec<super::ValidatorCommitteeMember>,
4496        ) {
4497            self.next_epoch_committee = field;
4498        }
4499        ///Sets `next_epoch_committee` with the provided value.
4500        pub fn with_next_epoch_committee(
4501            mut self,
4502            field: Vec<super::ValidatorCommitteeMember>,
4503        ) -> Self {
4504            self.set_next_epoch_committee(field);
4505            self
4506        }
4507        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4508        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4509            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4510        }
4511        ///Returns a mutable reference to `next_epoch_protocol_version`.
4512        ///If the field is unset, it is first initialized with the default value.
4513        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4514            self.next_epoch_protocol_version.get_or_insert_default()
4515        }
4516        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4517        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4518            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4519        }
4520        ///Sets `next_epoch_protocol_version` with the provided value.
4521        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4522            self.next_epoch_protocol_version = Some(field);
4523        }
4524        ///Sets `next_epoch_protocol_version` with the provided value.
4525        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4526            self.set_next_epoch_protocol_version(field);
4527            self
4528        }
4529        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4530        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4531            &self.epoch_commitments
4532        }
4533        ///Returns a mutable reference to `epoch_commitments`.
4534        ///If the field is unset, it is first initialized with the default value.
4535        pub fn epoch_commitments_mut(
4536            &mut self,
4537        ) -> &mut Vec<super::CheckpointCommitment> {
4538            &mut self.epoch_commitments
4539        }
4540        ///Sets `epoch_commitments` with the provided value.
4541        pub fn set_epoch_commitments(
4542            &mut self,
4543            field: Vec<super::CheckpointCommitment>,
4544        ) {
4545            self.epoch_commitments = field;
4546        }
4547        ///Sets `epoch_commitments` with the provided value.
4548        pub fn with_epoch_commitments(
4549            mut self,
4550            field: Vec<super::CheckpointCommitment>,
4551        ) -> Self {
4552            self.set_epoch_commitments(field);
4553            self
4554        }
4555    }
4556    impl super::EndOfEpochTransaction {
4557        pub const fn const_default() -> Self {
4558            Self { transactions: Vec::new() }
4559        }
4560        #[doc(hidden)]
4561        pub fn default_instance() -> &'static Self {
4562            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4563            &DEFAULT
4564        }
4565        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4566        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4567            &self.transactions
4568        }
4569        ///Returns a mutable reference to `transactions`.
4570        ///If the field is unset, it is first initialized with the default value.
4571        pub fn transactions_mut(
4572            &mut self,
4573        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4574            &mut self.transactions
4575        }
4576        ///Sets `transactions` with the provided value.
4577        pub fn set_transactions(
4578            &mut self,
4579            field: Vec<super::EndOfEpochTransactionKind>,
4580        ) {
4581            self.transactions = field;
4582        }
4583        ///Sets `transactions` with the provided value.
4584        pub fn with_transactions(
4585            mut self,
4586            field: Vec<super::EndOfEpochTransactionKind>,
4587        ) -> Self {
4588            self.set_transactions(field);
4589            self
4590        }
4591    }
4592    impl super::EndOfEpochTransactionKind {
4593        pub const fn const_default() -> Self {
4594            Self { kind: None, data: None }
4595        }
4596        #[doc(hidden)]
4597        pub fn default_instance() -> &'static Self {
4598            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4599            &DEFAULT
4600        }
4601        ///Sets `kind` with the provided value.
4602        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4603            mut self,
4604            field: T,
4605        ) -> Self {
4606            self.set_kind(field.into());
4607            self
4608        }
4609        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4610        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4611            if let Some(
4612                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4613            ) = &self.data
4614            {
4615                field as _
4616            } else {
4617                super::ChangeEpoch::default_instance() as _
4618            }
4619        }
4620        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4621        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4622            if let Some(
4623                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4624            ) = &self.data
4625            {
4626                Some(field as _)
4627            } else {
4628                None
4629            }
4630        }
4631        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4632        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4633            if let Some(
4634                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4635            ) = &mut self.data
4636            {
4637                Some(field as _)
4638            } else {
4639                None
4640            }
4641        }
4642        ///Returns a mutable reference to `change_epoch`.
4643        ///If the field is unset, it is first initialized with the default value.
4644        ///If any other oneof field in the same oneof is set, it will be cleared.
4645        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4646            if self.change_epoch_opt_mut().is_none() {
4647                self.data = Some(
4648                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4649                        super::ChangeEpoch::default(),
4650                    ),
4651                );
4652            }
4653            self.change_epoch_opt_mut().unwrap()
4654        }
4655        ///Sets `change_epoch` with the provided value.
4656        ///If any other oneof field in the same oneof is set, it will be cleared.
4657        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4658            self.data = Some(
4659                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4660                    field.into().into(),
4661                ),
4662            );
4663        }
4664        ///Sets `change_epoch` with the provided value.
4665        ///If any other oneof field in the same oneof is set, it will be cleared.
4666        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4667            mut self,
4668            field: T,
4669        ) -> Self {
4670            self.set_change_epoch(field.into());
4671            self
4672        }
4673        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4674        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4675            if let Some(
4676                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4677                    field,
4678                ),
4679            ) = &self.data
4680            {
4681                field as _
4682            } else {
4683                super::AuthenticatorStateExpire::default_instance() as _
4684            }
4685        }
4686        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4687        pub fn authenticator_state_expire_opt(
4688            &self,
4689        ) -> Option<&super::AuthenticatorStateExpire> {
4690            if let Some(
4691                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4692                    field,
4693                ),
4694            ) = &self.data
4695            {
4696                Some(field as _)
4697            } else {
4698                None
4699            }
4700        }
4701        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4702        pub fn authenticator_state_expire_opt_mut(
4703            &mut self,
4704        ) -> Option<&mut super::AuthenticatorStateExpire> {
4705            if let Some(
4706                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4707                    field,
4708                ),
4709            ) = &mut self.data
4710            {
4711                Some(field as _)
4712            } else {
4713                None
4714            }
4715        }
4716        ///Returns a mutable reference to `authenticator_state_expire`.
4717        ///If the field is unset, it is first initialized with the default value.
4718        ///If any other oneof field in the same oneof is set, it will be cleared.
4719        pub fn authenticator_state_expire_mut(
4720            &mut self,
4721        ) -> &mut super::AuthenticatorStateExpire {
4722            if self.authenticator_state_expire_opt_mut().is_none() {
4723                self.data = Some(
4724                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4725                        super::AuthenticatorStateExpire::default(),
4726                    ),
4727                );
4728            }
4729            self.authenticator_state_expire_opt_mut().unwrap()
4730        }
4731        ///Sets `authenticator_state_expire` with the provided value.
4732        ///If any other oneof field in the same oneof is set, it will be cleared.
4733        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4734            &mut self,
4735            field: T,
4736        ) {
4737            self.data = Some(
4738                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4739                    field.into().into(),
4740                ),
4741            );
4742        }
4743        ///Sets `authenticator_state_expire` with the provided value.
4744        ///If any other oneof field in the same oneof is set, it will be cleared.
4745        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4746            mut self,
4747            field: T,
4748        ) -> Self {
4749            self.set_authenticator_state_expire(field.into());
4750            self
4751        }
4752        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4753        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4754            if let Some(
4755                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4756                    field,
4757                ),
4758            ) = &self.data
4759            {
4760                field as _
4761            } else {
4762                super::ExecutionTimeObservations::default_instance() as _
4763            }
4764        }
4765        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4766        pub fn execution_time_observations_opt(
4767            &self,
4768        ) -> Option<&super::ExecutionTimeObservations> {
4769            if let Some(
4770                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4771                    field,
4772                ),
4773            ) = &self.data
4774            {
4775                Some(field as _)
4776            } else {
4777                None
4778            }
4779        }
4780        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4781        pub fn execution_time_observations_opt_mut(
4782            &mut self,
4783        ) -> Option<&mut super::ExecutionTimeObservations> {
4784            if let Some(
4785                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4786                    field,
4787                ),
4788            ) = &mut self.data
4789            {
4790                Some(field as _)
4791            } else {
4792                None
4793            }
4794        }
4795        ///Returns a mutable reference to `execution_time_observations`.
4796        ///If the field is unset, it is first initialized with the default value.
4797        ///If any other oneof field in the same oneof is set, it will be cleared.
4798        pub fn execution_time_observations_mut(
4799            &mut self,
4800        ) -> &mut super::ExecutionTimeObservations {
4801            if self.execution_time_observations_opt_mut().is_none() {
4802                self.data = Some(
4803                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4804                        super::ExecutionTimeObservations::default(),
4805                    ),
4806                );
4807            }
4808            self.execution_time_observations_opt_mut().unwrap()
4809        }
4810        ///Sets `execution_time_observations` with the provided value.
4811        ///If any other oneof field in the same oneof is set, it will be cleared.
4812        pub fn set_execution_time_observations<
4813            T: Into<super::ExecutionTimeObservations>,
4814        >(&mut self, field: T) {
4815            self.data = Some(
4816                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4817                    field.into().into(),
4818                ),
4819            );
4820        }
4821        ///Sets `execution_time_observations` with the provided value.
4822        ///If any other oneof field in the same oneof is set, it will be cleared.
4823        pub fn with_execution_time_observations<
4824            T: Into<super::ExecutionTimeObservations>,
4825        >(mut self, field: T) -> Self {
4826            self.set_execution_time_observations(field.into());
4827            self
4828        }
4829        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4830        pub fn bridge_chain_id(&self) -> &str {
4831            if let Some(
4832                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4833            ) = &self.data
4834            {
4835                field as _
4836            } else {
4837                ""
4838            }
4839        }
4840        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4841        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4842            if let Some(
4843                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4844            ) = &self.data
4845            {
4846                Some(field as _)
4847            } else {
4848                None
4849            }
4850        }
4851        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4852        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4853            if let Some(
4854                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4855            ) = &mut self.data
4856            {
4857                Some(field as _)
4858            } else {
4859                None
4860            }
4861        }
4862        ///Returns a mutable reference to `bridge_chain_id`.
4863        ///If the field is unset, it is first initialized with the default value.
4864        ///If any other oneof field in the same oneof is set, it will be cleared.
4865        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4866            if self.bridge_chain_id_opt_mut().is_none() {
4867                self.data = Some(
4868                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4869                        String::default(),
4870                    ),
4871                );
4872            }
4873            self.bridge_chain_id_opt_mut().unwrap()
4874        }
4875        ///Sets `bridge_chain_id` with the provided value.
4876        ///If any other oneof field in the same oneof is set, it will be cleared.
4877        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4878            self.data = Some(
4879                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4880                    field.into().into(),
4881                ),
4882            );
4883        }
4884        ///Sets `bridge_chain_id` with the provided value.
4885        ///If any other oneof field in the same oneof is set, it will be cleared.
4886        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4887            self.set_bridge_chain_id(field.into());
4888            self
4889        }
4890        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4891        pub fn bridge_object_version(&self) -> u64 {
4892            if let Some(
4893                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4894            ) = &self.data
4895            {
4896                *field
4897            } else {
4898                0u64
4899            }
4900        }
4901        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4902        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4903            if let Some(
4904                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4905            ) = &self.data
4906            {
4907                Some(*field)
4908            } else {
4909                None
4910            }
4911        }
4912        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4913        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4914            if let Some(
4915                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4916            ) = &mut self.data
4917            {
4918                Some(field as _)
4919            } else {
4920                None
4921            }
4922        }
4923        ///Returns a mutable reference to `bridge_object_version`.
4924        ///If the field is unset, it is first initialized with the default value.
4925        ///If any other oneof field in the same oneof is set, it will be cleared.
4926        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4927            if self.bridge_object_version_opt_mut().is_none() {
4928                self.data = Some(
4929                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4930                        u64::default(),
4931                    ),
4932                );
4933            }
4934            self.bridge_object_version_opt_mut().unwrap()
4935        }
4936        ///Sets `bridge_object_version` with the provided value.
4937        ///If any other oneof field in the same oneof is set, it will be cleared.
4938        pub fn set_bridge_object_version(&mut self, field: u64) {
4939            self.data = Some(
4940                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4941            );
4942        }
4943        ///Sets `bridge_object_version` with the provided value.
4944        ///If any other oneof field in the same oneof is set, it will be cleared.
4945        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4946            self.set_bridge_object_version(field);
4947            self
4948        }
4949        ///Returns the value of `storage_cost`, or the default value if `storage_cost` is unset.
4950        pub fn storage_cost(&self) -> u64 {
4951            if let Some(
4952                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4953            ) = &self.data
4954            {
4955                *field
4956            } else {
4957                0u64
4958            }
4959        }
4960        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
4961        pub fn storage_cost_opt(&self) -> Option<u64> {
4962            if let Some(
4963                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4964            ) = &self.data
4965            {
4966                Some(*field)
4967            } else {
4968                None
4969            }
4970        }
4971        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4972        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4973            if let Some(
4974                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4975            ) = &mut self.data
4976            {
4977                Some(field as _)
4978            } else {
4979                None
4980            }
4981        }
4982        ///Returns a mutable reference to `storage_cost`.
4983        ///If the field is unset, it is first initialized with the default value.
4984        ///If any other oneof field in the same oneof is set, it will be cleared.
4985        pub fn storage_cost_mut(&mut self) -> &mut u64 {
4986            if self.storage_cost_opt_mut().is_none() {
4987                self.data = Some(
4988                    super::end_of_epoch_transaction_kind::Data::StorageCost(
4989                        u64::default(),
4990                    ),
4991                );
4992            }
4993            self.storage_cost_opt_mut().unwrap()
4994        }
4995        ///Sets `storage_cost` with the provided value.
4996        ///If any other oneof field in the same oneof is set, it will be cleared.
4997        pub fn set_storage_cost(&mut self, field: u64) {
4998            self.data = Some(
4999                super::end_of_epoch_transaction_kind::Data::StorageCost(field),
5000            );
5001        }
5002        ///Sets `storage_cost` with the provided value.
5003        ///If any other oneof field in the same oneof is set, it will be cleared.
5004        pub fn with_storage_cost(mut self, field: u64) -> Self {
5005            self.set_storage_cost(field);
5006            self
5007        }
5008    }
5009    impl super::Epoch {
5010        pub const fn const_default() -> Self {
5011            Self {
5012                epoch: None,
5013                committee: None,
5014                system_state: None,
5015                first_checkpoint: None,
5016                last_checkpoint: None,
5017                start: None,
5018                end: None,
5019                reference_gas_price: None,
5020                protocol_config: None,
5021            }
5022        }
5023        #[doc(hidden)]
5024        pub fn default_instance() -> &'static Self {
5025            static DEFAULT: super::Epoch = super::Epoch::const_default();
5026            &DEFAULT
5027        }
5028        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5029        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
5030            self.epoch.as_mut().map(|field| field as _)
5031        }
5032        ///Returns a mutable reference to `epoch`.
5033        ///If the field is unset, it is first initialized with the default value.
5034        pub fn epoch_mut(&mut self) -> &mut u64 {
5035            self.epoch.get_or_insert_default()
5036        }
5037        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
5038        pub fn epoch_opt(&self) -> Option<u64> {
5039            self.epoch.as_ref().map(|field| *field)
5040        }
5041        ///Sets `epoch` with the provided value.
5042        pub fn set_epoch(&mut self, field: u64) {
5043            self.epoch = Some(field);
5044        }
5045        ///Sets `epoch` with the provided value.
5046        pub fn with_epoch(mut self, field: u64) -> Self {
5047            self.set_epoch(field);
5048            self
5049        }
5050        ///Returns the value of `committee`, or the default value if `committee` is unset.
5051        pub fn committee(&self) -> &super::ValidatorCommittee {
5052            self.committee
5053                .as_ref()
5054                .map(|field| field as _)
5055                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5056        }
5057        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5058        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5059            self.committee.as_mut().map(|field| field as _)
5060        }
5061        ///Returns a mutable reference to `committee`.
5062        ///If the field is unset, it is first initialized with the default value.
5063        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5064            self.committee.get_or_insert_default()
5065        }
5066        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
5067        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5068            self.committee.as_ref().map(|field| field as _)
5069        }
5070        ///Sets `committee` with the provided value.
5071        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5072            self.committee = Some(field.into().into());
5073        }
5074        ///Sets `committee` with the provided value.
5075        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5076            mut self,
5077            field: T,
5078        ) -> Self {
5079            self.set_committee(field.into());
5080            self
5081        }
5082        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
5083        pub fn system_state(&self) -> &super::SystemState {
5084            self.system_state
5085                .as_ref()
5086                .map(|field| field as _)
5087                .unwrap_or_else(|| super::SystemState::default_instance() as _)
5088        }
5089        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5090        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5091            self.system_state.as_mut().map(|field| field as _)
5092        }
5093        ///Returns a mutable reference to `system_state`.
5094        ///If the field is unset, it is first initialized with the default value.
5095        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5096            self.system_state.get_or_insert_default()
5097        }
5098        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
5099        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5100            self.system_state.as_ref().map(|field| field as _)
5101        }
5102        ///Sets `system_state` with the provided value.
5103        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5104            self.system_state = Some(field.into().into());
5105        }
5106        ///Sets `system_state` with the provided value.
5107        pub fn with_system_state<T: Into<super::SystemState>>(
5108            mut self,
5109            field: T,
5110        ) -> Self {
5111            self.set_system_state(field.into());
5112            self
5113        }
5114        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5115        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5116            self.first_checkpoint.as_mut().map(|field| field as _)
5117        }
5118        ///Returns a mutable reference to `first_checkpoint`.
5119        ///If the field is unset, it is first initialized with the default value.
5120        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5121            self.first_checkpoint.get_or_insert_default()
5122        }
5123        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5124        pub fn first_checkpoint_opt(&self) -> Option<u64> {
5125            self.first_checkpoint.as_ref().map(|field| *field)
5126        }
5127        ///Sets `first_checkpoint` with the provided value.
5128        pub fn set_first_checkpoint(&mut self, field: u64) {
5129            self.first_checkpoint = Some(field);
5130        }
5131        ///Sets `first_checkpoint` with the provided value.
5132        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5133            self.set_first_checkpoint(field);
5134            self
5135        }
5136        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5137        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5138            self.last_checkpoint.as_mut().map(|field| field as _)
5139        }
5140        ///Returns a mutable reference to `last_checkpoint`.
5141        ///If the field is unset, it is first initialized with the default value.
5142        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5143            self.last_checkpoint.get_or_insert_default()
5144        }
5145        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5146        pub fn last_checkpoint_opt(&self) -> Option<u64> {
5147            self.last_checkpoint.as_ref().map(|field| *field)
5148        }
5149        ///Sets `last_checkpoint` with the provided value.
5150        pub fn set_last_checkpoint(&mut self, field: u64) {
5151            self.last_checkpoint = Some(field);
5152        }
5153        ///Sets `last_checkpoint` with the provided value.
5154        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5155            self.set_last_checkpoint(field);
5156            self
5157        }
5158        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5159        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5160            self.start.as_mut().map(|field| field as _)
5161        }
5162        ///Returns a mutable reference to `start`.
5163        ///If the field is unset, it is first initialized with the default value.
5164        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5165            self.start.get_or_insert_default()
5166        }
5167        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
5168        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5169            self.start.as_ref().map(|field| field as _)
5170        }
5171        ///Sets `start` with the provided value.
5172        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5173            self.start = Some(field.into().into());
5174        }
5175        ///Sets `start` with the provided value.
5176        pub fn with_start<T: Into<::prost_types::Timestamp>>(
5177            mut self,
5178            field: T,
5179        ) -> Self {
5180            self.set_start(field.into());
5181            self
5182        }
5183        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5184        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5185            self.end.as_mut().map(|field| field as _)
5186        }
5187        ///Returns a mutable reference to `end`.
5188        ///If the field is unset, it is first initialized with the default value.
5189        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5190            self.end.get_or_insert_default()
5191        }
5192        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
5193        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5194            self.end.as_ref().map(|field| field as _)
5195        }
5196        ///Sets `end` with the provided value.
5197        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5198            self.end = Some(field.into().into());
5199        }
5200        ///Sets `end` with the provided value.
5201        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5202            self.set_end(field.into());
5203            self
5204        }
5205        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5206        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5207            self.reference_gas_price.as_mut().map(|field| field as _)
5208        }
5209        ///Returns a mutable reference to `reference_gas_price`.
5210        ///If the field is unset, it is first initialized with the default value.
5211        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5212            self.reference_gas_price.get_or_insert_default()
5213        }
5214        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
5215        pub fn reference_gas_price_opt(&self) -> Option<u64> {
5216            self.reference_gas_price.as_ref().map(|field| *field)
5217        }
5218        ///Sets `reference_gas_price` with the provided value.
5219        pub fn set_reference_gas_price(&mut self, field: u64) {
5220            self.reference_gas_price = Some(field);
5221        }
5222        ///Sets `reference_gas_price` with the provided value.
5223        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5224            self.set_reference_gas_price(field);
5225            self
5226        }
5227        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
5228        pub fn protocol_config(&self) -> &super::ProtocolConfig {
5229            self.protocol_config
5230                .as_ref()
5231                .map(|field| field as _)
5232                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5233        }
5234        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5235        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5236            self.protocol_config.as_mut().map(|field| field as _)
5237        }
5238        ///Returns a mutable reference to `protocol_config`.
5239        ///If the field is unset, it is first initialized with the default value.
5240        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5241            self.protocol_config.get_or_insert_default()
5242        }
5243        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
5244        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5245            self.protocol_config.as_ref().map(|field| field as _)
5246        }
5247        ///Sets `protocol_config` with the provided value.
5248        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5249            self.protocol_config = Some(field.into().into());
5250        }
5251        ///Sets `protocol_config` with the provided value.
5252        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5253            mut self,
5254            field: T,
5255        ) -> Self {
5256            self.set_protocol_config(field.into());
5257            self
5258        }
5259    }
5260    impl super::Event {
5261        pub const fn const_default() -> Self {
5262            Self {
5263                package_id: None,
5264                module: None,
5265                sender: None,
5266                event_type: None,
5267                contents: None,
5268                json: None,
5269                checkpoint: None,
5270                transaction_digest: None,
5271                transaction_index: None,
5272                event_index: None,
5273            }
5274        }
5275        #[doc(hidden)]
5276        pub fn default_instance() -> &'static Self {
5277            static DEFAULT: super::Event = super::Event::const_default();
5278            &DEFAULT
5279        }
5280        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5281        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5282            self.package_id.as_mut().map(|field| field as _)
5283        }
5284        ///Returns a mutable reference to `package_id`.
5285        ///If the field is unset, it is first initialized with the default value.
5286        pub fn package_id_mut(&mut self) -> &mut String {
5287            self.package_id.get_or_insert_default()
5288        }
5289        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5290        pub fn package_id_opt(&self) -> Option<&str> {
5291            self.package_id.as_ref().map(|field| field as _)
5292        }
5293        ///Sets `package_id` with the provided value.
5294        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5295            self.package_id = Some(field.into().into());
5296        }
5297        ///Sets `package_id` with the provided value.
5298        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5299            self.set_package_id(field.into());
5300            self
5301        }
5302        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5303        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5304            self.module.as_mut().map(|field| field as _)
5305        }
5306        ///Returns a mutable reference to `module`.
5307        ///If the field is unset, it is first initialized with the default value.
5308        pub fn module_mut(&mut self) -> &mut String {
5309            self.module.get_or_insert_default()
5310        }
5311        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5312        pub fn module_opt(&self) -> Option<&str> {
5313            self.module.as_ref().map(|field| field as _)
5314        }
5315        ///Sets `module` with the provided value.
5316        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5317            self.module = Some(field.into().into());
5318        }
5319        ///Sets `module` with the provided value.
5320        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5321            self.set_module(field.into());
5322            self
5323        }
5324        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5325        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5326            self.sender.as_mut().map(|field| field as _)
5327        }
5328        ///Returns a mutable reference to `sender`.
5329        ///If the field is unset, it is first initialized with the default value.
5330        pub fn sender_mut(&mut self) -> &mut String {
5331            self.sender.get_or_insert_default()
5332        }
5333        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5334        pub fn sender_opt(&self) -> Option<&str> {
5335            self.sender.as_ref().map(|field| field as _)
5336        }
5337        ///Sets `sender` with the provided value.
5338        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5339            self.sender = Some(field.into().into());
5340        }
5341        ///Sets `sender` with the provided value.
5342        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5343            self.set_sender(field.into());
5344            self
5345        }
5346        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5347        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5348            self.event_type.as_mut().map(|field| field as _)
5349        }
5350        ///Returns a mutable reference to `event_type`.
5351        ///If the field is unset, it is first initialized with the default value.
5352        pub fn event_type_mut(&mut self) -> &mut String {
5353            self.event_type.get_or_insert_default()
5354        }
5355        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5356        pub fn event_type_opt(&self) -> Option<&str> {
5357            self.event_type.as_ref().map(|field| field as _)
5358        }
5359        ///Sets `event_type` with the provided value.
5360        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5361            self.event_type = Some(field.into().into());
5362        }
5363        ///Sets `event_type` with the provided value.
5364        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5365            self.set_event_type(field.into());
5366            self
5367        }
5368        ///Returns the value of `contents`, or the default value if `contents` is unset.
5369        pub fn contents(&self) -> &super::Bcs {
5370            self.contents
5371                .as_ref()
5372                .map(|field| field as _)
5373                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5374        }
5375        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5376        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5377            self.contents.as_mut().map(|field| field as _)
5378        }
5379        ///Returns a mutable reference to `contents`.
5380        ///If the field is unset, it is first initialized with the default value.
5381        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5382            self.contents.get_or_insert_default()
5383        }
5384        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5385        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5386            self.contents.as_ref().map(|field| field as _)
5387        }
5388        ///Sets `contents` with the provided value.
5389        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5390            self.contents = Some(field.into().into());
5391        }
5392        ///Sets `contents` with the provided value.
5393        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5394            self.set_contents(field.into());
5395            self
5396        }
5397        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5398        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5399            self.json.as_mut().map(|field| field as _)
5400        }
5401        ///Returns a mutable reference to `json`.
5402        ///If the field is unset, it is first initialized with the default value.
5403        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5404            self.json.get_or_insert_default()
5405        }
5406        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5407        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5408            self.json.as_ref().map(|field| field as _)
5409        }
5410        ///Sets `json` with the provided value.
5411        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5412            self.json = Some(field.into().into());
5413        }
5414        ///Sets `json` with the provided value.
5415        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5416            self.set_json(field.into());
5417            self
5418        }
5419        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5420        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5421            self.checkpoint.as_mut().map(|field| field as _)
5422        }
5423        ///Returns a mutable reference to `checkpoint`.
5424        ///If the field is unset, it is first initialized with the default value.
5425        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5426            self.checkpoint.get_or_insert_default()
5427        }
5428        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5429        pub fn checkpoint_opt(&self) -> Option<u64> {
5430            self.checkpoint.as_ref().map(|field| *field)
5431        }
5432        ///Sets `checkpoint` with the provided value.
5433        pub fn set_checkpoint(&mut self, field: u64) {
5434            self.checkpoint = Some(field);
5435        }
5436        ///Sets `checkpoint` with the provided value.
5437        pub fn with_checkpoint(mut self, field: u64) -> Self {
5438            self.set_checkpoint(field);
5439            self
5440        }
5441        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5442        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5443            self.transaction_digest.as_mut().map(|field| field as _)
5444        }
5445        ///Returns a mutable reference to `transaction_digest`.
5446        ///If the field is unset, it is first initialized with the default value.
5447        pub fn transaction_digest_mut(&mut self) -> &mut String {
5448            self.transaction_digest.get_or_insert_default()
5449        }
5450        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5451        pub fn transaction_digest_opt(&self) -> Option<&str> {
5452            self.transaction_digest.as_ref().map(|field| field as _)
5453        }
5454        ///Sets `transaction_digest` with the provided value.
5455        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5456            self.transaction_digest = Some(field.into().into());
5457        }
5458        ///Sets `transaction_digest` with the provided value.
5459        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5460            self.set_transaction_digest(field.into());
5461            self
5462        }
5463        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5464        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5465            self.transaction_index.as_mut().map(|field| field as _)
5466        }
5467        ///Returns a mutable reference to `transaction_index`.
5468        ///If the field is unset, it is first initialized with the default value.
5469        pub fn transaction_index_mut(&mut self) -> &mut u64 {
5470            self.transaction_index.get_or_insert_default()
5471        }
5472        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5473        pub fn transaction_index_opt(&self) -> Option<u64> {
5474            self.transaction_index.as_ref().map(|field| *field)
5475        }
5476        ///Sets `transaction_index` with the provided value.
5477        pub fn set_transaction_index(&mut self, field: u64) {
5478            self.transaction_index = Some(field);
5479        }
5480        ///Sets `transaction_index` with the provided value.
5481        pub fn with_transaction_index(mut self, field: u64) -> Self {
5482            self.set_transaction_index(field);
5483            self
5484        }
5485        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5486        pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5487            self.event_index.as_mut().map(|field| field as _)
5488        }
5489        ///Returns a mutable reference to `event_index`.
5490        ///If the field is unset, it is first initialized with the default value.
5491        pub fn event_index_mut(&mut self) -> &mut u32 {
5492            self.event_index.get_or_insert_default()
5493        }
5494        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5495        pub fn event_index_opt(&self) -> Option<u32> {
5496            self.event_index.as_ref().map(|field| *field)
5497        }
5498        ///Sets `event_index` with the provided value.
5499        pub fn set_event_index(&mut self, field: u32) {
5500            self.event_index = Some(field);
5501        }
5502        ///Sets `event_index` with the provided value.
5503        pub fn with_event_index(mut self, field: u32) -> Self {
5504            self.set_event_index(field);
5505            self
5506        }
5507    }
5508    impl super::EventDigestEntry {
5509        pub const fn const_default() -> Self {
5510            Self {
5511                event_index: None,
5512                digest: None,
5513            }
5514        }
5515        #[doc(hidden)]
5516        pub fn default_instance() -> &'static Self {
5517            static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5518            &DEFAULT
5519        }
5520        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5521        pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5522            self.event_index.as_mut().map(|field| field as _)
5523        }
5524        ///Returns a mutable reference to `event_index`.
5525        ///If the field is unset, it is first initialized with the default value.
5526        pub fn event_index_mut(&mut self) -> &mut u64 {
5527            self.event_index.get_or_insert_default()
5528        }
5529        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5530        pub fn event_index_opt(&self) -> Option<u64> {
5531            self.event_index.as_ref().map(|field| *field)
5532        }
5533        ///Sets `event_index` with the provided value.
5534        pub fn set_event_index(&mut self, field: u64) {
5535            self.event_index = Some(field);
5536        }
5537        ///Sets `event_index` with the provided value.
5538        pub fn with_event_index(mut self, field: u64) -> Self {
5539            self.set_event_index(field);
5540            self
5541        }
5542        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5543        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5544            self.digest.as_mut().map(|field| field as _)
5545        }
5546        ///Returns a mutable reference to `digest`.
5547        ///If the field is unset, it is first initialized with the default value.
5548        pub fn digest_mut(&mut self) -> &mut String {
5549            self.digest.get_or_insert_default()
5550        }
5551        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5552        pub fn digest_opt(&self) -> Option<&str> {
5553            self.digest.as_ref().map(|field| field as _)
5554        }
5555        ///Sets `digest` with the provided value.
5556        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5557            self.digest = Some(field.into().into());
5558        }
5559        ///Sets `digest` with the provided value.
5560        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5561            self.set_digest(field.into());
5562            self
5563        }
5564    }
5565    impl super::EventFilter {
5566        pub const fn const_default() -> Self {
5567            Self { terms: Vec::new() }
5568        }
5569        #[doc(hidden)]
5570        pub fn default_instance() -> &'static Self {
5571            static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5572            &DEFAULT
5573        }
5574        ///Returns the value of `terms`, or the default value if `terms` is unset.
5575        pub fn terms(&self) -> &[super::EventTerm] {
5576            &self.terms
5577        }
5578        ///Returns a mutable reference to `terms`.
5579        ///If the field is unset, it is first initialized with the default value.
5580        pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5581            &mut self.terms
5582        }
5583        ///Sets `terms` with the provided value.
5584        pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5585            self.terms = field;
5586        }
5587        ///Sets `terms` with the provided value.
5588        pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5589            self.set_terms(field);
5590            self
5591        }
5592    }
5593    impl super::EventLiteral {
5594        pub const fn const_default() -> Self {
5595            Self {
5596                negated: false,
5597                predicate: None,
5598            }
5599        }
5600        #[doc(hidden)]
5601        pub fn default_instance() -> &'static Self {
5602            static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5603            &DEFAULT
5604        }
5605        ///Returns a mutable reference to `negated`.
5606        ///If the field is unset, it is first initialized with the default value.
5607        pub fn negated_mut(&mut self) -> &mut bool {
5608            &mut self.negated
5609        }
5610        ///Sets `negated` with the provided value.
5611        pub fn set_negated(&mut self, field: bool) {
5612            self.negated = field;
5613        }
5614        ///Sets `negated` with the provided value.
5615        pub fn with_negated(mut self, field: bool) -> Self {
5616            self.set_negated(field);
5617            self
5618        }
5619        ///Returns the value of `sender`, or the default value if `sender` is unset.
5620        pub fn sender(&self) -> &super::SenderFilter {
5621            if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5622            {
5623                field as _
5624            } else {
5625                super::SenderFilter::default_instance() as _
5626            }
5627        }
5628        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5629        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5630            if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5631            {
5632                Some(field as _)
5633            } else {
5634                None
5635            }
5636        }
5637        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5638        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5639            if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5640                .predicate
5641            {
5642                Some(field as _)
5643            } else {
5644                None
5645            }
5646        }
5647        ///Returns a mutable reference to `sender`.
5648        ///If the field is unset, it is first initialized with the default value.
5649        ///If any other oneof field in the same oneof is set, it will be cleared.
5650        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5651            if self.sender_opt_mut().is_none() {
5652                self.predicate = Some(
5653                    super::event_literal::Predicate::Sender(
5654                        super::SenderFilter::default(),
5655                    ),
5656                );
5657            }
5658            self.sender_opt_mut().unwrap()
5659        }
5660        ///Sets `sender` with the provided value.
5661        ///If any other oneof field in the same oneof is set, it will be cleared.
5662        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5663            self.predicate = Some(
5664                super::event_literal::Predicate::Sender(field.into().into()),
5665            );
5666        }
5667        ///Sets `sender` with the provided value.
5668        ///If any other oneof field in the same oneof is set, it will be cleared.
5669        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5670            self.set_sender(field.into());
5671            self
5672        }
5673        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
5674        pub fn emit_module(&self) -> &super::EmitModuleFilter {
5675            if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5676                .predicate
5677            {
5678                field as _
5679            } else {
5680                super::EmitModuleFilter::default_instance() as _
5681            }
5682        }
5683        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5684        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5685            if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5686                .predicate
5687            {
5688                Some(field as _)
5689            } else {
5690                None
5691            }
5692        }
5693        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5694        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5695            if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5696                .predicate
5697            {
5698                Some(field as _)
5699            } else {
5700                None
5701            }
5702        }
5703        ///Returns a mutable reference to `emit_module`.
5704        ///If the field is unset, it is first initialized with the default value.
5705        ///If any other oneof field in the same oneof is set, it will be cleared.
5706        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5707            if self.emit_module_opt_mut().is_none() {
5708                self.predicate = Some(
5709                    super::event_literal::Predicate::EmitModule(
5710                        super::EmitModuleFilter::default(),
5711                    ),
5712                );
5713            }
5714            self.emit_module_opt_mut().unwrap()
5715        }
5716        ///Sets `emit_module` with the provided value.
5717        ///If any other oneof field in the same oneof is set, it will be cleared.
5718        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5719            self.predicate = Some(
5720                super::event_literal::Predicate::EmitModule(field.into().into()),
5721            );
5722        }
5723        ///Sets `emit_module` with the provided value.
5724        ///If any other oneof field in the same oneof is set, it will be cleared.
5725        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5726            mut self,
5727            field: T,
5728        ) -> Self {
5729            self.set_emit_module(field.into());
5730            self
5731        }
5732        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
5733        pub fn event_type(&self) -> &super::EventTypeFilter {
5734            if let Some(super::event_literal::Predicate::EventType(field)) = &self
5735                .predicate
5736            {
5737                field as _
5738            } else {
5739                super::EventTypeFilter::default_instance() as _
5740            }
5741        }
5742        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5743        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5744            if let Some(super::event_literal::Predicate::EventType(field)) = &self
5745                .predicate
5746            {
5747                Some(field as _)
5748            } else {
5749                None
5750            }
5751        }
5752        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5753        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5754            if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5755                .predicate
5756            {
5757                Some(field as _)
5758            } else {
5759                None
5760            }
5761        }
5762        ///Returns a mutable reference to `event_type`.
5763        ///If the field is unset, it is first initialized with the default value.
5764        ///If any other oneof field in the same oneof is set, it will be cleared.
5765        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5766            if self.event_type_opt_mut().is_none() {
5767                self.predicate = Some(
5768                    super::event_literal::Predicate::EventType(
5769                        super::EventTypeFilter::default(),
5770                    ),
5771                );
5772            }
5773            self.event_type_opt_mut().unwrap()
5774        }
5775        ///Sets `event_type` with the provided value.
5776        ///If any other oneof field in the same oneof is set, it will be cleared.
5777        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5778            self.predicate = Some(
5779                super::event_literal::Predicate::EventType(field.into().into()),
5780            );
5781        }
5782        ///Sets `event_type` with the provided value.
5783        ///If any other oneof field in the same oneof is set, it will be cleared.
5784        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5785            mut self,
5786            field: T,
5787        ) -> Self {
5788            self.set_event_type(field.into());
5789            self
5790        }
5791        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
5792        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5793            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5794                .predicate
5795            {
5796                field as _
5797            } else {
5798                super::EventStreamHeadFilter::default_instance() as _
5799            }
5800        }
5801        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
5802        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5803            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5804                .predicate
5805            {
5806                Some(field as _)
5807            } else {
5808                None
5809            }
5810        }
5811        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5812        pub fn event_stream_head_opt_mut(
5813            &mut self,
5814        ) -> Option<&mut super::EventStreamHeadFilter> {
5815            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5816                .predicate
5817            {
5818                Some(field as _)
5819            } else {
5820                None
5821            }
5822        }
5823        ///Returns a mutable reference to `event_stream_head`.
5824        ///If the field is unset, it is first initialized with the default value.
5825        ///If any other oneof field in the same oneof is set, it will be cleared.
5826        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5827            if self.event_stream_head_opt_mut().is_none() {
5828                self.predicate = Some(
5829                    super::event_literal::Predicate::EventStreamHead(
5830                        super::EventStreamHeadFilter::default(),
5831                    ),
5832                );
5833            }
5834            self.event_stream_head_opt_mut().unwrap()
5835        }
5836        ///Sets `event_stream_head` with the provided value.
5837        ///If any other oneof field in the same oneof is set, it will be cleared.
5838        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5839            &mut self,
5840            field: T,
5841        ) {
5842            self.predicate = Some(
5843                super::event_literal::Predicate::EventStreamHead(field.into().into()),
5844            );
5845        }
5846        ///Sets `event_stream_head` with the provided value.
5847        ///If any other oneof field in the same oneof is set, it will be cleared.
5848        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5849            mut self,
5850            field: T,
5851        ) -> Self {
5852            self.set_event_stream_head(field.into());
5853            self
5854        }
5855    }
5856    impl super::EventStreamHeadFilter {
5857        pub const fn const_default() -> Self {
5858            Self { stream_id: None }
5859        }
5860        #[doc(hidden)]
5861        pub fn default_instance() -> &'static Self {
5862            static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5863            &DEFAULT
5864        }
5865        ///If `stream_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5866        pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
5867            self.stream_id.as_mut().map(|field| field as _)
5868        }
5869        ///Returns a mutable reference to `stream_id`.
5870        ///If the field is unset, it is first initialized with the default value.
5871        pub fn stream_id_mut(&mut self) -> &mut String {
5872            self.stream_id.get_or_insert_default()
5873        }
5874        ///If `stream_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5875        pub fn stream_id_opt(&self) -> Option<&str> {
5876            self.stream_id.as_ref().map(|field| field as _)
5877        }
5878        ///Sets `stream_id` with the provided value.
5879        pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
5880            self.stream_id = Some(field.into().into());
5881        }
5882        ///Sets `stream_id` with the provided value.
5883        pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
5884            self.set_stream_id(field.into());
5885            self
5886        }
5887    }
5888    impl super::EventTerm {
5889        pub const fn const_default() -> Self {
5890            Self { literals: Vec::new() }
5891        }
5892        #[doc(hidden)]
5893        pub fn default_instance() -> &'static Self {
5894            static DEFAULT: super::EventTerm = super::EventTerm::const_default();
5895            &DEFAULT
5896        }
5897        ///Returns the value of `literals`, or the default value if `literals` is unset.
5898        pub fn literals(&self) -> &[super::EventLiteral] {
5899            &self.literals
5900        }
5901        ///Returns a mutable reference to `literals`.
5902        ///If the field is unset, it is first initialized with the default value.
5903        pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
5904            &mut self.literals
5905        }
5906        ///Sets `literals` with the provided value.
5907        pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
5908            self.literals = field;
5909        }
5910        ///Sets `literals` with the provided value.
5911        pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
5912            self.set_literals(field);
5913            self
5914        }
5915    }
5916    impl super::EventTypeFilter {
5917        pub const fn const_default() -> Self {
5918            Self { event_type: None }
5919        }
5920        #[doc(hidden)]
5921        pub fn default_instance() -> &'static Self {
5922            static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
5923            &DEFAULT
5924        }
5925        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5926        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5927            self.event_type.as_mut().map(|field| field as _)
5928        }
5929        ///Returns a mutable reference to `event_type`.
5930        ///If the field is unset, it is first initialized with the default value.
5931        pub fn event_type_mut(&mut self) -> &mut String {
5932            self.event_type.get_or_insert_default()
5933        }
5934        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5935        pub fn event_type_opt(&self) -> Option<&str> {
5936            self.event_type.as_ref().map(|field| field as _)
5937        }
5938        ///Sets `event_type` with the provided value.
5939        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5940            self.event_type = Some(field.into().into());
5941        }
5942        ///Sets `event_type` with the provided value.
5943        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5944            self.set_event_type(field.into());
5945            self
5946        }
5947    }
5948    impl super::ExecuteTransactionRequest {
5949        pub const fn const_default() -> Self {
5950            Self {
5951                transaction: None,
5952                signatures: Vec::new(),
5953                read_mask: None,
5954            }
5955        }
5956        #[doc(hidden)]
5957        pub fn default_instance() -> &'static Self {
5958            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5959            &DEFAULT
5960        }
5961        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5962        pub fn transaction(&self) -> &super::Transaction {
5963            self.transaction
5964                .as_ref()
5965                .map(|field| field as _)
5966                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5967        }
5968        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5969        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5970            self.transaction.as_mut().map(|field| field as _)
5971        }
5972        ///Returns a mutable reference to `transaction`.
5973        ///If the field is unset, it is first initialized with the default value.
5974        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5975            self.transaction.get_or_insert_default()
5976        }
5977        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5978        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5979            self.transaction.as_ref().map(|field| field as _)
5980        }
5981        ///Sets `transaction` with the provided value.
5982        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5983            self.transaction = Some(field.into().into());
5984        }
5985        ///Sets `transaction` with the provided value.
5986        pub fn with_transaction<T: Into<super::Transaction>>(
5987            mut self,
5988            field: T,
5989        ) -> Self {
5990            self.set_transaction(field.into());
5991            self
5992        }
5993        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5994        pub fn signatures(&self) -> &[super::UserSignature] {
5995            &self.signatures
5996        }
5997        ///Returns a mutable reference to `signatures`.
5998        ///If the field is unset, it is first initialized with the default value.
5999        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6000            &mut self.signatures
6001        }
6002        ///Sets `signatures` with the provided value.
6003        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6004            self.signatures = field;
6005        }
6006        ///Sets `signatures` with the provided value.
6007        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6008            self.set_signatures(field);
6009            self
6010        }
6011        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6012        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6013            self.read_mask.as_mut().map(|field| field as _)
6014        }
6015        ///Returns a mutable reference to `read_mask`.
6016        ///If the field is unset, it is first initialized with the default value.
6017        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6018            self.read_mask.get_or_insert_default()
6019        }
6020        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6021        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6022            self.read_mask.as_ref().map(|field| field as _)
6023        }
6024        ///Sets `read_mask` with the provided value.
6025        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6026            self.read_mask = Some(field.into().into());
6027        }
6028        ///Sets `read_mask` with the provided value.
6029        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6030            mut self,
6031            field: T,
6032        ) -> Self {
6033            self.set_read_mask(field.into());
6034            self
6035        }
6036    }
6037    impl super::ExecuteTransactionResponse {
6038        pub const fn const_default() -> Self {
6039            Self { transaction: None }
6040        }
6041        #[doc(hidden)]
6042        pub fn default_instance() -> &'static Self {
6043            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
6044            &DEFAULT
6045        }
6046        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
6047        pub fn transaction(&self) -> &super::ExecutedTransaction {
6048            self.transaction
6049                .as_ref()
6050                .map(|field| field as _)
6051                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
6052        }
6053        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6054        pub fn transaction_opt_mut(
6055            &mut self,
6056        ) -> Option<&mut super::ExecutedTransaction> {
6057            self.transaction.as_mut().map(|field| field as _)
6058        }
6059        ///Returns a mutable reference to `transaction`.
6060        ///If the field is unset, it is first initialized with the default value.
6061        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6062            self.transaction.get_or_insert_default()
6063        }
6064        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6065        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6066            self.transaction.as_ref().map(|field| field as _)
6067        }
6068        ///Sets `transaction` with the provided value.
6069        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6070            &mut self,
6071            field: T,
6072        ) {
6073            self.transaction = Some(field.into().into());
6074        }
6075        ///Sets `transaction` with the provided value.
6076        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6077            mut self,
6078            field: T,
6079        ) -> Self {
6080            self.set_transaction(field.into());
6081            self
6082        }
6083    }
6084    impl super::ExecutedTransaction {
6085        pub const fn const_default() -> Self {
6086            Self {
6087                digest: None,
6088                transaction: None,
6089                signatures: Vec::new(),
6090                effects: None,
6091                events: None,
6092                checkpoint: None,
6093                timestamp: None,
6094                balance_changes: Vec::new(),
6095                objects: None,
6096                transaction_index: None,
6097            }
6098        }
6099        #[doc(hidden)]
6100        pub fn default_instance() -> &'static Self {
6101            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6102            &DEFAULT
6103        }
6104        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6105        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6106            self.digest.as_mut().map(|field| field as _)
6107        }
6108        ///Returns a mutable reference to `digest`.
6109        ///If the field is unset, it is first initialized with the default value.
6110        pub fn digest_mut(&mut self) -> &mut String {
6111            self.digest.get_or_insert_default()
6112        }
6113        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6114        pub fn digest_opt(&self) -> Option<&str> {
6115            self.digest.as_ref().map(|field| field as _)
6116        }
6117        ///Sets `digest` with the provided value.
6118        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6119            self.digest = Some(field.into().into());
6120        }
6121        ///Sets `digest` with the provided value.
6122        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6123            self.set_digest(field.into());
6124            self
6125        }
6126        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
6127        pub fn transaction(&self) -> &super::Transaction {
6128            self.transaction
6129                .as_ref()
6130                .map(|field| field as _)
6131                .unwrap_or_else(|| super::Transaction::default_instance() as _)
6132        }
6133        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6134        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6135            self.transaction.as_mut().map(|field| field as _)
6136        }
6137        ///Returns a mutable reference to `transaction`.
6138        ///If the field is unset, it is first initialized with the default value.
6139        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6140            self.transaction.get_or_insert_default()
6141        }
6142        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6143        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6144            self.transaction.as_ref().map(|field| field as _)
6145        }
6146        ///Sets `transaction` with the provided value.
6147        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6148            self.transaction = Some(field.into().into());
6149        }
6150        ///Sets `transaction` with the provided value.
6151        pub fn with_transaction<T: Into<super::Transaction>>(
6152            mut self,
6153            field: T,
6154        ) -> Self {
6155            self.set_transaction(field.into());
6156            self
6157        }
6158        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
6159        pub fn signatures(&self) -> &[super::UserSignature] {
6160            &self.signatures
6161        }
6162        ///Returns a mutable reference to `signatures`.
6163        ///If the field is unset, it is first initialized with the default value.
6164        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6165            &mut self.signatures
6166        }
6167        ///Sets `signatures` with the provided value.
6168        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6169            self.signatures = field;
6170        }
6171        ///Sets `signatures` with the provided value.
6172        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6173            self.set_signatures(field);
6174            self
6175        }
6176        ///Returns the value of `effects`, or the default value if `effects` is unset.
6177        pub fn effects(&self) -> &super::TransactionEffects {
6178            self.effects
6179                .as_ref()
6180                .map(|field| field as _)
6181                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6182        }
6183        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6184        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6185            self.effects.as_mut().map(|field| field as _)
6186        }
6187        ///Returns a mutable reference to `effects`.
6188        ///If the field is unset, it is first initialized with the default value.
6189        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6190            self.effects.get_or_insert_default()
6191        }
6192        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6193        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6194            self.effects.as_ref().map(|field| field as _)
6195        }
6196        ///Sets `effects` with the provided value.
6197        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6198            self.effects = Some(field.into().into());
6199        }
6200        ///Sets `effects` with the provided value.
6201        pub fn with_effects<T: Into<super::TransactionEffects>>(
6202            mut self,
6203            field: T,
6204        ) -> Self {
6205            self.set_effects(field.into());
6206            self
6207        }
6208        ///Returns the value of `events`, or the default value if `events` is unset.
6209        pub fn events(&self) -> &super::TransactionEvents {
6210            self.events
6211                .as_ref()
6212                .map(|field| field as _)
6213                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6214        }
6215        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6216        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6217            self.events.as_mut().map(|field| field as _)
6218        }
6219        ///Returns a mutable reference to `events`.
6220        ///If the field is unset, it is first initialized with the default value.
6221        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6222            self.events.get_or_insert_default()
6223        }
6224        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
6225        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6226            self.events.as_ref().map(|field| field as _)
6227        }
6228        ///Sets `events` with the provided value.
6229        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6230            self.events = Some(field.into().into());
6231        }
6232        ///Sets `events` with the provided value.
6233        pub fn with_events<T: Into<super::TransactionEvents>>(
6234            mut self,
6235            field: T,
6236        ) -> Self {
6237            self.set_events(field.into());
6238            self
6239        }
6240        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6241        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6242            self.checkpoint.as_mut().map(|field| field as _)
6243        }
6244        ///Returns a mutable reference to `checkpoint`.
6245        ///If the field is unset, it is first initialized with the default value.
6246        pub fn checkpoint_mut(&mut self) -> &mut u64 {
6247            self.checkpoint.get_or_insert_default()
6248        }
6249        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
6250        pub fn checkpoint_opt(&self) -> Option<u64> {
6251            self.checkpoint.as_ref().map(|field| *field)
6252        }
6253        ///Sets `checkpoint` with the provided value.
6254        pub fn set_checkpoint(&mut self, field: u64) {
6255            self.checkpoint = Some(field);
6256        }
6257        ///Sets `checkpoint` with the provided value.
6258        pub fn with_checkpoint(mut self, field: u64) -> Self {
6259            self.set_checkpoint(field);
6260            self
6261        }
6262        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6263        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6264            self.timestamp.as_mut().map(|field| field as _)
6265        }
6266        ///Returns a mutable reference to `timestamp`.
6267        ///If the field is unset, it is first initialized with the default value.
6268        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6269            self.timestamp.get_or_insert_default()
6270        }
6271        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
6272        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6273            self.timestamp.as_ref().map(|field| field as _)
6274        }
6275        ///Sets `timestamp` with the provided value.
6276        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6277            self.timestamp = Some(field.into().into());
6278        }
6279        ///Sets `timestamp` with the provided value.
6280        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6281            mut self,
6282            field: T,
6283        ) -> Self {
6284            self.set_timestamp(field.into());
6285            self
6286        }
6287        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
6288        pub fn balance_changes(&self) -> &[super::BalanceChange] {
6289            &self.balance_changes
6290        }
6291        ///Returns a mutable reference to `balance_changes`.
6292        ///If the field is unset, it is first initialized with the default value.
6293        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6294            &mut self.balance_changes
6295        }
6296        ///Sets `balance_changes` with the provided value.
6297        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6298            self.balance_changes = field;
6299        }
6300        ///Sets `balance_changes` with the provided value.
6301        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6302            self.set_balance_changes(field);
6303            self
6304        }
6305        ///Returns the value of `objects`, or the default value if `objects` is unset.
6306        pub fn objects(&self) -> &super::ObjectSet {
6307            self.objects
6308                .as_ref()
6309                .map(|field| field as _)
6310                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6311        }
6312        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6313        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6314            self.objects.as_mut().map(|field| field as _)
6315        }
6316        ///Returns a mutable reference to `objects`.
6317        ///If the field is unset, it is first initialized with the default value.
6318        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6319            self.objects.get_or_insert_default()
6320        }
6321        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6322        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6323            self.objects.as_ref().map(|field| field as _)
6324        }
6325        ///Sets `objects` with the provided value.
6326        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6327            self.objects = Some(field.into().into());
6328        }
6329        ///Sets `objects` with the provided value.
6330        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6331            self.set_objects(field.into());
6332            self
6333        }
6334        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6335        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6336            self.transaction_index.as_mut().map(|field| field as _)
6337        }
6338        ///Returns a mutable reference to `transaction_index`.
6339        ///If the field is unset, it is first initialized with the default value.
6340        pub fn transaction_index_mut(&mut self) -> &mut u64 {
6341            self.transaction_index.get_or_insert_default()
6342        }
6343        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
6344        pub fn transaction_index_opt(&self) -> Option<u64> {
6345            self.transaction_index.as_ref().map(|field| *field)
6346        }
6347        ///Sets `transaction_index` with the provided value.
6348        pub fn set_transaction_index(&mut self, field: u64) {
6349            self.transaction_index = Some(field);
6350        }
6351        ///Sets `transaction_index` with the provided value.
6352        pub fn with_transaction_index(mut self, field: u64) -> Self {
6353            self.set_transaction_index(field);
6354            self
6355        }
6356    }
6357    impl super::ExecutionError {
6358        pub const fn const_default() -> Self {
6359            Self {
6360                description: None,
6361                command: None,
6362                kind: None,
6363                error_details: None,
6364            }
6365        }
6366        #[doc(hidden)]
6367        pub fn default_instance() -> &'static Self {
6368            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6369            &DEFAULT
6370        }
6371        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6372        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6373            self.description.as_mut().map(|field| field as _)
6374        }
6375        ///Returns a mutable reference to `description`.
6376        ///If the field is unset, it is first initialized with the default value.
6377        pub fn description_mut(&mut self) -> &mut String {
6378            self.description.get_or_insert_default()
6379        }
6380        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
6381        pub fn description_opt(&self) -> Option<&str> {
6382            self.description.as_ref().map(|field| field as _)
6383        }
6384        ///Sets `description` with the provided value.
6385        pub fn set_description<T: Into<String>>(&mut self, field: T) {
6386            self.description = Some(field.into().into());
6387        }
6388        ///Sets `description` with the provided value.
6389        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6390            self.set_description(field.into());
6391            self
6392        }
6393        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6394        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6395            self.command.as_mut().map(|field| field as _)
6396        }
6397        ///Returns a mutable reference to `command`.
6398        ///If the field is unset, it is first initialized with the default value.
6399        pub fn command_mut(&mut self) -> &mut u64 {
6400            self.command.get_or_insert_default()
6401        }
6402        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
6403        pub fn command_opt(&self) -> Option<u64> {
6404            self.command.as_ref().map(|field| *field)
6405        }
6406        ///Sets `command` with the provided value.
6407        pub fn set_command(&mut self, field: u64) {
6408            self.command = Some(field);
6409        }
6410        ///Sets `command` with the provided value.
6411        pub fn with_command(mut self, field: u64) -> Self {
6412            self.set_command(field);
6413            self
6414        }
6415        ///Sets `kind` with the provided value.
6416        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6417            mut self,
6418            field: T,
6419        ) -> Self {
6420            self.set_kind(field.into());
6421            self
6422        }
6423        ///Returns the value of `abort`, or the default value if `abort` is unset.
6424        pub fn abort(&self) -> &super::MoveAbort {
6425            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6426                .error_details
6427            {
6428                field as _
6429            } else {
6430                super::MoveAbort::default_instance() as _
6431            }
6432        }
6433        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
6434        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6435            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6436                .error_details
6437            {
6438                Some(field as _)
6439            } else {
6440                None
6441            }
6442        }
6443        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6444        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6445            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6446                .error_details
6447            {
6448                Some(field as _)
6449            } else {
6450                None
6451            }
6452        }
6453        ///Returns a mutable reference to `abort`.
6454        ///If the field is unset, it is first initialized with the default value.
6455        ///If any other oneof field in the same oneof is set, it will be cleared.
6456        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6457            if self.abort_opt_mut().is_none() {
6458                self.error_details = Some(
6459                    super::execution_error::ErrorDetails::Abort(
6460                        super::MoveAbort::default(),
6461                    ),
6462                );
6463            }
6464            self.abort_opt_mut().unwrap()
6465        }
6466        ///Sets `abort` with the provided value.
6467        ///If any other oneof field in the same oneof is set, it will be cleared.
6468        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6469            self.error_details = Some(
6470                super::execution_error::ErrorDetails::Abort(field.into().into()),
6471            );
6472        }
6473        ///Sets `abort` with the provided value.
6474        ///If any other oneof field in the same oneof is set, it will be cleared.
6475        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6476            self.set_abort(field.into());
6477            self
6478        }
6479        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
6480        pub fn size_error(&self) -> &super::SizeError {
6481            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6482                .error_details
6483            {
6484                field as _
6485            } else {
6486                super::SizeError::default_instance() as _
6487            }
6488        }
6489        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6490        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6491            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6492                .error_details
6493            {
6494                Some(field as _)
6495            } else {
6496                None
6497            }
6498        }
6499        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6500        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6501            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6502                .error_details
6503            {
6504                Some(field as _)
6505            } else {
6506                None
6507            }
6508        }
6509        ///Returns a mutable reference to `size_error`.
6510        ///If the field is unset, it is first initialized with the default value.
6511        ///If any other oneof field in the same oneof is set, it will be cleared.
6512        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
6513            if self.size_error_opt_mut().is_none() {
6514                self.error_details = Some(
6515                    super::execution_error::ErrorDetails::SizeError(
6516                        super::SizeError::default(),
6517                    ),
6518                );
6519            }
6520            self.size_error_opt_mut().unwrap()
6521        }
6522        ///Sets `size_error` with the provided value.
6523        ///If any other oneof field in the same oneof is set, it will be cleared.
6524        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6525            self.error_details = Some(
6526                super::execution_error::ErrorDetails::SizeError(field.into().into()),
6527            );
6528        }
6529        ///Sets `size_error` with the provided value.
6530        ///If any other oneof field in the same oneof is set, it will be cleared.
6531        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6532            self.set_size_error(field.into());
6533            self
6534        }
6535        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
6536        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6537            if let Some(
6538                super::execution_error::ErrorDetails::CommandArgumentError(field),
6539            ) = &self.error_details
6540            {
6541                field as _
6542            } else {
6543                super::CommandArgumentError::default_instance() as _
6544            }
6545        }
6546        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6547        pub fn command_argument_error_opt(
6548            &self,
6549        ) -> Option<&super::CommandArgumentError> {
6550            if let Some(
6551                super::execution_error::ErrorDetails::CommandArgumentError(field),
6552            ) = &self.error_details
6553            {
6554                Some(field as _)
6555            } else {
6556                None
6557            }
6558        }
6559        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6560        pub fn command_argument_error_opt_mut(
6561            &mut self,
6562        ) -> Option<&mut super::CommandArgumentError> {
6563            if let Some(
6564                super::execution_error::ErrorDetails::CommandArgumentError(field),
6565            ) = &mut self.error_details
6566            {
6567                Some(field as _)
6568            } else {
6569                None
6570            }
6571        }
6572        ///Returns a mutable reference to `command_argument_error`.
6573        ///If the field is unset, it is first initialized with the default value.
6574        ///If any other oneof field in the same oneof is set, it will be cleared.
6575        pub fn command_argument_error_mut(
6576            &mut self,
6577        ) -> &mut super::CommandArgumentError {
6578            if self.command_argument_error_opt_mut().is_none() {
6579                self.error_details = Some(
6580                    super::execution_error::ErrorDetails::CommandArgumentError(
6581                        super::CommandArgumentError::default(),
6582                    ),
6583                );
6584            }
6585            self.command_argument_error_opt_mut().unwrap()
6586        }
6587        ///Sets `command_argument_error` with the provided value.
6588        ///If any other oneof field in the same oneof is set, it will be cleared.
6589        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6590            &mut self,
6591            field: T,
6592        ) {
6593            self.error_details = Some(
6594                super::execution_error::ErrorDetails::CommandArgumentError(
6595                    field.into().into(),
6596                ),
6597            );
6598        }
6599        ///Sets `command_argument_error` with the provided value.
6600        ///If any other oneof field in the same oneof is set, it will be cleared.
6601        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6602            mut self,
6603            field: T,
6604        ) -> Self {
6605            self.set_command_argument_error(field.into());
6606            self
6607        }
6608        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
6609        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6610            if let Some(
6611                super::execution_error::ErrorDetails::TypeArgumentError(field),
6612            ) = &self.error_details
6613            {
6614                field as _
6615            } else {
6616                super::TypeArgumentError::default_instance() as _
6617            }
6618        }
6619        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6620        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6621            if let Some(
6622                super::execution_error::ErrorDetails::TypeArgumentError(field),
6623            ) = &self.error_details
6624            {
6625                Some(field as _)
6626            } else {
6627                None
6628            }
6629        }
6630        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6631        pub fn type_argument_error_opt_mut(
6632            &mut self,
6633        ) -> Option<&mut super::TypeArgumentError> {
6634            if let Some(
6635                super::execution_error::ErrorDetails::TypeArgumentError(field),
6636            ) = &mut self.error_details
6637            {
6638                Some(field as _)
6639            } else {
6640                None
6641            }
6642        }
6643        ///Returns a mutable reference to `type_argument_error`.
6644        ///If the field is unset, it is first initialized with the default value.
6645        ///If any other oneof field in the same oneof is set, it will be cleared.
6646        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6647            if self.type_argument_error_opt_mut().is_none() {
6648                self.error_details = Some(
6649                    super::execution_error::ErrorDetails::TypeArgumentError(
6650                        super::TypeArgumentError::default(),
6651                    ),
6652                );
6653            }
6654            self.type_argument_error_opt_mut().unwrap()
6655        }
6656        ///Sets `type_argument_error` with the provided value.
6657        ///If any other oneof field in the same oneof is set, it will be cleared.
6658        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6659            &mut self,
6660            field: T,
6661        ) {
6662            self.error_details = Some(
6663                super::execution_error::ErrorDetails::TypeArgumentError(
6664                    field.into().into(),
6665                ),
6666            );
6667        }
6668        ///Sets `type_argument_error` with the provided value.
6669        ///If any other oneof field in the same oneof is set, it will be cleared.
6670        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6671            mut self,
6672            field: T,
6673        ) -> Self {
6674            self.set_type_argument_error(field.into());
6675            self
6676        }
6677        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
6678        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6679            if let Some(
6680                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6681            ) = &self.error_details
6682            {
6683                field as _
6684            } else {
6685                super::PackageUpgradeError::default_instance() as _
6686            }
6687        }
6688        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6689        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6690            if let Some(
6691                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6692            ) = &self.error_details
6693            {
6694                Some(field as _)
6695            } else {
6696                None
6697            }
6698        }
6699        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6700        pub fn package_upgrade_error_opt_mut(
6701            &mut self,
6702        ) -> Option<&mut super::PackageUpgradeError> {
6703            if let Some(
6704                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6705            ) = &mut self.error_details
6706            {
6707                Some(field as _)
6708            } else {
6709                None
6710            }
6711        }
6712        ///Returns a mutable reference to `package_upgrade_error`.
6713        ///If the field is unset, it is first initialized with the default value.
6714        ///If any other oneof field in the same oneof is set, it will be cleared.
6715        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6716            if self.package_upgrade_error_opt_mut().is_none() {
6717                self.error_details = Some(
6718                    super::execution_error::ErrorDetails::PackageUpgradeError(
6719                        super::PackageUpgradeError::default(),
6720                    ),
6721                );
6722            }
6723            self.package_upgrade_error_opt_mut().unwrap()
6724        }
6725        ///Sets `package_upgrade_error` with the provided value.
6726        ///If any other oneof field in the same oneof is set, it will be cleared.
6727        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6728            &mut self,
6729            field: T,
6730        ) {
6731            self.error_details = Some(
6732                super::execution_error::ErrorDetails::PackageUpgradeError(
6733                    field.into().into(),
6734                ),
6735            );
6736        }
6737        ///Sets `package_upgrade_error` with the provided value.
6738        ///If any other oneof field in the same oneof is set, it will be cleared.
6739        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6740            mut self,
6741            field: T,
6742        ) -> Self {
6743            self.set_package_upgrade_error(field.into());
6744            self
6745        }
6746        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
6747        pub fn index_error(&self) -> &super::IndexError {
6748            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6749                .error_details
6750            {
6751                field as _
6752            } else {
6753                super::IndexError::default_instance() as _
6754            }
6755        }
6756        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6757        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6758            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6759                .error_details
6760            {
6761                Some(field as _)
6762            } else {
6763                None
6764            }
6765        }
6766        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6767        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6768            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6769                .error_details
6770            {
6771                Some(field as _)
6772            } else {
6773                None
6774            }
6775        }
6776        ///Returns a mutable reference to `index_error`.
6777        ///If the field is unset, it is first initialized with the default value.
6778        ///If any other oneof field in the same oneof is set, it will be cleared.
6779        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6780            if self.index_error_opt_mut().is_none() {
6781                self.error_details = Some(
6782                    super::execution_error::ErrorDetails::IndexError(
6783                        super::IndexError::default(),
6784                    ),
6785                );
6786            }
6787            self.index_error_opt_mut().unwrap()
6788        }
6789        ///Sets `index_error` with the provided value.
6790        ///If any other oneof field in the same oneof is set, it will be cleared.
6791        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6792            self.error_details = Some(
6793                super::execution_error::ErrorDetails::IndexError(field.into().into()),
6794            );
6795        }
6796        ///Sets `index_error` with the provided value.
6797        ///If any other oneof field in the same oneof is set, it will be cleared.
6798        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6799            self.set_index_error(field.into());
6800            self
6801        }
6802        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
6803        pub fn object_id(&self) -> &str {
6804            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6805                .error_details
6806            {
6807                field as _
6808            } else {
6809                ""
6810            }
6811        }
6812        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6813        pub fn object_id_opt(&self) -> Option<&str> {
6814            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6815                .error_details
6816            {
6817                Some(field as _)
6818            } else {
6819                None
6820            }
6821        }
6822        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6823        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6824            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6825                .error_details
6826            {
6827                Some(field as _)
6828            } else {
6829                None
6830            }
6831        }
6832        ///Returns a mutable reference to `object_id`.
6833        ///If the field is unset, it is first initialized with the default value.
6834        ///If any other oneof field in the same oneof is set, it will be cleared.
6835        pub fn object_id_mut(&mut self) -> &mut String {
6836            if self.object_id_opt_mut().is_none() {
6837                self.error_details = Some(
6838                    super::execution_error::ErrorDetails::ObjectId(String::default()),
6839                );
6840            }
6841            self.object_id_opt_mut().unwrap()
6842        }
6843        ///Sets `object_id` with the provided value.
6844        ///If any other oneof field in the same oneof is set, it will be cleared.
6845        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6846            self.error_details = Some(
6847                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6848            );
6849        }
6850        ///Sets `object_id` with the provided value.
6851        ///If any other oneof field in the same oneof is set, it will be cleared.
6852        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6853            self.set_object_id(field.into());
6854            self
6855        }
6856        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
6857        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6858            if let Some(
6859                super::execution_error::ErrorDetails::CoinDenyListError(field),
6860            ) = &self.error_details
6861            {
6862                field as _
6863            } else {
6864                super::CoinDenyListError::default_instance() as _
6865            }
6866        }
6867        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6868        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6869            if let Some(
6870                super::execution_error::ErrorDetails::CoinDenyListError(field),
6871            ) = &self.error_details
6872            {
6873                Some(field as _)
6874            } else {
6875                None
6876            }
6877        }
6878        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6879        pub fn coin_deny_list_error_opt_mut(
6880            &mut self,
6881        ) -> Option<&mut super::CoinDenyListError> {
6882            if let Some(
6883                super::execution_error::ErrorDetails::CoinDenyListError(field),
6884            ) = &mut self.error_details
6885            {
6886                Some(field as _)
6887            } else {
6888                None
6889            }
6890        }
6891        ///Returns a mutable reference to `coin_deny_list_error`.
6892        ///If the field is unset, it is first initialized with the default value.
6893        ///If any other oneof field in the same oneof is set, it will be cleared.
6894        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6895            if self.coin_deny_list_error_opt_mut().is_none() {
6896                self.error_details = Some(
6897                    super::execution_error::ErrorDetails::CoinDenyListError(
6898                        super::CoinDenyListError::default(),
6899                    ),
6900                );
6901            }
6902            self.coin_deny_list_error_opt_mut().unwrap()
6903        }
6904        ///Sets `coin_deny_list_error` with the provided value.
6905        ///If any other oneof field in the same oneof is set, it will be cleared.
6906        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6907            &mut self,
6908            field: T,
6909        ) {
6910            self.error_details = Some(
6911                super::execution_error::ErrorDetails::CoinDenyListError(
6912                    field.into().into(),
6913                ),
6914            );
6915        }
6916        ///Sets `coin_deny_list_error` with the provided value.
6917        ///If any other oneof field in the same oneof is set, it will be cleared.
6918        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6919            mut self,
6920            field: T,
6921        ) -> Self {
6922            self.set_coin_deny_list_error(field.into());
6923            self
6924        }
6925        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6926        pub fn congested_objects(&self) -> &super::CongestedObjects {
6927            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6928                .error_details
6929            {
6930                field as _
6931            } else {
6932                super::CongestedObjects::default_instance() as _
6933            }
6934        }
6935        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6936        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6937            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6938                .error_details
6939            {
6940                Some(field as _)
6941            } else {
6942                None
6943            }
6944        }
6945        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6946        pub fn congested_objects_opt_mut(
6947            &mut self,
6948        ) -> Option<&mut super::CongestedObjects> {
6949            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6950                .error_details
6951            {
6952                Some(field as _)
6953            } else {
6954                None
6955            }
6956        }
6957        ///Returns a mutable reference to `congested_objects`.
6958        ///If the field is unset, it is first initialized with the default value.
6959        ///If any other oneof field in the same oneof is set, it will be cleared.
6960        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6961            if self.congested_objects_opt_mut().is_none() {
6962                self.error_details = Some(
6963                    super::execution_error::ErrorDetails::CongestedObjects(
6964                        super::CongestedObjects::default(),
6965                    ),
6966                );
6967            }
6968            self.congested_objects_opt_mut().unwrap()
6969        }
6970        ///Sets `congested_objects` with the provided value.
6971        ///If any other oneof field in the same oneof is set, it will be cleared.
6972        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6973            &mut self,
6974            field: T,
6975        ) {
6976            self.error_details = Some(
6977                super::execution_error::ErrorDetails::CongestedObjects(
6978                    field.into().into(),
6979                ),
6980            );
6981        }
6982        ///Sets `congested_objects` with the provided value.
6983        ///If any other oneof field in the same oneof is set, it will be cleared.
6984        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6985            mut self,
6986            field: T,
6987        ) -> Self {
6988            self.set_congested_objects(field.into());
6989            self
6990        }
6991    }
6992    impl super::ExecutionStatus {
6993        pub const fn const_default() -> Self {
6994            Self { success: None, error: None }
6995        }
6996        #[doc(hidden)]
6997        pub fn default_instance() -> &'static Self {
6998            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6999            &DEFAULT
7000        }
7001        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7002        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
7003            self.success.as_mut().map(|field| field as _)
7004        }
7005        ///Returns a mutable reference to `success`.
7006        ///If the field is unset, it is first initialized with the default value.
7007        pub fn success_mut(&mut self) -> &mut bool {
7008            self.success.get_or_insert_default()
7009        }
7010        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
7011        pub fn success_opt(&self) -> Option<bool> {
7012            self.success.as_ref().map(|field| *field)
7013        }
7014        ///Sets `success` with the provided value.
7015        pub fn set_success(&mut self, field: bool) {
7016            self.success = Some(field);
7017        }
7018        ///Sets `success` with the provided value.
7019        pub fn with_success(mut self, field: bool) -> Self {
7020            self.set_success(field);
7021            self
7022        }
7023        ///Returns the value of `error`, or the default value if `error` is unset.
7024        pub fn error(&self) -> &super::ExecutionError {
7025            self.error
7026                .as_ref()
7027                .map(|field| field as _)
7028                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
7029        }
7030        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7031        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
7032            self.error.as_mut().map(|field| field as _)
7033        }
7034        ///Returns a mutable reference to `error`.
7035        ///If the field is unset, it is first initialized with the default value.
7036        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
7037            self.error.get_or_insert_default()
7038        }
7039        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7040        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
7041            self.error.as_ref().map(|field| field as _)
7042        }
7043        ///Sets `error` with the provided value.
7044        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
7045            self.error = Some(field.into().into());
7046        }
7047        ///Sets `error` with the provided value.
7048        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
7049            self.set_error(field.into());
7050            self
7051        }
7052    }
7053    impl super::ExecutionTimeObservation {
7054        pub const fn const_default() -> Self {
7055            Self {
7056                kind: None,
7057                move_entry_point: None,
7058                validator_observations: Vec::new(),
7059            }
7060        }
7061        #[doc(hidden)]
7062        pub fn default_instance() -> &'static Self {
7063            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7064            &DEFAULT
7065        }
7066        ///Sets `kind` with the provided value.
7067        pub fn with_kind<
7068            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7069        >(mut self, field: T) -> Self {
7070            self.set_kind(field.into());
7071            self
7072        }
7073        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
7074        pub fn move_entry_point(&self) -> &super::MoveCall {
7075            self.move_entry_point
7076                .as_ref()
7077                .map(|field| field as _)
7078                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7079        }
7080        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7081        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7082            self.move_entry_point.as_mut().map(|field| field as _)
7083        }
7084        ///Returns a mutable reference to `move_entry_point`.
7085        ///If the field is unset, it is first initialized with the default value.
7086        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7087            self.move_entry_point.get_or_insert_default()
7088        }
7089        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
7090        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7091            self.move_entry_point.as_ref().map(|field| field as _)
7092        }
7093        ///Sets `move_entry_point` with the provided value.
7094        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7095            self.move_entry_point = Some(field.into().into());
7096        }
7097        ///Sets `move_entry_point` with the provided value.
7098        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7099            mut self,
7100            field: T,
7101        ) -> Self {
7102            self.set_move_entry_point(field.into());
7103            self
7104        }
7105        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
7106        pub fn validator_observations(
7107            &self,
7108        ) -> &[super::ValidatorExecutionTimeObservation] {
7109            &self.validator_observations
7110        }
7111        ///Returns a mutable reference to `validator_observations`.
7112        ///If the field is unset, it is first initialized with the default value.
7113        pub fn validator_observations_mut(
7114            &mut self,
7115        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7116            &mut self.validator_observations
7117        }
7118        ///Sets `validator_observations` with the provided value.
7119        pub fn set_validator_observations(
7120            &mut self,
7121            field: Vec<super::ValidatorExecutionTimeObservation>,
7122        ) {
7123            self.validator_observations = field;
7124        }
7125        ///Sets `validator_observations` with the provided value.
7126        pub fn with_validator_observations(
7127            mut self,
7128            field: Vec<super::ValidatorExecutionTimeObservation>,
7129        ) -> Self {
7130            self.set_validator_observations(field);
7131            self
7132        }
7133    }
7134    impl super::ExecutionTimeObservations {
7135        pub const fn const_default() -> Self {
7136            Self {
7137                version: None,
7138                observations: Vec::new(),
7139            }
7140        }
7141        #[doc(hidden)]
7142        pub fn default_instance() -> &'static Self {
7143            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7144            &DEFAULT
7145        }
7146        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7147        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7148            self.version.as_mut().map(|field| field as _)
7149        }
7150        ///Returns a mutable reference to `version`.
7151        ///If the field is unset, it is first initialized with the default value.
7152        pub fn version_mut(&mut self) -> &mut i32 {
7153            self.version.get_or_insert_default()
7154        }
7155        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7156        pub fn version_opt(&self) -> Option<i32> {
7157            self.version.as_ref().map(|field| *field)
7158        }
7159        ///Sets `version` with the provided value.
7160        pub fn set_version(&mut self, field: i32) {
7161            self.version = Some(field);
7162        }
7163        ///Sets `version` with the provided value.
7164        pub fn with_version(mut self, field: i32) -> Self {
7165            self.set_version(field);
7166            self
7167        }
7168        ///Returns the value of `observations`, or the default value if `observations` is unset.
7169        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7170            &self.observations
7171        }
7172        ///Returns a mutable reference to `observations`.
7173        ///If the field is unset, it is first initialized with the default value.
7174        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7175            &mut self.observations
7176        }
7177        ///Sets `observations` with the provided value.
7178        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7179            self.observations = field;
7180        }
7181        ///Sets `observations` with the provided value.
7182        pub fn with_observations(
7183            mut self,
7184            field: Vec<super::ExecutionTimeObservation>,
7185        ) -> Self {
7186            self.set_observations(field);
7187            self
7188        }
7189    }
7190    impl super::FieldDescriptor {
7191        pub const fn const_default() -> Self {
7192            Self {
7193                name: None,
7194                position: None,
7195                r#type: None,
7196            }
7197        }
7198        #[doc(hidden)]
7199        pub fn default_instance() -> &'static Self {
7200            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7201            &DEFAULT
7202        }
7203        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7204        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7205            self.name.as_mut().map(|field| field as _)
7206        }
7207        ///Returns a mutable reference to `name`.
7208        ///If the field is unset, it is first initialized with the default value.
7209        pub fn name_mut(&mut self) -> &mut String {
7210            self.name.get_or_insert_default()
7211        }
7212        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7213        pub fn name_opt(&self) -> Option<&str> {
7214            self.name.as_ref().map(|field| field as _)
7215        }
7216        ///Sets `name` with the provided value.
7217        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7218            self.name = Some(field.into().into());
7219        }
7220        ///Sets `name` with the provided value.
7221        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7222            self.set_name(field.into());
7223            self
7224        }
7225        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7226        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7227            self.position.as_mut().map(|field| field as _)
7228        }
7229        ///Returns a mutable reference to `position`.
7230        ///If the field is unset, it is first initialized with the default value.
7231        pub fn position_mut(&mut self) -> &mut u32 {
7232            self.position.get_or_insert_default()
7233        }
7234        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
7235        pub fn position_opt(&self) -> Option<u32> {
7236            self.position.as_ref().map(|field| *field)
7237        }
7238        ///Sets `position` with the provided value.
7239        pub fn set_position(&mut self, field: u32) {
7240            self.position = Some(field);
7241        }
7242        ///Sets `position` with the provided value.
7243        pub fn with_position(mut self, field: u32) -> Self {
7244            self.set_position(field);
7245            self
7246        }
7247        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
7248        pub fn r#type(&self) -> &super::OpenSignatureBody {
7249            self.r#type
7250                .as_ref()
7251                .map(|field| field as _)
7252                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7253        }
7254        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7255        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7256            self.r#type.as_mut().map(|field| field as _)
7257        }
7258        ///Returns a mutable reference to `r#type`.
7259        ///If the field is unset, it is first initialized with the default value.
7260        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7261            self.r#type.get_or_insert_default()
7262        }
7263        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7264        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7265            self.r#type.as_ref().map(|field| field as _)
7266        }
7267        ///Sets `r#type` with the provided value.
7268        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7269            self.r#type = Some(field.into().into());
7270        }
7271        ///Sets `r#type` with the provided value.
7272        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7273            self.set_type(field.into());
7274            self
7275        }
7276    }
7277    impl super::FunctionDescriptor {
7278        pub const fn const_default() -> Self {
7279            Self {
7280                name: None,
7281                visibility: None,
7282                is_entry: None,
7283                type_parameters: Vec::new(),
7284                parameters: Vec::new(),
7285                returns: Vec::new(),
7286            }
7287        }
7288        #[doc(hidden)]
7289        pub fn default_instance() -> &'static Self {
7290            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7291            &DEFAULT
7292        }
7293        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7294        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7295            self.name.as_mut().map(|field| field as _)
7296        }
7297        ///Returns a mutable reference to `name`.
7298        ///If the field is unset, it is first initialized with the default value.
7299        pub fn name_mut(&mut self) -> &mut String {
7300            self.name.get_or_insert_default()
7301        }
7302        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7303        pub fn name_opt(&self) -> Option<&str> {
7304            self.name.as_ref().map(|field| field as _)
7305        }
7306        ///Sets `name` with the provided value.
7307        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7308            self.name = Some(field.into().into());
7309        }
7310        ///Sets `name` with the provided value.
7311        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7312            self.set_name(field.into());
7313            self
7314        }
7315        ///Sets `visibility` with the provided value.
7316        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7317            mut self,
7318            field: T,
7319        ) -> Self {
7320            self.set_visibility(field.into());
7321            self
7322        }
7323        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7324        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7325            self.is_entry.as_mut().map(|field| field as _)
7326        }
7327        ///Returns a mutable reference to `is_entry`.
7328        ///If the field is unset, it is first initialized with the default value.
7329        pub fn is_entry_mut(&mut self) -> &mut bool {
7330            self.is_entry.get_or_insert_default()
7331        }
7332        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
7333        pub fn is_entry_opt(&self) -> Option<bool> {
7334            self.is_entry.as_ref().map(|field| *field)
7335        }
7336        ///Sets `is_entry` with the provided value.
7337        pub fn set_is_entry(&mut self, field: bool) {
7338            self.is_entry = Some(field);
7339        }
7340        ///Sets `is_entry` with the provided value.
7341        pub fn with_is_entry(mut self, field: bool) -> Self {
7342            self.set_is_entry(field);
7343            self
7344        }
7345        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
7346        pub fn type_parameters(&self) -> &[super::TypeParameter] {
7347            &self.type_parameters
7348        }
7349        ///Returns a mutable reference to `type_parameters`.
7350        ///If the field is unset, it is first initialized with the default value.
7351        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7352            &mut self.type_parameters
7353        }
7354        ///Sets `type_parameters` with the provided value.
7355        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7356            self.type_parameters = field;
7357        }
7358        ///Sets `type_parameters` with the provided value.
7359        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7360            self.set_type_parameters(field);
7361            self
7362        }
7363        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
7364        pub fn parameters(&self) -> &[super::OpenSignature] {
7365            &self.parameters
7366        }
7367        ///Returns a mutable reference to `parameters`.
7368        ///If the field is unset, it is first initialized with the default value.
7369        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7370            &mut self.parameters
7371        }
7372        ///Sets `parameters` with the provided value.
7373        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7374            self.parameters = field;
7375        }
7376        ///Sets `parameters` with the provided value.
7377        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7378            self.set_parameters(field);
7379            self
7380        }
7381        ///Returns the value of `returns`, or the default value if `returns` is unset.
7382        pub fn returns(&self) -> &[super::OpenSignature] {
7383            &self.returns
7384        }
7385        ///Returns a mutable reference to `returns`.
7386        ///If the field is unset, it is first initialized with the default value.
7387        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7388            &mut self.returns
7389        }
7390        ///Sets `returns` with the provided value.
7391        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7392            self.returns = field;
7393        }
7394        ///Sets `returns` with the provided value.
7395        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7396            self.set_returns(field);
7397            self
7398        }
7399    }
7400    impl super::FundsWithdrawal {
7401        pub const fn const_default() -> Self {
7402            Self {
7403                amount: None,
7404                coin_type: None,
7405                source: None,
7406                funder: None,
7407                allowance: None,
7408            }
7409        }
7410        #[doc(hidden)]
7411        pub fn default_instance() -> &'static Self {
7412            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7413            &DEFAULT
7414        }
7415        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7416        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7417            self.amount.as_mut().map(|field| field as _)
7418        }
7419        ///Returns a mutable reference to `amount`.
7420        ///If the field is unset, it is first initialized with the default value.
7421        pub fn amount_mut(&mut self) -> &mut u64 {
7422            self.amount.get_or_insert_default()
7423        }
7424        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
7425        pub fn amount_opt(&self) -> Option<u64> {
7426            self.amount.as_ref().map(|field| *field)
7427        }
7428        ///Sets `amount` with the provided value.
7429        pub fn set_amount(&mut self, field: u64) {
7430            self.amount = Some(field);
7431        }
7432        ///Sets `amount` with the provided value.
7433        pub fn with_amount(mut self, field: u64) -> Self {
7434            self.set_amount(field);
7435            self
7436        }
7437        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7438        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7439            self.coin_type.as_mut().map(|field| field as _)
7440        }
7441        ///Returns a mutable reference to `coin_type`.
7442        ///If the field is unset, it is first initialized with the default value.
7443        pub fn coin_type_mut(&mut self) -> &mut String {
7444            self.coin_type.get_or_insert_default()
7445        }
7446        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7447        pub fn coin_type_opt(&self) -> Option<&str> {
7448            self.coin_type.as_ref().map(|field| field as _)
7449        }
7450        ///Sets `coin_type` with the provided value.
7451        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7452            self.coin_type = Some(field.into().into());
7453        }
7454        ///Sets `coin_type` with the provided value.
7455        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7456            self.set_coin_type(field.into());
7457            self
7458        }
7459        ///Sets `source` with the provided value.
7460        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7461            mut self,
7462            field: T,
7463        ) -> Self {
7464            self.set_source(field.into());
7465            self
7466        }
7467        ///If `funder` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7468        pub fn funder_opt_mut(&mut self) -> Option<&mut String> {
7469            self.funder.as_mut().map(|field| field as _)
7470        }
7471        ///Returns a mutable reference to `funder`.
7472        ///If the field is unset, it is first initialized with the default value.
7473        pub fn funder_mut(&mut self) -> &mut String {
7474            self.funder.get_or_insert_default()
7475        }
7476        ///If `funder` is set, returns [`Some`] with the value; otherwise returns [`None`].
7477        pub fn funder_opt(&self) -> Option<&str> {
7478            self.funder.as_ref().map(|field| field as _)
7479        }
7480        ///Sets `funder` with the provided value.
7481        pub fn set_funder<T: Into<String>>(&mut self, field: T) {
7482            self.funder = Some(field.into().into());
7483        }
7484        ///Sets `funder` with the provided value.
7485        pub fn with_funder<T: Into<String>>(mut self, field: T) -> Self {
7486            self.set_funder(field.into());
7487            self
7488        }
7489        ///If `allowance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7490        pub fn allowance_opt_mut(&mut self) -> Option<&mut String> {
7491            self.allowance.as_mut().map(|field| field as _)
7492        }
7493        ///Returns a mutable reference to `allowance`.
7494        ///If the field is unset, it is first initialized with the default value.
7495        pub fn allowance_mut(&mut self) -> &mut String {
7496            self.allowance.get_or_insert_default()
7497        }
7498        ///If `allowance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7499        pub fn allowance_opt(&self) -> Option<&str> {
7500            self.allowance.as_ref().map(|field| field as _)
7501        }
7502        ///Sets `allowance` with the provided value.
7503        pub fn set_allowance<T: Into<String>>(&mut self, field: T) {
7504            self.allowance = Some(field.into().into());
7505        }
7506        ///Sets `allowance` with the provided value.
7507        pub fn with_allowance<T: Into<String>>(mut self, field: T) -> Self {
7508            self.set_allowance(field.into());
7509            self
7510        }
7511    }
7512    impl super::GasCostSummary {
7513        pub const fn const_default() -> Self {
7514            Self {
7515                computation_cost: None,
7516                storage_cost: None,
7517                storage_rebate: None,
7518                non_refundable_storage_fee: None,
7519            }
7520        }
7521        #[doc(hidden)]
7522        pub fn default_instance() -> &'static Self {
7523            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7524            &DEFAULT
7525        }
7526        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7527        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7528            self.computation_cost.as_mut().map(|field| field as _)
7529        }
7530        ///Returns a mutable reference to `computation_cost`.
7531        ///If the field is unset, it is first initialized with the default value.
7532        pub fn computation_cost_mut(&mut self) -> &mut u64 {
7533            self.computation_cost.get_or_insert_default()
7534        }
7535        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7536        pub fn computation_cost_opt(&self) -> Option<u64> {
7537            self.computation_cost.as_ref().map(|field| *field)
7538        }
7539        ///Sets `computation_cost` with the provided value.
7540        pub fn set_computation_cost(&mut self, field: u64) {
7541            self.computation_cost = Some(field);
7542        }
7543        ///Sets `computation_cost` with the provided value.
7544        pub fn with_computation_cost(mut self, field: u64) -> Self {
7545            self.set_computation_cost(field);
7546            self
7547        }
7548        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7549        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7550            self.storage_cost.as_mut().map(|field| field as _)
7551        }
7552        ///Returns a mutable reference to `storage_cost`.
7553        ///If the field is unset, it is first initialized with the default value.
7554        pub fn storage_cost_mut(&mut self) -> &mut u64 {
7555            self.storage_cost.get_or_insert_default()
7556        }
7557        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7558        pub fn storage_cost_opt(&self) -> Option<u64> {
7559            self.storage_cost.as_ref().map(|field| *field)
7560        }
7561        ///Sets `storage_cost` with the provided value.
7562        pub fn set_storage_cost(&mut self, field: u64) {
7563            self.storage_cost = Some(field);
7564        }
7565        ///Sets `storage_cost` with the provided value.
7566        pub fn with_storage_cost(mut self, field: u64) -> Self {
7567            self.set_storage_cost(field);
7568            self
7569        }
7570        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7571        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7572            self.storage_rebate.as_mut().map(|field| field as _)
7573        }
7574        ///Returns a mutable reference to `storage_rebate`.
7575        ///If the field is unset, it is first initialized with the default value.
7576        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7577            self.storage_rebate.get_or_insert_default()
7578        }
7579        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
7580        pub fn storage_rebate_opt(&self) -> Option<u64> {
7581            self.storage_rebate.as_ref().map(|field| *field)
7582        }
7583        ///Sets `storage_rebate` with the provided value.
7584        pub fn set_storage_rebate(&mut self, field: u64) {
7585            self.storage_rebate = Some(field);
7586        }
7587        ///Sets `storage_rebate` with the provided value.
7588        pub fn with_storage_rebate(mut self, field: u64) -> Self {
7589            self.set_storage_rebate(field);
7590            self
7591        }
7592        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7593        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7594            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7595        }
7596        ///Returns a mutable reference to `non_refundable_storage_fee`.
7597        ///If the field is unset, it is first initialized with the default value.
7598        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7599            self.non_refundable_storage_fee.get_or_insert_default()
7600        }
7601        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
7602        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7603            self.non_refundable_storage_fee.as_ref().map(|field| *field)
7604        }
7605        ///Sets `non_refundable_storage_fee` with the provided value.
7606        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7607            self.non_refundable_storage_fee = Some(field);
7608        }
7609        ///Sets `non_refundable_storage_fee` with the provided value.
7610        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7611            self.set_non_refundable_storage_fee(field);
7612            self
7613        }
7614    }
7615    impl super::GasPayment {
7616        pub const fn const_default() -> Self {
7617            Self {
7618                objects: Vec::new(),
7619                owner: None,
7620                price: None,
7621                budget: None,
7622            }
7623        }
7624        #[doc(hidden)]
7625        pub fn default_instance() -> &'static Self {
7626            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7627            &DEFAULT
7628        }
7629        ///Returns the value of `objects`, or the default value if `objects` is unset.
7630        pub fn objects(&self) -> &[super::ObjectReference] {
7631            &self.objects
7632        }
7633        ///Returns a mutable reference to `objects`.
7634        ///If the field is unset, it is first initialized with the default value.
7635        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7636            &mut self.objects
7637        }
7638        ///Sets `objects` with the provided value.
7639        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7640            self.objects = field;
7641        }
7642        ///Sets `objects` with the provided value.
7643        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7644            self.set_objects(field);
7645            self
7646        }
7647        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7648        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7649            self.owner.as_mut().map(|field| field as _)
7650        }
7651        ///Returns a mutable reference to `owner`.
7652        ///If the field is unset, it is first initialized with the default value.
7653        pub fn owner_mut(&mut self) -> &mut String {
7654            self.owner.get_or_insert_default()
7655        }
7656        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7657        pub fn owner_opt(&self) -> Option<&str> {
7658            self.owner.as_ref().map(|field| field as _)
7659        }
7660        ///Sets `owner` with the provided value.
7661        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7662            self.owner = Some(field.into().into());
7663        }
7664        ///Sets `owner` with the provided value.
7665        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7666            self.set_owner(field.into());
7667            self
7668        }
7669        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7670        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7671            self.price.as_mut().map(|field| field as _)
7672        }
7673        ///Returns a mutable reference to `price`.
7674        ///If the field is unset, it is first initialized with the default value.
7675        pub fn price_mut(&mut self) -> &mut u64 {
7676            self.price.get_or_insert_default()
7677        }
7678        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
7679        pub fn price_opt(&self) -> Option<u64> {
7680            self.price.as_ref().map(|field| *field)
7681        }
7682        ///Sets `price` with the provided value.
7683        pub fn set_price(&mut self, field: u64) {
7684            self.price = Some(field);
7685        }
7686        ///Sets `price` with the provided value.
7687        pub fn with_price(mut self, field: u64) -> Self {
7688            self.set_price(field);
7689            self
7690        }
7691        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7692        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7693            self.budget.as_mut().map(|field| field as _)
7694        }
7695        ///Returns a mutable reference to `budget`.
7696        ///If the field is unset, it is first initialized with the default value.
7697        pub fn budget_mut(&mut self) -> &mut u64 {
7698            self.budget.get_or_insert_default()
7699        }
7700        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
7701        pub fn budget_opt(&self) -> Option<u64> {
7702            self.budget.as_ref().map(|field| *field)
7703        }
7704        ///Sets `budget` with the provided value.
7705        pub fn set_budget(&mut self, field: u64) {
7706            self.budget = Some(field);
7707        }
7708        ///Sets `budget` with the provided value.
7709        pub fn with_budget(mut self, field: u64) -> Self {
7710            self.set_budget(field);
7711            self
7712        }
7713    }
7714    impl super::GenesisTransaction {
7715        pub const fn const_default() -> Self {
7716            Self { objects: Vec::new() }
7717        }
7718        #[doc(hidden)]
7719        pub fn default_instance() -> &'static Self {
7720            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7721            &DEFAULT
7722        }
7723        ///Returns the value of `objects`, or the default value if `objects` is unset.
7724        pub fn objects(&self) -> &[super::Object] {
7725            &self.objects
7726        }
7727        ///Returns a mutable reference to `objects`.
7728        ///If the field is unset, it is first initialized with the default value.
7729        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7730            &mut self.objects
7731        }
7732        ///Sets `objects` with the provided value.
7733        pub fn set_objects(&mut self, field: Vec<super::Object>) {
7734            self.objects = field;
7735        }
7736        ///Sets `objects` with the provided value.
7737        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7738            self.set_objects(field);
7739            self
7740        }
7741    }
7742    impl super::GetBalanceRequest {
7743        pub const fn const_default() -> Self {
7744            Self {
7745                owner: None,
7746                coin_type: None,
7747            }
7748        }
7749        #[doc(hidden)]
7750        pub fn default_instance() -> &'static Self {
7751            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7752            &DEFAULT
7753        }
7754        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7755        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7756            self.owner.as_mut().map(|field| field as _)
7757        }
7758        ///Returns a mutable reference to `owner`.
7759        ///If the field is unset, it is first initialized with the default value.
7760        pub fn owner_mut(&mut self) -> &mut String {
7761            self.owner.get_or_insert_default()
7762        }
7763        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7764        pub fn owner_opt(&self) -> Option<&str> {
7765            self.owner.as_ref().map(|field| field as _)
7766        }
7767        ///Sets `owner` with the provided value.
7768        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7769            self.owner = Some(field.into().into());
7770        }
7771        ///Sets `owner` with the provided value.
7772        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7773            self.set_owner(field.into());
7774            self
7775        }
7776        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7777        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7778            self.coin_type.as_mut().map(|field| field as _)
7779        }
7780        ///Returns a mutable reference to `coin_type`.
7781        ///If the field is unset, it is first initialized with the default value.
7782        pub fn coin_type_mut(&mut self) -> &mut String {
7783            self.coin_type.get_or_insert_default()
7784        }
7785        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7786        pub fn coin_type_opt(&self) -> Option<&str> {
7787            self.coin_type.as_ref().map(|field| field as _)
7788        }
7789        ///Sets `coin_type` with the provided value.
7790        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7791            self.coin_type = Some(field.into().into());
7792        }
7793        ///Sets `coin_type` with the provided value.
7794        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7795            self.set_coin_type(field.into());
7796            self
7797        }
7798    }
7799    impl super::GetBalanceResponse {
7800        pub const fn const_default() -> Self {
7801            Self { balance: None }
7802        }
7803        #[doc(hidden)]
7804        pub fn default_instance() -> &'static Self {
7805            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7806            &DEFAULT
7807        }
7808        ///Returns the value of `balance`, or the default value if `balance` is unset.
7809        pub fn balance(&self) -> &super::Balance {
7810            self.balance
7811                .as_ref()
7812                .map(|field| field as _)
7813                .unwrap_or_else(|| super::Balance::default_instance() as _)
7814        }
7815        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7816        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7817            self.balance.as_mut().map(|field| field as _)
7818        }
7819        ///Returns a mutable reference to `balance`.
7820        ///If the field is unset, it is first initialized with the default value.
7821        pub fn balance_mut(&mut self) -> &mut super::Balance {
7822            self.balance.get_or_insert_default()
7823        }
7824        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7825        pub fn balance_opt(&self) -> Option<&super::Balance> {
7826            self.balance.as_ref().map(|field| field as _)
7827        }
7828        ///Sets `balance` with the provided value.
7829        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7830            self.balance = Some(field.into().into());
7831        }
7832        ///Sets `balance` with the provided value.
7833        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7834            self.set_balance(field.into());
7835            self
7836        }
7837    }
7838    impl super::GetCheckpointRequest {
7839        pub const fn const_default() -> Self {
7840            Self {
7841                read_mask: None,
7842                checkpoint_id: None,
7843            }
7844        }
7845        #[doc(hidden)]
7846        pub fn default_instance() -> &'static Self {
7847            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7848            &DEFAULT
7849        }
7850        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7851        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7852            self.read_mask.as_mut().map(|field| field as _)
7853        }
7854        ///Returns a mutable reference to `read_mask`.
7855        ///If the field is unset, it is first initialized with the default value.
7856        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7857            self.read_mask.get_or_insert_default()
7858        }
7859        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7860        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7861            self.read_mask.as_ref().map(|field| field as _)
7862        }
7863        ///Sets `read_mask` with the provided value.
7864        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7865            self.read_mask = Some(field.into().into());
7866        }
7867        ///Sets `read_mask` with the provided value.
7868        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7869            mut self,
7870            field: T,
7871        ) -> Self {
7872            self.set_read_mask(field.into());
7873            self
7874        }
7875        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
7876        pub fn sequence_number(&self) -> u64 {
7877            if let Some(
7878                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7879            ) = &self.checkpoint_id
7880            {
7881                *field
7882            } else {
7883                0u64
7884            }
7885        }
7886        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
7887        pub fn sequence_number_opt(&self) -> Option<u64> {
7888            if let Some(
7889                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7890            ) = &self.checkpoint_id
7891            {
7892                Some(*field)
7893            } else {
7894                None
7895            }
7896        }
7897        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7898        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7899            if let Some(
7900                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7901            ) = &mut self.checkpoint_id
7902            {
7903                Some(field as _)
7904            } else {
7905                None
7906            }
7907        }
7908        ///Returns a mutable reference to `sequence_number`.
7909        ///If the field is unset, it is first initialized with the default value.
7910        ///If any other oneof field in the same oneof is set, it will be cleared.
7911        pub fn sequence_number_mut(&mut self) -> &mut u64 {
7912            if self.sequence_number_opt_mut().is_none() {
7913                self.checkpoint_id = Some(
7914                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
7915                        u64::default(),
7916                    ),
7917                );
7918            }
7919            self.sequence_number_opt_mut().unwrap()
7920        }
7921        ///Sets `sequence_number` with the provided value.
7922        ///If any other oneof field in the same oneof is set, it will be cleared.
7923        pub fn set_sequence_number(&mut self, field: u64) {
7924            self.checkpoint_id = Some(
7925                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7926            );
7927        }
7928        ///Sets `sequence_number` with the provided value.
7929        ///If any other oneof field in the same oneof is set, it will be cleared.
7930        pub fn with_sequence_number(mut self, field: u64) -> Self {
7931            self.set_sequence_number(field);
7932            self
7933        }
7934        ///Returns the value of `digest`, or the default value if `digest` is unset.
7935        pub fn digest(&self) -> &str {
7936            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7937                .checkpoint_id
7938            {
7939                field as _
7940            } else {
7941                ""
7942            }
7943        }
7944        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7945        pub fn digest_opt(&self) -> Option<&str> {
7946            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7947                .checkpoint_id
7948            {
7949                Some(field as _)
7950            } else {
7951                None
7952            }
7953        }
7954        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7955        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7956            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7957                .checkpoint_id
7958            {
7959                Some(field as _)
7960            } else {
7961                None
7962            }
7963        }
7964        ///Returns a mutable reference to `digest`.
7965        ///If the field is unset, it is first initialized with the default value.
7966        ///If any other oneof field in the same oneof is set, it will be cleared.
7967        pub fn digest_mut(&mut self) -> &mut String {
7968            if self.digest_opt_mut().is_none() {
7969                self.checkpoint_id = Some(
7970                    super::get_checkpoint_request::CheckpointId::Digest(
7971                        String::default(),
7972                    ),
7973                );
7974            }
7975            self.digest_opt_mut().unwrap()
7976        }
7977        ///Sets `digest` with the provided value.
7978        ///If any other oneof field in the same oneof is set, it will be cleared.
7979        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7980            self.checkpoint_id = Some(
7981                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7982            );
7983        }
7984        ///Sets `digest` with the provided value.
7985        ///If any other oneof field in the same oneof is set, it will be cleared.
7986        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7987            self.set_digest(field.into());
7988            self
7989        }
7990    }
7991    impl super::GetCheckpointResponse {
7992        pub const fn const_default() -> Self {
7993            Self { checkpoint: None }
7994        }
7995        #[doc(hidden)]
7996        pub fn default_instance() -> &'static Self {
7997            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7998            &DEFAULT
7999        }
8000        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
8001        pub fn checkpoint(&self) -> &super::Checkpoint {
8002            self.checkpoint
8003                .as_ref()
8004                .map(|field| field as _)
8005                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
8006        }
8007        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8008        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
8009            self.checkpoint.as_mut().map(|field| field as _)
8010        }
8011        ///Returns a mutable reference to `checkpoint`.
8012        ///If the field is unset, it is first initialized with the default value.
8013        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
8014            self.checkpoint.get_or_insert_default()
8015        }
8016        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8017        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
8018            self.checkpoint.as_ref().map(|field| field as _)
8019        }
8020        ///Sets `checkpoint` with the provided value.
8021        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
8022            self.checkpoint = Some(field.into().into());
8023        }
8024        ///Sets `checkpoint` with the provided value.
8025        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
8026            self.set_checkpoint(field.into());
8027            self
8028        }
8029    }
8030    impl super::GetCoinInfoRequest {
8031        pub const fn const_default() -> Self {
8032            Self { coin_type: None }
8033        }
8034        #[doc(hidden)]
8035        pub fn default_instance() -> &'static Self {
8036            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
8037            &DEFAULT
8038        }
8039        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8040        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8041            self.coin_type.as_mut().map(|field| field as _)
8042        }
8043        ///Returns a mutable reference to `coin_type`.
8044        ///If the field is unset, it is first initialized with the default value.
8045        pub fn coin_type_mut(&mut self) -> &mut String {
8046            self.coin_type.get_or_insert_default()
8047        }
8048        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8049        pub fn coin_type_opt(&self) -> Option<&str> {
8050            self.coin_type.as_ref().map(|field| field as _)
8051        }
8052        ///Sets `coin_type` with the provided value.
8053        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8054            self.coin_type = Some(field.into().into());
8055        }
8056        ///Sets `coin_type` with the provided value.
8057        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8058            self.set_coin_type(field.into());
8059            self
8060        }
8061    }
8062    impl super::GetCoinInfoResponse {
8063        pub const fn const_default() -> Self {
8064            Self {
8065                coin_type: None,
8066                metadata: None,
8067                treasury: None,
8068                regulated_metadata: None,
8069            }
8070        }
8071        #[doc(hidden)]
8072        pub fn default_instance() -> &'static Self {
8073            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
8074            &DEFAULT
8075        }
8076        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8077        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8078            self.coin_type.as_mut().map(|field| field as _)
8079        }
8080        ///Returns a mutable reference to `coin_type`.
8081        ///If the field is unset, it is first initialized with the default value.
8082        pub fn coin_type_mut(&mut self) -> &mut String {
8083            self.coin_type.get_or_insert_default()
8084        }
8085        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8086        pub fn coin_type_opt(&self) -> Option<&str> {
8087            self.coin_type.as_ref().map(|field| field as _)
8088        }
8089        ///Sets `coin_type` with the provided value.
8090        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8091            self.coin_type = Some(field.into().into());
8092        }
8093        ///Sets `coin_type` with the provided value.
8094        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8095            self.set_coin_type(field.into());
8096            self
8097        }
8098        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
8099        pub fn metadata(&self) -> &super::CoinMetadata {
8100            self.metadata
8101                .as_ref()
8102                .map(|field| field as _)
8103                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8104        }
8105        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8106        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8107            self.metadata.as_mut().map(|field| field as _)
8108        }
8109        ///Returns a mutable reference to `metadata`.
8110        ///If the field is unset, it is first initialized with the default value.
8111        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8112            self.metadata.get_or_insert_default()
8113        }
8114        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8115        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8116            self.metadata.as_ref().map(|field| field as _)
8117        }
8118        ///Sets `metadata` with the provided value.
8119        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8120            self.metadata = Some(field.into().into());
8121        }
8122        ///Sets `metadata` with the provided value.
8123        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8124            self.set_metadata(field.into());
8125            self
8126        }
8127        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
8128        pub fn treasury(&self) -> &super::CoinTreasury {
8129            self.treasury
8130                .as_ref()
8131                .map(|field| field as _)
8132                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8133        }
8134        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8135        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8136            self.treasury.as_mut().map(|field| field as _)
8137        }
8138        ///Returns a mutable reference to `treasury`.
8139        ///If the field is unset, it is first initialized with the default value.
8140        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8141            self.treasury.get_or_insert_default()
8142        }
8143        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
8144        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8145            self.treasury.as_ref().map(|field| field as _)
8146        }
8147        ///Sets `treasury` with the provided value.
8148        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8149            self.treasury = Some(field.into().into());
8150        }
8151        ///Sets `treasury` with the provided value.
8152        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8153            self.set_treasury(field.into());
8154            self
8155        }
8156        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
8157        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8158            self.regulated_metadata
8159                .as_ref()
8160                .map(|field| field as _)
8161                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8162        }
8163        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8164        pub fn regulated_metadata_opt_mut(
8165            &mut self,
8166        ) -> Option<&mut super::RegulatedCoinMetadata> {
8167            self.regulated_metadata.as_mut().map(|field| field as _)
8168        }
8169        ///Returns a mutable reference to `regulated_metadata`.
8170        ///If the field is unset, it is first initialized with the default value.
8171        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8172            self.regulated_metadata.get_or_insert_default()
8173        }
8174        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8175        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8176            self.regulated_metadata.as_ref().map(|field| field as _)
8177        }
8178        ///Sets `regulated_metadata` with the provided value.
8179        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8180            &mut self,
8181            field: T,
8182        ) {
8183            self.regulated_metadata = Some(field.into().into());
8184        }
8185        ///Sets `regulated_metadata` with the provided value.
8186        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8187            mut self,
8188            field: T,
8189        ) -> Self {
8190            self.set_regulated_metadata(field.into());
8191            self
8192        }
8193    }
8194    impl super::GetDatatypeRequest {
8195        pub const fn const_default() -> Self {
8196            Self {
8197                package_id: None,
8198                module_name: None,
8199                name: None,
8200            }
8201        }
8202        #[doc(hidden)]
8203        pub fn default_instance() -> &'static Self {
8204            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8205            &DEFAULT
8206        }
8207        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8208        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8209            self.package_id.as_mut().map(|field| field as _)
8210        }
8211        ///Returns a mutable reference to `package_id`.
8212        ///If the field is unset, it is first initialized with the default value.
8213        pub fn package_id_mut(&mut self) -> &mut String {
8214            self.package_id.get_or_insert_default()
8215        }
8216        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8217        pub fn package_id_opt(&self) -> Option<&str> {
8218            self.package_id.as_ref().map(|field| field as _)
8219        }
8220        ///Sets `package_id` with the provided value.
8221        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8222            self.package_id = Some(field.into().into());
8223        }
8224        ///Sets `package_id` with the provided value.
8225        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8226            self.set_package_id(field.into());
8227            self
8228        }
8229        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8230        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8231            self.module_name.as_mut().map(|field| field as _)
8232        }
8233        ///Returns a mutable reference to `module_name`.
8234        ///If the field is unset, it is first initialized with the default value.
8235        pub fn module_name_mut(&mut self) -> &mut String {
8236            self.module_name.get_or_insert_default()
8237        }
8238        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8239        pub fn module_name_opt(&self) -> Option<&str> {
8240            self.module_name.as_ref().map(|field| field as _)
8241        }
8242        ///Sets `module_name` with the provided value.
8243        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8244            self.module_name = Some(field.into().into());
8245        }
8246        ///Sets `module_name` with the provided value.
8247        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8248            self.set_module_name(field.into());
8249            self
8250        }
8251        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8252        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8253            self.name.as_mut().map(|field| field as _)
8254        }
8255        ///Returns a mutable reference to `name`.
8256        ///If the field is unset, it is first initialized with the default value.
8257        pub fn name_mut(&mut self) -> &mut String {
8258            self.name.get_or_insert_default()
8259        }
8260        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8261        pub fn name_opt(&self) -> Option<&str> {
8262            self.name.as_ref().map(|field| field as _)
8263        }
8264        ///Sets `name` with the provided value.
8265        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8266            self.name = Some(field.into().into());
8267        }
8268        ///Sets `name` with the provided value.
8269        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8270            self.set_name(field.into());
8271            self
8272        }
8273    }
8274    impl super::GetDatatypeResponse {
8275        pub const fn const_default() -> Self {
8276            Self { datatype: None }
8277        }
8278        #[doc(hidden)]
8279        pub fn default_instance() -> &'static Self {
8280            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8281            &DEFAULT
8282        }
8283        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
8284        pub fn datatype(&self) -> &super::DatatypeDescriptor {
8285            self.datatype
8286                .as_ref()
8287                .map(|field| field as _)
8288                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8289        }
8290        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8291        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8292            self.datatype.as_mut().map(|field| field as _)
8293        }
8294        ///Returns a mutable reference to `datatype`.
8295        ///If the field is unset, it is first initialized with the default value.
8296        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8297            self.datatype.get_or_insert_default()
8298        }
8299        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
8300        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8301            self.datatype.as_ref().map(|field| field as _)
8302        }
8303        ///Sets `datatype` with the provided value.
8304        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8305            self.datatype = Some(field.into().into());
8306        }
8307        ///Sets `datatype` with the provided value.
8308        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8309            mut self,
8310            field: T,
8311        ) -> Self {
8312            self.set_datatype(field.into());
8313            self
8314        }
8315    }
8316    impl super::GetEpochRequest {
8317        pub const fn const_default() -> Self {
8318            Self {
8319                epoch: None,
8320                read_mask: None,
8321            }
8322        }
8323        #[doc(hidden)]
8324        pub fn default_instance() -> &'static Self {
8325            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8326            &DEFAULT
8327        }
8328        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8329        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8330            self.epoch.as_mut().map(|field| field as _)
8331        }
8332        ///Returns a mutable reference to `epoch`.
8333        ///If the field is unset, it is first initialized with the default value.
8334        pub fn epoch_mut(&mut self) -> &mut u64 {
8335            self.epoch.get_or_insert_default()
8336        }
8337        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8338        pub fn epoch_opt(&self) -> Option<u64> {
8339            self.epoch.as_ref().map(|field| *field)
8340        }
8341        ///Sets `epoch` with the provided value.
8342        pub fn set_epoch(&mut self, field: u64) {
8343            self.epoch = Some(field);
8344        }
8345        ///Sets `epoch` with the provided value.
8346        pub fn with_epoch(mut self, field: u64) -> Self {
8347            self.set_epoch(field);
8348            self
8349        }
8350        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8351        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8352            self.read_mask.as_mut().map(|field| field as _)
8353        }
8354        ///Returns a mutable reference to `read_mask`.
8355        ///If the field is unset, it is first initialized with the default value.
8356        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8357            self.read_mask.get_or_insert_default()
8358        }
8359        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8360        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8361            self.read_mask.as_ref().map(|field| field as _)
8362        }
8363        ///Sets `read_mask` with the provided value.
8364        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8365            self.read_mask = Some(field.into().into());
8366        }
8367        ///Sets `read_mask` with the provided value.
8368        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8369            mut self,
8370            field: T,
8371        ) -> Self {
8372            self.set_read_mask(field.into());
8373            self
8374        }
8375    }
8376    impl super::GetEpochResponse {
8377        pub const fn const_default() -> Self {
8378            Self { epoch: None }
8379        }
8380        #[doc(hidden)]
8381        pub fn default_instance() -> &'static Self {
8382            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8383            &DEFAULT
8384        }
8385        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
8386        pub fn epoch(&self) -> &super::Epoch {
8387            self.epoch
8388                .as_ref()
8389                .map(|field| field as _)
8390                .unwrap_or_else(|| super::Epoch::default_instance() as _)
8391        }
8392        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8393        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8394            self.epoch.as_mut().map(|field| field as _)
8395        }
8396        ///Returns a mutable reference to `epoch`.
8397        ///If the field is unset, it is first initialized with the default value.
8398        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8399            self.epoch.get_or_insert_default()
8400        }
8401        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8402        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8403            self.epoch.as_ref().map(|field| field as _)
8404        }
8405        ///Sets `epoch` with the provided value.
8406        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8407            self.epoch = Some(field.into().into());
8408        }
8409        ///Sets `epoch` with the provided value.
8410        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8411            self.set_epoch(field.into());
8412            self
8413        }
8414    }
8415    impl super::GetFunctionRequest {
8416        pub const fn const_default() -> Self {
8417            Self {
8418                package_id: None,
8419                module_name: None,
8420                name: None,
8421            }
8422        }
8423        #[doc(hidden)]
8424        pub fn default_instance() -> &'static Self {
8425            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8426            &DEFAULT
8427        }
8428        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8429        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8430            self.package_id.as_mut().map(|field| field as _)
8431        }
8432        ///Returns a mutable reference to `package_id`.
8433        ///If the field is unset, it is first initialized with the default value.
8434        pub fn package_id_mut(&mut self) -> &mut String {
8435            self.package_id.get_or_insert_default()
8436        }
8437        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8438        pub fn package_id_opt(&self) -> Option<&str> {
8439            self.package_id.as_ref().map(|field| field as _)
8440        }
8441        ///Sets `package_id` with the provided value.
8442        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8443            self.package_id = Some(field.into().into());
8444        }
8445        ///Sets `package_id` with the provided value.
8446        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8447            self.set_package_id(field.into());
8448            self
8449        }
8450        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8451        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8452            self.module_name.as_mut().map(|field| field as _)
8453        }
8454        ///Returns a mutable reference to `module_name`.
8455        ///If the field is unset, it is first initialized with the default value.
8456        pub fn module_name_mut(&mut self) -> &mut String {
8457            self.module_name.get_or_insert_default()
8458        }
8459        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8460        pub fn module_name_opt(&self) -> Option<&str> {
8461            self.module_name.as_ref().map(|field| field as _)
8462        }
8463        ///Sets `module_name` with the provided value.
8464        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8465            self.module_name = Some(field.into().into());
8466        }
8467        ///Sets `module_name` with the provided value.
8468        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8469            self.set_module_name(field.into());
8470            self
8471        }
8472        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8473        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8474            self.name.as_mut().map(|field| field as _)
8475        }
8476        ///Returns a mutable reference to `name`.
8477        ///If the field is unset, it is first initialized with the default value.
8478        pub fn name_mut(&mut self) -> &mut String {
8479            self.name.get_or_insert_default()
8480        }
8481        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8482        pub fn name_opt(&self) -> Option<&str> {
8483            self.name.as_ref().map(|field| field as _)
8484        }
8485        ///Sets `name` with the provided value.
8486        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8487            self.name = Some(field.into().into());
8488        }
8489        ///Sets `name` with the provided value.
8490        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8491            self.set_name(field.into());
8492            self
8493        }
8494    }
8495    impl super::GetFunctionResponse {
8496        pub const fn const_default() -> Self {
8497            Self { function: None }
8498        }
8499        #[doc(hidden)]
8500        pub fn default_instance() -> &'static Self {
8501            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8502            &DEFAULT
8503        }
8504        ///Returns the value of `function`, or the default value if `function` is unset.
8505        pub fn function(&self) -> &super::FunctionDescriptor {
8506            self.function
8507                .as_ref()
8508                .map(|field| field as _)
8509                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8510        }
8511        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8512        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8513            self.function.as_mut().map(|field| field as _)
8514        }
8515        ///Returns a mutable reference to `function`.
8516        ///If the field is unset, it is first initialized with the default value.
8517        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8518            self.function.get_or_insert_default()
8519        }
8520        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
8521        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8522            self.function.as_ref().map(|field| field as _)
8523        }
8524        ///Sets `function` with the provided value.
8525        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8526            self.function = Some(field.into().into());
8527        }
8528        ///Sets `function` with the provided value.
8529        pub fn with_function<T: Into<super::FunctionDescriptor>>(
8530            mut self,
8531            field: T,
8532        ) -> Self {
8533            self.set_function(field.into());
8534            self
8535        }
8536    }
8537    impl super::GetObjectRequest {
8538        pub const fn const_default() -> Self {
8539            Self {
8540                object_id: None,
8541                version: None,
8542                read_mask: None,
8543            }
8544        }
8545        #[doc(hidden)]
8546        pub fn default_instance() -> &'static Self {
8547            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8548            &DEFAULT
8549        }
8550        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8551        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8552            self.object_id.as_mut().map(|field| field as _)
8553        }
8554        ///Returns a mutable reference to `object_id`.
8555        ///If the field is unset, it is first initialized with the default value.
8556        pub fn object_id_mut(&mut self) -> &mut String {
8557            self.object_id.get_or_insert_default()
8558        }
8559        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8560        pub fn object_id_opt(&self) -> Option<&str> {
8561            self.object_id.as_ref().map(|field| field as _)
8562        }
8563        ///Sets `object_id` with the provided value.
8564        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8565            self.object_id = Some(field.into().into());
8566        }
8567        ///Sets `object_id` with the provided value.
8568        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8569            self.set_object_id(field.into());
8570            self
8571        }
8572        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8573        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8574            self.version.as_mut().map(|field| field as _)
8575        }
8576        ///Returns a mutable reference to `version`.
8577        ///If the field is unset, it is first initialized with the default value.
8578        pub fn version_mut(&mut self) -> &mut u64 {
8579            self.version.get_or_insert_default()
8580        }
8581        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8582        pub fn version_opt(&self) -> Option<u64> {
8583            self.version.as_ref().map(|field| *field)
8584        }
8585        ///Sets `version` with the provided value.
8586        pub fn set_version(&mut self, field: u64) {
8587            self.version = Some(field);
8588        }
8589        ///Sets `version` with the provided value.
8590        pub fn with_version(mut self, field: u64) -> Self {
8591            self.set_version(field);
8592            self
8593        }
8594        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8595        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8596            self.read_mask.as_mut().map(|field| field as _)
8597        }
8598        ///Returns a mutable reference to `read_mask`.
8599        ///If the field is unset, it is first initialized with the default value.
8600        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8601            self.read_mask.get_or_insert_default()
8602        }
8603        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8604        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8605            self.read_mask.as_ref().map(|field| field as _)
8606        }
8607        ///Sets `read_mask` with the provided value.
8608        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8609            self.read_mask = Some(field.into().into());
8610        }
8611        ///Sets `read_mask` with the provided value.
8612        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8613            mut self,
8614            field: T,
8615        ) -> Self {
8616            self.set_read_mask(field.into());
8617            self
8618        }
8619    }
8620    impl super::GetObjectResponse {
8621        pub const fn const_default() -> Self {
8622            Self { object: None }
8623        }
8624        #[doc(hidden)]
8625        pub fn default_instance() -> &'static Self {
8626            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8627            &DEFAULT
8628        }
8629        ///Returns the value of `object`, or the default value if `object` is unset.
8630        pub fn object(&self) -> &super::Object {
8631            self.object
8632                .as_ref()
8633                .map(|field| field as _)
8634                .unwrap_or_else(|| super::Object::default_instance() as _)
8635        }
8636        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8637        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8638            self.object.as_mut().map(|field| field as _)
8639        }
8640        ///Returns a mutable reference to `object`.
8641        ///If the field is unset, it is first initialized with the default value.
8642        pub fn object_mut(&mut self) -> &mut super::Object {
8643            self.object.get_or_insert_default()
8644        }
8645        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8646        pub fn object_opt(&self) -> Option<&super::Object> {
8647            self.object.as_ref().map(|field| field as _)
8648        }
8649        ///Sets `object` with the provided value.
8650        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8651            self.object = Some(field.into().into());
8652        }
8653        ///Sets `object` with the provided value.
8654        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8655            self.set_object(field.into());
8656            self
8657        }
8658    }
8659    impl super::GetObjectResult {
8660        pub const fn const_default() -> Self {
8661            Self { result: None }
8662        }
8663        #[doc(hidden)]
8664        pub fn default_instance() -> &'static Self {
8665            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8666            &DEFAULT
8667        }
8668        ///Returns the value of `object`, or the default value if `object` is unset.
8669        pub fn object(&self) -> &super::Object {
8670            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8671                field as _
8672            } else {
8673                super::Object::default_instance() as _
8674            }
8675        }
8676        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8677        pub fn object_opt(&self) -> Option<&super::Object> {
8678            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8679                Some(field as _)
8680            } else {
8681                None
8682            }
8683        }
8684        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8685        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8686            if let Some(super::get_object_result::Result::Object(field)) = &mut self
8687                .result
8688            {
8689                Some(field as _)
8690            } else {
8691                None
8692            }
8693        }
8694        ///Returns a mutable reference to `object`.
8695        ///If the field is unset, it is first initialized with the default value.
8696        ///If any other oneof field in the same oneof is set, it will be cleared.
8697        pub fn object_mut(&mut self) -> &mut super::Object {
8698            if self.object_opt_mut().is_none() {
8699                self.result = Some(
8700                    super::get_object_result::Result::Object(super::Object::default()),
8701                );
8702            }
8703            self.object_opt_mut().unwrap()
8704        }
8705        ///Sets `object` with the provided value.
8706        ///If any other oneof field in the same oneof is set, it will be cleared.
8707        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8708            self.result = Some(
8709                super::get_object_result::Result::Object(field.into().into()),
8710            );
8711        }
8712        ///Sets `object` with the provided value.
8713        ///If any other oneof field in the same oneof is set, it will be cleared.
8714        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8715            self.set_object(field.into());
8716            self
8717        }
8718        ///Returns the value of `error`, or the default value if `error` is unset.
8719        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8720            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8721                field as _
8722            } else {
8723                super::super::super::super::google::rpc::Status::default_instance() as _
8724            }
8725        }
8726        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8727        pub fn error_opt(
8728            &self,
8729        ) -> Option<&super::super::super::super::google::rpc::Status> {
8730            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8731                Some(field as _)
8732            } else {
8733                None
8734            }
8735        }
8736        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8737        pub fn error_opt_mut(
8738            &mut self,
8739        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8740            if let Some(super::get_object_result::Result::Error(field)) = &mut self
8741                .result
8742            {
8743                Some(field as _)
8744            } else {
8745                None
8746            }
8747        }
8748        ///Returns a mutable reference to `error`.
8749        ///If the field is unset, it is first initialized with the default value.
8750        ///If any other oneof field in the same oneof is set, it will be cleared.
8751        pub fn error_mut(
8752            &mut self,
8753        ) -> &mut super::super::super::super::google::rpc::Status {
8754            if self.error_opt_mut().is_none() {
8755                self.result = Some(
8756                    super::get_object_result::Result::Error(
8757                        super::super::super::super::google::rpc::Status::default(),
8758                    ),
8759                );
8760            }
8761            self.error_opt_mut().unwrap()
8762        }
8763        ///Sets `error` with the provided value.
8764        ///If any other oneof field in the same oneof is set, it will be cleared.
8765        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8766            &mut self,
8767            field: T,
8768        ) {
8769            self.result = Some(
8770                super::get_object_result::Result::Error(field.into().into()),
8771            );
8772        }
8773        ///Sets `error` with the provided value.
8774        ///If any other oneof field in the same oneof is set, it will be cleared.
8775        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8776            mut self,
8777            field: T,
8778        ) -> Self {
8779            self.set_error(field.into());
8780            self
8781        }
8782    }
8783    impl super::GetPackageRequest {
8784        pub const fn const_default() -> Self {
8785            Self { package_id: None }
8786        }
8787        #[doc(hidden)]
8788        pub fn default_instance() -> &'static Self {
8789            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8790            &DEFAULT
8791        }
8792        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8793        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8794            self.package_id.as_mut().map(|field| field as _)
8795        }
8796        ///Returns a mutable reference to `package_id`.
8797        ///If the field is unset, it is first initialized with the default value.
8798        pub fn package_id_mut(&mut self) -> &mut String {
8799            self.package_id.get_or_insert_default()
8800        }
8801        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8802        pub fn package_id_opt(&self) -> Option<&str> {
8803            self.package_id.as_ref().map(|field| field as _)
8804        }
8805        ///Sets `package_id` with the provided value.
8806        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8807            self.package_id = Some(field.into().into());
8808        }
8809        ///Sets `package_id` with the provided value.
8810        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8811            self.set_package_id(field.into());
8812            self
8813        }
8814    }
8815    impl super::GetPackageResponse {
8816        pub const fn const_default() -> Self {
8817            Self { package: None }
8818        }
8819        #[doc(hidden)]
8820        pub fn default_instance() -> &'static Self {
8821            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8822            &DEFAULT
8823        }
8824        ///Returns the value of `package`, or the default value if `package` is unset.
8825        pub fn package(&self) -> &super::Package {
8826            self.package
8827                .as_ref()
8828                .map(|field| field as _)
8829                .unwrap_or_else(|| super::Package::default_instance() as _)
8830        }
8831        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8832        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8833            self.package.as_mut().map(|field| field as _)
8834        }
8835        ///Returns a mutable reference to `package`.
8836        ///If the field is unset, it is first initialized with the default value.
8837        pub fn package_mut(&mut self) -> &mut super::Package {
8838            self.package.get_or_insert_default()
8839        }
8840        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
8841        pub fn package_opt(&self) -> Option<&super::Package> {
8842            self.package.as_ref().map(|field| field as _)
8843        }
8844        ///Sets `package` with the provided value.
8845        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8846            self.package = Some(field.into().into());
8847        }
8848        ///Sets `package` with the provided value.
8849        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8850            self.set_package(field.into());
8851            self
8852        }
8853    }
8854    impl super::GetServiceInfoRequest {
8855        pub const fn const_default() -> Self {
8856            Self {}
8857        }
8858        #[doc(hidden)]
8859        pub fn default_instance() -> &'static Self {
8860            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8861            &DEFAULT
8862        }
8863    }
8864    impl super::GetServiceInfoResponse {
8865        pub const fn const_default() -> Self {
8866            Self {
8867                chain_id: None,
8868                chain: None,
8869                epoch: None,
8870                checkpoint_height: None,
8871                timestamp: None,
8872                lowest_available_checkpoint: None,
8873                lowest_available_checkpoint_objects: None,
8874                server: None,
8875            }
8876        }
8877        #[doc(hidden)]
8878        pub fn default_instance() -> &'static Self {
8879            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8880            &DEFAULT
8881        }
8882        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8883        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8884            self.chain_id.as_mut().map(|field| field as _)
8885        }
8886        ///Returns a mutable reference to `chain_id`.
8887        ///If the field is unset, it is first initialized with the default value.
8888        pub fn chain_id_mut(&mut self) -> &mut String {
8889            self.chain_id.get_or_insert_default()
8890        }
8891        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8892        pub fn chain_id_opt(&self) -> Option<&str> {
8893            self.chain_id.as_ref().map(|field| field as _)
8894        }
8895        ///Sets `chain_id` with the provided value.
8896        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8897            self.chain_id = Some(field.into().into());
8898        }
8899        ///Sets `chain_id` with the provided value.
8900        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8901            self.set_chain_id(field.into());
8902            self
8903        }
8904        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8905        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8906            self.chain.as_mut().map(|field| field as _)
8907        }
8908        ///Returns a mutable reference to `chain`.
8909        ///If the field is unset, it is first initialized with the default value.
8910        pub fn chain_mut(&mut self) -> &mut String {
8911            self.chain.get_or_insert_default()
8912        }
8913        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
8914        pub fn chain_opt(&self) -> Option<&str> {
8915            self.chain.as_ref().map(|field| field as _)
8916        }
8917        ///Sets `chain` with the provided value.
8918        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8919            self.chain = Some(field.into().into());
8920        }
8921        ///Sets `chain` with the provided value.
8922        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8923            self.set_chain(field.into());
8924            self
8925        }
8926        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8927        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8928            self.epoch.as_mut().map(|field| field as _)
8929        }
8930        ///Returns a mutable reference to `epoch`.
8931        ///If the field is unset, it is first initialized with the default value.
8932        pub fn epoch_mut(&mut self) -> &mut u64 {
8933            self.epoch.get_or_insert_default()
8934        }
8935        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8936        pub fn epoch_opt(&self) -> Option<u64> {
8937            self.epoch.as_ref().map(|field| *field)
8938        }
8939        ///Sets `epoch` with the provided value.
8940        pub fn set_epoch(&mut self, field: u64) {
8941            self.epoch = Some(field);
8942        }
8943        ///Sets `epoch` with the provided value.
8944        pub fn with_epoch(mut self, field: u64) -> Self {
8945            self.set_epoch(field);
8946            self
8947        }
8948        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8949        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8950            self.checkpoint_height.as_mut().map(|field| field as _)
8951        }
8952        ///Returns a mutable reference to `checkpoint_height`.
8953        ///If the field is unset, it is first initialized with the default value.
8954        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8955            self.checkpoint_height.get_or_insert_default()
8956        }
8957        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
8958        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8959            self.checkpoint_height.as_ref().map(|field| *field)
8960        }
8961        ///Sets `checkpoint_height` with the provided value.
8962        pub fn set_checkpoint_height(&mut self, field: u64) {
8963            self.checkpoint_height = Some(field);
8964        }
8965        ///Sets `checkpoint_height` with the provided value.
8966        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8967            self.set_checkpoint_height(field);
8968            self
8969        }
8970        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8971        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8972            self.timestamp.as_mut().map(|field| field as _)
8973        }
8974        ///Returns a mutable reference to `timestamp`.
8975        ///If the field is unset, it is first initialized with the default value.
8976        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8977            self.timestamp.get_or_insert_default()
8978        }
8979        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8980        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8981            self.timestamp.as_ref().map(|field| field as _)
8982        }
8983        ///Sets `timestamp` with the provided value.
8984        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8985            self.timestamp = Some(field.into().into());
8986        }
8987        ///Sets `timestamp` with the provided value.
8988        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8989            mut self,
8990            field: T,
8991        ) -> Self {
8992            self.set_timestamp(field.into());
8993            self
8994        }
8995        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8996        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8997            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8998        }
8999        ///Returns a mutable reference to `lowest_available_checkpoint`.
9000        ///If the field is unset, it is first initialized with the default value.
9001        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
9002            self.lowest_available_checkpoint.get_or_insert_default()
9003        }
9004        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9005        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
9006            self.lowest_available_checkpoint.as_ref().map(|field| *field)
9007        }
9008        ///Sets `lowest_available_checkpoint` with the provided value.
9009        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
9010            self.lowest_available_checkpoint = Some(field);
9011        }
9012        ///Sets `lowest_available_checkpoint` with the provided value.
9013        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
9014            self.set_lowest_available_checkpoint(field);
9015            self
9016        }
9017        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9018        pub fn lowest_available_checkpoint_objects_opt_mut(
9019            &mut self,
9020        ) -> Option<&mut u64> {
9021            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
9022        }
9023        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
9024        ///If the field is unset, it is first initialized with the default value.
9025        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
9026            self.lowest_available_checkpoint_objects.get_or_insert_default()
9027        }
9028        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
9029        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
9030            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
9031        }
9032        ///Sets `lowest_available_checkpoint_objects` with the provided value.
9033        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
9034            self.lowest_available_checkpoint_objects = Some(field);
9035        }
9036        ///Sets `lowest_available_checkpoint_objects` with the provided value.
9037        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
9038            self.set_lowest_available_checkpoint_objects(field);
9039            self
9040        }
9041        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9042        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
9043            self.server.as_mut().map(|field| field as _)
9044        }
9045        ///Returns a mutable reference to `server`.
9046        ///If the field is unset, it is first initialized with the default value.
9047        pub fn server_mut(&mut self) -> &mut String {
9048            self.server.get_or_insert_default()
9049        }
9050        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
9051        pub fn server_opt(&self) -> Option<&str> {
9052            self.server.as_ref().map(|field| field as _)
9053        }
9054        ///Sets `server` with the provided value.
9055        pub fn set_server<T: Into<String>>(&mut self, field: T) {
9056            self.server = Some(field.into().into());
9057        }
9058        ///Sets `server` with the provided value.
9059        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9060            self.set_server(field.into());
9061            self
9062        }
9063    }
9064    impl super::GetTransactionRequest {
9065        pub const fn const_default() -> Self {
9066            Self {
9067                digest: None,
9068                read_mask: None,
9069            }
9070        }
9071        #[doc(hidden)]
9072        pub fn default_instance() -> &'static Self {
9073            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9074            &DEFAULT
9075        }
9076        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9077        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9078            self.digest.as_mut().map(|field| field as _)
9079        }
9080        ///Returns a mutable reference to `digest`.
9081        ///If the field is unset, it is first initialized with the default value.
9082        pub fn digest_mut(&mut self) -> &mut String {
9083            self.digest.get_or_insert_default()
9084        }
9085        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9086        pub fn digest_opt(&self) -> Option<&str> {
9087            self.digest.as_ref().map(|field| field as _)
9088        }
9089        ///Sets `digest` with the provided value.
9090        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9091            self.digest = Some(field.into().into());
9092        }
9093        ///Sets `digest` with the provided value.
9094        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9095            self.set_digest(field.into());
9096            self
9097        }
9098        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9099        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9100            self.read_mask.as_mut().map(|field| field as _)
9101        }
9102        ///Returns a mutable reference to `read_mask`.
9103        ///If the field is unset, it is first initialized with the default value.
9104        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9105            self.read_mask.get_or_insert_default()
9106        }
9107        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9108        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9109            self.read_mask.as_ref().map(|field| field as _)
9110        }
9111        ///Sets `read_mask` with the provided value.
9112        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9113            self.read_mask = Some(field.into().into());
9114        }
9115        ///Sets `read_mask` with the provided value.
9116        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9117            mut self,
9118            field: T,
9119        ) -> Self {
9120            self.set_read_mask(field.into());
9121            self
9122        }
9123    }
9124    impl super::GetTransactionResponse {
9125        pub const fn const_default() -> Self {
9126            Self { transaction: None }
9127        }
9128        #[doc(hidden)]
9129        pub fn default_instance() -> &'static Self {
9130            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9131            &DEFAULT
9132        }
9133        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9134        pub fn transaction(&self) -> &super::ExecutedTransaction {
9135            self.transaction
9136                .as_ref()
9137                .map(|field| field as _)
9138                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9139        }
9140        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9141        pub fn transaction_opt_mut(
9142            &mut self,
9143        ) -> Option<&mut super::ExecutedTransaction> {
9144            self.transaction.as_mut().map(|field| field as _)
9145        }
9146        ///Returns a mutable reference to `transaction`.
9147        ///If the field is unset, it is first initialized with the default value.
9148        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9149            self.transaction.get_or_insert_default()
9150        }
9151        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9152        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9153            self.transaction.as_ref().map(|field| field as _)
9154        }
9155        ///Sets `transaction` with the provided value.
9156        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9157            &mut self,
9158            field: T,
9159        ) {
9160            self.transaction = Some(field.into().into());
9161        }
9162        ///Sets `transaction` with the provided value.
9163        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9164            mut self,
9165            field: T,
9166        ) -> Self {
9167            self.set_transaction(field.into());
9168            self
9169        }
9170    }
9171    impl super::GetTransactionResult {
9172        pub const fn const_default() -> Self {
9173            Self { result: None }
9174        }
9175        #[doc(hidden)]
9176        pub fn default_instance() -> &'static Self {
9177            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9178            &DEFAULT
9179        }
9180        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9181        pub fn transaction(&self) -> &super::ExecutedTransaction {
9182            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9183                .result
9184            {
9185                field as _
9186            } else {
9187                super::ExecutedTransaction::default_instance() as _
9188            }
9189        }
9190        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9191        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9192            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9193                .result
9194            {
9195                Some(field as _)
9196            } else {
9197                None
9198            }
9199        }
9200        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9201        pub fn transaction_opt_mut(
9202            &mut self,
9203        ) -> Option<&mut super::ExecutedTransaction> {
9204            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9205                .result
9206            {
9207                Some(field as _)
9208            } else {
9209                None
9210            }
9211        }
9212        ///Returns a mutable reference to `transaction`.
9213        ///If the field is unset, it is first initialized with the default value.
9214        ///If any other oneof field in the same oneof is set, it will be cleared.
9215        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9216            if self.transaction_opt_mut().is_none() {
9217                self.result = Some(
9218                    super::get_transaction_result::Result::Transaction(
9219                        super::ExecutedTransaction::default(),
9220                    ),
9221                );
9222            }
9223            self.transaction_opt_mut().unwrap()
9224        }
9225        ///Sets `transaction` with the provided value.
9226        ///If any other oneof field in the same oneof is set, it will be cleared.
9227        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9228            &mut self,
9229            field: T,
9230        ) {
9231            self.result = Some(
9232                super::get_transaction_result::Result::Transaction(field.into().into()),
9233            );
9234        }
9235        ///Sets `transaction` with the provided value.
9236        ///If any other oneof field in the same oneof is set, it will be cleared.
9237        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9238            mut self,
9239            field: T,
9240        ) -> Self {
9241            self.set_transaction(field.into());
9242            self
9243        }
9244        ///Returns the value of `error`, or the default value if `error` is unset.
9245        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9246            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9247                .result
9248            {
9249                field as _
9250            } else {
9251                super::super::super::super::google::rpc::Status::default_instance() as _
9252            }
9253        }
9254        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9255        pub fn error_opt(
9256            &self,
9257        ) -> Option<&super::super::super::super::google::rpc::Status> {
9258            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9259                .result
9260            {
9261                Some(field as _)
9262            } else {
9263                None
9264            }
9265        }
9266        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9267        pub fn error_opt_mut(
9268            &mut self,
9269        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9270            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9271                .result
9272            {
9273                Some(field as _)
9274            } else {
9275                None
9276            }
9277        }
9278        ///Returns a mutable reference to `error`.
9279        ///If the field is unset, it is first initialized with the default value.
9280        ///If any other oneof field in the same oneof is set, it will be cleared.
9281        pub fn error_mut(
9282            &mut self,
9283        ) -> &mut super::super::super::super::google::rpc::Status {
9284            if self.error_opt_mut().is_none() {
9285                self.result = Some(
9286                    super::get_transaction_result::Result::Error(
9287                        super::super::super::super::google::rpc::Status::default(),
9288                    ),
9289                );
9290            }
9291            self.error_opt_mut().unwrap()
9292        }
9293        ///Sets `error` with the provided value.
9294        ///If any other oneof field in the same oneof is set, it will be cleared.
9295        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9296            &mut self,
9297            field: T,
9298        ) {
9299            self.result = Some(
9300                super::get_transaction_result::Result::Error(field.into().into()),
9301            );
9302        }
9303        ///Sets `error` with the provided value.
9304        ///If any other oneof field in the same oneof is set, it will be cleared.
9305        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9306            mut self,
9307            field: T,
9308        ) -> Self {
9309            self.set_error(field.into());
9310            self
9311        }
9312    }
9313    impl super::IndexError {
9314        pub const fn const_default() -> Self {
9315            Self {
9316                index: None,
9317                subresult: None,
9318            }
9319        }
9320        #[doc(hidden)]
9321        pub fn default_instance() -> &'static Self {
9322            static DEFAULT: super::IndexError = super::IndexError::const_default();
9323            &DEFAULT
9324        }
9325        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9326        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9327            self.index.as_mut().map(|field| field as _)
9328        }
9329        ///Returns a mutable reference to `index`.
9330        ///If the field is unset, it is first initialized with the default value.
9331        pub fn index_mut(&mut self) -> &mut u32 {
9332            self.index.get_or_insert_default()
9333        }
9334        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
9335        pub fn index_opt(&self) -> Option<u32> {
9336            self.index.as_ref().map(|field| *field)
9337        }
9338        ///Sets `index` with the provided value.
9339        pub fn set_index(&mut self, field: u32) {
9340            self.index = Some(field);
9341        }
9342        ///Sets `index` with the provided value.
9343        pub fn with_index(mut self, field: u32) -> Self {
9344            self.set_index(field);
9345            self
9346        }
9347        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9348        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9349            self.subresult.as_mut().map(|field| field as _)
9350        }
9351        ///Returns a mutable reference to `subresult`.
9352        ///If the field is unset, it is first initialized with the default value.
9353        pub fn subresult_mut(&mut self) -> &mut u32 {
9354            self.subresult.get_or_insert_default()
9355        }
9356        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
9357        pub fn subresult_opt(&self) -> Option<u32> {
9358            self.subresult.as_ref().map(|field| *field)
9359        }
9360        ///Sets `subresult` with the provided value.
9361        pub fn set_subresult(&mut self, field: u32) {
9362            self.subresult = Some(field);
9363        }
9364        ///Sets `subresult` with the provided value.
9365        pub fn with_subresult(mut self, field: u32) -> Self {
9366            self.set_subresult(field);
9367            self
9368        }
9369    }
9370    impl super::Input {
9371        pub const fn const_default() -> Self {
9372            Self {
9373                kind: None,
9374                pure: None,
9375                object_id: None,
9376                version: None,
9377                digest: None,
9378                mutable: None,
9379                mutability: None,
9380                funds_withdrawal: None,
9381                literal: None,
9382            }
9383        }
9384        #[doc(hidden)]
9385        pub fn default_instance() -> &'static Self {
9386            static DEFAULT: super::Input = super::Input::const_default();
9387            &DEFAULT
9388        }
9389        ///Sets `kind` with the provided value.
9390        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9391            self.set_kind(field.into());
9392            self
9393        }
9394        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
9395        pub fn pure_opt(&self) -> Option<&[u8]> {
9396            self.pure.as_ref().map(|field| field as _)
9397        }
9398        ///Sets `pure` with the provided value.
9399        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9400            self.pure = Some(field.into().into());
9401        }
9402        ///Sets `pure` with the provided value.
9403        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9404            self.set_pure(field.into());
9405            self
9406        }
9407        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9408        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9409            self.object_id.as_mut().map(|field| field as _)
9410        }
9411        ///Returns a mutable reference to `object_id`.
9412        ///If the field is unset, it is first initialized with the default value.
9413        pub fn object_id_mut(&mut self) -> &mut String {
9414            self.object_id.get_or_insert_default()
9415        }
9416        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9417        pub fn object_id_opt(&self) -> Option<&str> {
9418            self.object_id.as_ref().map(|field| field as _)
9419        }
9420        ///Sets `object_id` with the provided value.
9421        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9422            self.object_id = Some(field.into().into());
9423        }
9424        ///Sets `object_id` with the provided value.
9425        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9426            self.set_object_id(field.into());
9427            self
9428        }
9429        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9430        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9431            self.version.as_mut().map(|field| field as _)
9432        }
9433        ///Returns a mutable reference to `version`.
9434        ///If the field is unset, it is first initialized with the default value.
9435        pub fn version_mut(&mut self) -> &mut u64 {
9436            self.version.get_or_insert_default()
9437        }
9438        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9439        pub fn version_opt(&self) -> Option<u64> {
9440            self.version.as_ref().map(|field| *field)
9441        }
9442        ///Sets `version` with the provided value.
9443        pub fn set_version(&mut self, field: u64) {
9444            self.version = Some(field);
9445        }
9446        ///Sets `version` with the provided value.
9447        pub fn with_version(mut self, field: u64) -> Self {
9448            self.set_version(field);
9449            self
9450        }
9451        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9452        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9453            self.digest.as_mut().map(|field| field as _)
9454        }
9455        ///Returns a mutable reference to `digest`.
9456        ///If the field is unset, it is first initialized with the default value.
9457        pub fn digest_mut(&mut self) -> &mut String {
9458            self.digest.get_or_insert_default()
9459        }
9460        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9461        pub fn digest_opt(&self) -> Option<&str> {
9462            self.digest.as_ref().map(|field| field as _)
9463        }
9464        ///Sets `digest` with the provided value.
9465        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9466            self.digest = Some(field.into().into());
9467        }
9468        ///Sets `digest` with the provided value.
9469        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9470            self.set_digest(field.into());
9471            self
9472        }
9473        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9474        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9475            self.mutable.as_mut().map(|field| field as _)
9476        }
9477        ///Returns a mutable reference to `mutable`.
9478        ///If the field is unset, it is first initialized with the default value.
9479        pub fn mutable_mut(&mut self) -> &mut bool {
9480            self.mutable.get_or_insert_default()
9481        }
9482        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
9483        pub fn mutable_opt(&self) -> Option<bool> {
9484            self.mutable.as_ref().map(|field| *field)
9485        }
9486        ///Sets `mutable` with the provided value.
9487        pub fn set_mutable(&mut self, field: bool) {
9488            self.mutable = Some(field);
9489        }
9490        ///Sets `mutable` with the provided value.
9491        pub fn with_mutable(mut self, field: bool) -> Self {
9492            self.set_mutable(field);
9493            self
9494        }
9495        ///Sets `mutability` with the provided value.
9496        pub fn with_mutability<T: Into<super::input::Mutability>>(
9497            mut self,
9498            field: T,
9499        ) -> Self {
9500            self.set_mutability(field.into());
9501            self
9502        }
9503        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
9504        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9505            self.funds_withdrawal
9506                .as_ref()
9507                .map(|field| field as _)
9508                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9509        }
9510        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9511        pub fn funds_withdrawal_opt_mut(
9512            &mut self,
9513        ) -> Option<&mut super::FundsWithdrawal> {
9514            self.funds_withdrawal.as_mut().map(|field| field as _)
9515        }
9516        ///Returns a mutable reference to `funds_withdrawal`.
9517        ///If the field is unset, it is first initialized with the default value.
9518        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9519            self.funds_withdrawal.get_or_insert_default()
9520        }
9521        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9522        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9523            self.funds_withdrawal.as_ref().map(|field| field as _)
9524        }
9525        ///Sets `funds_withdrawal` with the provided value.
9526        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9527            &mut self,
9528            field: T,
9529        ) {
9530            self.funds_withdrawal = Some(field.into().into());
9531        }
9532        ///Sets `funds_withdrawal` with the provided value.
9533        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9534            mut self,
9535            field: T,
9536        ) -> Self {
9537            self.set_funds_withdrawal(field.into());
9538            self
9539        }
9540        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9541        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9542            self.literal.as_mut().map(|field| field as _)
9543        }
9544        ///Returns a mutable reference to `literal`.
9545        ///If the field is unset, it is first initialized with the default value.
9546        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9547            self.literal.get_or_insert_default()
9548        }
9549        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9550        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9551            self.literal.as_ref().map(|field| field as _)
9552        }
9553        ///Sets `literal` with the provided value.
9554        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9555            self.literal = Some(field.into().into());
9556        }
9557        ///Sets `literal` with the provided value.
9558        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9559            self.set_literal(field.into());
9560            self
9561        }
9562    }
9563    impl super::Jwk {
9564        pub const fn const_default() -> Self {
9565            Self {
9566                kty: None,
9567                e: None,
9568                n: None,
9569                alg: None,
9570            }
9571        }
9572        #[doc(hidden)]
9573        pub fn default_instance() -> &'static Self {
9574            static DEFAULT: super::Jwk = super::Jwk::const_default();
9575            &DEFAULT
9576        }
9577        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9578        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9579            self.kty.as_mut().map(|field| field as _)
9580        }
9581        ///Returns a mutable reference to `kty`.
9582        ///If the field is unset, it is first initialized with the default value.
9583        pub fn kty_mut(&mut self) -> &mut String {
9584            self.kty.get_or_insert_default()
9585        }
9586        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
9587        pub fn kty_opt(&self) -> Option<&str> {
9588            self.kty.as_ref().map(|field| field as _)
9589        }
9590        ///Sets `kty` with the provided value.
9591        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9592            self.kty = Some(field.into().into());
9593        }
9594        ///Sets `kty` with the provided value.
9595        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9596            self.set_kty(field.into());
9597            self
9598        }
9599        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9600        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9601            self.e.as_mut().map(|field| field as _)
9602        }
9603        ///Returns a mutable reference to `e`.
9604        ///If the field is unset, it is first initialized with the default value.
9605        pub fn e_mut(&mut self) -> &mut String {
9606            self.e.get_or_insert_default()
9607        }
9608        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
9609        pub fn e_opt(&self) -> Option<&str> {
9610            self.e.as_ref().map(|field| field as _)
9611        }
9612        ///Sets `e` with the provided value.
9613        pub fn set_e<T: Into<String>>(&mut self, field: T) {
9614            self.e = Some(field.into().into());
9615        }
9616        ///Sets `e` with the provided value.
9617        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9618            self.set_e(field.into());
9619            self
9620        }
9621        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9622        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9623            self.n.as_mut().map(|field| field as _)
9624        }
9625        ///Returns a mutable reference to `n`.
9626        ///If the field is unset, it is first initialized with the default value.
9627        pub fn n_mut(&mut self) -> &mut String {
9628            self.n.get_or_insert_default()
9629        }
9630        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
9631        pub fn n_opt(&self) -> Option<&str> {
9632            self.n.as_ref().map(|field| field as _)
9633        }
9634        ///Sets `n` with the provided value.
9635        pub fn set_n<T: Into<String>>(&mut self, field: T) {
9636            self.n = Some(field.into().into());
9637        }
9638        ///Sets `n` with the provided value.
9639        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9640            self.set_n(field.into());
9641            self
9642        }
9643        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9644        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9645            self.alg.as_mut().map(|field| field as _)
9646        }
9647        ///Returns a mutable reference to `alg`.
9648        ///If the field is unset, it is first initialized with the default value.
9649        pub fn alg_mut(&mut self) -> &mut String {
9650            self.alg.get_or_insert_default()
9651        }
9652        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
9653        pub fn alg_opt(&self) -> Option<&str> {
9654            self.alg.as_ref().map(|field| field as _)
9655        }
9656        ///Sets `alg` with the provided value.
9657        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9658            self.alg = Some(field.into().into());
9659        }
9660        ///Sets `alg` with the provided value.
9661        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9662            self.set_alg(field.into());
9663            self
9664        }
9665    }
9666    impl super::JwkId {
9667        pub const fn const_default() -> Self {
9668            Self { iss: None, kid: None }
9669        }
9670        #[doc(hidden)]
9671        pub fn default_instance() -> &'static Self {
9672            static DEFAULT: super::JwkId = super::JwkId::const_default();
9673            &DEFAULT
9674        }
9675        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9676        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9677            self.iss.as_mut().map(|field| field as _)
9678        }
9679        ///Returns a mutable reference to `iss`.
9680        ///If the field is unset, it is first initialized with the default value.
9681        pub fn iss_mut(&mut self) -> &mut String {
9682            self.iss.get_or_insert_default()
9683        }
9684        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
9685        pub fn iss_opt(&self) -> Option<&str> {
9686            self.iss.as_ref().map(|field| field as _)
9687        }
9688        ///Sets `iss` with the provided value.
9689        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9690            self.iss = Some(field.into().into());
9691        }
9692        ///Sets `iss` with the provided value.
9693        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9694            self.set_iss(field.into());
9695            self
9696        }
9697        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9698        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9699            self.kid.as_mut().map(|field| field as _)
9700        }
9701        ///Returns a mutable reference to `kid`.
9702        ///If the field is unset, it is first initialized with the default value.
9703        pub fn kid_mut(&mut self) -> &mut String {
9704            self.kid.get_or_insert_default()
9705        }
9706        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
9707        pub fn kid_opt(&self) -> Option<&str> {
9708            self.kid.as_ref().map(|field| field as _)
9709        }
9710        ///Sets `kid` with the provided value.
9711        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9712            self.kid = Some(field.into().into());
9713        }
9714        ///Sets `kid` with the provided value.
9715        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9716            self.set_kid(field.into());
9717            self
9718        }
9719    }
9720    impl super::Linkage {
9721        pub const fn const_default() -> Self {
9722            Self {
9723                original_id: None,
9724                upgraded_id: None,
9725                upgraded_version: None,
9726            }
9727        }
9728        #[doc(hidden)]
9729        pub fn default_instance() -> &'static Self {
9730            static DEFAULT: super::Linkage = super::Linkage::const_default();
9731            &DEFAULT
9732        }
9733        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9734        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9735            self.original_id.as_mut().map(|field| field as _)
9736        }
9737        ///Returns a mutable reference to `original_id`.
9738        ///If the field is unset, it is first initialized with the default value.
9739        pub fn original_id_mut(&mut self) -> &mut String {
9740            self.original_id.get_or_insert_default()
9741        }
9742        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9743        pub fn original_id_opt(&self) -> Option<&str> {
9744            self.original_id.as_ref().map(|field| field as _)
9745        }
9746        ///Sets `original_id` with the provided value.
9747        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9748            self.original_id = Some(field.into().into());
9749        }
9750        ///Sets `original_id` with the provided value.
9751        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9752            self.set_original_id(field.into());
9753            self
9754        }
9755        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9756        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9757            self.upgraded_id.as_mut().map(|field| field as _)
9758        }
9759        ///Returns a mutable reference to `upgraded_id`.
9760        ///If the field is unset, it is first initialized with the default value.
9761        pub fn upgraded_id_mut(&mut self) -> &mut String {
9762            self.upgraded_id.get_or_insert_default()
9763        }
9764        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9765        pub fn upgraded_id_opt(&self) -> Option<&str> {
9766            self.upgraded_id.as_ref().map(|field| field as _)
9767        }
9768        ///Sets `upgraded_id` with the provided value.
9769        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9770            self.upgraded_id = Some(field.into().into());
9771        }
9772        ///Sets `upgraded_id` with the provided value.
9773        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9774            self.set_upgraded_id(field.into());
9775            self
9776        }
9777        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9778        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9779            self.upgraded_version.as_mut().map(|field| field as _)
9780        }
9781        ///Returns a mutable reference to `upgraded_version`.
9782        ///If the field is unset, it is first initialized with the default value.
9783        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9784            self.upgraded_version.get_or_insert_default()
9785        }
9786        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9787        pub fn upgraded_version_opt(&self) -> Option<u64> {
9788            self.upgraded_version.as_ref().map(|field| *field)
9789        }
9790        ///Sets `upgraded_version` with the provided value.
9791        pub fn set_upgraded_version(&mut self, field: u64) {
9792            self.upgraded_version = Some(field);
9793        }
9794        ///Sets `upgraded_version` with the provided value.
9795        pub fn with_upgraded_version(mut self, field: u64) -> Self {
9796            self.set_upgraded_version(field);
9797            self
9798        }
9799    }
9800    impl super::ListBalancesRequest {
9801        pub const fn const_default() -> Self {
9802            Self {
9803                owner: None,
9804                page_size: None,
9805                page_token: None,
9806            }
9807        }
9808        #[doc(hidden)]
9809        pub fn default_instance() -> &'static Self {
9810            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9811            &DEFAULT
9812        }
9813        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9814        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9815            self.owner.as_mut().map(|field| field as _)
9816        }
9817        ///Returns a mutable reference to `owner`.
9818        ///If the field is unset, it is first initialized with the default value.
9819        pub fn owner_mut(&mut self) -> &mut String {
9820            self.owner.get_or_insert_default()
9821        }
9822        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9823        pub fn owner_opt(&self) -> Option<&str> {
9824            self.owner.as_ref().map(|field| field as _)
9825        }
9826        ///Sets `owner` with the provided value.
9827        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9828            self.owner = Some(field.into().into());
9829        }
9830        ///Sets `owner` with the provided value.
9831        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9832            self.set_owner(field.into());
9833            self
9834        }
9835        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9836        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9837            self.page_size.as_mut().map(|field| field as _)
9838        }
9839        ///Returns a mutable reference to `page_size`.
9840        ///If the field is unset, it is first initialized with the default value.
9841        pub fn page_size_mut(&mut self) -> &mut u32 {
9842            self.page_size.get_or_insert_default()
9843        }
9844        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9845        pub fn page_size_opt(&self) -> Option<u32> {
9846            self.page_size.as_ref().map(|field| *field)
9847        }
9848        ///Sets `page_size` with the provided value.
9849        pub fn set_page_size(&mut self, field: u32) {
9850            self.page_size = Some(field);
9851        }
9852        ///Sets `page_size` with the provided value.
9853        pub fn with_page_size(mut self, field: u32) -> Self {
9854            self.set_page_size(field);
9855            self
9856        }
9857        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9858        pub fn page_token_opt(&self) -> Option<&[u8]> {
9859            self.page_token.as_ref().map(|field| field as _)
9860        }
9861        ///Sets `page_token` with the provided value.
9862        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9863            self.page_token = Some(field.into().into());
9864        }
9865        ///Sets `page_token` with the provided value.
9866        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9867            mut self,
9868            field: T,
9869        ) -> Self {
9870            self.set_page_token(field.into());
9871            self
9872        }
9873    }
9874    impl super::ListBalancesResponse {
9875        pub const fn const_default() -> Self {
9876            Self {
9877                balances: Vec::new(),
9878                next_page_token: None,
9879            }
9880        }
9881        #[doc(hidden)]
9882        pub fn default_instance() -> &'static Self {
9883            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9884            &DEFAULT
9885        }
9886        ///Returns the value of `balances`, or the default value if `balances` is unset.
9887        pub fn balances(&self) -> &[super::Balance] {
9888            &self.balances
9889        }
9890        ///Returns a mutable reference to `balances`.
9891        ///If the field is unset, it is first initialized with the default value.
9892        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9893            &mut self.balances
9894        }
9895        ///Sets `balances` with the provided value.
9896        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9897            self.balances = field;
9898        }
9899        ///Sets `balances` with the provided value.
9900        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9901            self.set_balances(field);
9902            self
9903        }
9904        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9905        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9906            self.next_page_token.as_ref().map(|field| field as _)
9907        }
9908        ///Sets `next_page_token` with the provided value.
9909        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9910            self.next_page_token = Some(field.into().into());
9911        }
9912        ///Sets `next_page_token` with the provided value.
9913        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9914            mut self,
9915            field: T,
9916        ) -> Self {
9917            self.set_next_page_token(field.into());
9918            self
9919        }
9920    }
9921    impl super::ListCheckpointsRequest {
9922        pub const fn const_default() -> Self {
9923            Self {
9924                read_mask: None,
9925                start_checkpoint: None,
9926                end_checkpoint: None,
9927                filter: None,
9928                options: None,
9929            }
9930        }
9931        #[doc(hidden)]
9932        pub fn default_instance() -> &'static Self {
9933            static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
9934            &DEFAULT
9935        }
9936        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9937        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9938            self.read_mask.as_mut().map(|field| field as _)
9939        }
9940        ///Returns a mutable reference to `read_mask`.
9941        ///If the field is unset, it is first initialized with the default value.
9942        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9943            self.read_mask.get_or_insert_default()
9944        }
9945        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9946        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9947            self.read_mask.as_ref().map(|field| field as _)
9948        }
9949        ///Sets `read_mask` with the provided value.
9950        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9951            self.read_mask = Some(field.into().into());
9952        }
9953        ///Sets `read_mask` with the provided value.
9954        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9955            mut self,
9956            field: T,
9957        ) -> Self {
9958            self.set_read_mask(field.into());
9959            self
9960        }
9961        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9962        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9963            self.start_checkpoint.as_mut().map(|field| field as _)
9964        }
9965        ///Returns a mutable reference to `start_checkpoint`.
9966        ///If the field is unset, it is first initialized with the default value.
9967        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
9968            self.start_checkpoint.get_or_insert_default()
9969        }
9970        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9971        pub fn start_checkpoint_opt(&self) -> Option<u64> {
9972            self.start_checkpoint.as_ref().map(|field| *field)
9973        }
9974        ///Sets `start_checkpoint` with the provided value.
9975        pub fn set_start_checkpoint(&mut self, field: u64) {
9976            self.start_checkpoint = Some(field);
9977        }
9978        ///Sets `start_checkpoint` with the provided value.
9979        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
9980            self.set_start_checkpoint(field);
9981            self
9982        }
9983        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9984        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9985            self.end_checkpoint.as_mut().map(|field| field as _)
9986        }
9987        ///Returns a mutable reference to `end_checkpoint`.
9988        ///If the field is unset, it is first initialized with the default value.
9989        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
9990            self.end_checkpoint.get_or_insert_default()
9991        }
9992        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9993        pub fn end_checkpoint_opt(&self) -> Option<u64> {
9994            self.end_checkpoint.as_ref().map(|field| *field)
9995        }
9996        ///Sets `end_checkpoint` with the provided value.
9997        pub fn set_end_checkpoint(&mut self, field: u64) {
9998            self.end_checkpoint = Some(field);
9999        }
10000        ///Sets `end_checkpoint` with the provided value.
10001        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10002            self.set_end_checkpoint(field);
10003            self
10004        }
10005        ///Returns the value of `filter`, or the default value if `filter` is unset.
10006        pub fn filter(&self) -> &super::TransactionFilter {
10007            self.filter
10008                .as_ref()
10009                .map(|field| field as _)
10010                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10011        }
10012        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10013        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10014            self.filter.as_mut().map(|field| field as _)
10015        }
10016        ///Returns a mutable reference to `filter`.
10017        ///If the field is unset, it is first initialized with the default value.
10018        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10019            self.filter.get_or_insert_default()
10020        }
10021        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10022        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10023            self.filter.as_ref().map(|field| field as _)
10024        }
10025        ///Sets `filter` with the provided value.
10026        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10027            self.filter = Some(field.into().into());
10028        }
10029        ///Sets `filter` with the provided value.
10030        pub fn with_filter<T: Into<super::TransactionFilter>>(
10031            mut self,
10032            field: T,
10033        ) -> Self {
10034            self.set_filter(field.into());
10035            self
10036        }
10037        ///Returns the value of `options`, or the default value if `options` is unset.
10038        pub fn options(&self) -> &super::QueryOptions {
10039            self.options
10040                .as_ref()
10041                .map(|field| field as _)
10042                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10043        }
10044        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10045        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10046            self.options.as_mut().map(|field| field as _)
10047        }
10048        ///Returns a mutable reference to `options`.
10049        ///If the field is unset, it is first initialized with the default value.
10050        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10051            self.options.get_or_insert_default()
10052        }
10053        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10054        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10055            self.options.as_ref().map(|field| field as _)
10056        }
10057        ///Sets `options` with the provided value.
10058        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10059            self.options = Some(field.into().into());
10060        }
10061        ///Sets `options` with the provided value.
10062        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10063            self.set_options(field.into());
10064            self
10065        }
10066    }
10067    impl super::ListCheckpointsResponse {
10068        pub const fn const_default() -> Self {
10069            Self {
10070                checkpoint: None,
10071                watermark: None,
10072                end: None,
10073            }
10074        }
10075        #[doc(hidden)]
10076        pub fn default_instance() -> &'static Self {
10077            static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10078            &DEFAULT
10079        }
10080        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
10081        pub fn checkpoint(&self) -> &super::Checkpoint {
10082            self.checkpoint
10083                .as_ref()
10084                .map(|field| field as _)
10085                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10086        }
10087        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10088        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10089            self.checkpoint.as_mut().map(|field| field as _)
10090        }
10091        ///Returns a mutable reference to `checkpoint`.
10092        ///If the field is unset, it is first initialized with the default value.
10093        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10094            self.checkpoint.get_or_insert_default()
10095        }
10096        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10097        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10098            self.checkpoint.as_ref().map(|field| field as _)
10099        }
10100        ///Sets `checkpoint` with the provided value.
10101        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10102            self.checkpoint = Some(field.into().into());
10103        }
10104        ///Sets `checkpoint` with the provided value.
10105        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10106            self.set_checkpoint(field.into());
10107            self
10108        }
10109        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10110        pub fn watermark(&self) -> &super::Watermark {
10111            self.watermark
10112                .as_ref()
10113                .map(|field| field as _)
10114                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10115        }
10116        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10117        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10118            self.watermark.as_mut().map(|field| field as _)
10119        }
10120        ///Returns a mutable reference to `watermark`.
10121        ///If the field is unset, it is first initialized with the default value.
10122        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10123            self.watermark.get_or_insert_default()
10124        }
10125        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10126        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10127            self.watermark.as_ref().map(|field| field as _)
10128        }
10129        ///Sets `watermark` with the provided value.
10130        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10131            self.watermark = Some(field.into().into());
10132        }
10133        ///Sets `watermark` with the provided value.
10134        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10135            self.set_watermark(field.into());
10136            self
10137        }
10138        ///Returns the value of `end`, or the default value if `end` is unset.
10139        pub fn end(&self) -> &super::QueryEnd {
10140            self.end
10141                .as_ref()
10142                .map(|field| field as _)
10143                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10144        }
10145        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10146        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10147            self.end.as_mut().map(|field| field as _)
10148        }
10149        ///Returns a mutable reference to `end`.
10150        ///If the field is unset, it is first initialized with the default value.
10151        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10152            self.end.get_or_insert_default()
10153        }
10154        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10155        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10156            self.end.as_ref().map(|field| field as _)
10157        }
10158        ///Sets `end` with the provided value.
10159        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10160            self.end = Some(field.into().into());
10161        }
10162        ///Sets `end` with the provided value.
10163        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10164            self.set_end(field.into());
10165            self
10166        }
10167    }
10168    impl super::ListDynamicFieldsRequest {
10169        pub const fn const_default() -> Self {
10170            Self {
10171                parent: None,
10172                page_size: None,
10173                page_token: None,
10174                read_mask: None,
10175            }
10176        }
10177        #[doc(hidden)]
10178        pub fn default_instance() -> &'static Self {
10179            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10180            &DEFAULT
10181        }
10182        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10183        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10184            self.parent.as_mut().map(|field| field as _)
10185        }
10186        ///Returns a mutable reference to `parent`.
10187        ///If the field is unset, it is first initialized with the default value.
10188        pub fn parent_mut(&mut self) -> &mut String {
10189            self.parent.get_or_insert_default()
10190        }
10191        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
10192        pub fn parent_opt(&self) -> Option<&str> {
10193            self.parent.as_ref().map(|field| field as _)
10194        }
10195        ///Sets `parent` with the provided value.
10196        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10197            self.parent = Some(field.into().into());
10198        }
10199        ///Sets `parent` with the provided value.
10200        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10201            self.set_parent(field.into());
10202            self
10203        }
10204        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10205        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10206            self.page_size.as_mut().map(|field| field as _)
10207        }
10208        ///Returns a mutable reference to `page_size`.
10209        ///If the field is unset, it is first initialized with the default value.
10210        pub fn page_size_mut(&mut self) -> &mut u32 {
10211            self.page_size.get_or_insert_default()
10212        }
10213        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10214        pub fn page_size_opt(&self) -> Option<u32> {
10215            self.page_size.as_ref().map(|field| *field)
10216        }
10217        ///Sets `page_size` with the provided value.
10218        pub fn set_page_size(&mut self, field: u32) {
10219            self.page_size = Some(field);
10220        }
10221        ///Sets `page_size` with the provided value.
10222        pub fn with_page_size(mut self, field: u32) -> Self {
10223            self.set_page_size(field);
10224            self
10225        }
10226        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10227        pub fn page_token_opt(&self) -> Option<&[u8]> {
10228            self.page_token.as_ref().map(|field| field as _)
10229        }
10230        ///Sets `page_token` with the provided value.
10231        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10232            self.page_token = Some(field.into().into());
10233        }
10234        ///Sets `page_token` with the provided value.
10235        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10236            mut self,
10237            field: T,
10238        ) -> Self {
10239            self.set_page_token(field.into());
10240            self
10241        }
10242        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10243        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10244            self.read_mask.as_mut().map(|field| field as _)
10245        }
10246        ///Returns a mutable reference to `read_mask`.
10247        ///If the field is unset, it is first initialized with the default value.
10248        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10249            self.read_mask.get_or_insert_default()
10250        }
10251        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10252        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10253            self.read_mask.as_ref().map(|field| field as _)
10254        }
10255        ///Sets `read_mask` with the provided value.
10256        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10257            self.read_mask = Some(field.into().into());
10258        }
10259        ///Sets `read_mask` with the provided value.
10260        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10261            mut self,
10262            field: T,
10263        ) -> Self {
10264            self.set_read_mask(field.into());
10265            self
10266        }
10267    }
10268    impl super::ListDynamicFieldsResponse {
10269        pub const fn const_default() -> Self {
10270            Self {
10271                dynamic_fields: Vec::new(),
10272                next_page_token: None,
10273            }
10274        }
10275        #[doc(hidden)]
10276        pub fn default_instance() -> &'static Self {
10277            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10278            &DEFAULT
10279        }
10280        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
10281        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10282            &self.dynamic_fields
10283        }
10284        ///Returns a mutable reference to `dynamic_fields`.
10285        ///If the field is unset, it is first initialized with the default value.
10286        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10287            &mut self.dynamic_fields
10288        }
10289        ///Sets `dynamic_fields` with the provided value.
10290        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10291            self.dynamic_fields = field;
10292        }
10293        ///Sets `dynamic_fields` with the provided value.
10294        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10295            self.set_dynamic_fields(field);
10296            self
10297        }
10298        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10299        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10300            self.next_page_token.as_ref().map(|field| field as _)
10301        }
10302        ///Sets `next_page_token` with the provided value.
10303        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10304            self.next_page_token = Some(field.into().into());
10305        }
10306        ///Sets `next_page_token` with the provided value.
10307        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10308            mut self,
10309            field: T,
10310        ) -> Self {
10311            self.set_next_page_token(field.into());
10312            self
10313        }
10314    }
10315    impl super::ListEventsRequest {
10316        pub const fn const_default() -> Self {
10317            Self {
10318                read_mask: None,
10319                start_checkpoint: None,
10320                end_checkpoint: None,
10321                filter: None,
10322                options: None,
10323            }
10324        }
10325        #[doc(hidden)]
10326        pub fn default_instance() -> &'static Self {
10327            static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10328            &DEFAULT
10329        }
10330        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10331        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10332            self.read_mask.as_mut().map(|field| field as _)
10333        }
10334        ///Returns a mutable reference to `read_mask`.
10335        ///If the field is unset, it is first initialized with the default value.
10336        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10337            self.read_mask.get_or_insert_default()
10338        }
10339        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10340        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10341            self.read_mask.as_ref().map(|field| field as _)
10342        }
10343        ///Sets `read_mask` with the provided value.
10344        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10345            self.read_mask = Some(field.into().into());
10346        }
10347        ///Sets `read_mask` with the provided value.
10348        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10349            mut self,
10350            field: T,
10351        ) -> Self {
10352            self.set_read_mask(field.into());
10353            self
10354        }
10355        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10356        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10357            self.start_checkpoint.as_mut().map(|field| field as _)
10358        }
10359        ///Returns a mutable reference to `start_checkpoint`.
10360        ///If the field is unset, it is first initialized with the default value.
10361        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10362            self.start_checkpoint.get_or_insert_default()
10363        }
10364        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10365        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10366            self.start_checkpoint.as_ref().map(|field| *field)
10367        }
10368        ///Sets `start_checkpoint` with the provided value.
10369        pub fn set_start_checkpoint(&mut self, field: u64) {
10370            self.start_checkpoint = Some(field);
10371        }
10372        ///Sets `start_checkpoint` with the provided value.
10373        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10374            self.set_start_checkpoint(field);
10375            self
10376        }
10377        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10378        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10379            self.end_checkpoint.as_mut().map(|field| field as _)
10380        }
10381        ///Returns a mutable reference to `end_checkpoint`.
10382        ///If the field is unset, it is first initialized with the default value.
10383        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10384            self.end_checkpoint.get_or_insert_default()
10385        }
10386        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10387        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10388            self.end_checkpoint.as_ref().map(|field| *field)
10389        }
10390        ///Sets `end_checkpoint` with the provided value.
10391        pub fn set_end_checkpoint(&mut self, field: u64) {
10392            self.end_checkpoint = Some(field);
10393        }
10394        ///Sets `end_checkpoint` with the provided value.
10395        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10396            self.set_end_checkpoint(field);
10397            self
10398        }
10399        ///Returns the value of `filter`, or the default value if `filter` is unset.
10400        pub fn filter(&self) -> &super::EventFilter {
10401            self.filter
10402                .as_ref()
10403                .map(|field| field as _)
10404                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10405        }
10406        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10407        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10408            self.filter.as_mut().map(|field| field as _)
10409        }
10410        ///Returns a mutable reference to `filter`.
10411        ///If the field is unset, it is first initialized with the default value.
10412        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10413            self.filter.get_or_insert_default()
10414        }
10415        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10416        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10417            self.filter.as_ref().map(|field| field as _)
10418        }
10419        ///Sets `filter` with the provided value.
10420        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10421            self.filter = Some(field.into().into());
10422        }
10423        ///Sets `filter` with the provided value.
10424        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10425            self.set_filter(field.into());
10426            self
10427        }
10428        ///Returns the value of `options`, or the default value if `options` is unset.
10429        pub fn options(&self) -> &super::QueryOptions {
10430            self.options
10431                .as_ref()
10432                .map(|field| field as _)
10433                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10434        }
10435        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10436        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10437            self.options.as_mut().map(|field| field as _)
10438        }
10439        ///Returns a mutable reference to `options`.
10440        ///If the field is unset, it is first initialized with the default value.
10441        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10442            self.options.get_or_insert_default()
10443        }
10444        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10445        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10446            self.options.as_ref().map(|field| field as _)
10447        }
10448        ///Sets `options` with the provided value.
10449        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10450            self.options = Some(field.into().into());
10451        }
10452        ///Sets `options` with the provided value.
10453        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10454            self.set_options(field.into());
10455            self
10456        }
10457    }
10458    impl super::ListEventsResponse {
10459        pub const fn const_default() -> Self {
10460            Self {
10461                event: None,
10462                watermark: None,
10463                end: None,
10464            }
10465        }
10466        #[doc(hidden)]
10467        pub fn default_instance() -> &'static Self {
10468            static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10469            &DEFAULT
10470        }
10471        ///Returns the value of `event`, or the default value if `event` is unset.
10472        pub fn event(&self) -> &super::Event {
10473            self.event
10474                .as_ref()
10475                .map(|field| field as _)
10476                .unwrap_or_else(|| super::Event::default_instance() as _)
10477        }
10478        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10479        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10480            self.event.as_mut().map(|field| field as _)
10481        }
10482        ///Returns a mutable reference to `event`.
10483        ///If the field is unset, it is first initialized with the default value.
10484        pub fn event_mut(&mut self) -> &mut super::Event {
10485            self.event.get_or_insert_default()
10486        }
10487        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
10488        pub fn event_opt(&self) -> Option<&super::Event> {
10489            self.event.as_ref().map(|field| field as _)
10490        }
10491        ///Sets `event` with the provided value.
10492        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10493            self.event = Some(field.into().into());
10494        }
10495        ///Sets `event` with the provided value.
10496        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10497            self.set_event(field.into());
10498            self
10499        }
10500        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10501        pub fn watermark(&self) -> &super::Watermark {
10502            self.watermark
10503                .as_ref()
10504                .map(|field| field as _)
10505                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10506        }
10507        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10508        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10509            self.watermark.as_mut().map(|field| field as _)
10510        }
10511        ///Returns a mutable reference to `watermark`.
10512        ///If the field is unset, it is first initialized with the default value.
10513        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10514            self.watermark.get_or_insert_default()
10515        }
10516        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10517        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10518            self.watermark.as_ref().map(|field| field as _)
10519        }
10520        ///Sets `watermark` with the provided value.
10521        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10522            self.watermark = Some(field.into().into());
10523        }
10524        ///Sets `watermark` with the provided value.
10525        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10526            self.set_watermark(field.into());
10527            self
10528        }
10529        ///Returns the value of `end`, or the default value if `end` is unset.
10530        pub fn end(&self) -> &super::QueryEnd {
10531            self.end
10532                .as_ref()
10533                .map(|field| field as _)
10534                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10535        }
10536        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10537        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10538            self.end.as_mut().map(|field| field as _)
10539        }
10540        ///Returns a mutable reference to `end`.
10541        ///If the field is unset, it is first initialized with the default value.
10542        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10543            self.end.get_or_insert_default()
10544        }
10545        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10546        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10547            self.end.as_ref().map(|field| field as _)
10548        }
10549        ///Sets `end` with the provided value.
10550        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10551            self.end = Some(field.into().into());
10552        }
10553        ///Sets `end` with the provided value.
10554        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10555            self.set_end(field.into());
10556            self
10557        }
10558    }
10559    impl super::ListOwnedObjectsRequest {
10560        pub const fn const_default() -> Self {
10561            Self {
10562                owner: None,
10563                page_size: None,
10564                page_token: None,
10565                read_mask: None,
10566                object_type: None,
10567            }
10568        }
10569        #[doc(hidden)]
10570        pub fn default_instance() -> &'static Self {
10571            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10572            &DEFAULT
10573        }
10574        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10575        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10576            self.owner.as_mut().map(|field| field as _)
10577        }
10578        ///Returns a mutable reference to `owner`.
10579        ///If the field is unset, it is first initialized with the default value.
10580        pub fn owner_mut(&mut self) -> &mut String {
10581            self.owner.get_or_insert_default()
10582        }
10583        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10584        pub fn owner_opt(&self) -> Option<&str> {
10585            self.owner.as_ref().map(|field| field as _)
10586        }
10587        ///Sets `owner` with the provided value.
10588        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10589            self.owner = Some(field.into().into());
10590        }
10591        ///Sets `owner` with the provided value.
10592        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10593            self.set_owner(field.into());
10594            self
10595        }
10596        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10597        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10598            self.page_size.as_mut().map(|field| field as _)
10599        }
10600        ///Returns a mutable reference to `page_size`.
10601        ///If the field is unset, it is first initialized with the default value.
10602        pub fn page_size_mut(&mut self) -> &mut u32 {
10603            self.page_size.get_or_insert_default()
10604        }
10605        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10606        pub fn page_size_opt(&self) -> Option<u32> {
10607            self.page_size.as_ref().map(|field| *field)
10608        }
10609        ///Sets `page_size` with the provided value.
10610        pub fn set_page_size(&mut self, field: u32) {
10611            self.page_size = Some(field);
10612        }
10613        ///Sets `page_size` with the provided value.
10614        pub fn with_page_size(mut self, field: u32) -> Self {
10615            self.set_page_size(field);
10616            self
10617        }
10618        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10619        pub fn page_token_opt(&self) -> Option<&[u8]> {
10620            self.page_token.as_ref().map(|field| field as _)
10621        }
10622        ///Sets `page_token` with the provided value.
10623        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10624            self.page_token = Some(field.into().into());
10625        }
10626        ///Sets `page_token` with the provided value.
10627        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10628            mut self,
10629            field: T,
10630        ) -> Self {
10631            self.set_page_token(field.into());
10632            self
10633        }
10634        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10635        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10636            self.read_mask.as_mut().map(|field| field as _)
10637        }
10638        ///Returns a mutable reference to `read_mask`.
10639        ///If the field is unset, it is first initialized with the default value.
10640        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10641            self.read_mask.get_or_insert_default()
10642        }
10643        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10644        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10645            self.read_mask.as_ref().map(|field| field as _)
10646        }
10647        ///Sets `read_mask` with the provided value.
10648        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10649            self.read_mask = Some(field.into().into());
10650        }
10651        ///Sets `read_mask` with the provided value.
10652        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10653            mut self,
10654            field: T,
10655        ) -> Self {
10656            self.set_read_mask(field.into());
10657            self
10658        }
10659        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10660        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10661            self.object_type.as_mut().map(|field| field as _)
10662        }
10663        ///Returns a mutable reference to `object_type`.
10664        ///If the field is unset, it is first initialized with the default value.
10665        pub fn object_type_mut(&mut self) -> &mut String {
10666            self.object_type.get_or_insert_default()
10667        }
10668        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10669        pub fn object_type_opt(&self) -> Option<&str> {
10670            self.object_type.as_ref().map(|field| field as _)
10671        }
10672        ///Sets `object_type` with the provided value.
10673        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10674            self.object_type = Some(field.into().into());
10675        }
10676        ///Sets `object_type` with the provided value.
10677        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10678            self.set_object_type(field.into());
10679            self
10680        }
10681    }
10682    impl super::ListOwnedObjectsResponse {
10683        pub const fn const_default() -> Self {
10684            Self {
10685                objects: Vec::new(),
10686                next_page_token: None,
10687            }
10688        }
10689        #[doc(hidden)]
10690        pub fn default_instance() -> &'static Self {
10691            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10692            &DEFAULT
10693        }
10694        ///Returns the value of `objects`, or the default value if `objects` is unset.
10695        pub fn objects(&self) -> &[super::Object] {
10696            &self.objects
10697        }
10698        ///Returns a mutable reference to `objects`.
10699        ///If the field is unset, it is first initialized with the default value.
10700        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10701            &mut self.objects
10702        }
10703        ///Sets `objects` with the provided value.
10704        pub fn set_objects(&mut self, field: Vec<super::Object>) {
10705            self.objects = field;
10706        }
10707        ///Sets `objects` with the provided value.
10708        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10709            self.set_objects(field);
10710            self
10711        }
10712        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10713        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10714            self.next_page_token.as_ref().map(|field| field as _)
10715        }
10716        ///Sets `next_page_token` with the provided value.
10717        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10718            self.next_page_token = Some(field.into().into());
10719        }
10720        ///Sets `next_page_token` with the provided value.
10721        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10722            mut self,
10723            field: T,
10724        ) -> Self {
10725            self.set_next_page_token(field.into());
10726            self
10727        }
10728    }
10729    impl super::ListPackageVersionsRequest {
10730        pub const fn const_default() -> Self {
10731            Self {
10732                package_id: None,
10733                page_size: None,
10734                page_token: None,
10735            }
10736        }
10737        #[doc(hidden)]
10738        pub fn default_instance() -> &'static Self {
10739            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10740            &DEFAULT
10741        }
10742        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10743        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10744            self.package_id.as_mut().map(|field| field as _)
10745        }
10746        ///Returns a mutable reference to `package_id`.
10747        ///If the field is unset, it is first initialized with the default value.
10748        pub fn package_id_mut(&mut self) -> &mut String {
10749            self.package_id.get_or_insert_default()
10750        }
10751        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10752        pub fn package_id_opt(&self) -> Option<&str> {
10753            self.package_id.as_ref().map(|field| field as _)
10754        }
10755        ///Sets `package_id` with the provided value.
10756        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10757            self.package_id = Some(field.into().into());
10758        }
10759        ///Sets `package_id` with the provided value.
10760        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10761            self.set_package_id(field.into());
10762            self
10763        }
10764        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10765        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10766            self.page_size.as_mut().map(|field| field as _)
10767        }
10768        ///Returns a mutable reference to `page_size`.
10769        ///If the field is unset, it is first initialized with the default value.
10770        pub fn page_size_mut(&mut self) -> &mut u32 {
10771            self.page_size.get_or_insert_default()
10772        }
10773        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10774        pub fn page_size_opt(&self) -> Option<u32> {
10775            self.page_size.as_ref().map(|field| *field)
10776        }
10777        ///Sets `page_size` with the provided value.
10778        pub fn set_page_size(&mut self, field: u32) {
10779            self.page_size = Some(field);
10780        }
10781        ///Sets `page_size` with the provided value.
10782        pub fn with_page_size(mut self, field: u32) -> Self {
10783            self.set_page_size(field);
10784            self
10785        }
10786        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10787        pub fn page_token_opt(&self) -> Option<&[u8]> {
10788            self.page_token.as_ref().map(|field| field as _)
10789        }
10790        ///Sets `page_token` with the provided value.
10791        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10792            self.page_token = Some(field.into().into());
10793        }
10794        ///Sets `page_token` with the provided value.
10795        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10796            mut self,
10797            field: T,
10798        ) -> Self {
10799            self.set_page_token(field.into());
10800            self
10801        }
10802    }
10803    impl super::ListPackageVersionsResponse {
10804        pub const fn const_default() -> Self {
10805            Self {
10806                versions: Vec::new(),
10807                next_page_token: None,
10808            }
10809        }
10810        #[doc(hidden)]
10811        pub fn default_instance() -> &'static Self {
10812            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10813            &DEFAULT
10814        }
10815        ///Returns the value of `versions`, or the default value if `versions` is unset.
10816        pub fn versions(&self) -> &[super::PackageVersion] {
10817            &self.versions
10818        }
10819        ///Returns a mutable reference to `versions`.
10820        ///If the field is unset, it is first initialized with the default value.
10821        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10822            &mut self.versions
10823        }
10824        ///Sets `versions` with the provided value.
10825        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10826            self.versions = field;
10827        }
10828        ///Sets `versions` with the provided value.
10829        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10830            self.set_versions(field);
10831            self
10832        }
10833        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10834        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10835            self.next_page_token.as_ref().map(|field| field as _)
10836        }
10837        ///Sets `next_page_token` with the provided value.
10838        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10839            self.next_page_token = Some(field.into().into());
10840        }
10841        ///Sets `next_page_token` with the provided value.
10842        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10843            mut self,
10844            field: T,
10845        ) -> Self {
10846            self.set_next_page_token(field.into());
10847            self
10848        }
10849    }
10850    impl super::ListTransactionsRequest {
10851        pub const fn const_default() -> Self {
10852            Self {
10853                read_mask: None,
10854                start_checkpoint: None,
10855                end_checkpoint: None,
10856                filter: None,
10857                options: None,
10858            }
10859        }
10860        #[doc(hidden)]
10861        pub fn default_instance() -> &'static Self {
10862            static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10863            &DEFAULT
10864        }
10865        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10866        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10867            self.read_mask.as_mut().map(|field| field as _)
10868        }
10869        ///Returns a mutable reference to `read_mask`.
10870        ///If the field is unset, it is first initialized with the default value.
10871        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10872            self.read_mask.get_or_insert_default()
10873        }
10874        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10875        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10876            self.read_mask.as_ref().map(|field| field as _)
10877        }
10878        ///Sets `read_mask` with the provided value.
10879        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10880            self.read_mask = Some(field.into().into());
10881        }
10882        ///Sets `read_mask` with the provided value.
10883        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10884            mut self,
10885            field: T,
10886        ) -> Self {
10887            self.set_read_mask(field.into());
10888            self
10889        }
10890        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10891        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10892            self.start_checkpoint.as_mut().map(|field| field as _)
10893        }
10894        ///Returns a mutable reference to `start_checkpoint`.
10895        ///If the field is unset, it is first initialized with the default value.
10896        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10897            self.start_checkpoint.get_or_insert_default()
10898        }
10899        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10900        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10901            self.start_checkpoint.as_ref().map(|field| *field)
10902        }
10903        ///Sets `start_checkpoint` with the provided value.
10904        pub fn set_start_checkpoint(&mut self, field: u64) {
10905            self.start_checkpoint = Some(field);
10906        }
10907        ///Sets `start_checkpoint` with the provided value.
10908        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10909            self.set_start_checkpoint(field);
10910            self
10911        }
10912        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10913        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10914            self.end_checkpoint.as_mut().map(|field| field as _)
10915        }
10916        ///Returns a mutable reference to `end_checkpoint`.
10917        ///If the field is unset, it is first initialized with the default value.
10918        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10919            self.end_checkpoint.get_or_insert_default()
10920        }
10921        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10922        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10923            self.end_checkpoint.as_ref().map(|field| *field)
10924        }
10925        ///Sets `end_checkpoint` with the provided value.
10926        pub fn set_end_checkpoint(&mut self, field: u64) {
10927            self.end_checkpoint = Some(field);
10928        }
10929        ///Sets `end_checkpoint` with the provided value.
10930        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10931            self.set_end_checkpoint(field);
10932            self
10933        }
10934        ///Returns the value of `filter`, or the default value if `filter` is unset.
10935        pub fn filter(&self) -> &super::TransactionFilter {
10936            self.filter
10937                .as_ref()
10938                .map(|field| field as _)
10939                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10940        }
10941        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10942        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10943            self.filter.as_mut().map(|field| field as _)
10944        }
10945        ///Returns a mutable reference to `filter`.
10946        ///If the field is unset, it is first initialized with the default value.
10947        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10948            self.filter.get_or_insert_default()
10949        }
10950        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10951        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10952            self.filter.as_ref().map(|field| field as _)
10953        }
10954        ///Sets `filter` with the provided value.
10955        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10956            self.filter = Some(field.into().into());
10957        }
10958        ///Sets `filter` with the provided value.
10959        pub fn with_filter<T: Into<super::TransactionFilter>>(
10960            mut self,
10961            field: T,
10962        ) -> Self {
10963            self.set_filter(field.into());
10964            self
10965        }
10966        ///Returns the value of `options`, or the default value if `options` is unset.
10967        pub fn options(&self) -> &super::QueryOptions {
10968            self.options
10969                .as_ref()
10970                .map(|field| field as _)
10971                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10972        }
10973        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10974        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10975            self.options.as_mut().map(|field| field as _)
10976        }
10977        ///Returns a mutable reference to `options`.
10978        ///If the field is unset, it is first initialized with the default value.
10979        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10980            self.options.get_or_insert_default()
10981        }
10982        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10983        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10984            self.options.as_ref().map(|field| field as _)
10985        }
10986        ///Sets `options` with the provided value.
10987        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10988            self.options = Some(field.into().into());
10989        }
10990        ///Sets `options` with the provided value.
10991        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10992            self.set_options(field.into());
10993            self
10994        }
10995    }
10996    impl super::ListTransactionsResponse {
10997        pub const fn const_default() -> Self {
10998            Self {
10999                transaction: None,
11000                watermark: None,
11001                end: None,
11002            }
11003        }
11004        #[doc(hidden)]
11005        pub fn default_instance() -> &'static Self {
11006            static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
11007            &DEFAULT
11008        }
11009        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
11010        pub fn transaction(&self) -> &super::ExecutedTransaction {
11011            self.transaction
11012                .as_ref()
11013                .map(|field| field as _)
11014                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
11015        }
11016        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11017        pub fn transaction_opt_mut(
11018            &mut self,
11019        ) -> Option<&mut super::ExecutedTransaction> {
11020            self.transaction.as_mut().map(|field| field as _)
11021        }
11022        ///Returns a mutable reference to `transaction`.
11023        ///If the field is unset, it is first initialized with the default value.
11024        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
11025            self.transaction.get_or_insert_default()
11026        }
11027        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11028        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
11029            self.transaction.as_ref().map(|field| field as _)
11030        }
11031        ///Sets `transaction` with the provided value.
11032        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
11033            &mut self,
11034            field: T,
11035        ) {
11036            self.transaction = Some(field.into().into());
11037        }
11038        ///Sets `transaction` with the provided value.
11039        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
11040            mut self,
11041            field: T,
11042        ) -> Self {
11043            self.set_transaction(field.into());
11044            self
11045        }
11046        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
11047        pub fn watermark(&self) -> &super::Watermark {
11048            self.watermark
11049                .as_ref()
11050                .map(|field| field as _)
11051                .unwrap_or_else(|| super::Watermark::default_instance() as _)
11052        }
11053        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11054        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11055            self.watermark.as_mut().map(|field| field as _)
11056        }
11057        ///Returns a mutable reference to `watermark`.
11058        ///If the field is unset, it is first initialized with the default value.
11059        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11060            self.watermark.get_or_insert_default()
11061        }
11062        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
11063        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11064            self.watermark.as_ref().map(|field| field as _)
11065        }
11066        ///Sets `watermark` with the provided value.
11067        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11068            self.watermark = Some(field.into().into());
11069        }
11070        ///Sets `watermark` with the provided value.
11071        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11072            self.set_watermark(field.into());
11073            self
11074        }
11075        ///Returns the value of `end`, or the default value if `end` is unset.
11076        pub fn end(&self) -> &super::QueryEnd {
11077            self.end
11078                .as_ref()
11079                .map(|field| field as _)
11080                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11081        }
11082        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11083        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11084            self.end.as_mut().map(|field| field as _)
11085        }
11086        ///Returns a mutable reference to `end`.
11087        ///If the field is unset, it is first initialized with the default value.
11088        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11089            self.end.get_or_insert_default()
11090        }
11091        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
11092        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11093            self.end.as_ref().map(|field| field as _)
11094        }
11095        ///Sets `end` with the provided value.
11096        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11097            self.end = Some(field.into().into());
11098        }
11099        ///Sets `end` with the provided value.
11100        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11101            self.set_end(field.into());
11102            self
11103        }
11104    }
11105    impl super::LookupNameRequest {
11106        pub const fn const_default() -> Self {
11107            Self { name: None }
11108        }
11109        #[doc(hidden)]
11110        pub fn default_instance() -> &'static Self {
11111            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11112            &DEFAULT
11113        }
11114        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11115        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11116            self.name.as_mut().map(|field| field as _)
11117        }
11118        ///Returns a mutable reference to `name`.
11119        ///If the field is unset, it is first initialized with the default value.
11120        pub fn name_mut(&mut self) -> &mut String {
11121            self.name.get_or_insert_default()
11122        }
11123        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11124        pub fn name_opt(&self) -> Option<&str> {
11125            self.name.as_ref().map(|field| field as _)
11126        }
11127        ///Sets `name` with the provided value.
11128        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11129            self.name = Some(field.into().into());
11130        }
11131        ///Sets `name` with the provided value.
11132        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11133            self.set_name(field.into());
11134            self
11135        }
11136    }
11137    impl super::LookupNameResponse {
11138        pub const fn const_default() -> Self {
11139            Self { record: None }
11140        }
11141        #[doc(hidden)]
11142        pub fn default_instance() -> &'static Self {
11143            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11144            &DEFAULT
11145        }
11146        ///Returns the value of `record`, or the default value if `record` is unset.
11147        pub fn record(&self) -> &super::NameRecord {
11148            self.record
11149                .as_ref()
11150                .map(|field| field as _)
11151                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11152        }
11153        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11154        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11155            self.record.as_mut().map(|field| field as _)
11156        }
11157        ///Returns a mutable reference to `record`.
11158        ///If the field is unset, it is first initialized with the default value.
11159        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11160            self.record.get_or_insert_default()
11161        }
11162        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11163        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11164            self.record.as_ref().map(|field| field as _)
11165        }
11166        ///Sets `record` with the provided value.
11167        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11168            self.record = Some(field.into().into());
11169        }
11170        ///Sets `record` with the provided value.
11171        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11172            self.set_record(field.into());
11173            self
11174        }
11175    }
11176    impl super::MakeMoveVector {
11177        pub const fn const_default() -> Self {
11178            Self {
11179                element_type: None,
11180                elements: Vec::new(),
11181            }
11182        }
11183        #[doc(hidden)]
11184        pub fn default_instance() -> &'static Self {
11185            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11186            &DEFAULT
11187        }
11188        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11189        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11190            self.element_type.as_mut().map(|field| field as _)
11191        }
11192        ///Returns a mutable reference to `element_type`.
11193        ///If the field is unset, it is first initialized with the default value.
11194        pub fn element_type_mut(&mut self) -> &mut String {
11195            self.element_type.get_or_insert_default()
11196        }
11197        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
11198        pub fn element_type_opt(&self) -> Option<&str> {
11199            self.element_type.as_ref().map(|field| field as _)
11200        }
11201        ///Sets `element_type` with the provided value.
11202        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11203            self.element_type = Some(field.into().into());
11204        }
11205        ///Sets `element_type` with the provided value.
11206        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11207            self.set_element_type(field.into());
11208            self
11209        }
11210        ///Returns the value of `elements`, or the default value if `elements` is unset.
11211        pub fn elements(&self) -> &[super::Argument] {
11212            &self.elements
11213        }
11214        ///Returns a mutable reference to `elements`.
11215        ///If the field is unset, it is first initialized with the default value.
11216        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11217            &mut self.elements
11218        }
11219        ///Sets `elements` with the provided value.
11220        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11221            self.elements = field;
11222        }
11223        ///Sets `elements` with the provided value.
11224        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11225            self.set_elements(field);
11226            self
11227        }
11228    }
11229    impl super::MergeCoins {
11230        pub const fn const_default() -> Self {
11231            Self {
11232                coin: None,
11233                coins_to_merge: Vec::new(),
11234            }
11235        }
11236        #[doc(hidden)]
11237        pub fn default_instance() -> &'static Self {
11238            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11239            &DEFAULT
11240        }
11241        ///Returns the value of `coin`, or the default value if `coin` is unset.
11242        pub fn coin(&self) -> &super::Argument {
11243            self.coin
11244                .as_ref()
11245                .map(|field| field as _)
11246                .unwrap_or_else(|| super::Argument::default_instance() as _)
11247        }
11248        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11249        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11250            self.coin.as_mut().map(|field| field as _)
11251        }
11252        ///Returns a mutable reference to `coin`.
11253        ///If the field is unset, it is first initialized with the default value.
11254        pub fn coin_mut(&mut self) -> &mut super::Argument {
11255            self.coin.get_or_insert_default()
11256        }
11257        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
11258        pub fn coin_opt(&self) -> Option<&super::Argument> {
11259            self.coin.as_ref().map(|field| field as _)
11260        }
11261        ///Sets `coin` with the provided value.
11262        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11263            self.coin = Some(field.into().into());
11264        }
11265        ///Sets `coin` with the provided value.
11266        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11267            self.set_coin(field.into());
11268            self
11269        }
11270        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
11271        pub fn coins_to_merge(&self) -> &[super::Argument] {
11272            &self.coins_to_merge
11273        }
11274        ///Returns a mutable reference to `coins_to_merge`.
11275        ///If the field is unset, it is first initialized with the default value.
11276        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11277            &mut self.coins_to_merge
11278        }
11279        ///Sets `coins_to_merge` with the provided value.
11280        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11281            self.coins_to_merge = field;
11282        }
11283        ///Sets `coins_to_merge` with the provided value.
11284        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11285            self.set_coins_to_merge(field);
11286            self
11287        }
11288    }
11289    impl super::Module {
11290        pub const fn const_default() -> Self {
11291            Self {
11292                name: None,
11293                contents: None,
11294                datatypes: Vec::new(),
11295                functions: Vec::new(),
11296            }
11297        }
11298        #[doc(hidden)]
11299        pub fn default_instance() -> &'static Self {
11300            static DEFAULT: super::Module = super::Module::const_default();
11301            &DEFAULT
11302        }
11303        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11304        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11305            self.name.as_mut().map(|field| field as _)
11306        }
11307        ///Returns a mutable reference to `name`.
11308        ///If the field is unset, it is first initialized with the default value.
11309        pub fn name_mut(&mut self) -> &mut String {
11310            self.name.get_or_insert_default()
11311        }
11312        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11313        pub fn name_opt(&self) -> Option<&str> {
11314            self.name.as_ref().map(|field| field as _)
11315        }
11316        ///Sets `name` with the provided value.
11317        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11318            self.name = Some(field.into().into());
11319        }
11320        ///Sets `name` with the provided value.
11321        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11322            self.set_name(field.into());
11323            self
11324        }
11325        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
11326        pub fn contents_opt(&self) -> Option<&[u8]> {
11327            self.contents.as_ref().map(|field| field as _)
11328        }
11329        ///Sets `contents` with the provided value.
11330        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11331            self.contents = Some(field.into().into());
11332        }
11333        ///Sets `contents` with the provided value.
11334        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11335            mut self,
11336            field: T,
11337        ) -> Self {
11338            self.set_contents(field.into());
11339            self
11340        }
11341        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
11342        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11343            &self.datatypes
11344        }
11345        ///Returns a mutable reference to `datatypes`.
11346        ///If the field is unset, it is first initialized with the default value.
11347        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11348            &mut self.datatypes
11349        }
11350        ///Sets `datatypes` with the provided value.
11351        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11352            self.datatypes = field;
11353        }
11354        ///Sets `datatypes` with the provided value.
11355        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11356            self.set_datatypes(field);
11357            self
11358        }
11359        ///Returns the value of `functions`, or the default value if `functions` is unset.
11360        pub fn functions(&self) -> &[super::FunctionDescriptor] {
11361            &self.functions
11362        }
11363        ///Returns a mutable reference to `functions`.
11364        ///If the field is unset, it is first initialized with the default value.
11365        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11366            &mut self.functions
11367        }
11368        ///Sets `functions` with the provided value.
11369        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11370            self.functions = field;
11371        }
11372        ///Sets `functions` with the provided value.
11373        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11374            self.set_functions(field);
11375            self
11376        }
11377    }
11378    impl super::MoveAbort {
11379        pub const fn const_default() -> Self {
11380            Self {
11381                abort_code: None,
11382                location: None,
11383                clever_error: None,
11384            }
11385        }
11386        #[doc(hidden)]
11387        pub fn default_instance() -> &'static Self {
11388            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11389            &DEFAULT
11390        }
11391        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11392        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11393            self.abort_code.as_mut().map(|field| field as _)
11394        }
11395        ///Returns a mutable reference to `abort_code`.
11396        ///If the field is unset, it is first initialized with the default value.
11397        pub fn abort_code_mut(&mut self) -> &mut u64 {
11398            self.abort_code.get_or_insert_default()
11399        }
11400        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
11401        pub fn abort_code_opt(&self) -> Option<u64> {
11402            self.abort_code.as_ref().map(|field| *field)
11403        }
11404        ///Sets `abort_code` with the provided value.
11405        pub fn set_abort_code(&mut self, field: u64) {
11406            self.abort_code = Some(field);
11407        }
11408        ///Sets `abort_code` with the provided value.
11409        pub fn with_abort_code(mut self, field: u64) -> Self {
11410            self.set_abort_code(field);
11411            self
11412        }
11413        ///Returns the value of `location`, or the default value if `location` is unset.
11414        pub fn location(&self) -> &super::MoveLocation {
11415            self.location
11416                .as_ref()
11417                .map(|field| field as _)
11418                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11419        }
11420        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11421        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11422            self.location.as_mut().map(|field| field as _)
11423        }
11424        ///Returns a mutable reference to `location`.
11425        ///If the field is unset, it is first initialized with the default value.
11426        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11427            self.location.get_or_insert_default()
11428        }
11429        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
11430        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11431            self.location.as_ref().map(|field| field as _)
11432        }
11433        ///Sets `location` with the provided value.
11434        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11435            self.location = Some(field.into().into());
11436        }
11437        ///Sets `location` with the provided value.
11438        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11439            self.set_location(field.into());
11440            self
11441        }
11442        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
11443        pub fn clever_error(&self) -> &super::CleverError {
11444            self.clever_error
11445                .as_ref()
11446                .map(|field| field as _)
11447                .unwrap_or_else(|| super::CleverError::default_instance() as _)
11448        }
11449        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11450        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11451            self.clever_error.as_mut().map(|field| field as _)
11452        }
11453        ///Returns a mutable reference to `clever_error`.
11454        ///If the field is unset, it is first initialized with the default value.
11455        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11456            self.clever_error.get_or_insert_default()
11457        }
11458        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
11459        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11460            self.clever_error.as_ref().map(|field| field as _)
11461        }
11462        ///Sets `clever_error` with the provided value.
11463        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11464            self.clever_error = Some(field.into().into());
11465        }
11466        ///Sets `clever_error` with the provided value.
11467        pub fn with_clever_error<T: Into<super::CleverError>>(
11468            mut self,
11469            field: T,
11470        ) -> Self {
11471            self.set_clever_error(field.into());
11472            self
11473        }
11474    }
11475    impl super::MoveCall {
11476        pub const fn const_default() -> Self {
11477            Self {
11478                package: None,
11479                module: None,
11480                function: None,
11481                type_arguments: Vec::new(),
11482                arguments: Vec::new(),
11483            }
11484        }
11485        #[doc(hidden)]
11486        pub fn default_instance() -> &'static Self {
11487            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11488            &DEFAULT
11489        }
11490        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11491        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11492            self.package.as_mut().map(|field| field as _)
11493        }
11494        ///Returns a mutable reference to `package`.
11495        ///If the field is unset, it is first initialized with the default value.
11496        pub fn package_mut(&mut self) -> &mut String {
11497            self.package.get_or_insert_default()
11498        }
11499        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11500        pub fn package_opt(&self) -> Option<&str> {
11501            self.package.as_ref().map(|field| field as _)
11502        }
11503        ///Sets `package` with the provided value.
11504        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11505            self.package = Some(field.into().into());
11506        }
11507        ///Sets `package` with the provided value.
11508        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11509            self.set_package(field.into());
11510            self
11511        }
11512        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11513        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11514            self.module.as_mut().map(|field| field as _)
11515        }
11516        ///Returns a mutable reference to `module`.
11517        ///If the field is unset, it is first initialized with the default value.
11518        pub fn module_mut(&mut self) -> &mut String {
11519            self.module.get_or_insert_default()
11520        }
11521        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11522        pub fn module_opt(&self) -> Option<&str> {
11523            self.module.as_ref().map(|field| field as _)
11524        }
11525        ///Sets `module` with the provided value.
11526        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11527            self.module = Some(field.into().into());
11528        }
11529        ///Sets `module` with the provided value.
11530        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11531            self.set_module(field.into());
11532            self
11533        }
11534        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11535        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11536            self.function.as_mut().map(|field| field as _)
11537        }
11538        ///Returns a mutable reference to `function`.
11539        ///If the field is unset, it is first initialized with the default value.
11540        pub fn function_mut(&mut self) -> &mut String {
11541            self.function.get_or_insert_default()
11542        }
11543        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11544        pub fn function_opt(&self) -> Option<&str> {
11545            self.function.as_ref().map(|field| field as _)
11546        }
11547        ///Sets `function` with the provided value.
11548        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11549            self.function = Some(field.into().into());
11550        }
11551        ///Sets `function` with the provided value.
11552        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11553            self.set_function(field.into());
11554            self
11555        }
11556        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
11557        pub fn type_arguments(&self) -> &[String] {
11558            &self.type_arguments
11559        }
11560        ///Returns a mutable reference to `type_arguments`.
11561        ///If the field is unset, it is first initialized with the default value.
11562        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11563            &mut self.type_arguments
11564        }
11565        ///Sets `type_arguments` with the provided value.
11566        pub fn set_type_arguments(&mut self, field: Vec<String>) {
11567            self.type_arguments = field;
11568        }
11569        ///Sets `type_arguments` with the provided value.
11570        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11571            self.set_type_arguments(field);
11572            self
11573        }
11574        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
11575        pub fn arguments(&self) -> &[super::Argument] {
11576            &self.arguments
11577        }
11578        ///Returns a mutable reference to `arguments`.
11579        ///If the field is unset, it is first initialized with the default value.
11580        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11581            &mut self.arguments
11582        }
11583        ///Sets `arguments` with the provided value.
11584        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11585            self.arguments = field;
11586        }
11587        ///Sets `arguments` with the provided value.
11588        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11589            self.set_arguments(field);
11590            self
11591        }
11592    }
11593    impl super::MoveCallFilter {
11594        pub const fn const_default() -> Self {
11595            Self { function: None }
11596        }
11597        #[doc(hidden)]
11598        pub fn default_instance() -> &'static Self {
11599            static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11600            &DEFAULT
11601        }
11602        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11603        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11604            self.function.as_mut().map(|field| field as _)
11605        }
11606        ///Returns a mutable reference to `function`.
11607        ///If the field is unset, it is first initialized with the default value.
11608        pub fn function_mut(&mut self) -> &mut String {
11609            self.function.get_or_insert_default()
11610        }
11611        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11612        pub fn function_opt(&self) -> Option<&str> {
11613            self.function.as_ref().map(|field| field as _)
11614        }
11615        ///Sets `function` with the provided value.
11616        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11617            self.function = Some(field.into().into());
11618        }
11619        ///Sets `function` with the provided value.
11620        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11621            self.set_function(field.into());
11622            self
11623        }
11624    }
11625    impl super::MoveLocation {
11626        pub const fn const_default() -> Self {
11627            Self {
11628                package: None,
11629                module: None,
11630                function: None,
11631                instruction: None,
11632                function_name: None,
11633            }
11634        }
11635        #[doc(hidden)]
11636        pub fn default_instance() -> &'static Self {
11637            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11638            &DEFAULT
11639        }
11640        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11641        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11642            self.package.as_mut().map(|field| field as _)
11643        }
11644        ///Returns a mutable reference to `package`.
11645        ///If the field is unset, it is first initialized with the default value.
11646        pub fn package_mut(&mut self) -> &mut String {
11647            self.package.get_or_insert_default()
11648        }
11649        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11650        pub fn package_opt(&self) -> Option<&str> {
11651            self.package.as_ref().map(|field| field as _)
11652        }
11653        ///Sets `package` with the provided value.
11654        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11655            self.package = Some(field.into().into());
11656        }
11657        ///Sets `package` with the provided value.
11658        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11659            self.set_package(field.into());
11660            self
11661        }
11662        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11663        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11664            self.module.as_mut().map(|field| field as _)
11665        }
11666        ///Returns a mutable reference to `module`.
11667        ///If the field is unset, it is first initialized with the default value.
11668        pub fn module_mut(&mut self) -> &mut String {
11669            self.module.get_or_insert_default()
11670        }
11671        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11672        pub fn module_opt(&self) -> Option<&str> {
11673            self.module.as_ref().map(|field| field as _)
11674        }
11675        ///Sets `module` with the provided value.
11676        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11677            self.module = Some(field.into().into());
11678        }
11679        ///Sets `module` with the provided value.
11680        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11681            self.set_module(field.into());
11682            self
11683        }
11684        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11685        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11686            self.function.as_mut().map(|field| field as _)
11687        }
11688        ///Returns a mutable reference to `function`.
11689        ///If the field is unset, it is first initialized with the default value.
11690        pub fn function_mut(&mut self) -> &mut u32 {
11691            self.function.get_or_insert_default()
11692        }
11693        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11694        pub fn function_opt(&self) -> Option<u32> {
11695            self.function.as_ref().map(|field| *field)
11696        }
11697        ///Sets `function` with the provided value.
11698        pub fn set_function(&mut self, field: u32) {
11699            self.function = Some(field);
11700        }
11701        ///Sets `function` with the provided value.
11702        pub fn with_function(mut self, field: u32) -> Self {
11703            self.set_function(field);
11704            self
11705        }
11706        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11707        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11708            self.instruction.as_mut().map(|field| field as _)
11709        }
11710        ///Returns a mutable reference to `instruction`.
11711        ///If the field is unset, it is first initialized with the default value.
11712        pub fn instruction_mut(&mut self) -> &mut u32 {
11713            self.instruction.get_or_insert_default()
11714        }
11715        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11716        pub fn instruction_opt(&self) -> Option<u32> {
11717            self.instruction.as_ref().map(|field| *field)
11718        }
11719        ///Sets `instruction` with the provided value.
11720        pub fn set_instruction(&mut self, field: u32) {
11721            self.instruction = Some(field);
11722        }
11723        ///Sets `instruction` with the provided value.
11724        pub fn with_instruction(mut self, field: u32) -> Self {
11725            self.set_instruction(field);
11726            self
11727        }
11728        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11729        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11730            self.function_name.as_mut().map(|field| field as _)
11731        }
11732        ///Returns a mutable reference to `function_name`.
11733        ///If the field is unset, it is first initialized with the default value.
11734        pub fn function_name_mut(&mut self) -> &mut String {
11735            self.function_name.get_or_insert_default()
11736        }
11737        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11738        pub fn function_name_opt(&self) -> Option<&str> {
11739            self.function_name.as_ref().map(|field| field as _)
11740        }
11741        ///Sets `function_name` with the provided value.
11742        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11743            self.function_name = Some(field.into().into());
11744        }
11745        ///Sets `function_name` with the provided value.
11746        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11747            self.set_function_name(field.into());
11748            self
11749        }
11750    }
11751    impl super::MoveTable {
11752        pub const fn const_default() -> Self {
11753            Self { id: None, size: None }
11754        }
11755        #[doc(hidden)]
11756        pub fn default_instance() -> &'static Self {
11757            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11758            &DEFAULT
11759        }
11760        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11761        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11762            self.id.as_mut().map(|field| field as _)
11763        }
11764        ///Returns a mutable reference to `id`.
11765        ///If the field is unset, it is first initialized with the default value.
11766        pub fn id_mut(&mut self) -> &mut String {
11767            self.id.get_or_insert_default()
11768        }
11769        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11770        pub fn id_opt(&self) -> Option<&str> {
11771            self.id.as_ref().map(|field| field as _)
11772        }
11773        ///Sets `id` with the provided value.
11774        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11775            self.id = Some(field.into().into());
11776        }
11777        ///Sets `id` with the provided value.
11778        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11779            self.set_id(field.into());
11780            self
11781        }
11782        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11783        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11784            self.size.as_mut().map(|field| field as _)
11785        }
11786        ///Returns a mutable reference to `size`.
11787        ///If the field is unset, it is first initialized with the default value.
11788        pub fn size_mut(&mut self) -> &mut u64 {
11789            self.size.get_or_insert_default()
11790        }
11791        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
11792        pub fn size_opt(&self) -> Option<u64> {
11793            self.size.as_ref().map(|field| *field)
11794        }
11795        ///Sets `size` with the provided value.
11796        pub fn set_size(&mut self, field: u64) {
11797            self.size = Some(field);
11798        }
11799        ///Sets `size` with the provided value.
11800        pub fn with_size(mut self, field: u64) -> Self {
11801            self.set_size(field);
11802            self
11803        }
11804    }
11805    impl super::MultisigAggregatedSignature {
11806        pub const fn const_default() -> Self {
11807            Self {
11808                signatures: Vec::new(),
11809                bitmap: None,
11810                legacy_bitmap: None,
11811                committee: None,
11812            }
11813        }
11814        #[doc(hidden)]
11815        pub fn default_instance() -> &'static Self {
11816            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11817            &DEFAULT
11818        }
11819        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
11820        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11821            &self.signatures
11822        }
11823        ///Returns a mutable reference to `signatures`.
11824        ///If the field is unset, it is first initialized with the default value.
11825        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11826            &mut self.signatures
11827        }
11828        ///Sets `signatures` with the provided value.
11829        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11830            self.signatures = field;
11831        }
11832        ///Sets `signatures` with the provided value.
11833        pub fn with_signatures(
11834            mut self,
11835            field: Vec<super::MultisigMemberSignature>,
11836        ) -> Self {
11837            self.set_signatures(field);
11838            self
11839        }
11840        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11841        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11842            self.bitmap.as_mut().map(|field| field as _)
11843        }
11844        ///Returns a mutable reference to `bitmap`.
11845        ///If the field is unset, it is first initialized with the default value.
11846        pub fn bitmap_mut(&mut self) -> &mut u32 {
11847            self.bitmap.get_or_insert_default()
11848        }
11849        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11850        pub fn bitmap_opt(&self) -> Option<u32> {
11851            self.bitmap.as_ref().map(|field| *field)
11852        }
11853        ///Sets `bitmap` with the provided value.
11854        pub fn set_bitmap(&mut self, field: u32) {
11855            self.bitmap = Some(field);
11856        }
11857        ///Sets `bitmap` with the provided value.
11858        pub fn with_bitmap(mut self, field: u32) -> Self {
11859            self.set_bitmap(field);
11860            self
11861        }
11862        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11863        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11864            self.legacy_bitmap.as_ref().map(|field| field as _)
11865        }
11866        ///Sets `legacy_bitmap` with the provided value.
11867        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11868            self.legacy_bitmap = Some(field.into().into());
11869        }
11870        ///Sets `legacy_bitmap` with the provided value.
11871        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11872            mut self,
11873            field: T,
11874        ) -> Self {
11875            self.set_legacy_bitmap(field.into());
11876            self
11877        }
11878        ///Returns the value of `committee`, or the default value if `committee` is unset.
11879        pub fn committee(&self) -> &super::MultisigCommittee {
11880            self.committee
11881                .as_ref()
11882                .map(|field| field as _)
11883                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11884        }
11885        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11886        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11887            self.committee.as_mut().map(|field| field as _)
11888        }
11889        ///Returns a mutable reference to `committee`.
11890        ///If the field is unset, it is first initialized with the default value.
11891        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
11892            self.committee.get_or_insert_default()
11893        }
11894        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
11895        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
11896            self.committee.as_ref().map(|field| field as _)
11897        }
11898        ///Sets `committee` with the provided value.
11899        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
11900            self.committee = Some(field.into().into());
11901        }
11902        ///Sets `committee` with the provided value.
11903        pub fn with_committee<T: Into<super::MultisigCommittee>>(
11904            mut self,
11905            field: T,
11906        ) -> Self {
11907            self.set_committee(field.into());
11908            self
11909        }
11910    }
11911    impl super::MultisigCommittee {
11912        pub const fn const_default() -> Self {
11913            Self {
11914                members: Vec::new(),
11915                threshold: None,
11916            }
11917        }
11918        #[doc(hidden)]
11919        pub fn default_instance() -> &'static Self {
11920            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
11921            &DEFAULT
11922        }
11923        ///Returns the value of `members`, or the default value if `members` is unset.
11924        pub fn members(&self) -> &[super::MultisigMember] {
11925            &self.members
11926        }
11927        ///Returns a mutable reference to `members`.
11928        ///If the field is unset, it is first initialized with the default value.
11929        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
11930            &mut self.members
11931        }
11932        ///Sets `members` with the provided value.
11933        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
11934            self.members = field;
11935        }
11936        ///Sets `members` with the provided value.
11937        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
11938            self.set_members(field);
11939            self
11940        }
11941        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11942        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
11943            self.threshold.as_mut().map(|field| field as _)
11944        }
11945        ///Returns a mutable reference to `threshold`.
11946        ///If the field is unset, it is first initialized with the default value.
11947        pub fn threshold_mut(&mut self) -> &mut u32 {
11948            self.threshold.get_or_insert_default()
11949        }
11950        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
11951        pub fn threshold_opt(&self) -> Option<u32> {
11952            self.threshold.as_ref().map(|field| *field)
11953        }
11954        ///Sets `threshold` with the provided value.
11955        pub fn set_threshold(&mut self, field: u32) {
11956            self.threshold = Some(field);
11957        }
11958        ///Sets `threshold` with the provided value.
11959        pub fn with_threshold(mut self, field: u32) -> Self {
11960            self.set_threshold(field);
11961            self
11962        }
11963    }
11964    impl super::MultisigMember {
11965        pub const fn const_default() -> Self {
11966            Self {
11967                public_key: None,
11968                weight: None,
11969            }
11970        }
11971        #[doc(hidden)]
11972        pub fn default_instance() -> &'static Self {
11973            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
11974            &DEFAULT
11975        }
11976        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
11977        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
11978            self.public_key
11979                .as_ref()
11980                .map(|field| field as _)
11981                .unwrap_or_else(|| {
11982                    super::MultisigMemberPublicKey::default_instance() as _
11983                })
11984        }
11985        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11986        pub fn public_key_opt_mut(
11987            &mut self,
11988        ) -> Option<&mut super::MultisigMemberPublicKey> {
11989            self.public_key.as_mut().map(|field| field as _)
11990        }
11991        ///Returns a mutable reference to `public_key`.
11992        ///If the field is unset, it is first initialized with the default value.
11993        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
11994            self.public_key.get_or_insert_default()
11995        }
11996        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11997        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
11998            self.public_key.as_ref().map(|field| field as _)
11999        }
12000        ///Sets `public_key` with the provided value.
12001        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
12002            &mut self,
12003            field: T,
12004        ) {
12005            self.public_key = Some(field.into().into());
12006        }
12007        ///Sets `public_key` with the provided value.
12008        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
12009            mut self,
12010            field: T,
12011        ) -> Self {
12012            self.set_public_key(field.into());
12013            self
12014        }
12015        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12016        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
12017            self.weight.as_mut().map(|field| field as _)
12018        }
12019        ///Returns a mutable reference to `weight`.
12020        ///If the field is unset, it is first initialized with the default value.
12021        pub fn weight_mut(&mut self) -> &mut u32 {
12022            self.weight.get_or_insert_default()
12023        }
12024        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
12025        pub fn weight_opt(&self) -> Option<u32> {
12026            self.weight.as_ref().map(|field| *field)
12027        }
12028        ///Sets `weight` with the provided value.
12029        pub fn set_weight(&mut self, field: u32) {
12030            self.weight = Some(field);
12031        }
12032        ///Sets `weight` with the provided value.
12033        pub fn with_weight(mut self, field: u32) -> Self {
12034            self.set_weight(field);
12035            self
12036        }
12037    }
12038    impl super::MultisigMemberPublicKey {
12039        pub const fn const_default() -> Self {
12040            Self {
12041                scheme: None,
12042                public_key: None,
12043                zklogin: None,
12044            }
12045        }
12046        #[doc(hidden)]
12047        pub fn default_instance() -> &'static Self {
12048            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
12049            &DEFAULT
12050        }
12051        ///Sets `scheme` with the provided value.
12052        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12053            self.set_scheme(field.into());
12054            self
12055        }
12056        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12057        pub fn public_key_opt(&self) -> Option<&[u8]> {
12058            self.public_key.as_ref().map(|field| field as _)
12059        }
12060        ///Sets `public_key` with the provided value.
12061        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12062            self.public_key = Some(field.into().into());
12063        }
12064        ///Sets `public_key` with the provided value.
12065        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12066            mut self,
12067            field: T,
12068        ) -> Self {
12069            self.set_public_key(field.into());
12070            self
12071        }
12072        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12073        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
12074            self.zklogin
12075                .as_ref()
12076                .map(|field| field as _)
12077                .unwrap_or_else(|| {
12078                    super::ZkLoginPublicIdentifier::default_instance() as _
12079                })
12080        }
12081        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12082        pub fn zklogin_opt_mut(
12083            &mut self,
12084        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
12085            self.zklogin.as_mut().map(|field| field as _)
12086        }
12087        ///Returns a mutable reference to `zklogin`.
12088        ///If the field is unset, it is first initialized with the default value.
12089        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
12090            self.zklogin.get_or_insert_default()
12091        }
12092        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12093        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
12094            self.zklogin.as_ref().map(|field| field as _)
12095        }
12096        ///Sets `zklogin` with the provided value.
12097        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12098            &mut self,
12099            field: T,
12100        ) {
12101            self.zklogin = Some(field.into().into());
12102        }
12103        ///Sets `zklogin` with the provided value.
12104        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12105            mut self,
12106            field: T,
12107        ) -> Self {
12108            self.set_zklogin(field.into());
12109            self
12110        }
12111    }
12112    impl super::MultisigMemberSignature {
12113        pub const fn const_default() -> Self {
12114            Self {
12115                scheme: None,
12116                signature: None,
12117                zklogin: None,
12118                passkey: None,
12119            }
12120        }
12121        #[doc(hidden)]
12122        pub fn default_instance() -> &'static Self {
12123            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12124            &DEFAULT
12125        }
12126        ///Sets `scheme` with the provided value.
12127        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12128            self.set_scheme(field.into());
12129            self
12130        }
12131        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12132        pub fn signature_opt(&self) -> Option<&[u8]> {
12133            self.signature.as_ref().map(|field| field as _)
12134        }
12135        ///Sets `signature` with the provided value.
12136        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12137            self.signature = Some(field.into().into());
12138        }
12139        ///Sets `signature` with the provided value.
12140        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12141            mut self,
12142            field: T,
12143        ) -> Self {
12144            self.set_signature(field.into());
12145            self
12146        }
12147        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12148        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12149            self.zklogin
12150                .as_ref()
12151                .map(|field| field as _)
12152                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12153        }
12154        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12155        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12156            self.zklogin.as_mut().map(|field| field as _)
12157        }
12158        ///Returns a mutable reference to `zklogin`.
12159        ///If the field is unset, it is first initialized with the default value.
12160        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12161            self.zklogin.get_or_insert_default()
12162        }
12163        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12164        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12165            self.zklogin.as_ref().map(|field| field as _)
12166        }
12167        ///Sets `zklogin` with the provided value.
12168        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12169            self.zklogin = Some(field.into().into());
12170        }
12171        ///Sets `zklogin` with the provided value.
12172        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12173            mut self,
12174            field: T,
12175        ) -> Self {
12176            self.set_zklogin(field.into());
12177            self
12178        }
12179        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
12180        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12181            self.passkey
12182                .as_ref()
12183                .map(|field| field as _)
12184                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12185        }
12186        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12187        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12188            self.passkey.as_mut().map(|field| field as _)
12189        }
12190        ///Returns a mutable reference to `passkey`.
12191        ///If the field is unset, it is first initialized with the default value.
12192        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12193            self.passkey.get_or_insert_default()
12194        }
12195        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
12196        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12197            self.passkey.as_ref().map(|field| field as _)
12198        }
12199        ///Sets `passkey` with the provided value.
12200        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12201            self.passkey = Some(field.into().into());
12202        }
12203        ///Sets `passkey` with the provided value.
12204        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12205            mut self,
12206            field: T,
12207        ) -> Self {
12208            self.set_passkey(field.into());
12209            self
12210        }
12211    }
12212    impl super::NameRecord {
12213        pub const fn const_default() -> Self {
12214            Self {
12215                id: None,
12216                name: None,
12217                registration_nft_id: None,
12218                expiration_timestamp: None,
12219                target_address: None,
12220                data: std::collections::BTreeMap::new(),
12221            }
12222        }
12223        #[doc(hidden)]
12224        pub fn default_instance() -> &'static Self {
12225            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12226            &DEFAULT
12227        }
12228        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12229        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12230            self.id.as_mut().map(|field| field as _)
12231        }
12232        ///Returns a mutable reference to `id`.
12233        ///If the field is unset, it is first initialized with the default value.
12234        pub fn id_mut(&mut self) -> &mut String {
12235            self.id.get_or_insert_default()
12236        }
12237        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12238        pub fn id_opt(&self) -> Option<&str> {
12239            self.id.as_ref().map(|field| field as _)
12240        }
12241        ///Sets `id` with the provided value.
12242        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12243            self.id = Some(field.into().into());
12244        }
12245        ///Sets `id` with the provided value.
12246        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12247            self.set_id(field.into());
12248            self
12249        }
12250        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12251        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12252            self.name.as_mut().map(|field| field as _)
12253        }
12254        ///Returns a mutable reference to `name`.
12255        ///If the field is unset, it is first initialized with the default value.
12256        pub fn name_mut(&mut self) -> &mut String {
12257            self.name.get_or_insert_default()
12258        }
12259        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12260        pub fn name_opt(&self) -> Option<&str> {
12261            self.name.as_ref().map(|field| field as _)
12262        }
12263        ///Sets `name` with the provided value.
12264        pub fn set_name<T: Into<String>>(&mut self, field: T) {
12265            self.name = Some(field.into().into());
12266        }
12267        ///Sets `name` with the provided value.
12268        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12269            self.set_name(field.into());
12270            self
12271        }
12272        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12273        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12274            self.registration_nft_id.as_mut().map(|field| field as _)
12275        }
12276        ///Returns a mutable reference to `registration_nft_id`.
12277        ///If the field is unset, it is first initialized with the default value.
12278        pub fn registration_nft_id_mut(&mut self) -> &mut String {
12279            self.registration_nft_id.get_or_insert_default()
12280        }
12281        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12282        pub fn registration_nft_id_opt(&self) -> Option<&str> {
12283            self.registration_nft_id.as_ref().map(|field| field as _)
12284        }
12285        ///Sets `registration_nft_id` with the provided value.
12286        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12287            self.registration_nft_id = Some(field.into().into());
12288        }
12289        ///Sets `registration_nft_id` with the provided value.
12290        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12291            self.set_registration_nft_id(field.into());
12292            self
12293        }
12294        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12295        pub fn expiration_timestamp_opt_mut(
12296            &mut self,
12297        ) -> Option<&mut ::prost_types::Timestamp> {
12298            self.expiration_timestamp.as_mut().map(|field| field as _)
12299        }
12300        ///Returns a mutable reference to `expiration_timestamp`.
12301        ///If the field is unset, it is first initialized with the default value.
12302        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12303            self.expiration_timestamp.get_or_insert_default()
12304        }
12305        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
12306        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12307            self.expiration_timestamp.as_ref().map(|field| field as _)
12308        }
12309        ///Sets `expiration_timestamp` with the provided value.
12310        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12311            &mut self,
12312            field: T,
12313        ) {
12314            self.expiration_timestamp = Some(field.into().into());
12315        }
12316        ///Sets `expiration_timestamp` with the provided value.
12317        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12318            mut self,
12319            field: T,
12320        ) -> Self {
12321            self.set_expiration_timestamp(field.into());
12322            self
12323        }
12324        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12325        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12326            self.target_address.as_mut().map(|field| field as _)
12327        }
12328        ///Returns a mutable reference to `target_address`.
12329        ///If the field is unset, it is first initialized with the default value.
12330        pub fn target_address_mut(&mut self) -> &mut String {
12331            self.target_address.get_or_insert_default()
12332        }
12333        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12334        pub fn target_address_opt(&self) -> Option<&str> {
12335            self.target_address.as_ref().map(|field| field as _)
12336        }
12337        ///Sets `target_address` with the provided value.
12338        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12339            self.target_address = Some(field.into().into());
12340        }
12341        ///Sets `target_address` with the provided value.
12342        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12343            self.set_target_address(field.into());
12344            self
12345        }
12346        ///Returns the value of `data`, or the default value if `data` is unset.
12347        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12348            &self.data
12349        }
12350        ///Returns a mutable reference to `data`.
12351        ///If the field is unset, it is first initialized with the default value.
12352        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12353            &mut self.data
12354        }
12355        ///Sets `data` with the provided value.
12356        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12357            self.data = field;
12358        }
12359        ///Sets `data` with the provided value.
12360        pub fn with_data(
12361            mut self,
12362            field: ::std::collections::BTreeMap<String, String>,
12363        ) -> Self {
12364            self.set_data(field);
12365            self
12366        }
12367    }
12368    impl super::Object {
12369        pub const fn const_default() -> Self {
12370            Self {
12371                bcs: None,
12372                object_id: None,
12373                version: None,
12374                digest: None,
12375                owner: None,
12376                object_type: None,
12377                has_public_transfer: None,
12378                contents: None,
12379                package: None,
12380                previous_transaction: None,
12381                storage_rebate: None,
12382                json: None,
12383                balance: None,
12384                display: None,
12385            }
12386        }
12387        #[doc(hidden)]
12388        pub fn default_instance() -> &'static Self {
12389            static DEFAULT: super::Object = super::Object::const_default();
12390            &DEFAULT
12391        }
12392        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
12393        pub fn bcs(&self) -> &super::Bcs {
12394            self.bcs
12395                .as_ref()
12396                .map(|field| field as _)
12397                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12398        }
12399        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12400        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12401            self.bcs.as_mut().map(|field| field as _)
12402        }
12403        ///Returns a mutable reference to `bcs`.
12404        ///If the field is unset, it is first initialized with the default value.
12405        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12406            self.bcs.get_or_insert_default()
12407        }
12408        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
12409        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12410            self.bcs.as_ref().map(|field| field as _)
12411        }
12412        ///Sets `bcs` with the provided value.
12413        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12414            self.bcs = Some(field.into().into());
12415        }
12416        ///Sets `bcs` with the provided value.
12417        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12418            self.set_bcs(field.into());
12419            self
12420        }
12421        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12422        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12423            self.object_id.as_mut().map(|field| field as _)
12424        }
12425        ///Returns a mutable reference to `object_id`.
12426        ///If the field is unset, it is first initialized with the default value.
12427        pub fn object_id_mut(&mut self) -> &mut String {
12428            self.object_id.get_or_insert_default()
12429        }
12430        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12431        pub fn object_id_opt(&self) -> Option<&str> {
12432            self.object_id.as_ref().map(|field| field as _)
12433        }
12434        ///Sets `object_id` with the provided value.
12435        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12436            self.object_id = Some(field.into().into());
12437        }
12438        ///Sets `object_id` with the provided value.
12439        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12440            self.set_object_id(field.into());
12441            self
12442        }
12443        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12444        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12445            self.version.as_mut().map(|field| field as _)
12446        }
12447        ///Returns a mutable reference to `version`.
12448        ///If the field is unset, it is first initialized with the default value.
12449        pub fn version_mut(&mut self) -> &mut u64 {
12450            self.version.get_or_insert_default()
12451        }
12452        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12453        pub fn version_opt(&self) -> Option<u64> {
12454            self.version.as_ref().map(|field| *field)
12455        }
12456        ///Sets `version` with the provided value.
12457        pub fn set_version(&mut self, field: u64) {
12458            self.version = Some(field);
12459        }
12460        ///Sets `version` with the provided value.
12461        pub fn with_version(mut self, field: u64) -> Self {
12462            self.set_version(field);
12463            self
12464        }
12465        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12466        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12467            self.digest.as_mut().map(|field| field as _)
12468        }
12469        ///Returns a mutable reference to `digest`.
12470        ///If the field is unset, it is first initialized with the default value.
12471        pub fn digest_mut(&mut self) -> &mut String {
12472            self.digest.get_or_insert_default()
12473        }
12474        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12475        pub fn digest_opt(&self) -> Option<&str> {
12476            self.digest.as_ref().map(|field| field as _)
12477        }
12478        ///Sets `digest` with the provided value.
12479        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12480            self.digest = Some(field.into().into());
12481        }
12482        ///Sets `digest` with the provided value.
12483        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12484            self.set_digest(field.into());
12485            self
12486        }
12487        ///Returns the value of `owner`, or the default value if `owner` is unset.
12488        pub fn owner(&self) -> &super::Owner {
12489            self.owner
12490                .as_ref()
12491                .map(|field| field as _)
12492                .unwrap_or_else(|| super::Owner::default_instance() as _)
12493        }
12494        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12495        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12496            self.owner.as_mut().map(|field| field as _)
12497        }
12498        ///Returns a mutable reference to `owner`.
12499        ///If the field is unset, it is first initialized with the default value.
12500        pub fn owner_mut(&mut self) -> &mut super::Owner {
12501            self.owner.get_or_insert_default()
12502        }
12503        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
12504        pub fn owner_opt(&self) -> Option<&super::Owner> {
12505            self.owner.as_ref().map(|field| field as _)
12506        }
12507        ///Sets `owner` with the provided value.
12508        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12509            self.owner = Some(field.into().into());
12510        }
12511        ///Sets `owner` with the provided value.
12512        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12513            self.set_owner(field.into());
12514            self
12515        }
12516        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12517        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12518            self.object_type.as_mut().map(|field| field as _)
12519        }
12520        ///Returns a mutable reference to `object_type`.
12521        ///If the field is unset, it is first initialized with the default value.
12522        pub fn object_type_mut(&mut self) -> &mut String {
12523            self.object_type.get_or_insert_default()
12524        }
12525        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
12526        pub fn object_type_opt(&self) -> Option<&str> {
12527            self.object_type.as_ref().map(|field| field as _)
12528        }
12529        ///Sets `object_type` with the provided value.
12530        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12531            self.object_type = Some(field.into().into());
12532        }
12533        ///Sets `object_type` with the provided value.
12534        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12535            self.set_object_type(field.into());
12536            self
12537        }
12538        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12539        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12540            self.has_public_transfer.as_mut().map(|field| field as _)
12541        }
12542        ///Returns a mutable reference to `has_public_transfer`.
12543        ///If the field is unset, it is first initialized with the default value.
12544        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12545            self.has_public_transfer.get_or_insert_default()
12546        }
12547        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
12548        pub fn has_public_transfer_opt(&self) -> Option<bool> {
12549            self.has_public_transfer.as_ref().map(|field| *field)
12550        }
12551        ///Sets `has_public_transfer` with the provided value.
12552        pub fn set_has_public_transfer(&mut self, field: bool) {
12553            self.has_public_transfer = Some(field);
12554        }
12555        ///Sets `has_public_transfer` with the provided value.
12556        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12557            self.set_has_public_transfer(field);
12558            self
12559        }
12560        ///Returns the value of `contents`, or the default value if `contents` is unset.
12561        pub fn contents(&self) -> &super::Bcs {
12562            self.contents
12563                .as_ref()
12564                .map(|field| field as _)
12565                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12566        }
12567        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12568        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12569            self.contents.as_mut().map(|field| field as _)
12570        }
12571        ///Returns a mutable reference to `contents`.
12572        ///If the field is unset, it is first initialized with the default value.
12573        pub fn contents_mut(&mut self) -> &mut super::Bcs {
12574            self.contents.get_or_insert_default()
12575        }
12576        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
12577        pub fn contents_opt(&self) -> Option<&super::Bcs> {
12578            self.contents.as_ref().map(|field| field as _)
12579        }
12580        ///Sets `contents` with the provided value.
12581        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12582            self.contents = Some(field.into().into());
12583        }
12584        ///Sets `contents` with the provided value.
12585        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12586            self.set_contents(field.into());
12587            self
12588        }
12589        ///Returns the value of `package`, or the default value if `package` is unset.
12590        pub fn package(&self) -> &super::Package {
12591            self.package
12592                .as_ref()
12593                .map(|field| field as _)
12594                .unwrap_or_else(|| super::Package::default_instance() as _)
12595        }
12596        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12597        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12598            self.package.as_mut().map(|field| field as _)
12599        }
12600        ///Returns a mutable reference to `package`.
12601        ///If the field is unset, it is first initialized with the default value.
12602        pub fn package_mut(&mut self) -> &mut super::Package {
12603            self.package.get_or_insert_default()
12604        }
12605        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
12606        pub fn package_opt(&self) -> Option<&super::Package> {
12607            self.package.as_ref().map(|field| field as _)
12608        }
12609        ///Sets `package` with the provided value.
12610        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12611            self.package = Some(field.into().into());
12612        }
12613        ///Sets `package` with the provided value.
12614        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12615            self.set_package(field.into());
12616            self
12617        }
12618        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12619        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12620            self.previous_transaction.as_mut().map(|field| field as _)
12621        }
12622        ///Returns a mutable reference to `previous_transaction`.
12623        ///If the field is unset, it is first initialized with the default value.
12624        pub fn previous_transaction_mut(&mut self) -> &mut String {
12625            self.previous_transaction.get_or_insert_default()
12626        }
12627        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12628        pub fn previous_transaction_opt(&self) -> Option<&str> {
12629            self.previous_transaction.as_ref().map(|field| field as _)
12630        }
12631        ///Sets `previous_transaction` with the provided value.
12632        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12633            self.previous_transaction = Some(field.into().into());
12634        }
12635        ///Sets `previous_transaction` with the provided value.
12636        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12637            self.set_previous_transaction(field.into());
12638            self
12639        }
12640        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12641        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12642            self.storage_rebate.as_mut().map(|field| field as _)
12643        }
12644        ///Returns a mutable reference to `storage_rebate`.
12645        ///If the field is unset, it is first initialized with the default value.
12646        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12647            self.storage_rebate.get_or_insert_default()
12648        }
12649        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12650        pub fn storage_rebate_opt(&self) -> Option<u64> {
12651            self.storage_rebate.as_ref().map(|field| *field)
12652        }
12653        ///Sets `storage_rebate` with the provided value.
12654        pub fn set_storage_rebate(&mut self, field: u64) {
12655            self.storage_rebate = Some(field);
12656        }
12657        ///Sets `storage_rebate` with the provided value.
12658        pub fn with_storage_rebate(mut self, field: u64) -> Self {
12659            self.set_storage_rebate(field);
12660            self
12661        }
12662        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12663        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12664            self.json.as_mut().map(|field| field as _)
12665        }
12666        ///Returns a mutable reference to `json`.
12667        ///If the field is unset, it is first initialized with the default value.
12668        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12669            self.json.get_or_insert_default()
12670        }
12671        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
12672        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12673            self.json.as_ref().map(|field| field as _)
12674        }
12675        ///Sets `json` with the provided value.
12676        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12677            self.json = Some(field.into().into());
12678        }
12679        ///Sets `json` with the provided value.
12680        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12681            self.set_json(field.into());
12682            self
12683        }
12684        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12685        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12686            self.balance.as_mut().map(|field| field as _)
12687        }
12688        ///Returns a mutable reference to `balance`.
12689        ///If the field is unset, it is first initialized with the default value.
12690        pub fn balance_mut(&mut self) -> &mut u64 {
12691            self.balance.get_or_insert_default()
12692        }
12693        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12694        pub fn balance_opt(&self) -> Option<u64> {
12695            self.balance.as_ref().map(|field| *field)
12696        }
12697        ///Sets `balance` with the provided value.
12698        pub fn set_balance(&mut self, field: u64) {
12699            self.balance = Some(field);
12700        }
12701        ///Sets `balance` with the provided value.
12702        pub fn with_balance(mut self, field: u64) -> Self {
12703            self.set_balance(field);
12704            self
12705        }
12706        ///Returns the value of `display`, or the default value if `display` is unset.
12707        pub fn display(&self) -> &super::Display {
12708            self.display
12709                .as_ref()
12710                .map(|field| field as _)
12711                .unwrap_or_else(|| super::Display::default_instance() as _)
12712        }
12713        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12714        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12715            self.display.as_mut().map(|field| field as _)
12716        }
12717        ///Returns a mutable reference to `display`.
12718        ///If the field is unset, it is first initialized with the default value.
12719        pub fn display_mut(&mut self) -> &mut super::Display {
12720            self.display.get_or_insert_default()
12721        }
12722        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
12723        pub fn display_opt(&self) -> Option<&super::Display> {
12724            self.display.as_ref().map(|field| field as _)
12725        }
12726        ///Sets `display` with the provided value.
12727        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12728            self.display = Some(field.into().into());
12729        }
12730        ///Sets `display` with the provided value.
12731        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12732            self.set_display(field.into());
12733            self
12734        }
12735    }
12736    impl super::ObjectReference {
12737        pub const fn const_default() -> Self {
12738            Self {
12739                object_id: None,
12740                version: None,
12741                digest: None,
12742            }
12743        }
12744        #[doc(hidden)]
12745        pub fn default_instance() -> &'static Self {
12746            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12747            &DEFAULT
12748        }
12749        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12750        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12751            self.object_id.as_mut().map(|field| field as _)
12752        }
12753        ///Returns a mutable reference to `object_id`.
12754        ///If the field is unset, it is first initialized with the default value.
12755        pub fn object_id_mut(&mut self) -> &mut String {
12756            self.object_id.get_or_insert_default()
12757        }
12758        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12759        pub fn object_id_opt(&self) -> Option<&str> {
12760            self.object_id.as_ref().map(|field| field as _)
12761        }
12762        ///Sets `object_id` with the provided value.
12763        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12764            self.object_id = Some(field.into().into());
12765        }
12766        ///Sets `object_id` with the provided value.
12767        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12768            self.set_object_id(field.into());
12769            self
12770        }
12771        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12772        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12773            self.version.as_mut().map(|field| field as _)
12774        }
12775        ///Returns a mutable reference to `version`.
12776        ///If the field is unset, it is first initialized with the default value.
12777        pub fn version_mut(&mut self) -> &mut u64 {
12778            self.version.get_or_insert_default()
12779        }
12780        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12781        pub fn version_opt(&self) -> Option<u64> {
12782            self.version.as_ref().map(|field| *field)
12783        }
12784        ///Sets `version` with the provided value.
12785        pub fn set_version(&mut self, field: u64) {
12786            self.version = Some(field);
12787        }
12788        ///Sets `version` with the provided value.
12789        pub fn with_version(mut self, field: u64) -> Self {
12790            self.set_version(field);
12791            self
12792        }
12793        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12794        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12795            self.digest.as_mut().map(|field| field as _)
12796        }
12797        ///Returns a mutable reference to `digest`.
12798        ///If the field is unset, it is first initialized with the default value.
12799        pub fn digest_mut(&mut self) -> &mut String {
12800            self.digest.get_or_insert_default()
12801        }
12802        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12803        pub fn digest_opt(&self) -> Option<&str> {
12804            self.digest.as_ref().map(|field| field as _)
12805        }
12806        ///Sets `digest` with the provided value.
12807        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12808            self.digest = Some(field.into().into());
12809        }
12810        ///Sets `digest` with the provided value.
12811        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12812            self.set_digest(field.into());
12813            self
12814        }
12815    }
12816    impl super::ObjectSet {
12817        pub const fn const_default() -> Self {
12818            Self { objects: Vec::new() }
12819        }
12820        #[doc(hidden)]
12821        pub fn default_instance() -> &'static Self {
12822            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12823            &DEFAULT
12824        }
12825        ///Returns the value of `objects`, or the default value if `objects` is unset.
12826        pub fn objects(&self) -> &[super::Object] {
12827            &self.objects
12828        }
12829        ///Returns a mutable reference to `objects`.
12830        ///If the field is unset, it is first initialized with the default value.
12831        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12832            &mut self.objects
12833        }
12834        ///Sets `objects` with the provided value.
12835        pub fn set_objects(&mut self, field: Vec<super::Object>) {
12836            self.objects = field;
12837        }
12838        ///Sets `objects` with the provided value.
12839        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12840            self.set_objects(field);
12841            self
12842        }
12843    }
12844    impl super::OpenSignature {
12845        pub const fn const_default() -> Self {
12846            Self {
12847                reference: None,
12848                body: None,
12849            }
12850        }
12851        #[doc(hidden)]
12852        pub fn default_instance() -> &'static Self {
12853            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12854            &DEFAULT
12855        }
12856        ///Sets `reference` with the provided value.
12857        pub fn with_reference<T: Into<super::open_signature::Reference>>(
12858            mut self,
12859            field: T,
12860        ) -> Self {
12861            self.set_reference(field.into());
12862            self
12863        }
12864        ///Returns the value of `body`, or the default value if `body` is unset.
12865        pub fn body(&self) -> &super::OpenSignatureBody {
12866            self.body
12867                .as_ref()
12868                .map(|field| field as _)
12869                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12870        }
12871        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12872        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12873            self.body.as_mut().map(|field| field as _)
12874        }
12875        ///Returns a mutable reference to `body`.
12876        ///If the field is unset, it is first initialized with the default value.
12877        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12878            self.body.get_or_insert_default()
12879        }
12880        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
12881        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12882            self.body.as_ref().map(|field| field as _)
12883        }
12884        ///Sets `body` with the provided value.
12885        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12886            self.body = Some(field.into().into());
12887        }
12888        ///Sets `body` with the provided value.
12889        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12890            self.set_body(field.into());
12891            self
12892        }
12893    }
12894    impl super::OpenSignatureBody {
12895        pub const fn const_default() -> Self {
12896            Self {
12897                r#type: None,
12898                type_name: None,
12899                type_parameter_instantiation: Vec::new(),
12900                type_parameter: None,
12901            }
12902        }
12903        #[doc(hidden)]
12904        pub fn default_instance() -> &'static Self {
12905            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
12906            &DEFAULT
12907        }
12908        ///Sets `r#type` with the provided value.
12909        pub fn with_type<T: Into<super::open_signature_body::Type>>(
12910            mut self,
12911            field: T,
12912        ) -> Self {
12913            self.set_type(field.into());
12914            self
12915        }
12916        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12917        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
12918            self.type_name.as_mut().map(|field| field as _)
12919        }
12920        ///Returns a mutable reference to `type_name`.
12921        ///If the field is unset, it is first initialized with the default value.
12922        pub fn type_name_mut(&mut self) -> &mut String {
12923            self.type_name.get_or_insert_default()
12924        }
12925        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12926        pub fn type_name_opt(&self) -> Option<&str> {
12927            self.type_name.as_ref().map(|field| field as _)
12928        }
12929        ///Sets `type_name` with the provided value.
12930        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
12931            self.type_name = Some(field.into().into());
12932        }
12933        ///Sets `type_name` with the provided value.
12934        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
12935            self.set_type_name(field.into());
12936            self
12937        }
12938        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
12939        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
12940            &self.type_parameter_instantiation
12941        }
12942        ///Returns a mutable reference to `type_parameter_instantiation`.
12943        ///If the field is unset, it is first initialized with the default value.
12944        pub fn type_parameter_instantiation_mut(
12945            &mut self,
12946        ) -> &mut Vec<super::OpenSignatureBody> {
12947            &mut self.type_parameter_instantiation
12948        }
12949        ///Sets `type_parameter_instantiation` with the provided value.
12950        pub fn set_type_parameter_instantiation(
12951            &mut self,
12952            field: Vec<super::OpenSignatureBody>,
12953        ) {
12954            self.type_parameter_instantiation = field;
12955        }
12956        ///Sets `type_parameter_instantiation` with the provided value.
12957        pub fn with_type_parameter_instantiation(
12958            mut self,
12959            field: Vec<super::OpenSignatureBody>,
12960        ) -> Self {
12961            self.set_type_parameter_instantiation(field);
12962            self
12963        }
12964        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12965        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
12966            self.type_parameter.as_mut().map(|field| field as _)
12967        }
12968        ///Returns a mutable reference to `type_parameter`.
12969        ///If the field is unset, it is first initialized with the default value.
12970        pub fn type_parameter_mut(&mut self) -> &mut u32 {
12971            self.type_parameter.get_or_insert_default()
12972        }
12973        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12974        pub fn type_parameter_opt(&self) -> Option<u32> {
12975            self.type_parameter.as_ref().map(|field| *field)
12976        }
12977        ///Sets `type_parameter` with the provided value.
12978        pub fn set_type_parameter(&mut self, field: u32) {
12979            self.type_parameter = Some(field);
12980        }
12981        ///Sets `type_parameter` with the provided value.
12982        pub fn with_type_parameter(mut self, field: u32) -> Self {
12983            self.set_type_parameter(field);
12984            self
12985        }
12986    }
12987    impl super::Owner {
12988        pub const fn const_default() -> Self {
12989            Self {
12990                kind: None,
12991                address: None,
12992                version: None,
12993            }
12994        }
12995        #[doc(hidden)]
12996        pub fn default_instance() -> &'static Self {
12997            static DEFAULT: super::Owner = super::Owner::const_default();
12998            &DEFAULT
12999        }
13000        ///Sets `kind` with the provided value.
13001        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
13002            self.set_kind(field.into());
13003            self
13004        }
13005        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13006        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13007            self.address.as_mut().map(|field| field as _)
13008        }
13009        ///Returns a mutable reference to `address`.
13010        ///If the field is unset, it is first initialized with the default value.
13011        pub fn address_mut(&mut self) -> &mut String {
13012            self.address.get_or_insert_default()
13013        }
13014        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
13015        pub fn address_opt(&self) -> Option<&str> {
13016            self.address.as_ref().map(|field| field as _)
13017        }
13018        ///Sets `address` with the provided value.
13019        pub fn set_address<T: Into<String>>(&mut self, field: T) {
13020            self.address = Some(field.into().into());
13021        }
13022        ///Sets `address` with the provided value.
13023        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13024            self.set_address(field.into());
13025            self
13026        }
13027        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13028        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13029            self.version.as_mut().map(|field| field as _)
13030        }
13031        ///Returns a mutable reference to `version`.
13032        ///If the field is unset, it is first initialized with the default value.
13033        pub fn version_mut(&mut self) -> &mut u64 {
13034            self.version.get_or_insert_default()
13035        }
13036        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13037        pub fn version_opt(&self) -> Option<u64> {
13038            self.version.as_ref().map(|field| *field)
13039        }
13040        ///Sets `version` with the provided value.
13041        pub fn set_version(&mut self, field: u64) {
13042            self.version = Some(field);
13043        }
13044        ///Sets `version` with the provided value.
13045        pub fn with_version(mut self, field: u64) -> Self {
13046            self.set_version(field);
13047            self
13048        }
13049    }
13050    impl super::Package {
13051        pub const fn const_default() -> Self {
13052            Self {
13053                storage_id: None,
13054                original_id: None,
13055                version: None,
13056                modules: Vec::new(),
13057                type_origins: Vec::new(),
13058                linkage: Vec::new(),
13059            }
13060        }
13061        #[doc(hidden)]
13062        pub fn default_instance() -> &'static Self {
13063            static DEFAULT: super::Package = super::Package::const_default();
13064            &DEFAULT
13065        }
13066        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13067        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
13068            self.storage_id.as_mut().map(|field| field as _)
13069        }
13070        ///Returns a mutable reference to `storage_id`.
13071        ///If the field is unset, it is first initialized with the default value.
13072        pub fn storage_id_mut(&mut self) -> &mut String {
13073            self.storage_id.get_or_insert_default()
13074        }
13075        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13076        pub fn storage_id_opt(&self) -> Option<&str> {
13077            self.storage_id.as_ref().map(|field| field as _)
13078        }
13079        ///Sets `storage_id` with the provided value.
13080        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
13081            self.storage_id = Some(field.into().into());
13082        }
13083        ///Sets `storage_id` with the provided value.
13084        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
13085            self.set_storage_id(field.into());
13086            self
13087        }
13088        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13089        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
13090            self.original_id.as_mut().map(|field| field as _)
13091        }
13092        ///Returns a mutable reference to `original_id`.
13093        ///If the field is unset, it is first initialized with the default value.
13094        pub fn original_id_mut(&mut self) -> &mut String {
13095            self.original_id.get_or_insert_default()
13096        }
13097        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13098        pub fn original_id_opt(&self) -> Option<&str> {
13099            self.original_id.as_ref().map(|field| field as _)
13100        }
13101        ///Sets `original_id` with the provided value.
13102        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13103            self.original_id = Some(field.into().into());
13104        }
13105        ///Sets `original_id` with the provided value.
13106        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13107            self.set_original_id(field.into());
13108            self
13109        }
13110        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13111        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13112            self.version.as_mut().map(|field| field as _)
13113        }
13114        ///Returns a mutable reference to `version`.
13115        ///If the field is unset, it is first initialized with the default value.
13116        pub fn version_mut(&mut self) -> &mut u64 {
13117            self.version.get_or_insert_default()
13118        }
13119        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13120        pub fn version_opt(&self) -> Option<u64> {
13121            self.version.as_ref().map(|field| *field)
13122        }
13123        ///Sets `version` with the provided value.
13124        pub fn set_version(&mut self, field: u64) {
13125            self.version = Some(field);
13126        }
13127        ///Sets `version` with the provided value.
13128        pub fn with_version(mut self, field: u64) -> Self {
13129            self.set_version(field);
13130            self
13131        }
13132        ///Returns the value of `modules`, or the default value if `modules` is unset.
13133        pub fn modules(&self) -> &[super::Module] {
13134            &self.modules
13135        }
13136        ///Returns a mutable reference to `modules`.
13137        ///If the field is unset, it is first initialized with the default value.
13138        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13139            &mut self.modules
13140        }
13141        ///Sets `modules` with the provided value.
13142        pub fn set_modules(&mut self, field: Vec<super::Module>) {
13143            self.modules = field;
13144        }
13145        ///Sets `modules` with the provided value.
13146        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13147            self.set_modules(field);
13148            self
13149        }
13150        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
13151        pub fn type_origins(&self) -> &[super::TypeOrigin] {
13152            &self.type_origins
13153        }
13154        ///Returns a mutable reference to `type_origins`.
13155        ///If the field is unset, it is first initialized with the default value.
13156        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13157            &mut self.type_origins
13158        }
13159        ///Sets `type_origins` with the provided value.
13160        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13161            self.type_origins = field;
13162        }
13163        ///Sets `type_origins` with the provided value.
13164        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13165            self.set_type_origins(field);
13166            self
13167        }
13168        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
13169        pub fn linkage(&self) -> &[super::Linkage] {
13170            &self.linkage
13171        }
13172        ///Returns a mutable reference to `linkage`.
13173        ///If the field is unset, it is first initialized with the default value.
13174        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13175            &mut self.linkage
13176        }
13177        ///Sets `linkage` with the provided value.
13178        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13179            self.linkage = field;
13180        }
13181        ///Sets `linkage` with the provided value.
13182        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13183            self.set_linkage(field);
13184            self
13185        }
13186    }
13187    impl super::PackageUpgradeError {
13188        pub const fn const_default() -> Self {
13189            Self {
13190                kind: None,
13191                package_id: None,
13192                digest: None,
13193                policy: None,
13194                ticket_id: None,
13195            }
13196        }
13197        #[doc(hidden)]
13198        pub fn default_instance() -> &'static Self {
13199            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13200            &DEFAULT
13201        }
13202        ///Sets `kind` with the provided value.
13203        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13204            mut self,
13205            field: T,
13206        ) -> Self {
13207            self.set_kind(field.into());
13208            self
13209        }
13210        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13211        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13212            self.package_id.as_mut().map(|field| field as _)
13213        }
13214        ///Returns a mutable reference to `package_id`.
13215        ///If the field is unset, it is first initialized with the default value.
13216        pub fn package_id_mut(&mut self) -> &mut String {
13217            self.package_id.get_or_insert_default()
13218        }
13219        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13220        pub fn package_id_opt(&self) -> Option<&str> {
13221            self.package_id.as_ref().map(|field| field as _)
13222        }
13223        ///Sets `package_id` with the provided value.
13224        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13225            self.package_id = Some(field.into().into());
13226        }
13227        ///Sets `package_id` with the provided value.
13228        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13229            self.set_package_id(field.into());
13230            self
13231        }
13232        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13233        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13234            self.digest.as_mut().map(|field| field as _)
13235        }
13236        ///Returns a mutable reference to `digest`.
13237        ///If the field is unset, it is first initialized with the default value.
13238        pub fn digest_mut(&mut self) -> &mut String {
13239            self.digest.get_or_insert_default()
13240        }
13241        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13242        pub fn digest_opt(&self) -> Option<&str> {
13243            self.digest.as_ref().map(|field| field as _)
13244        }
13245        ///Sets `digest` with the provided value.
13246        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13247            self.digest = Some(field.into().into());
13248        }
13249        ///Sets `digest` with the provided value.
13250        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13251            self.set_digest(field.into());
13252            self
13253        }
13254        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13255        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13256            self.policy.as_mut().map(|field| field as _)
13257        }
13258        ///Returns a mutable reference to `policy`.
13259        ///If the field is unset, it is first initialized with the default value.
13260        pub fn policy_mut(&mut self) -> &mut u32 {
13261            self.policy.get_or_insert_default()
13262        }
13263        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13264        pub fn policy_opt(&self) -> Option<u32> {
13265            self.policy.as_ref().map(|field| *field)
13266        }
13267        ///Sets `policy` with the provided value.
13268        pub fn set_policy(&mut self, field: u32) {
13269            self.policy = Some(field);
13270        }
13271        ///Sets `policy` with the provided value.
13272        pub fn with_policy(mut self, field: u32) -> Self {
13273            self.set_policy(field);
13274            self
13275        }
13276        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13277        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13278            self.ticket_id.as_mut().map(|field| field as _)
13279        }
13280        ///Returns a mutable reference to `ticket_id`.
13281        ///If the field is unset, it is first initialized with the default value.
13282        pub fn ticket_id_mut(&mut self) -> &mut String {
13283            self.ticket_id.get_or_insert_default()
13284        }
13285        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13286        pub fn ticket_id_opt(&self) -> Option<&str> {
13287            self.ticket_id.as_ref().map(|field| field as _)
13288        }
13289        ///Sets `ticket_id` with the provided value.
13290        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13291            self.ticket_id = Some(field.into().into());
13292        }
13293        ///Sets `ticket_id` with the provided value.
13294        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13295            self.set_ticket_id(field.into());
13296            self
13297        }
13298    }
13299    impl super::PackageVersion {
13300        pub const fn const_default() -> Self {
13301            Self {
13302                package_id: None,
13303                version: None,
13304            }
13305        }
13306        #[doc(hidden)]
13307        pub fn default_instance() -> &'static Self {
13308            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13309            &DEFAULT
13310        }
13311        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13312        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13313            self.package_id.as_mut().map(|field| field as _)
13314        }
13315        ///Returns a mutable reference to `package_id`.
13316        ///If the field is unset, it is first initialized with the default value.
13317        pub fn package_id_mut(&mut self) -> &mut String {
13318            self.package_id.get_or_insert_default()
13319        }
13320        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13321        pub fn package_id_opt(&self) -> Option<&str> {
13322            self.package_id.as_ref().map(|field| field as _)
13323        }
13324        ///Sets `package_id` with the provided value.
13325        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13326            self.package_id = Some(field.into().into());
13327        }
13328        ///Sets `package_id` with the provided value.
13329        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13330            self.set_package_id(field.into());
13331            self
13332        }
13333        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13334        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13335            self.version.as_mut().map(|field| field as _)
13336        }
13337        ///Returns a mutable reference to `version`.
13338        ///If the field is unset, it is first initialized with the default value.
13339        pub fn version_mut(&mut self) -> &mut u64 {
13340            self.version.get_or_insert_default()
13341        }
13342        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13343        pub fn version_opt(&self) -> Option<u64> {
13344            self.version.as_ref().map(|field| *field)
13345        }
13346        ///Sets `version` with the provided value.
13347        pub fn set_version(&mut self, field: u64) {
13348            self.version = Some(field);
13349        }
13350        ///Sets `version` with the provided value.
13351        pub fn with_version(mut self, field: u64) -> Self {
13352            self.set_version(field);
13353            self
13354        }
13355    }
13356    impl super::PackageWriteFilter {
13357        pub const fn const_default() -> Self {
13358            Self {}
13359        }
13360        #[doc(hidden)]
13361        pub fn default_instance() -> &'static Self {
13362            static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13363            &DEFAULT
13364        }
13365    }
13366    impl super::PasskeyAuthenticator {
13367        pub const fn const_default() -> Self {
13368            Self {
13369                authenticator_data: None,
13370                client_data_json: None,
13371                signature: None,
13372            }
13373        }
13374        #[doc(hidden)]
13375        pub fn default_instance() -> &'static Self {
13376            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13377            &DEFAULT
13378        }
13379        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
13380        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13381            self.authenticator_data.as_ref().map(|field| field as _)
13382        }
13383        ///Sets `authenticator_data` with the provided value.
13384        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13385            &mut self,
13386            field: T,
13387        ) {
13388            self.authenticator_data = Some(field.into().into());
13389        }
13390        ///Sets `authenticator_data` with the provided value.
13391        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13392            mut self,
13393            field: T,
13394        ) -> Self {
13395            self.set_authenticator_data(field.into());
13396            self
13397        }
13398        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13399        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13400            self.client_data_json.as_mut().map(|field| field as _)
13401        }
13402        ///Returns a mutable reference to `client_data_json`.
13403        ///If the field is unset, it is first initialized with the default value.
13404        pub fn client_data_json_mut(&mut self) -> &mut String {
13405            self.client_data_json.get_or_insert_default()
13406        }
13407        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
13408        pub fn client_data_json_opt(&self) -> Option<&str> {
13409            self.client_data_json.as_ref().map(|field| field as _)
13410        }
13411        ///Sets `client_data_json` with the provided value.
13412        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13413            self.client_data_json = Some(field.into().into());
13414        }
13415        ///Sets `client_data_json` with the provided value.
13416        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13417            self.set_client_data_json(field.into());
13418            self
13419        }
13420        ///Returns the value of `signature`, or the default value if `signature` is unset.
13421        pub fn signature(&self) -> &super::SimpleSignature {
13422            self.signature
13423                .as_ref()
13424                .map(|field| field as _)
13425                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13426        }
13427        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13428        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13429            self.signature.as_mut().map(|field| field as _)
13430        }
13431        ///Returns a mutable reference to `signature`.
13432        ///If the field is unset, it is first initialized with the default value.
13433        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13434            self.signature.get_or_insert_default()
13435        }
13436        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
13437        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13438            self.signature.as_ref().map(|field| field as _)
13439        }
13440        ///Sets `signature` with the provided value.
13441        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13442            self.signature = Some(field.into().into());
13443        }
13444        ///Sets `signature` with the provided value.
13445        pub fn with_signature<T: Into<super::SimpleSignature>>(
13446            mut self,
13447            field: T,
13448        ) -> Self {
13449            self.set_signature(field.into());
13450            self
13451        }
13452    }
13453    impl super::ProgrammableTransaction {
13454        pub const fn const_default() -> Self {
13455            Self {
13456                inputs: Vec::new(),
13457                commands: Vec::new(),
13458            }
13459        }
13460        #[doc(hidden)]
13461        pub fn default_instance() -> &'static Self {
13462            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13463            &DEFAULT
13464        }
13465        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
13466        pub fn inputs(&self) -> &[super::Input] {
13467            &self.inputs
13468        }
13469        ///Returns a mutable reference to `inputs`.
13470        ///If the field is unset, it is first initialized with the default value.
13471        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13472            &mut self.inputs
13473        }
13474        ///Sets `inputs` with the provided value.
13475        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13476            self.inputs = field;
13477        }
13478        ///Sets `inputs` with the provided value.
13479        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13480            self.set_inputs(field);
13481            self
13482        }
13483        ///Returns the value of `commands`, or the default value if `commands` is unset.
13484        pub fn commands(&self) -> &[super::Command] {
13485            &self.commands
13486        }
13487        ///Returns a mutable reference to `commands`.
13488        ///If the field is unset, it is first initialized with the default value.
13489        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13490            &mut self.commands
13491        }
13492        ///Sets `commands` with the provided value.
13493        pub fn set_commands(&mut self, field: Vec<super::Command>) {
13494            self.commands = field;
13495        }
13496        ///Sets `commands` with the provided value.
13497        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13498            self.set_commands(field);
13499            self
13500        }
13501    }
13502    impl super::ProtocolConfig {
13503        pub const fn const_default() -> Self {
13504            Self {
13505                protocol_version: None,
13506                feature_flags: std::collections::BTreeMap::new(),
13507                attributes: std::collections::BTreeMap::new(),
13508                configs: std::collections::BTreeMap::new(),
13509            }
13510        }
13511        #[doc(hidden)]
13512        pub fn default_instance() -> &'static Self {
13513            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13514            &DEFAULT
13515        }
13516        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13517        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13518            self.protocol_version.as_mut().map(|field| field as _)
13519        }
13520        ///Returns a mutable reference to `protocol_version`.
13521        ///If the field is unset, it is first initialized with the default value.
13522        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13523            self.protocol_version.get_or_insert_default()
13524        }
13525        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13526        pub fn protocol_version_opt(&self) -> Option<u64> {
13527            self.protocol_version.as_ref().map(|field| *field)
13528        }
13529        ///Sets `protocol_version` with the provided value.
13530        pub fn set_protocol_version(&mut self, field: u64) {
13531            self.protocol_version = Some(field);
13532        }
13533        ///Sets `protocol_version` with the provided value.
13534        pub fn with_protocol_version(mut self, field: u64) -> Self {
13535            self.set_protocol_version(field);
13536            self
13537        }
13538        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
13539        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13540            &self.feature_flags
13541        }
13542        ///Returns a mutable reference to `feature_flags`.
13543        ///If the field is unset, it is first initialized with the default value.
13544        pub fn feature_flags_mut(
13545            &mut self,
13546        ) -> &mut ::std::collections::BTreeMap<String, bool> {
13547            &mut self.feature_flags
13548        }
13549        ///Sets `feature_flags` with the provided value.
13550        pub fn set_feature_flags(
13551            &mut self,
13552            field: ::std::collections::BTreeMap<String, bool>,
13553        ) {
13554            self.feature_flags = field;
13555        }
13556        ///Sets `feature_flags` with the provided value.
13557        pub fn with_feature_flags(
13558            mut self,
13559            field: ::std::collections::BTreeMap<String, bool>,
13560        ) -> Self {
13561            self.set_feature_flags(field);
13562            self
13563        }
13564        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
13565        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13566            &self.attributes
13567        }
13568        ///Returns a mutable reference to `attributes`.
13569        ///If the field is unset, it is first initialized with the default value.
13570        pub fn attributes_mut(
13571            &mut self,
13572        ) -> &mut ::std::collections::BTreeMap<String, String> {
13573            &mut self.attributes
13574        }
13575        ///Sets `attributes` with the provided value.
13576        pub fn set_attributes(
13577            &mut self,
13578            field: ::std::collections::BTreeMap<String, String>,
13579        ) {
13580            self.attributes = field;
13581        }
13582        ///Sets `attributes` with the provided value.
13583        pub fn with_attributes(
13584            mut self,
13585            field: ::std::collections::BTreeMap<String, String>,
13586        ) -> Self {
13587            self.set_attributes(field);
13588            self
13589        }
13590        ///Returns the value of `configs`, or the default value if `configs` is unset.
13591        pub fn configs(
13592            &self,
13593        ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13594            &self.configs
13595        }
13596        ///Returns a mutable reference to `configs`.
13597        ///If the field is unset, it is first initialized with the default value.
13598        pub fn configs_mut(
13599            &mut self,
13600        ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13601            &mut self.configs
13602        }
13603        ///Sets `configs` with the provided value.
13604        pub fn set_configs(
13605            &mut self,
13606            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13607        ) {
13608            self.configs = field;
13609        }
13610        ///Sets `configs` with the provided value.
13611        pub fn with_configs(
13612            mut self,
13613            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13614        ) -> Self {
13615            self.set_configs(field);
13616            self
13617        }
13618    }
13619    impl super::Publish {
13620        pub const fn const_default() -> Self {
13621            Self {
13622                modules: Vec::new(),
13623                dependencies: Vec::new(),
13624            }
13625        }
13626        #[doc(hidden)]
13627        pub fn default_instance() -> &'static Self {
13628            static DEFAULT: super::Publish = super::Publish::const_default();
13629            &DEFAULT
13630        }
13631        ///Returns the value of `modules`, or the default value if `modules` is unset.
13632        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13633            &self.modules
13634        }
13635        ///Returns a mutable reference to `modules`.
13636        ///If the field is unset, it is first initialized with the default value.
13637        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13638            &mut self.modules
13639        }
13640        ///Sets `modules` with the provided value.
13641        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13642            self.modules = field;
13643        }
13644        ///Sets `modules` with the provided value.
13645        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13646            self.set_modules(field);
13647            self
13648        }
13649        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13650        pub fn dependencies(&self) -> &[String] {
13651            &self.dependencies
13652        }
13653        ///Returns a mutable reference to `dependencies`.
13654        ///If the field is unset, it is first initialized with the default value.
13655        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13656            &mut self.dependencies
13657        }
13658        ///Sets `dependencies` with the provided value.
13659        pub fn set_dependencies(&mut self, field: Vec<String>) {
13660            self.dependencies = field;
13661        }
13662        ///Sets `dependencies` with the provided value.
13663        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13664            self.set_dependencies(field);
13665            self
13666        }
13667    }
13668    impl super::QueryEnd {
13669        pub const fn const_default() -> Self {
13670            Self { reason: None }
13671        }
13672        #[doc(hidden)]
13673        pub fn default_instance() -> &'static Self {
13674            static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13675            &DEFAULT
13676        }
13677        ///Sets `reason` with the provided value.
13678        pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13679            self.set_reason(field.into());
13680            self
13681        }
13682    }
13683    impl super::QueryOptions {
13684        pub const fn const_default() -> Self {
13685            Self {
13686                limit: None,
13687                after: None,
13688                before: None,
13689                ordering: None,
13690            }
13691        }
13692        #[doc(hidden)]
13693        pub fn default_instance() -> &'static Self {
13694            static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13695            &DEFAULT
13696        }
13697        ///If `limit` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13698        pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13699            self.limit.as_mut().map(|field| field as _)
13700        }
13701        ///Returns a mutable reference to `limit`.
13702        ///If the field is unset, it is first initialized with the default value.
13703        pub fn limit_mut(&mut self) -> &mut u32 {
13704            self.limit.get_or_insert_default()
13705        }
13706        ///If `limit` is set, returns [`Some`] with the value; otherwise returns [`None`].
13707        pub fn limit_opt(&self) -> Option<u32> {
13708            self.limit.as_ref().map(|field| *field)
13709        }
13710        ///Sets `limit` with the provided value.
13711        pub fn set_limit(&mut self, field: u32) {
13712            self.limit = Some(field);
13713        }
13714        ///Sets `limit` with the provided value.
13715        pub fn with_limit(mut self, field: u32) -> Self {
13716            self.set_limit(field);
13717            self
13718        }
13719        ///If `after` is set, returns [`Some`] with the value; otherwise returns [`None`].
13720        pub fn after_opt(&self) -> Option<&[u8]> {
13721            self.after.as_ref().map(|field| field as _)
13722        }
13723        ///Sets `after` with the provided value.
13724        pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13725            self.after = Some(field.into().into());
13726        }
13727        ///Sets `after` with the provided value.
13728        pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13729            self.set_after(field.into());
13730            self
13731        }
13732        ///If `before` is set, returns [`Some`] with the value; otherwise returns [`None`].
13733        pub fn before_opt(&self) -> Option<&[u8]> {
13734            self.before.as_ref().map(|field| field as _)
13735        }
13736        ///Sets `before` with the provided value.
13737        pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13738            self.before = Some(field.into().into());
13739        }
13740        ///Sets `before` with the provided value.
13741        pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13742            self.set_before(field.into());
13743            self
13744        }
13745        ///Sets `ordering` with the provided value.
13746        pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13747            self.set_ordering(field.into());
13748            self
13749        }
13750    }
13751    impl super::RandomnessStateUpdate {
13752        pub const fn const_default() -> Self {
13753            Self {
13754                epoch: None,
13755                randomness_round: None,
13756                random_bytes: None,
13757                randomness_object_initial_shared_version: None,
13758            }
13759        }
13760        #[doc(hidden)]
13761        pub fn default_instance() -> &'static Self {
13762            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13763            &DEFAULT
13764        }
13765        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13766        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13767            self.epoch.as_mut().map(|field| field as _)
13768        }
13769        ///Returns a mutable reference to `epoch`.
13770        ///If the field is unset, it is first initialized with the default value.
13771        pub fn epoch_mut(&mut self) -> &mut u64 {
13772            self.epoch.get_or_insert_default()
13773        }
13774        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13775        pub fn epoch_opt(&self) -> Option<u64> {
13776            self.epoch.as_ref().map(|field| *field)
13777        }
13778        ///Sets `epoch` with the provided value.
13779        pub fn set_epoch(&mut self, field: u64) {
13780            self.epoch = Some(field);
13781        }
13782        ///Sets `epoch` with the provided value.
13783        pub fn with_epoch(mut self, field: u64) -> Self {
13784            self.set_epoch(field);
13785            self
13786        }
13787        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13788        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13789            self.randomness_round.as_mut().map(|field| field as _)
13790        }
13791        ///Returns a mutable reference to `randomness_round`.
13792        ///If the field is unset, it is first initialized with the default value.
13793        pub fn randomness_round_mut(&mut self) -> &mut u64 {
13794            self.randomness_round.get_or_insert_default()
13795        }
13796        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
13797        pub fn randomness_round_opt(&self) -> Option<u64> {
13798            self.randomness_round.as_ref().map(|field| *field)
13799        }
13800        ///Sets `randomness_round` with the provided value.
13801        pub fn set_randomness_round(&mut self, field: u64) {
13802            self.randomness_round = Some(field);
13803        }
13804        ///Sets `randomness_round` with the provided value.
13805        pub fn with_randomness_round(mut self, field: u64) -> Self {
13806            self.set_randomness_round(field);
13807            self
13808        }
13809        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
13810        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13811            self.random_bytes.as_ref().map(|field| field as _)
13812        }
13813        ///Sets `random_bytes` with the provided value.
13814        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13815            self.random_bytes = Some(field.into().into());
13816        }
13817        ///Sets `random_bytes` with the provided value.
13818        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13819            mut self,
13820            field: T,
13821        ) -> Self {
13822            self.set_random_bytes(field.into());
13823            self
13824        }
13825        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13826        pub fn randomness_object_initial_shared_version_opt_mut(
13827            &mut self,
13828        ) -> Option<&mut u64> {
13829            self.randomness_object_initial_shared_version
13830                .as_mut()
13831                .map(|field| field as _)
13832        }
13833        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
13834        ///If the field is unset, it is first initialized with the default value.
13835        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13836            self.randomness_object_initial_shared_version.get_or_insert_default()
13837        }
13838        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13839        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13840            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13841        }
13842        ///Sets `randomness_object_initial_shared_version` with the provided value.
13843        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13844            self.randomness_object_initial_shared_version = Some(field);
13845        }
13846        ///Sets `randomness_object_initial_shared_version` with the provided value.
13847        pub fn with_randomness_object_initial_shared_version(
13848            mut self,
13849            field: u64,
13850        ) -> Self {
13851            self.set_randomness_object_initial_shared_version(field);
13852            self
13853        }
13854    }
13855    impl super::RegulatedCoinMetadata {
13856        pub const fn const_default() -> Self {
13857            Self {
13858                id: None,
13859                coin_metadata_object: None,
13860                deny_cap_object: None,
13861                allow_global_pause: None,
13862                variant: None,
13863                coin_regulated_state: None,
13864            }
13865        }
13866        #[doc(hidden)]
13867        pub fn default_instance() -> &'static Self {
13868            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13869            &DEFAULT
13870        }
13871        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13872        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13873            self.id.as_mut().map(|field| field as _)
13874        }
13875        ///Returns a mutable reference to `id`.
13876        ///If the field is unset, it is first initialized with the default value.
13877        pub fn id_mut(&mut self) -> &mut String {
13878            self.id.get_or_insert_default()
13879        }
13880        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13881        pub fn id_opt(&self) -> Option<&str> {
13882            self.id.as_ref().map(|field| field as _)
13883        }
13884        ///Sets `id` with the provided value.
13885        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13886            self.id = Some(field.into().into());
13887        }
13888        ///Sets `id` with the provided value.
13889        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13890            self.set_id(field.into());
13891            self
13892        }
13893        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13894        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
13895            self.coin_metadata_object.as_mut().map(|field| field as _)
13896        }
13897        ///Returns a mutable reference to `coin_metadata_object`.
13898        ///If the field is unset, it is first initialized with the default value.
13899        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
13900            self.coin_metadata_object.get_or_insert_default()
13901        }
13902        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13903        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
13904            self.coin_metadata_object.as_ref().map(|field| field as _)
13905        }
13906        ///Sets `coin_metadata_object` with the provided value.
13907        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
13908            self.coin_metadata_object = Some(field.into().into());
13909        }
13910        ///Sets `coin_metadata_object` with the provided value.
13911        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
13912            self.set_coin_metadata_object(field.into());
13913            self
13914        }
13915        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13916        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
13917            self.deny_cap_object.as_mut().map(|field| field as _)
13918        }
13919        ///Returns a mutable reference to `deny_cap_object`.
13920        ///If the field is unset, it is first initialized with the default value.
13921        pub fn deny_cap_object_mut(&mut self) -> &mut String {
13922            self.deny_cap_object.get_or_insert_default()
13923        }
13924        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
13925        pub fn deny_cap_object_opt(&self) -> Option<&str> {
13926            self.deny_cap_object.as_ref().map(|field| field as _)
13927        }
13928        ///Sets `deny_cap_object` with the provided value.
13929        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
13930            self.deny_cap_object = Some(field.into().into());
13931        }
13932        ///Sets `deny_cap_object` with the provided value.
13933        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
13934            self.set_deny_cap_object(field.into());
13935            self
13936        }
13937        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13938        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
13939            self.allow_global_pause.as_mut().map(|field| field as _)
13940        }
13941        ///Returns a mutable reference to `allow_global_pause`.
13942        ///If the field is unset, it is first initialized with the default value.
13943        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
13944            self.allow_global_pause.get_or_insert_default()
13945        }
13946        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
13947        pub fn allow_global_pause_opt(&self) -> Option<bool> {
13948            self.allow_global_pause.as_ref().map(|field| *field)
13949        }
13950        ///Sets `allow_global_pause` with the provided value.
13951        pub fn set_allow_global_pause(&mut self, field: bool) {
13952            self.allow_global_pause = Some(field);
13953        }
13954        ///Sets `allow_global_pause` with the provided value.
13955        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
13956            self.set_allow_global_pause(field);
13957            self
13958        }
13959        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13960        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
13961            self.variant.as_mut().map(|field| field as _)
13962        }
13963        ///Returns a mutable reference to `variant`.
13964        ///If the field is unset, it is first initialized with the default value.
13965        pub fn variant_mut(&mut self) -> &mut u32 {
13966            self.variant.get_or_insert_default()
13967        }
13968        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
13969        pub fn variant_opt(&self) -> Option<u32> {
13970            self.variant.as_ref().map(|field| *field)
13971        }
13972        ///Sets `variant` with the provided value.
13973        pub fn set_variant(&mut self, field: u32) {
13974            self.variant = Some(field);
13975        }
13976        ///Sets `variant` with the provided value.
13977        pub fn with_variant(mut self, field: u32) -> Self {
13978            self.set_variant(field);
13979            self
13980        }
13981        ///Sets `coin_regulated_state` with the provided value.
13982        pub fn with_coin_regulated_state<
13983            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
13984        >(mut self, field: T) -> Self {
13985            self.set_coin_regulated_state(field.into());
13986            self
13987        }
13988    }
13989    impl super::ReverseLookupNameRequest {
13990        pub const fn const_default() -> Self {
13991            Self { address: None }
13992        }
13993        #[doc(hidden)]
13994        pub fn default_instance() -> &'static Self {
13995            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
13996            &DEFAULT
13997        }
13998        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13999        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14000            self.address.as_mut().map(|field| field as _)
14001        }
14002        ///Returns a mutable reference to `address`.
14003        ///If the field is unset, it is first initialized with the default value.
14004        pub fn address_mut(&mut self) -> &mut String {
14005            self.address.get_or_insert_default()
14006        }
14007        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14008        pub fn address_opt(&self) -> Option<&str> {
14009            self.address.as_ref().map(|field| field as _)
14010        }
14011        ///Sets `address` with the provided value.
14012        pub fn set_address<T: Into<String>>(&mut self, field: T) {
14013            self.address = Some(field.into().into());
14014        }
14015        ///Sets `address` with the provided value.
14016        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14017            self.set_address(field.into());
14018            self
14019        }
14020    }
14021    impl super::ReverseLookupNameResponse {
14022        pub const fn const_default() -> Self {
14023            Self { record: None }
14024        }
14025        #[doc(hidden)]
14026        pub fn default_instance() -> &'static Self {
14027            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
14028            &DEFAULT
14029        }
14030        ///Returns the value of `record`, or the default value if `record` is unset.
14031        pub fn record(&self) -> &super::NameRecord {
14032            self.record
14033                .as_ref()
14034                .map(|field| field as _)
14035                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
14036        }
14037        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14038        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
14039            self.record.as_mut().map(|field| field as _)
14040        }
14041        ///Returns a mutable reference to `record`.
14042        ///If the field is unset, it is first initialized with the default value.
14043        pub fn record_mut(&mut self) -> &mut super::NameRecord {
14044            self.record.get_or_insert_default()
14045        }
14046        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
14047        pub fn record_opt(&self) -> Option<&super::NameRecord> {
14048            self.record.as_ref().map(|field| field as _)
14049        }
14050        ///Sets `record` with the provided value.
14051        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
14052            self.record = Some(field.into().into());
14053        }
14054        ///Sets `record` with the provided value.
14055        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
14056            self.set_record(field.into());
14057            self
14058        }
14059    }
14060    impl super::SenderFilter {
14061        pub const fn const_default() -> Self {
14062            Self { address: None }
14063        }
14064        #[doc(hidden)]
14065        pub fn default_instance() -> &'static Self {
14066            static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
14067            &DEFAULT
14068        }
14069        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14070        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14071            self.address.as_mut().map(|field| field as _)
14072        }
14073        ///Returns a mutable reference to `address`.
14074        ///If the field is unset, it is first initialized with the default value.
14075        pub fn address_mut(&mut self) -> &mut String {
14076            self.address.get_or_insert_default()
14077        }
14078        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14079        pub fn address_opt(&self) -> Option<&str> {
14080            self.address.as_ref().map(|field| field as _)
14081        }
14082        ///Sets `address` with the provided value.
14083        pub fn set_address<T: Into<String>>(&mut self, field: T) {
14084            self.address = Some(field.into().into());
14085        }
14086        ///Sets `address` with the provided value.
14087        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14088            self.set_address(field.into());
14089            self
14090        }
14091    }
14092    impl super::SimpleSignature {
14093        pub const fn const_default() -> Self {
14094            Self {
14095                scheme: None,
14096                signature: None,
14097                public_key: None,
14098            }
14099        }
14100        #[doc(hidden)]
14101        pub fn default_instance() -> &'static Self {
14102            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14103            &DEFAULT
14104        }
14105        ///Sets `scheme` with the provided value.
14106        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14107            self.set_scheme(field.into());
14108            self
14109        }
14110        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
14111        pub fn signature_opt(&self) -> Option<&[u8]> {
14112            self.signature.as_ref().map(|field| field as _)
14113        }
14114        ///Sets `signature` with the provided value.
14115        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14116            self.signature = Some(field.into().into());
14117        }
14118        ///Sets `signature` with the provided value.
14119        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14120            mut self,
14121            field: T,
14122        ) -> Self {
14123            self.set_signature(field.into());
14124            self
14125        }
14126        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
14127        pub fn public_key_opt(&self) -> Option<&[u8]> {
14128            self.public_key.as_ref().map(|field| field as _)
14129        }
14130        ///Sets `public_key` with the provided value.
14131        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14132            self.public_key = Some(field.into().into());
14133        }
14134        ///Sets `public_key` with the provided value.
14135        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14136            mut self,
14137            field: T,
14138        ) -> Self {
14139            self.set_public_key(field.into());
14140            self
14141        }
14142    }
14143    impl super::SimulateTransactionRequest {
14144        pub const fn const_default() -> Self {
14145            Self {
14146                transaction: None,
14147                read_mask: None,
14148                checks: None,
14149                do_gas_selection: None,
14150            }
14151        }
14152        #[doc(hidden)]
14153        pub fn default_instance() -> &'static Self {
14154            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14155            &DEFAULT
14156        }
14157        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14158        pub fn transaction(&self) -> &super::Transaction {
14159            self.transaction
14160                .as_ref()
14161                .map(|field| field as _)
14162                .unwrap_or_else(|| super::Transaction::default_instance() as _)
14163        }
14164        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14165        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14166            self.transaction.as_mut().map(|field| field as _)
14167        }
14168        ///Returns a mutable reference to `transaction`.
14169        ///If the field is unset, it is first initialized with the default value.
14170        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14171            self.transaction.get_or_insert_default()
14172        }
14173        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14174        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14175            self.transaction.as_ref().map(|field| field as _)
14176        }
14177        ///Sets `transaction` with the provided value.
14178        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14179            self.transaction = Some(field.into().into());
14180        }
14181        ///Sets `transaction` with the provided value.
14182        pub fn with_transaction<T: Into<super::Transaction>>(
14183            mut self,
14184            field: T,
14185        ) -> Self {
14186            self.set_transaction(field.into());
14187            self
14188        }
14189        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14190        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14191            self.read_mask.as_mut().map(|field| field as _)
14192        }
14193        ///Returns a mutable reference to `read_mask`.
14194        ///If the field is unset, it is first initialized with the default value.
14195        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14196            self.read_mask.get_or_insert_default()
14197        }
14198        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14199        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14200            self.read_mask.as_ref().map(|field| field as _)
14201        }
14202        ///Sets `read_mask` with the provided value.
14203        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14204            self.read_mask = Some(field.into().into());
14205        }
14206        ///Sets `read_mask` with the provided value.
14207        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14208            mut self,
14209            field: T,
14210        ) -> Self {
14211            self.set_read_mask(field.into());
14212            self
14213        }
14214        ///Sets `checks` with the provided value.
14215        pub fn with_checks<
14216            T: Into<super::simulate_transaction_request::TransactionChecks>,
14217        >(mut self, field: T) -> Self {
14218            self.set_checks(field.into());
14219            self
14220        }
14221        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14222        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14223            self.do_gas_selection.as_mut().map(|field| field as _)
14224        }
14225        ///Returns a mutable reference to `do_gas_selection`.
14226        ///If the field is unset, it is first initialized with the default value.
14227        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14228            self.do_gas_selection.get_or_insert_default()
14229        }
14230        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
14231        pub fn do_gas_selection_opt(&self) -> Option<bool> {
14232            self.do_gas_selection.as_ref().map(|field| *field)
14233        }
14234        ///Sets `do_gas_selection` with the provided value.
14235        pub fn set_do_gas_selection(&mut self, field: bool) {
14236            self.do_gas_selection = Some(field);
14237        }
14238        ///Sets `do_gas_selection` with the provided value.
14239        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14240            self.set_do_gas_selection(field);
14241            self
14242        }
14243    }
14244    impl super::SimulateTransactionResponse {
14245        pub const fn const_default() -> Self {
14246            Self {
14247                transaction: None,
14248                command_outputs: Vec::new(),
14249                suggested_gas_price: None,
14250            }
14251        }
14252        #[doc(hidden)]
14253        pub fn default_instance() -> &'static Self {
14254            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14255            &DEFAULT
14256        }
14257        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14258        pub fn transaction(&self) -> &super::ExecutedTransaction {
14259            self.transaction
14260                .as_ref()
14261                .map(|field| field as _)
14262                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14263        }
14264        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14265        pub fn transaction_opt_mut(
14266            &mut self,
14267        ) -> Option<&mut super::ExecutedTransaction> {
14268            self.transaction.as_mut().map(|field| field as _)
14269        }
14270        ///Returns a mutable reference to `transaction`.
14271        ///If the field is unset, it is first initialized with the default value.
14272        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14273            self.transaction.get_or_insert_default()
14274        }
14275        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14276        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14277            self.transaction.as_ref().map(|field| field as _)
14278        }
14279        ///Sets `transaction` with the provided value.
14280        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14281            &mut self,
14282            field: T,
14283        ) {
14284            self.transaction = Some(field.into().into());
14285        }
14286        ///Sets `transaction` with the provided value.
14287        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14288            mut self,
14289            field: T,
14290        ) -> Self {
14291            self.set_transaction(field.into());
14292            self
14293        }
14294        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
14295        pub fn command_outputs(&self) -> &[super::CommandResult] {
14296            &self.command_outputs
14297        }
14298        ///Returns a mutable reference to `command_outputs`.
14299        ///If the field is unset, it is first initialized with the default value.
14300        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14301            &mut self.command_outputs
14302        }
14303        ///Sets `command_outputs` with the provided value.
14304        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14305            self.command_outputs = field;
14306        }
14307        ///Sets `command_outputs` with the provided value.
14308        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14309            self.set_command_outputs(field);
14310            self
14311        }
14312        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14313        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14314            self.suggested_gas_price.as_mut().map(|field| field as _)
14315        }
14316        ///Returns a mutable reference to `suggested_gas_price`.
14317        ///If the field is unset, it is first initialized with the default value.
14318        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14319            self.suggested_gas_price.get_or_insert_default()
14320        }
14321        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
14322        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14323            self.suggested_gas_price.as_ref().map(|field| *field)
14324        }
14325        ///Sets `suggested_gas_price` with the provided value.
14326        pub fn set_suggested_gas_price(&mut self, field: u64) {
14327            self.suggested_gas_price = Some(field);
14328        }
14329        ///Sets `suggested_gas_price` with the provided value.
14330        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14331            self.set_suggested_gas_price(field);
14332            self
14333        }
14334    }
14335    impl super::SizeError {
14336        pub const fn const_default() -> Self {
14337            Self { size: None, max_size: None }
14338        }
14339        #[doc(hidden)]
14340        pub fn default_instance() -> &'static Self {
14341            static DEFAULT: super::SizeError = super::SizeError::const_default();
14342            &DEFAULT
14343        }
14344        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14345        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14346            self.size.as_mut().map(|field| field as _)
14347        }
14348        ///Returns a mutable reference to `size`.
14349        ///If the field is unset, it is first initialized with the default value.
14350        pub fn size_mut(&mut self) -> &mut u64 {
14351            self.size.get_or_insert_default()
14352        }
14353        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14354        pub fn size_opt(&self) -> Option<u64> {
14355            self.size.as_ref().map(|field| *field)
14356        }
14357        ///Sets `size` with the provided value.
14358        pub fn set_size(&mut self, field: u64) {
14359            self.size = Some(field);
14360        }
14361        ///Sets `size` with the provided value.
14362        pub fn with_size(mut self, field: u64) -> Self {
14363            self.set_size(field);
14364            self
14365        }
14366        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14367        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14368            self.max_size.as_mut().map(|field| field as _)
14369        }
14370        ///Returns a mutable reference to `max_size`.
14371        ///If the field is unset, it is first initialized with the default value.
14372        pub fn max_size_mut(&mut self) -> &mut u64 {
14373            self.max_size.get_or_insert_default()
14374        }
14375        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14376        pub fn max_size_opt(&self) -> Option<u64> {
14377            self.max_size.as_ref().map(|field| *field)
14378        }
14379        ///Sets `max_size` with the provided value.
14380        pub fn set_max_size(&mut self, field: u64) {
14381            self.max_size = Some(field);
14382        }
14383        ///Sets `max_size` with the provided value.
14384        pub fn with_max_size(mut self, field: u64) -> Self {
14385            self.set_max_size(field);
14386            self
14387        }
14388    }
14389    impl super::SplitCoins {
14390        pub const fn const_default() -> Self {
14391            Self {
14392                coin: None,
14393                amounts: Vec::new(),
14394            }
14395        }
14396        #[doc(hidden)]
14397        pub fn default_instance() -> &'static Self {
14398            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14399            &DEFAULT
14400        }
14401        ///Returns the value of `coin`, or the default value if `coin` is unset.
14402        pub fn coin(&self) -> &super::Argument {
14403            self.coin
14404                .as_ref()
14405                .map(|field| field as _)
14406                .unwrap_or_else(|| super::Argument::default_instance() as _)
14407        }
14408        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14409        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14410            self.coin.as_mut().map(|field| field as _)
14411        }
14412        ///Returns a mutable reference to `coin`.
14413        ///If the field is unset, it is first initialized with the default value.
14414        pub fn coin_mut(&mut self) -> &mut super::Argument {
14415            self.coin.get_or_insert_default()
14416        }
14417        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
14418        pub fn coin_opt(&self) -> Option<&super::Argument> {
14419            self.coin.as_ref().map(|field| field as _)
14420        }
14421        ///Sets `coin` with the provided value.
14422        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14423            self.coin = Some(field.into().into());
14424        }
14425        ///Sets `coin` with the provided value.
14426        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14427            self.set_coin(field.into());
14428            self
14429        }
14430        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
14431        pub fn amounts(&self) -> &[super::Argument] {
14432            &self.amounts
14433        }
14434        ///Returns a mutable reference to `amounts`.
14435        ///If the field is unset, it is first initialized with the default value.
14436        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14437            &mut self.amounts
14438        }
14439        ///Sets `amounts` with the provided value.
14440        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14441            self.amounts = field;
14442        }
14443        ///Sets `amounts` with the provided value.
14444        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14445            self.set_amounts(field);
14446            self
14447        }
14448    }
14449    impl super::StakeSubsidy {
14450        pub const fn const_default() -> Self {
14451            Self {
14452                balance: None,
14453                distribution_counter: None,
14454                current_distribution_amount: None,
14455                stake_subsidy_period_length: None,
14456                stake_subsidy_decrease_rate: None,
14457                extra_fields: None,
14458            }
14459        }
14460        #[doc(hidden)]
14461        pub fn default_instance() -> &'static Self {
14462            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14463            &DEFAULT
14464        }
14465        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14466        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14467            self.balance.as_mut().map(|field| field as _)
14468        }
14469        ///Returns a mutable reference to `balance`.
14470        ///If the field is unset, it is first initialized with the default value.
14471        pub fn balance_mut(&mut self) -> &mut u64 {
14472            self.balance.get_or_insert_default()
14473        }
14474        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14475        pub fn balance_opt(&self) -> Option<u64> {
14476            self.balance.as_ref().map(|field| *field)
14477        }
14478        ///Sets `balance` with the provided value.
14479        pub fn set_balance(&mut self, field: u64) {
14480            self.balance = Some(field);
14481        }
14482        ///Sets `balance` with the provided value.
14483        pub fn with_balance(mut self, field: u64) -> Self {
14484            self.set_balance(field);
14485            self
14486        }
14487        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14488        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14489            self.distribution_counter.as_mut().map(|field| field as _)
14490        }
14491        ///Returns a mutable reference to `distribution_counter`.
14492        ///If the field is unset, it is first initialized with the default value.
14493        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14494            self.distribution_counter.get_or_insert_default()
14495        }
14496        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14497        pub fn distribution_counter_opt(&self) -> Option<u64> {
14498            self.distribution_counter.as_ref().map(|field| *field)
14499        }
14500        ///Sets `distribution_counter` with the provided value.
14501        pub fn set_distribution_counter(&mut self, field: u64) {
14502            self.distribution_counter = Some(field);
14503        }
14504        ///Sets `distribution_counter` with the provided value.
14505        pub fn with_distribution_counter(mut self, field: u64) -> Self {
14506            self.set_distribution_counter(field);
14507            self
14508        }
14509        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14510        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14511            self.current_distribution_amount.as_mut().map(|field| field as _)
14512        }
14513        ///Returns a mutable reference to `current_distribution_amount`.
14514        ///If the field is unset, it is first initialized with the default value.
14515        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14516            self.current_distribution_amount.get_or_insert_default()
14517        }
14518        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
14519        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14520            self.current_distribution_amount.as_ref().map(|field| *field)
14521        }
14522        ///Sets `current_distribution_amount` with the provided value.
14523        pub fn set_current_distribution_amount(&mut self, field: u64) {
14524            self.current_distribution_amount = Some(field);
14525        }
14526        ///Sets `current_distribution_amount` with the provided value.
14527        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14528            self.set_current_distribution_amount(field);
14529            self
14530        }
14531        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14532        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14533            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14534        }
14535        ///Returns a mutable reference to `stake_subsidy_period_length`.
14536        ///If the field is unset, it is first initialized with the default value.
14537        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14538            self.stake_subsidy_period_length.get_or_insert_default()
14539        }
14540        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
14541        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14542            self.stake_subsidy_period_length.as_ref().map(|field| *field)
14543        }
14544        ///Sets `stake_subsidy_period_length` with the provided value.
14545        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14546            self.stake_subsidy_period_length = Some(field);
14547        }
14548        ///Sets `stake_subsidy_period_length` with the provided value.
14549        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14550            self.set_stake_subsidy_period_length(field);
14551            self
14552        }
14553        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14554        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14555            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14556        }
14557        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
14558        ///If the field is unset, it is first initialized with the default value.
14559        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14560            self.stake_subsidy_decrease_rate.get_or_insert_default()
14561        }
14562        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
14563        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14564            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14565        }
14566        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14567        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14568            self.stake_subsidy_decrease_rate = Some(field);
14569        }
14570        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14571        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14572            self.set_stake_subsidy_decrease_rate(field);
14573            self
14574        }
14575        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14576        pub fn extra_fields(&self) -> &super::MoveTable {
14577            self.extra_fields
14578                .as_ref()
14579                .map(|field| field as _)
14580                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14581        }
14582        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14583        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14584            self.extra_fields.as_mut().map(|field| field as _)
14585        }
14586        ///Returns a mutable reference to `extra_fields`.
14587        ///If the field is unset, it is first initialized with the default value.
14588        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14589            self.extra_fields.get_or_insert_default()
14590        }
14591        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14592        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14593            self.extra_fields.as_ref().map(|field| field as _)
14594        }
14595        ///Sets `extra_fields` with the provided value.
14596        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14597            self.extra_fields = Some(field.into().into());
14598        }
14599        ///Sets `extra_fields` with the provided value.
14600        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14601            self.set_extra_fields(field.into());
14602            self
14603        }
14604    }
14605    impl super::StakingPool {
14606        pub const fn const_default() -> Self {
14607            Self {
14608                id: None,
14609                activation_epoch: None,
14610                deactivation_epoch: None,
14611                sui_balance: None,
14612                rewards_pool: None,
14613                pool_token_balance: None,
14614                exchange_rates: None,
14615                pending_stake: None,
14616                pending_total_sui_withdraw: None,
14617                pending_pool_token_withdraw: None,
14618                extra_fields: None,
14619            }
14620        }
14621        #[doc(hidden)]
14622        pub fn default_instance() -> &'static Self {
14623            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14624            &DEFAULT
14625        }
14626        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14627        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14628            self.id.as_mut().map(|field| field as _)
14629        }
14630        ///Returns a mutable reference to `id`.
14631        ///If the field is unset, it is first initialized with the default value.
14632        pub fn id_mut(&mut self) -> &mut String {
14633            self.id.get_or_insert_default()
14634        }
14635        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14636        pub fn id_opt(&self) -> Option<&str> {
14637            self.id.as_ref().map(|field| field as _)
14638        }
14639        ///Sets `id` with the provided value.
14640        pub fn set_id<T: Into<String>>(&mut self, field: T) {
14641            self.id = Some(field.into().into());
14642        }
14643        ///Sets `id` with the provided value.
14644        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14645            self.set_id(field.into());
14646            self
14647        }
14648        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14649        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14650            self.activation_epoch.as_mut().map(|field| field as _)
14651        }
14652        ///Returns a mutable reference to `activation_epoch`.
14653        ///If the field is unset, it is first initialized with the default value.
14654        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14655            self.activation_epoch.get_or_insert_default()
14656        }
14657        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14658        pub fn activation_epoch_opt(&self) -> Option<u64> {
14659            self.activation_epoch.as_ref().map(|field| *field)
14660        }
14661        ///Sets `activation_epoch` with the provided value.
14662        pub fn set_activation_epoch(&mut self, field: u64) {
14663            self.activation_epoch = Some(field);
14664        }
14665        ///Sets `activation_epoch` with the provided value.
14666        pub fn with_activation_epoch(mut self, field: u64) -> Self {
14667            self.set_activation_epoch(field);
14668            self
14669        }
14670        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14671        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14672            self.deactivation_epoch.as_mut().map(|field| field as _)
14673        }
14674        ///Returns a mutable reference to `deactivation_epoch`.
14675        ///If the field is unset, it is first initialized with the default value.
14676        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14677            self.deactivation_epoch.get_or_insert_default()
14678        }
14679        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14680        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14681            self.deactivation_epoch.as_ref().map(|field| *field)
14682        }
14683        ///Sets `deactivation_epoch` with the provided value.
14684        pub fn set_deactivation_epoch(&mut self, field: u64) {
14685            self.deactivation_epoch = Some(field);
14686        }
14687        ///Sets `deactivation_epoch` with the provided value.
14688        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14689            self.set_deactivation_epoch(field);
14690            self
14691        }
14692        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14693        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14694            self.sui_balance.as_mut().map(|field| field as _)
14695        }
14696        ///Returns a mutable reference to `sui_balance`.
14697        ///If the field is unset, it is first initialized with the default value.
14698        pub fn sui_balance_mut(&mut self) -> &mut u64 {
14699            self.sui_balance.get_or_insert_default()
14700        }
14701        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14702        pub fn sui_balance_opt(&self) -> Option<u64> {
14703            self.sui_balance.as_ref().map(|field| *field)
14704        }
14705        ///Sets `sui_balance` with the provided value.
14706        pub fn set_sui_balance(&mut self, field: u64) {
14707            self.sui_balance = Some(field);
14708        }
14709        ///Sets `sui_balance` with the provided value.
14710        pub fn with_sui_balance(mut self, field: u64) -> Self {
14711            self.set_sui_balance(field);
14712            self
14713        }
14714        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14715        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14716            self.rewards_pool.as_mut().map(|field| field as _)
14717        }
14718        ///Returns a mutable reference to `rewards_pool`.
14719        ///If the field is unset, it is first initialized with the default value.
14720        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14721            self.rewards_pool.get_or_insert_default()
14722        }
14723        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
14724        pub fn rewards_pool_opt(&self) -> Option<u64> {
14725            self.rewards_pool.as_ref().map(|field| *field)
14726        }
14727        ///Sets `rewards_pool` with the provided value.
14728        pub fn set_rewards_pool(&mut self, field: u64) {
14729            self.rewards_pool = Some(field);
14730        }
14731        ///Sets `rewards_pool` with the provided value.
14732        pub fn with_rewards_pool(mut self, field: u64) -> Self {
14733            self.set_rewards_pool(field);
14734            self
14735        }
14736        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14737        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14738            self.pool_token_balance.as_mut().map(|field| field as _)
14739        }
14740        ///Returns a mutable reference to `pool_token_balance`.
14741        ///If the field is unset, it is first initialized with the default value.
14742        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14743            self.pool_token_balance.get_or_insert_default()
14744        }
14745        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14746        pub fn pool_token_balance_opt(&self) -> Option<u64> {
14747            self.pool_token_balance.as_ref().map(|field| *field)
14748        }
14749        ///Sets `pool_token_balance` with the provided value.
14750        pub fn set_pool_token_balance(&mut self, field: u64) {
14751            self.pool_token_balance = Some(field);
14752        }
14753        ///Sets `pool_token_balance` with the provided value.
14754        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14755            self.set_pool_token_balance(field);
14756            self
14757        }
14758        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
14759        pub fn exchange_rates(&self) -> &super::MoveTable {
14760            self.exchange_rates
14761                .as_ref()
14762                .map(|field| field as _)
14763                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14764        }
14765        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14766        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14767            self.exchange_rates.as_mut().map(|field| field as _)
14768        }
14769        ///Returns a mutable reference to `exchange_rates`.
14770        ///If the field is unset, it is first initialized with the default value.
14771        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14772            self.exchange_rates.get_or_insert_default()
14773        }
14774        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14775        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14776            self.exchange_rates.as_ref().map(|field| field as _)
14777        }
14778        ///Sets `exchange_rates` with the provided value.
14779        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14780            self.exchange_rates = Some(field.into().into());
14781        }
14782        ///Sets `exchange_rates` with the provided value.
14783        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14784            mut self,
14785            field: T,
14786        ) -> Self {
14787            self.set_exchange_rates(field.into());
14788            self
14789        }
14790        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14791        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14792            self.pending_stake.as_mut().map(|field| field as _)
14793        }
14794        ///Returns a mutable reference to `pending_stake`.
14795        ///If the field is unset, it is first initialized with the default value.
14796        pub fn pending_stake_mut(&mut self) -> &mut u64 {
14797            self.pending_stake.get_or_insert_default()
14798        }
14799        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
14800        pub fn pending_stake_opt(&self) -> Option<u64> {
14801            self.pending_stake.as_ref().map(|field| *field)
14802        }
14803        ///Sets `pending_stake` with the provided value.
14804        pub fn set_pending_stake(&mut self, field: u64) {
14805            self.pending_stake = Some(field);
14806        }
14807        ///Sets `pending_stake` with the provided value.
14808        pub fn with_pending_stake(mut self, field: u64) -> Self {
14809            self.set_pending_stake(field);
14810            self
14811        }
14812        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14813        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14814            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14815        }
14816        ///Returns a mutable reference to `pending_total_sui_withdraw`.
14817        ///If the field is unset, it is first initialized with the default value.
14818        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14819            self.pending_total_sui_withdraw.get_or_insert_default()
14820        }
14821        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14822        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14823            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14824        }
14825        ///Sets `pending_total_sui_withdraw` with the provided value.
14826        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14827            self.pending_total_sui_withdraw = Some(field);
14828        }
14829        ///Sets `pending_total_sui_withdraw` with the provided value.
14830        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14831            self.set_pending_total_sui_withdraw(field);
14832            self
14833        }
14834        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14835        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14836            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14837        }
14838        ///Returns a mutable reference to `pending_pool_token_withdraw`.
14839        ///If the field is unset, it is first initialized with the default value.
14840        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14841            self.pending_pool_token_withdraw.get_or_insert_default()
14842        }
14843        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14844        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14845            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14846        }
14847        ///Sets `pending_pool_token_withdraw` with the provided value.
14848        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14849            self.pending_pool_token_withdraw = Some(field);
14850        }
14851        ///Sets `pending_pool_token_withdraw` with the provided value.
14852        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14853            self.set_pending_pool_token_withdraw(field);
14854            self
14855        }
14856        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14857        pub fn extra_fields(&self) -> &super::MoveTable {
14858            self.extra_fields
14859                .as_ref()
14860                .map(|field| field as _)
14861                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14862        }
14863        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14864        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14865            self.extra_fields.as_mut().map(|field| field as _)
14866        }
14867        ///Returns a mutable reference to `extra_fields`.
14868        ///If the field is unset, it is first initialized with the default value.
14869        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14870            self.extra_fields.get_or_insert_default()
14871        }
14872        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14873        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14874            self.extra_fields.as_ref().map(|field| field as _)
14875        }
14876        ///Sets `extra_fields` with the provided value.
14877        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14878            self.extra_fields = Some(field.into().into());
14879        }
14880        ///Sets `extra_fields` with the provided value.
14881        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14882            self.set_extra_fields(field.into());
14883            self
14884        }
14885    }
14886    impl super::StorageFund {
14887        pub const fn const_default() -> Self {
14888            Self {
14889                total_object_storage_rebates: None,
14890                non_refundable_balance: None,
14891            }
14892        }
14893        #[doc(hidden)]
14894        pub fn default_instance() -> &'static Self {
14895            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
14896            &DEFAULT
14897        }
14898        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14899        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14900            self.total_object_storage_rebates.as_mut().map(|field| field as _)
14901        }
14902        ///Returns a mutable reference to `total_object_storage_rebates`.
14903        ///If the field is unset, it is first initialized with the default value.
14904        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
14905            self.total_object_storage_rebates.get_or_insert_default()
14906        }
14907        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14908        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
14909            self.total_object_storage_rebates.as_ref().map(|field| *field)
14910        }
14911        ///Sets `total_object_storage_rebates` with the provided value.
14912        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
14913            self.total_object_storage_rebates = Some(field);
14914        }
14915        ///Sets `total_object_storage_rebates` with the provided value.
14916        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
14917            self.set_total_object_storage_rebates(field);
14918            self
14919        }
14920        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14921        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
14922            self.non_refundable_balance.as_mut().map(|field| field as _)
14923        }
14924        ///Returns a mutable reference to `non_refundable_balance`.
14925        ///If the field is unset, it is first initialized with the default value.
14926        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
14927            self.non_refundable_balance.get_or_insert_default()
14928        }
14929        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14930        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
14931            self.non_refundable_balance.as_ref().map(|field| *field)
14932        }
14933        ///Sets `non_refundable_balance` with the provided value.
14934        pub fn set_non_refundable_balance(&mut self, field: u64) {
14935            self.non_refundable_balance = Some(field);
14936        }
14937        ///Sets `non_refundable_balance` with the provided value.
14938        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
14939            self.set_non_refundable_balance(field);
14940            self
14941        }
14942    }
14943    impl super::SubscribeCheckpointsRequest {
14944        pub const fn const_default() -> Self {
14945            Self {
14946                read_mask: None,
14947                filter: None,
14948            }
14949        }
14950        #[doc(hidden)]
14951        pub fn default_instance() -> &'static Self {
14952            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
14953            &DEFAULT
14954        }
14955        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14956        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14957            self.read_mask.as_mut().map(|field| field as _)
14958        }
14959        ///Returns a mutable reference to `read_mask`.
14960        ///If the field is unset, it is first initialized with the default value.
14961        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14962            self.read_mask.get_or_insert_default()
14963        }
14964        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14965        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14966            self.read_mask.as_ref().map(|field| field as _)
14967        }
14968        ///Sets `read_mask` with the provided value.
14969        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14970            self.read_mask = Some(field.into().into());
14971        }
14972        ///Sets `read_mask` with the provided value.
14973        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14974            mut self,
14975            field: T,
14976        ) -> Self {
14977            self.set_read_mask(field.into());
14978            self
14979        }
14980        ///Returns the value of `filter`, or the default value if `filter` is unset.
14981        pub fn filter(&self) -> &super::TransactionFilter {
14982            self.filter
14983                .as_ref()
14984                .map(|field| field as _)
14985                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
14986        }
14987        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14988        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
14989            self.filter.as_mut().map(|field| field as _)
14990        }
14991        ///Returns a mutable reference to `filter`.
14992        ///If the field is unset, it is first initialized with the default value.
14993        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
14994            self.filter.get_or_insert_default()
14995        }
14996        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14997        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
14998            self.filter.as_ref().map(|field| field as _)
14999        }
15000        ///Sets `filter` with the provided value.
15001        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15002            self.filter = Some(field.into().into());
15003        }
15004        ///Sets `filter` with the provided value.
15005        pub fn with_filter<T: Into<super::TransactionFilter>>(
15006            mut self,
15007            field: T,
15008        ) -> Self {
15009            self.set_filter(field.into());
15010            self
15011        }
15012    }
15013    impl super::SubscribeCheckpointsResponse {
15014        pub const fn const_default() -> Self {
15015            Self {
15016                cursor: None,
15017                checkpoint: None,
15018            }
15019        }
15020        #[doc(hidden)]
15021        pub fn default_instance() -> &'static Self {
15022            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
15023            &DEFAULT
15024        }
15025        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15026        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
15027            self.cursor.as_mut().map(|field| field as _)
15028        }
15029        ///Returns a mutable reference to `cursor`.
15030        ///If the field is unset, it is first initialized with the default value.
15031        pub fn cursor_mut(&mut self) -> &mut u64 {
15032            self.cursor.get_or_insert_default()
15033        }
15034        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
15035        pub fn cursor_opt(&self) -> Option<u64> {
15036            self.cursor.as_ref().map(|field| *field)
15037        }
15038        ///Sets `cursor` with the provided value.
15039        pub fn set_cursor(&mut self, field: u64) {
15040            self.cursor = Some(field);
15041        }
15042        ///Sets `cursor` with the provided value.
15043        pub fn with_cursor(mut self, field: u64) -> Self {
15044            self.set_cursor(field);
15045            self
15046        }
15047        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
15048        pub fn checkpoint(&self) -> &super::Checkpoint {
15049            self.checkpoint
15050                .as_ref()
15051                .map(|field| field as _)
15052                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
15053        }
15054        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15055        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
15056            self.checkpoint.as_mut().map(|field| field as _)
15057        }
15058        ///Returns a mutable reference to `checkpoint`.
15059        ///If the field is unset, it is first initialized with the default value.
15060        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
15061            self.checkpoint.get_or_insert_default()
15062        }
15063        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
15064        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
15065            self.checkpoint.as_ref().map(|field| field as _)
15066        }
15067        ///Sets `checkpoint` with the provided value.
15068        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
15069            self.checkpoint = Some(field.into().into());
15070        }
15071        ///Sets `checkpoint` with the provided value.
15072        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
15073            self.set_checkpoint(field.into());
15074            self
15075        }
15076    }
15077    impl super::SubscribeEventsRequest {
15078        pub const fn const_default() -> Self {
15079            Self {
15080                read_mask: None,
15081                filter: None,
15082            }
15083        }
15084        #[doc(hidden)]
15085        pub fn default_instance() -> &'static Self {
15086            static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
15087            &DEFAULT
15088        }
15089        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15090        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15091            self.read_mask.as_mut().map(|field| field as _)
15092        }
15093        ///Returns a mutable reference to `read_mask`.
15094        ///If the field is unset, it is first initialized with the default value.
15095        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15096            self.read_mask.get_or_insert_default()
15097        }
15098        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15099        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15100            self.read_mask.as_ref().map(|field| field as _)
15101        }
15102        ///Sets `read_mask` with the provided value.
15103        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15104            self.read_mask = Some(field.into().into());
15105        }
15106        ///Sets `read_mask` with the provided value.
15107        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15108            mut self,
15109            field: T,
15110        ) -> Self {
15111            self.set_read_mask(field.into());
15112            self
15113        }
15114        ///Returns the value of `filter`, or the default value if `filter` is unset.
15115        pub fn filter(&self) -> &super::EventFilter {
15116            self.filter
15117                .as_ref()
15118                .map(|field| field as _)
15119                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15120        }
15121        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15122        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15123            self.filter.as_mut().map(|field| field as _)
15124        }
15125        ///Returns a mutable reference to `filter`.
15126        ///If the field is unset, it is first initialized with the default value.
15127        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15128            self.filter.get_or_insert_default()
15129        }
15130        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15131        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15132            self.filter.as_ref().map(|field| field as _)
15133        }
15134        ///Sets `filter` with the provided value.
15135        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15136            self.filter = Some(field.into().into());
15137        }
15138        ///Sets `filter` with the provided value.
15139        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15140            self.set_filter(field.into());
15141            self
15142        }
15143    }
15144    impl super::SubscribeEventsResponse {
15145        pub const fn const_default() -> Self {
15146            Self {
15147                event: None,
15148                watermark: None,
15149            }
15150        }
15151        #[doc(hidden)]
15152        pub fn default_instance() -> &'static Self {
15153            static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15154            &DEFAULT
15155        }
15156        ///Returns the value of `event`, or the default value if `event` is unset.
15157        pub fn event(&self) -> &super::Event {
15158            self.event
15159                .as_ref()
15160                .map(|field| field as _)
15161                .unwrap_or_else(|| super::Event::default_instance() as _)
15162        }
15163        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15164        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15165            self.event.as_mut().map(|field| field as _)
15166        }
15167        ///Returns a mutable reference to `event`.
15168        ///If the field is unset, it is first initialized with the default value.
15169        pub fn event_mut(&mut self) -> &mut super::Event {
15170            self.event.get_or_insert_default()
15171        }
15172        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
15173        pub fn event_opt(&self) -> Option<&super::Event> {
15174            self.event.as_ref().map(|field| field as _)
15175        }
15176        ///Sets `event` with the provided value.
15177        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15178            self.event = Some(field.into().into());
15179        }
15180        ///Sets `event` with the provided value.
15181        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15182            self.set_event(field.into());
15183            self
15184        }
15185        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15186        pub fn watermark(&self) -> &super::Watermark {
15187            self.watermark
15188                .as_ref()
15189                .map(|field| field as _)
15190                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15191        }
15192        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15193        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15194            self.watermark.as_mut().map(|field| field as _)
15195        }
15196        ///Returns a mutable reference to `watermark`.
15197        ///If the field is unset, it is first initialized with the default value.
15198        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15199            self.watermark.get_or_insert_default()
15200        }
15201        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15202        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15203            self.watermark.as_ref().map(|field| field as _)
15204        }
15205        ///Sets `watermark` with the provided value.
15206        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15207            self.watermark = Some(field.into().into());
15208        }
15209        ///Sets `watermark` with the provided value.
15210        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15211            self.set_watermark(field.into());
15212            self
15213        }
15214    }
15215    impl super::SubscribeTransactionsRequest {
15216        pub const fn const_default() -> Self {
15217            Self {
15218                read_mask: None,
15219                filter: None,
15220            }
15221        }
15222        #[doc(hidden)]
15223        pub fn default_instance() -> &'static Self {
15224            static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15225            &DEFAULT
15226        }
15227        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15228        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15229            self.read_mask.as_mut().map(|field| field as _)
15230        }
15231        ///Returns a mutable reference to `read_mask`.
15232        ///If the field is unset, it is first initialized with the default value.
15233        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15234            self.read_mask.get_or_insert_default()
15235        }
15236        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15237        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15238            self.read_mask.as_ref().map(|field| field as _)
15239        }
15240        ///Sets `read_mask` with the provided value.
15241        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15242            self.read_mask = Some(field.into().into());
15243        }
15244        ///Sets `read_mask` with the provided value.
15245        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15246            mut self,
15247            field: T,
15248        ) -> Self {
15249            self.set_read_mask(field.into());
15250            self
15251        }
15252        ///Returns the value of `filter`, or the default value if `filter` is unset.
15253        pub fn filter(&self) -> &super::TransactionFilter {
15254            self.filter
15255                .as_ref()
15256                .map(|field| field as _)
15257                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15258        }
15259        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15260        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15261            self.filter.as_mut().map(|field| field as _)
15262        }
15263        ///Returns a mutable reference to `filter`.
15264        ///If the field is unset, it is first initialized with the default value.
15265        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15266            self.filter.get_or_insert_default()
15267        }
15268        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15269        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15270            self.filter.as_ref().map(|field| field as _)
15271        }
15272        ///Sets `filter` with the provided value.
15273        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15274            self.filter = Some(field.into().into());
15275        }
15276        ///Sets `filter` with the provided value.
15277        pub fn with_filter<T: Into<super::TransactionFilter>>(
15278            mut self,
15279            field: T,
15280        ) -> Self {
15281            self.set_filter(field.into());
15282            self
15283        }
15284    }
15285    impl super::SubscribeTransactionsResponse {
15286        pub const fn const_default() -> Self {
15287            Self {
15288                transaction: None,
15289                watermark: None,
15290            }
15291        }
15292        #[doc(hidden)]
15293        pub fn default_instance() -> &'static Self {
15294            static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15295            &DEFAULT
15296        }
15297        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
15298        pub fn transaction(&self) -> &super::ExecutedTransaction {
15299            self.transaction
15300                .as_ref()
15301                .map(|field| field as _)
15302                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15303        }
15304        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15305        pub fn transaction_opt_mut(
15306            &mut self,
15307        ) -> Option<&mut super::ExecutedTransaction> {
15308            self.transaction.as_mut().map(|field| field as _)
15309        }
15310        ///Returns a mutable reference to `transaction`.
15311        ///If the field is unset, it is first initialized with the default value.
15312        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15313            self.transaction.get_or_insert_default()
15314        }
15315        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15316        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15317            self.transaction.as_ref().map(|field| field as _)
15318        }
15319        ///Sets `transaction` with the provided value.
15320        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15321            &mut self,
15322            field: T,
15323        ) {
15324            self.transaction = Some(field.into().into());
15325        }
15326        ///Sets `transaction` with the provided value.
15327        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15328            mut self,
15329            field: T,
15330        ) -> Self {
15331            self.set_transaction(field.into());
15332            self
15333        }
15334        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15335        pub fn watermark(&self) -> &super::Watermark {
15336            self.watermark
15337                .as_ref()
15338                .map(|field| field as _)
15339                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15340        }
15341        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15342        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15343            self.watermark.as_mut().map(|field| field as _)
15344        }
15345        ///Returns a mutable reference to `watermark`.
15346        ///If the field is unset, it is first initialized with the default value.
15347        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15348            self.watermark.get_or_insert_default()
15349        }
15350        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15351        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15352            self.watermark.as_ref().map(|field| field as _)
15353        }
15354        ///Sets `watermark` with the provided value.
15355        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15356            self.watermark = Some(field.into().into());
15357        }
15358        ///Sets `watermark` with the provided value.
15359        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15360            self.set_watermark(field.into());
15361            self
15362        }
15363    }
15364    impl super::SystemPackage {
15365        pub const fn const_default() -> Self {
15366            Self {
15367                version: None,
15368                modules: Vec::new(),
15369                dependencies: Vec::new(),
15370            }
15371        }
15372        #[doc(hidden)]
15373        pub fn default_instance() -> &'static Self {
15374            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15375            &DEFAULT
15376        }
15377        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15378        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15379            self.version.as_mut().map(|field| field as _)
15380        }
15381        ///Returns a mutable reference to `version`.
15382        ///If the field is unset, it is first initialized with the default value.
15383        pub fn version_mut(&mut self) -> &mut u64 {
15384            self.version.get_or_insert_default()
15385        }
15386        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15387        pub fn version_opt(&self) -> Option<u64> {
15388            self.version.as_ref().map(|field| *field)
15389        }
15390        ///Sets `version` with the provided value.
15391        pub fn set_version(&mut self, field: u64) {
15392            self.version = Some(field);
15393        }
15394        ///Sets `version` with the provided value.
15395        pub fn with_version(mut self, field: u64) -> Self {
15396            self.set_version(field);
15397            self
15398        }
15399        ///Returns the value of `modules`, or the default value if `modules` is unset.
15400        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15401            &self.modules
15402        }
15403        ///Returns a mutable reference to `modules`.
15404        ///If the field is unset, it is first initialized with the default value.
15405        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15406            &mut self.modules
15407        }
15408        ///Sets `modules` with the provided value.
15409        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15410            self.modules = field;
15411        }
15412        ///Sets `modules` with the provided value.
15413        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15414            self.set_modules(field);
15415            self
15416        }
15417        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15418        pub fn dependencies(&self) -> &[String] {
15419            &self.dependencies
15420        }
15421        ///Returns a mutable reference to `dependencies`.
15422        ///If the field is unset, it is first initialized with the default value.
15423        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15424            &mut self.dependencies
15425        }
15426        ///Sets `dependencies` with the provided value.
15427        pub fn set_dependencies(&mut self, field: Vec<String>) {
15428            self.dependencies = field;
15429        }
15430        ///Sets `dependencies` with the provided value.
15431        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15432            self.set_dependencies(field);
15433            self
15434        }
15435    }
15436    impl super::SystemParameters {
15437        pub const fn const_default() -> Self {
15438            Self {
15439                epoch_duration_ms: None,
15440                stake_subsidy_start_epoch: None,
15441                min_validator_count: None,
15442                max_validator_count: None,
15443                min_validator_joining_stake: None,
15444                validator_low_stake_threshold: None,
15445                validator_very_low_stake_threshold: None,
15446                validator_low_stake_grace_period: None,
15447                extra_fields: None,
15448            }
15449        }
15450        #[doc(hidden)]
15451        pub fn default_instance() -> &'static Self {
15452            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15453            &DEFAULT
15454        }
15455        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15456        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15457            self.epoch_duration_ms.as_mut().map(|field| field as _)
15458        }
15459        ///Returns a mutable reference to `epoch_duration_ms`.
15460        ///If the field is unset, it is first initialized with the default value.
15461        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15462            self.epoch_duration_ms.get_or_insert_default()
15463        }
15464        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
15465        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15466            self.epoch_duration_ms.as_ref().map(|field| *field)
15467        }
15468        ///Sets `epoch_duration_ms` with the provided value.
15469        pub fn set_epoch_duration_ms(&mut self, field: u64) {
15470            self.epoch_duration_ms = Some(field);
15471        }
15472        ///Sets `epoch_duration_ms` with the provided value.
15473        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15474            self.set_epoch_duration_ms(field);
15475            self
15476        }
15477        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15478        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15479            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15480        }
15481        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
15482        ///If the field is unset, it is first initialized with the default value.
15483        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15484            self.stake_subsidy_start_epoch.get_or_insert_default()
15485        }
15486        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15487        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15488            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15489        }
15490        ///Sets `stake_subsidy_start_epoch` with the provided value.
15491        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15492            self.stake_subsidy_start_epoch = Some(field);
15493        }
15494        ///Sets `stake_subsidy_start_epoch` with the provided value.
15495        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15496            self.set_stake_subsidy_start_epoch(field);
15497            self
15498        }
15499        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15500        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15501            self.min_validator_count.as_mut().map(|field| field as _)
15502        }
15503        ///Returns a mutable reference to `min_validator_count`.
15504        ///If the field is unset, it is first initialized with the default value.
15505        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15506            self.min_validator_count.get_or_insert_default()
15507        }
15508        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15509        pub fn min_validator_count_opt(&self) -> Option<u64> {
15510            self.min_validator_count.as_ref().map(|field| *field)
15511        }
15512        ///Sets `min_validator_count` with the provided value.
15513        pub fn set_min_validator_count(&mut self, field: u64) {
15514            self.min_validator_count = Some(field);
15515        }
15516        ///Sets `min_validator_count` with the provided value.
15517        pub fn with_min_validator_count(mut self, field: u64) -> Self {
15518            self.set_min_validator_count(field);
15519            self
15520        }
15521        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15522        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15523            self.max_validator_count.as_mut().map(|field| field as _)
15524        }
15525        ///Returns a mutable reference to `max_validator_count`.
15526        ///If the field is unset, it is first initialized with the default value.
15527        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15528            self.max_validator_count.get_or_insert_default()
15529        }
15530        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15531        pub fn max_validator_count_opt(&self) -> Option<u64> {
15532            self.max_validator_count.as_ref().map(|field| *field)
15533        }
15534        ///Sets `max_validator_count` with the provided value.
15535        pub fn set_max_validator_count(&mut self, field: u64) {
15536            self.max_validator_count = Some(field);
15537        }
15538        ///Sets `max_validator_count` with the provided value.
15539        pub fn with_max_validator_count(mut self, field: u64) -> Self {
15540            self.set_max_validator_count(field);
15541            self
15542        }
15543        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15544        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15545            self.min_validator_joining_stake.as_mut().map(|field| field as _)
15546        }
15547        ///Returns a mutable reference to `min_validator_joining_stake`.
15548        ///If the field is unset, it is first initialized with the default value.
15549        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15550            self.min_validator_joining_stake.get_or_insert_default()
15551        }
15552        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
15553        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15554            self.min_validator_joining_stake.as_ref().map(|field| *field)
15555        }
15556        ///Sets `min_validator_joining_stake` with the provided value.
15557        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15558            self.min_validator_joining_stake = Some(field);
15559        }
15560        ///Sets `min_validator_joining_stake` with the provided value.
15561        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15562            self.set_min_validator_joining_stake(field);
15563            self
15564        }
15565        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15566        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15567            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15568        }
15569        ///Returns a mutable reference to `validator_low_stake_threshold`.
15570        ///If the field is unset, it is first initialized with the default value.
15571        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15572            self.validator_low_stake_threshold.get_or_insert_default()
15573        }
15574        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15575        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15576            self.validator_low_stake_threshold.as_ref().map(|field| *field)
15577        }
15578        ///Sets `validator_low_stake_threshold` with the provided value.
15579        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15580            self.validator_low_stake_threshold = Some(field);
15581        }
15582        ///Sets `validator_low_stake_threshold` with the provided value.
15583        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15584            self.set_validator_low_stake_threshold(field);
15585            self
15586        }
15587        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15588        pub fn validator_very_low_stake_threshold_opt_mut(
15589            &mut self,
15590        ) -> Option<&mut u64> {
15591            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15592        }
15593        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
15594        ///If the field is unset, it is first initialized with the default value.
15595        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15596            self.validator_very_low_stake_threshold.get_or_insert_default()
15597        }
15598        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15599        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15600            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15601        }
15602        ///Sets `validator_very_low_stake_threshold` with the provided value.
15603        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15604            self.validator_very_low_stake_threshold = Some(field);
15605        }
15606        ///Sets `validator_very_low_stake_threshold` with the provided value.
15607        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15608            self.set_validator_very_low_stake_threshold(field);
15609            self
15610        }
15611        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15612        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15613            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15614        }
15615        ///Returns a mutable reference to `validator_low_stake_grace_period`.
15616        ///If the field is unset, it is first initialized with the default value.
15617        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15618            self.validator_low_stake_grace_period.get_or_insert_default()
15619        }
15620        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
15621        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15622            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15623        }
15624        ///Sets `validator_low_stake_grace_period` with the provided value.
15625        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15626            self.validator_low_stake_grace_period = Some(field);
15627        }
15628        ///Sets `validator_low_stake_grace_period` with the provided value.
15629        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15630            self.set_validator_low_stake_grace_period(field);
15631            self
15632        }
15633        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
15634        pub fn extra_fields(&self) -> &super::MoveTable {
15635            self.extra_fields
15636                .as_ref()
15637                .map(|field| field as _)
15638                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15639        }
15640        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15641        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15642            self.extra_fields.as_mut().map(|field| field as _)
15643        }
15644        ///Returns a mutable reference to `extra_fields`.
15645        ///If the field is unset, it is first initialized with the default value.
15646        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15647            self.extra_fields.get_or_insert_default()
15648        }
15649        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15650        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15651            self.extra_fields.as_ref().map(|field| field as _)
15652        }
15653        ///Sets `extra_fields` with the provided value.
15654        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15655            self.extra_fields = Some(field.into().into());
15656        }
15657        ///Sets `extra_fields` with the provided value.
15658        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15659            self.set_extra_fields(field.into());
15660            self
15661        }
15662    }
15663    impl super::SystemState {
15664        pub const fn const_default() -> Self {
15665            Self {
15666                version: None,
15667                epoch: None,
15668                protocol_version: None,
15669                validators: None,
15670                storage_fund: None,
15671                parameters: None,
15672                reference_gas_price: None,
15673                validator_report_records: Vec::new(),
15674                stake_subsidy: None,
15675                safe_mode: None,
15676                safe_mode_storage_rewards: None,
15677                safe_mode_computation_rewards: None,
15678                safe_mode_storage_rebates: None,
15679                safe_mode_non_refundable_storage_fee: None,
15680                epoch_start_timestamp_ms: None,
15681                extra_fields: None,
15682            }
15683        }
15684        #[doc(hidden)]
15685        pub fn default_instance() -> &'static Self {
15686            static DEFAULT: super::SystemState = super::SystemState::const_default();
15687            &DEFAULT
15688        }
15689        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15690        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15691            self.version.as_mut().map(|field| field as _)
15692        }
15693        ///Returns a mutable reference to `version`.
15694        ///If the field is unset, it is first initialized with the default value.
15695        pub fn version_mut(&mut self) -> &mut u64 {
15696            self.version.get_or_insert_default()
15697        }
15698        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15699        pub fn version_opt(&self) -> Option<u64> {
15700            self.version.as_ref().map(|field| *field)
15701        }
15702        ///Sets `version` with the provided value.
15703        pub fn set_version(&mut self, field: u64) {
15704            self.version = Some(field);
15705        }
15706        ///Sets `version` with the provided value.
15707        pub fn with_version(mut self, field: u64) -> Self {
15708            self.set_version(field);
15709            self
15710        }
15711        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15712        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15713            self.epoch.as_mut().map(|field| field as _)
15714        }
15715        ///Returns a mutable reference to `epoch`.
15716        ///If the field is unset, it is first initialized with the default value.
15717        pub fn epoch_mut(&mut self) -> &mut u64 {
15718            self.epoch.get_or_insert_default()
15719        }
15720        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15721        pub fn epoch_opt(&self) -> Option<u64> {
15722            self.epoch.as_ref().map(|field| *field)
15723        }
15724        ///Sets `epoch` with the provided value.
15725        pub fn set_epoch(&mut self, field: u64) {
15726            self.epoch = Some(field);
15727        }
15728        ///Sets `epoch` with the provided value.
15729        pub fn with_epoch(mut self, field: u64) -> Self {
15730            self.set_epoch(field);
15731            self
15732        }
15733        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15734        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15735            self.protocol_version.as_mut().map(|field| field as _)
15736        }
15737        ///Returns a mutable reference to `protocol_version`.
15738        ///If the field is unset, it is first initialized with the default value.
15739        pub fn protocol_version_mut(&mut self) -> &mut u64 {
15740            self.protocol_version.get_or_insert_default()
15741        }
15742        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15743        pub fn protocol_version_opt(&self) -> Option<u64> {
15744            self.protocol_version.as_ref().map(|field| *field)
15745        }
15746        ///Sets `protocol_version` with the provided value.
15747        pub fn set_protocol_version(&mut self, field: u64) {
15748            self.protocol_version = Some(field);
15749        }
15750        ///Sets `protocol_version` with the provided value.
15751        pub fn with_protocol_version(mut self, field: u64) -> Self {
15752            self.set_protocol_version(field);
15753            self
15754        }
15755        ///Returns the value of `validators`, or the default value if `validators` is unset.
15756        pub fn validators(&self) -> &super::ValidatorSet {
15757            self.validators
15758                .as_ref()
15759                .map(|field| field as _)
15760                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15761        }
15762        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15763        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15764            self.validators.as_mut().map(|field| field as _)
15765        }
15766        ///Returns a mutable reference to `validators`.
15767        ///If the field is unset, it is first initialized with the default value.
15768        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15769            self.validators.get_or_insert_default()
15770        }
15771        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
15772        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15773            self.validators.as_ref().map(|field| field as _)
15774        }
15775        ///Sets `validators` with the provided value.
15776        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15777            self.validators = Some(field.into().into());
15778        }
15779        ///Sets `validators` with the provided value.
15780        pub fn with_validators<T: Into<super::ValidatorSet>>(
15781            mut self,
15782            field: T,
15783        ) -> Self {
15784            self.set_validators(field.into());
15785            self
15786        }
15787        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
15788        pub fn storage_fund(&self) -> &super::StorageFund {
15789            self.storage_fund
15790                .as_ref()
15791                .map(|field| field as _)
15792                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15793        }
15794        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15795        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15796            self.storage_fund.as_mut().map(|field| field as _)
15797        }
15798        ///Returns a mutable reference to `storage_fund`.
15799        ///If the field is unset, it is first initialized with the default value.
15800        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15801            self.storage_fund.get_or_insert_default()
15802        }
15803        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
15804        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15805            self.storage_fund.as_ref().map(|field| field as _)
15806        }
15807        ///Sets `storage_fund` with the provided value.
15808        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15809            self.storage_fund = Some(field.into().into());
15810        }
15811        ///Sets `storage_fund` with the provided value.
15812        pub fn with_storage_fund<T: Into<super::StorageFund>>(
15813            mut self,
15814            field: T,
15815        ) -> Self {
15816            self.set_storage_fund(field.into());
15817            self
15818        }
15819        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
15820        pub fn parameters(&self) -> &super::SystemParameters {
15821            self.parameters
15822                .as_ref()
15823                .map(|field| field as _)
15824                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15825        }
15826        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15827        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15828            self.parameters.as_mut().map(|field| field as _)
15829        }
15830        ///Returns a mutable reference to `parameters`.
15831        ///If the field is unset, it is first initialized with the default value.
15832        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15833            self.parameters.get_or_insert_default()
15834        }
15835        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
15836        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15837            self.parameters.as_ref().map(|field| field as _)
15838        }
15839        ///Sets `parameters` with the provided value.
15840        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15841            self.parameters = Some(field.into().into());
15842        }
15843        ///Sets `parameters` with the provided value.
15844        pub fn with_parameters<T: Into<super::SystemParameters>>(
15845            mut self,
15846            field: T,
15847        ) -> Self {
15848            self.set_parameters(field.into());
15849            self
15850        }
15851        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15852        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15853            self.reference_gas_price.as_mut().map(|field| field as _)
15854        }
15855        ///Returns a mutable reference to `reference_gas_price`.
15856        ///If the field is unset, it is first initialized with the default value.
15857        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15858            self.reference_gas_price.get_or_insert_default()
15859        }
15860        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
15861        pub fn reference_gas_price_opt(&self) -> Option<u64> {
15862            self.reference_gas_price.as_ref().map(|field| *field)
15863        }
15864        ///Sets `reference_gas_price` with the provided value.
15865        pub fn set_reference_gas_price(&mut self, field: u64) {
15866            self.reference_gas_price = Some(field);
15867        }
15868        ///Sets `reference_gas_price` with the provided value.
15869        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15870            self.set_reference_gas_price(field);
15871            self
15872        }
15873        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
15874        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15875            &self.validator_report_records
15876        }
15877        ///Returns a mutable reference to `validator_report_records`.
15878        ///If the field is unset, it is first initialized with the default value.
15879        pub fn validator_report_records_mut(
15880            &mut self,
15881        ) -> &mut Vec<super::ValidatorReportRecord> {
15882            &mut self.validator_report_records
15883        }
15884        ///Sets `validator_report_records` with the provided value.
15885        pub fn set_validator_report_records(
15886            &mut self,
15887            field: Vec<super::ValidatorReportRecord>,
15888        ) {
15889            self.validator_report_records = field;
15890        }
15891        ///Sets `validator_report_records` with the provided value.
15892        pub fn with_validator_report_records(
15893            mut self,
15894            field: Vec<super::ValidatorReportRecord>,
15895        ) -> Self {
15896            self.set_validator_report_records(field);
15897            self
15898        }
15899        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
15900        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
15901            self.stake_subsidy
15902                .as_ref()
15903                .map(|field| field as _)
15904                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
15905        }
15906        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15907        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
15908            self.stake_subsidy.as_mut().map(|field| field as _)
15909        }
15910        ///Returns a mutable reference to `stake_subsidy`.
15911        ///If the field is unset, it is first initialized with the default value.
15912        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
15913            self.stake_subsidy.get_or_insert_default()
15914        }
15915        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
15916        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
15917            self.stake_subsidy.as_ref().map(|field| field as _)
15918        }
15919        ///Sets `stake_subsidy` with the provided value.
15920        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
15921            self.stake_subsidy = Some(field.into().into());
15922        }
15923        ///Sets `stake_subsidy` with the provided value.
15924        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
15925            mut self,
15926            field: T,
15927        ) -> Self {
15928            self.set_stake_subsidy(field.into());
15929            self
15930        }
15931        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15932        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
15933            self.safe_mode.as_mut().map(|field| field as _)
15934        }
15935        ///Returns a mutable reference to `safe_mode`.
15936        ///If the field is unset, it is first initialized with the default value.
15937        pub fn safe_mode_mut(&mut self) -> &mut bool {
15938            self.safe_mode.get_or_insert_default()
15939        }
15940        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
15941        pub fn safe_mode_opt(&self) -> Option<bool> {
15942            self.safe_mode.as_ref().map(|field| *field)
15943        }
15944        ///Sets `safe_mode` with the provided value.
15945        pub fn set_safe_mode(&mut self, field: bool) {
15946            self.safe_mode = Some(field);
15947        }
15948        ///Sets `safe_mode` with the provided value.
15949        pub fn with_safe_mode(mut self, field: bool) -> Self {
15950            self.set_safe_mode(field);
15951            self
15952        }
15953        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15954        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15955            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
15956        }
15957        ///Returns a mutable reference to `safe_mode_storage_rewards`.
15958        ///If the field is unset, it is first initialized with the default value.
15959        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
15960            self.safe_mode_storage_rewards.get_or_insert_default()
15961        }
15962        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
15963        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
15964            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
15965        }
15966        ///Sets `safe_mode_storage_rewards` with the provided value.
15967        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
15968            self.safe_mode_storage_rewards = Some(field);
15969        }
15970        ///Sets `safe_mode_storage_rewards` with the provided value.
15971        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
15972            self.set_safe_mode_storage_rewards(field);
15973            self
15974        }
15975        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15976        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15977            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
15978        }
15979        ///Returns a mutable reference to `safe_mode_computation_rewards`.
15980        ///If the field is unset, it is first initialized with the default value.
15981        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
15982            self.safe_mode_computation_rewards.get_or_insert_default()
15983        }
15984        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
15985        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
15986            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
15987        }
15988        ///Sets `safe_mode_computation_rewards` with the provided value.
15989        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
15990            self.safe_mode_computation_rewards = Some(field);
15991        }
15992        ///Sets `safe_mode_computation_rewards` with the provided value.
15993        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
15994            self.set_safe_mode_computation_rewards(field);
15995            self
15996        }
15997        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15998        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15999            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
16000        }
16001        ///Returns a mutable reference to `safe_mode_storage_rebates`.
16002        ///If the field is unset, it is first initialized with the default value.
16003        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
16004            self.safe_mode_storage_rebates.get_or_insert_default()
16005        }
16006        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
16007        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
16008            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
16009        }
16010        ///Sets `safe_mode_storage_rebates` with the provided value.
16011        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
16012            self.safe_mode_storage_rebates = Some(field);
16013        }
16014        ///Sets `safe_mode_storage_rebates` with the provided value.
16015        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
16016            self.set_safe_mode_storage_rebates(field);
16017            self
16018        }
16019        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16020        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
16021            &mut self,
16022        ) -> Option<&mut u64> {
16023            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
16024        }
16025        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
16026        ///If the field is unset, it is first initialized with the default value.
16027        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
16028            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
16029        }
16030        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
16031        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
16032            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
16033        }
16034        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
16035        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
16036            self.safe_mode_non_refundable_storage_fee = Some(field);
16037        }
16038        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
16039        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
16040            self.set_safe_mode_non_refundable_storage_fee(field);
16041            self
16042        }
16043        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16044        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
16045            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
16046        }
16047        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
16048        ///If the field is unset, it is first initialized with the default value.
16049        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
16050            self.epoch_start_timestamp_ms.get_or_insert_default()
16051        }
16052        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
16053        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
16054            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
16055        }
16056        ///Sets `epoch_start_timestamp_ms` with the provided value.
16057        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
16058            self.epoch_start_timestamp_ms = Some(field);
16059        }
16060        ///Sets `epoch_start_timestamp_ms` with the provided value.
16061        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
16062            self.set_epoch_start_timestamp_ms(field);
16063            self
16064        }
16065        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16066        pub fn extra_fields(&self) -> &super::MoveTable {
16067            self.extra_fields
16068                .as_ref()
16069                .map(|field| field as _)
16070                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16071        }
16072        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16073        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16074            self.extra_fields.as_mut().map(|field| field as _)
16075        }
16076        ///Returns a mutable reference to `extra_fields`.
16077        ///If the field is unset, it is first initialized with the default value.
16078        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16079            self.extra_fields.get_or_insert_default()
16080        }
16081        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16082        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16083            self.extra_fields.as_ref().map(|field| field as _)
16084        }
16085        ///Sets `extra_fields` with the provided value.
16086        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16087            self.extra_fields = Some(field.into().into());
16088        }
16089        ///Sets `extra_fields` with the provided value.
16090        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16091            self.set_extra_fields(field.into());
16092            self
16093        }
16094    }
16095    impl super::Transaction {
16096        pub const fn const_default() -> Self {
16097            Self {
16098                bcs: None,
16099                digest: None,
16100                version: None,
16101                kind: None,
16102                sender: None,
16103                gas_payment: None,
16104                expiration: None,
16105            }
16106        }
16107        #[doc(hidden)]
16108        pub fn default_instance() -> &'static Self {
16109            static DEFAULT: super::Transaction = super::Transaction::const_default();
16110            &DEFAULT
16111        }
16112        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16113        pub fn bcs(&self) -> &super::Bcs {
16114            self.bcs
16115                .as_ref()
16116                .map(|field| field as _)
16117                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16118        }
16119        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16120        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16121            self.bcs.as_mut().map(|field| field as _)
16122        }
16123        ///Returns a mutable reference to `bcs`.
16124        ///If the field is unset, it is first initialized with the default value.
16125        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16126            self.bcs.get_or_insert_default()
16127        }
16128        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16129        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16130            self.bcs.as_ref().map(|field| field as _)
16131        }
16132        ///Sets `bcs` with the provided value.
16133        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16134            self.bcs = Some(field.into().into());
16135        }
16136        ///Sets `bcs` with the provided value.
16137        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16138            self.set_bcs(field.into());
16139            self
16140        }
16141        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16142        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16143            self.digest.as_mut().map(|field| field as _)
16144        }
16145        ///Returns a mutable reference to `digest`.
16146        ///If the field is unset, it is first initialized with the default value.
16147        pub fn digest_mut(&mut self) -> &mut String {
16148            self.digest.get_or_insert_default()
16149        }
16150        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16151        pub fn digest_opt(&self) -> Option<&str> {
16152            self.digest.as_ref().map(|field| field as _)
16153        }
16154        ///Sets `digest` with the provided value.
16155        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16156            self.digest = Some(field.into().into());
16157        }
16158        ///Sets `digest` with the provided value.
16159        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16160            self.set_digest(field.into());
16161            self
16162        }
16163        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16164        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16165            self.version.as_mut().map(|field| field as _)
16166        }
16167        ///Returns a mutable reference to `version`.
16168        ///If the field is unset, it is first initialized with the default value.
16169        pub fn version_mut(&mut self) -> &mut i32 {
16170            self.version.get_or_insert_default()
16171        }
16172        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16173        pub fn version_opt(&self) -> Option<i32> {
16174            self.version.as_ref().map(|field| *field)
16175        }
16176        ///Sets `version` with the provided value.
16177        pub fn set_version(&mut self, field: i32) {
16178            self.version = Some(field);
16179        }
16180        ///Sets `version` with the provided value.
16181        pub fn with_version(mut self, field: i32) -> Self {
16182            self.set_version(field);
16183            self
16184        }
16185        ///Returns the value of `kind`, or the default value if `kind` is unset.
16186        pub fn kind(&self) -> &super::TransactionKind {
16187            self.kind
16188                .as_ref()
16189                .map(|field| field as _)
16190                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16191        }
16192        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16193        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16194            self.kind.as_mut().map(|field| field as _)
16195        }
16196        ///Returns a mutable reference to `kind`.
16197        ///If the field is unset, it is first initialized with the default value.
16198        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16199            self.kind.get_or_insert_default()
16200        }
16201        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
16202        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16203            self.kind.as_ref().map(|field| field as _)
16204        }
16205        ///Sets `kind` with the provided value.
16206        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16207            self.kind = Some(field.into().into());
16208        }
16209        ///Sets `kind` with the provided value.
16210        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16211            self.set_kind(field.into());
16212            self
16213        }
16214        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16215        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16216            self.sender.as_mut().map(|field| field as _)
16217        }
16218        ///Returns a mutable reference to `sender`.
16219        ///If the field is unset, it is first initialized with the default value.
16220        pub fn sender_mut(&mut self) -> &mut String {
16221            self.sender.get_or_insert_default()
16222        }
16223        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
16224        pub fn sender_opt(&self) -> Option<&str> {
16225            self.sender.as_ref().map(|field| field as _)
16226        }
16227        ///Sets `sender` with the provided value.
16228        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16229            self.sender = Some(field.into().into());
16230        }
16231        ///Sets `sender` with the provided value.
16232        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16233            self.set_sender(field.into());
16234            self
16235        }
16236        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
16237        pub fn gas_payment(&self) -> &super::GasPayment {
16238            self.gas_payment
16239                .as_ref()
16240                .map(|field| field as _)
16241                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16242        }
16243        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16244        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16245            self.gas_payment.as_mut().map(|field| field as _)
16246        }
16247        ///Returns a mutable reference to `gas_payment`.
16248        ///If the field is unset, it is first initialized with the default value.
16249        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16250            self.gas_payment.get_or_insert_default()
16251        }
16252        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
16253        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16254            self.gas_payment.as_ref().map(|field| field as _)
16255        }
16256        ///Sets `gas_payment` with the provided value.
16257        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16258            self.gas_payment = Some(field.into().into());
16259        }
16260        ///Sets `gas_payment` with the provided value.
16261        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16262            self.set_gas_payment(field.into());
16263            self
16264        }
16265        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
16266        pub fn expiration(&self) -> &super::TransactionExpiration {
16267            self.expiration
16268                .as_ref()
16269                .map(|field| field as _)
16270                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16271        }
16272        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16273        pub fn expiration_opt_mut(
16274            &mut self,
16275        ) -> Option<&mut super::TransactionExpiration> {
16276            self.expiration.as_mut().map(|field| field as _)
16277        }
16278        ///Returns a mutable reference to `expiration`.
16279        ///If the field is unset, it is first initialized with the default value.
16280        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16281            self.expiration.get_or_insert_default()
16282        }
16283        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16284        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16285            self.expiration.as_ref().map(|field| field as _)
16286        }
16287        ///Sets `expiration` with the provided value.
16288        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16289            &mut self,
16290            field: T,
16291        ) {
16292            self.expiration = Some(field.into().into());
16293        }
16294        ///Sets `expiration` with the provided value.
16295        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16296            mut self,
16297            field: T,
16298        ) -> Self {
16299            self.set_expiration(field.into());
16300            self
16301        }
16302    }
16303    impl super::TransactionEffects {
16304        pub const fn const_default() -> Self {
16305            Self {
16306                bcs: None,
16307                digest: None,
16308                version: None,
16309                status: None,
16310                epoch: None,
16311                gas_used: None,
16312                transaction_digest: None,
16313                gas_object: None,
16314                events_digest: None,
16315                dependencies: Vec::new(),
16316                lamport_version: None,
16317                changed_objects: Vec::new(),
16318                unchanged_consensus_objects: Vec::new(),
16319                auxiliary_data_digest: None,
16320                unchanged_loaded_runtime_objects: Vec::new(),
16321            }
16322        }
16323        #[doc(hidden)]
16324        pub fn default_instance() -> &'static Self {
16325            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16326            &DEFAULT
16327        }
16328        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16329        pub fn bcs(&self) -> &super::Bcs {
16330            self.bcs
16331                .as_ref()
16332                .map(|field| field as _)
16333                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16334        }
16335        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16336        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16337            self.bcs.as_mut().map(|field| field as _)
16338        }
16339        ///Returns a mutable reference to `bcs`.
16340        ///If the field is unset, it is first initialized with the default value.
16341        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16342            self.bcs.get_or_insert_default()
16343        }
16344        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16345        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16346            self.bcs.as_ref().map(|field| field as _)
16347        }
16348        ///Sets `bcs` with the provided value.
16349        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16350            self.bcs = Some(field.into().into());
16351        }
16352        ///Sets `bcs` with the provided value.
16353        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16354            self.set_bcs(field.into());
16355            self
16356        }
16357        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16358        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16359            self.digest.as_mut().map(|field| field as _)
16360        }
16361        ///Returns a mutable reference to `digest`.
16362        ///If the field is unset, it is first initialized with the default value.
16363        pub fn digest_mut(&mut self) -> &mut String {
16364            self.digest.get_or_insert_default()
16365        }
16366        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16367        pub fn digest_opt(&self) -> Option<&str> {
16368            self.digest.as_ref().map(|field| field as _)
16369        }
16370        ///Sets `digest` with the provided value.
16371        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16372            self.digest = Some(field.into().into());
16373        }
16374        ///Sets `digest` with the provided value.
16375        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16376            self.set_digest(field.into());
16377            self
16378        }
16379        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16380        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16381            self.version.as_mut().map(|field| field as _)
16382        }
16383        ///Returns a mutable reference to `version`.
16384        ///If the field is unset, it is first initialized with the default value.
16385        pub fn version_mut(&mut self) -> &mut i32 {
16386            self.version.get_or_insert_default()
16387        }
16388        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16389        pub fn version_opt(&self) -> Option<i32> {
16390            self.version.as_ref().map(|field| *field)
16391        }
16392        ///Sets `version` with the provided value.
16393        pub fn set_version(&mut self, field: i32) {
16394            self.version = Some(field);
16395        }
16396        ///Sets `version` with the provided value.
16397        pub fn with_version(mut self, field: i32) -> Self {
16398            self.set_version(field);
16399            self
16400        }
16401        ///Returns the value of `status`, or the default value if `status` is unset.
16402        pub fn status(&self) -> &super::ExecutionStatus {
16403            self.status
16404                .as_ref()
16405                .map(|field| field as _)
16406                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16407        }
16408        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16409        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16410            self.status.as_mut().map(|field| field as _)
16411        }
16412        ///Returns a mutable reference to `status`.
16413        ///If the field is unset, it is first initialized with the default value.
16414        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16415            self.status.get_or_insert_default()
16416        }
16417        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
16418        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16419            self.status.as_ref().map(|field| field as _)
16420        }
16421        ///Sets `status` with the provided value.
16422        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16423            self.status = Some(field.into().into());
16424        }
16425        ///Sets `status` with the provided value.
16426        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16427            self.set_status(field.into());
16428            self
16429        }
16430        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16431        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16432            self.epoch.as_mut().map(|field| field as _)
16433        }
16434        ///Returns a mutable reference to `epoch`.
16435        ///If the field is unset, it is first initialized with the default value.
16436        pub fn epoch_mut(&mut self) -> &mut u64 {
16437            self.epoch.get_or_insert_default()
16438        }
16439        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16440        pub fn epoch_opt(&self) -> Option<u64> {
16441            self.epoch.as_ref().map(|field| *field)
16442        }
16443        ///Sets `epoch` with the provided value.
16444        pub fn set_epoch(&mut self, field: u64) {
16445            self.epoch = Some(field);
16446        }
16447        ///Sets `epoch` with the provided value.
16448        pub fn with_epoch(mut self, field: u64) -> Self {
16449            self.set_epoch(field);
16450            self
16451        }
16452        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
16453        pub fn gas_used(&self) -> &super::GasCostSummary {
16454            self.gas_used
16455                .as_ref()
16456                .map(|field| field as _)
16457                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16458        }
16459        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16460        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16461            self.gas_used.as_mut().map(|field| field as _)
16462        }
16463        ///Returns a mutable reference to `gas_used`.
16464        ///If the field is unset, it is first initialized with the default value.
16465        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16466            self.gas_used.get_or_insert_default()
16467        }
16468        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
16469        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16470            self.gas_used.as_ref().map(|field| field as _)
16471        }
16472        ///Sets `gas_used` with the provided value.
16473        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16474            self.gas_used = Some(field.into().into());
16475        }
16476        ///Sets `gas_used` with the provided value.
16477        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16478            mut self,
16479            field: T,
16480        ) -> Self {
16481            self.set_gas_used(field.into());
16482            self
16483        }
16484        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16485        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16486            self.transaction_digest.as_mut().map(|field| field as _)
16487        }
16488        ///Returns a mutable reference to `transaction_digest`.
16489        ///If the field is unset, it is first initialized with the default value.
16490        pub fn transaction_digest_mut(&mut self) -> &mut String {
16491            self.transaction_digest.get_or_insert_default()
16492        }
16493        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16494        pub fn transaction_digest_opt(&self) -> Option<&str> {
16495            self.transaction_digest.as_ref().map(|field| field as _)
16496        }
16497        ///Sets `transaction_digest` with the provided value.
16498        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16499            self.transaction_digest = Some(field.into().into());
16500        }
16501        ///Sets `transaction_digest` with the provided value.
16502        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16503            self.set_transaction_digest(field.into());
16504            self
16505        }
16506        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
16507        pub fn gas_object(&self) -> &super::ChangedObject {
16508            self.gas_object
16509                .as_ref()
16510                .map(|field| field as _)
16511                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16512        }
16513        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16514        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16515            self.gas_object.as_mut().map(|field| field as _)
16516        }
16517        ///Returns a mutable reference to `gas_object`.
16518        ///If the field is unset, it is first initialized with the default value.
16519        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16520            self.gas_object.get_or_insert_default()
16521        }
16522        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
16523        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16524            self.gas_object.as_ref().map(|field| field as _)
16525        }
16526        ///Sets `gas_object` with the provided value.
16527        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16528            self.gas_object = Some(field.into().into());
16529        }
16530        ///Sets `gas_object` with the provided value.
16531        pub fn with_gas_object<T: Into<super::ChangedObject>>(
16532            mut self,
16533            field: T,
16534        ) -> Self {
16535            self.set_gas_object(field.into());
16536            self
16537        }
16538        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16539        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16540            self.events_digest.as_mut().map(|field| field as _)
16541        }
16542        ///Returns a mutable reference to `events_digest`.
16543        ///If the field is unset, it is first initialized with the default value.
16544        pub fn events_digest_mut(&mut self) -> &mut String {
16545            self.events_digest.get_or_insert_default()
16546        }
16547        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16548        pub fn events_digest_opt(&self) -> Option<&str> {
16549            self.events_digest.as_ref().map(|field| field as _)
16550        }
16551        ///Sets `events_digest` with the provided value.
16552        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16553            self.events_digest = Some(field.into().into());
16554        }
16555        ///Sets `events_digest` with the provided value.
16556        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16557            self.set_events_digest(field.into());
16558            self
16559        }
16560        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
16561        pub fn dependencies(&self) -> &[String] {
16562            &self.dependencies
16563        }
16564        ///Returns a mutable reference to `dependencies`.
16565        ///If the field is unset, it is first initialized with the default value.
16566        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16567            &mut self.dependencies
16568        }
16569        ///Sets `dependencies` with the provided value.
16570        pub fn set_dependencies(&mut self, field: Vec<String>) {
16571            self.dependencies = field;
16572        }
16573        ///Sets `dependencies` with the provided value.
16574        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16575            self.set_dependencies(field);
16576            self
16577        }
16578        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16579        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16580            self.lamport_version.as_mut().map(|field| field as _)
16581        }
16582        ///Returns a mutable reference to `lamport_version`.
16583        ///If the field is unset, it is first initialized with the default value.
16584        pub fn lamport_version_mut(&mut self) -> &mut u64 {
16585            self.lamport_version.get_or_insert_default()
16586        }
16587        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16588        pub fn lamport_version_opt(&self) -> Option<u64> {
16589            self.lamport_version.as_ref().map(|field| *field)
16590        }
16591        ///Sets `lamport_version` with the provided value.
16592        pub fn set_lamport_version(&mut self, field: u64) {
16593            self.lamport_version = Some(field);
16594        }
16595        ///Sets `lamport_version` with the provided value.
16596        pub fn with_lamport_version(mut self, field: u64) -> Self {
16597            self.set_lamport_version(field);
16598            self
16599        }
16600        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
16601        pub fn changed_objects(&self) -> &[super::ChangedObject] {
16602            &self.changed_objects
16603        }
16604        ///Returns a mutable reference to `changed_objects`.
16605        ///If the field is unset, it is first initialized with the default value.
16606        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16607            &mut self.changed_objects
16608        }
16609        ///Sets `changed_objects` with the provided value.
16610        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16611            self.changed_objects = field;
16612        }
16613        ///Sets `changed_objects` with the provided value.
16614        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16615            self.set_changed_objects(field);
16616            self
16617        }
16618        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
16619        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16620            &self.unchanged_consensus_objects
16621        }
16622        ///Returns a mutable reference to `unchanged_consensus_objects`.
16623        ///If the field is unset, it is first initialized with the default value.
16624        pub fn unchanged_consensus_objects_mut(
16625            &mut self,
16626        ) -> &mut Vec<super::UnchangedConsensusObject> {
16627            &mut self.unchanged_consensus_objects
16628        }
16629        ///Sets `unchanged_consensus_objects` with the provided value.
16630        pub fn set_unchanged_consensus_objects(
16631            &mut self,
16632            field: Vec<super::UnchangedConsensusObject>,
16633        ) {
16634            self.unchanged_consensus_objects = field;
16635        }
16636        ///Sets `unchanged_consensus_objects` with the provided value.
16637        pub fn with_unchanged_consensus_objects(
16638            mut self,
16639            field: Vec<super::UnchangedConsensusObject>,
16640        ) -> Self {
16641            self.set_unchanged_consensus_objects(field);
16642            self
16643        }
16644        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16645        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16646            self.auxiliary_data_digest.as_mut().map(|field| field as _)
16647        }
16648        ///Returns a mutable reference to `auxiliary_data_digest`.
16649        ///If the field is unset, it is first initialized with the default value.
16650        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16651            self.auxiliary_data_digest.get_or_insert_default()
16652        }
16653        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16654        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16655            self.auxiliary_data_digest.as_ref().map(|field| field as _)
16656        }
16657        ///Sets `auxiliary_data_digest` with the provided value.
16658        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16659            self.auxiliary_data_digest = Some(field.into().into());
16660        }
16661        ///Sets `auxiliary_data_digest` with the provided value.
16662        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16663            self.set_auxiliary_data_digest(field.into());
16664            self
16665        }
16666        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
16667        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16668            &self.unchanged_loaded_runtime_objects
16669        }
16670        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
16671        ///If the field is unset, it is first initialized with the default value.
16672        pub fn unchanged_loaded_runtime_objects_mut(
16673            &mut self,
16674        ) -> &mut Vec<super::ObjectReference> {
16675            &mut self.unchanged_loaded_runtime_objects
16676        }
16677        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16678        pub fn set_unchanged_loaded_runtime_objects(
16679            &mut self,
16680            field: Vec<super::ObjectReference>,
16681        ) {
16682            self.unchanged_loaded_runtime_objects = field;
16683        }
16684        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16685        pub fn with_unchanged_loaded_runtime_objects(
16686            mut self,
16687            field: Vec<super::ObjectReference>,
16688        ) -> Self {
16689            self.set_unchanged_loaded_runtime_objects(field);
16690            self
16691        }
16692    }
16693    impl super::TransactionEvents {
16694        pub const fn const_default() -> Self {
16695            Self {
16696                bcs: None,
16697                digest: None,
16698                events: Vec::new(),
16699            }
16700        }
16701        #[doc(hidden)]
16702        pub fn default_instance() -> &'static Self {
16703            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16704            &DEFAULT
16705        }
16706        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16707        pub fn bcs(&self) -> &super::Bcs {
16708            self.bcs
16709                .as_ref()
16710                .map(|field| field as _)
16711                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16712        }
16713        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16714        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16715            self.bcs.as_mut().map(|field| field as _)
16716        }
16717        ///Returns a mutable reference to `bcs`.
16718        ///If the field is unset, it is first initialized with the default value.
16719        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16720            self.bcs.get_or_insert_default()
16721        }
16722        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16723        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16724            self.bcs.as_ref().map(|field| field as _)
16725        }
16726        ///Sets `bcs` with the provided value.
16727        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16728            self.bcs = Some(field.into().into());
16729        }
16730        ///Sets `bcs` with the provided value.
16731        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16732            self.set_bcs(field.into());
16733            self
16734        }
16735        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16736        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16737            self.digest.as_mut().map(|field| field as _)
16738        }
16739        ///Returns a mutable reference to `digest`.
16740        ///If the field is unset, it is first initialized with the default value.
16741        pub fn digest_mut(&mut self) -> &mut String {
16742            self.digest.get_or_insert_default()
16743        }
16744        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16745        pub fn digest_opt(&self) -> Option<&str> {
16746            self.digest.as_ref().map(|field| field as _)
16747        }
16748        ///Sets `digest` with the provided value.
16749        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16750            self.digest = Some(field.into().into());
16751        }
16752        ///Sets `digest` with the provided value.
16753        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16754            self.set_digest(field.into());
16755            self
16756        }
16757        ///Returns the value of `events`, or the default value if `events` is unset.
16758        pub fn events(&self) -> &[super::Event] {
16759            &self.events
16760        }
16761        ///Returns a mutable reference to `events`.
16762        ///If the field is unset, it is first initialized with the default value.
16763        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16764            &mut self.events
16765        }
16766        ///Sets `events` with the provided value.
16767        pub fn set_events(&mut self, field: Vec<super::Event>) {
16768            self.events = field;
16769        }
16770        ///Sets `events` with the provided value.
16771        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16772            self.set_events(field);
16773            self
16774        }
16775    }
16776    impl super::TransactionExpiration {
16777        pub const fn const_default() -> Self {
16778            Self {
16779                kind: None,
16780                epoch: None,
16781                min_epoch: None,
16782                min_timestamp: None,
16783                max_timestamp: None,
16784                chain: None,
16785                nonce: None,
16786                allowed_proposers: None,
16787            }
16788        }
16789        #[doc(hidden)]
16790        pub fn default_instance() -> &'static Self {
16791            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16792            &DEFAULT
16793        }
16794        ///Sets `kind` with the provided value.
16795        pub fn with_kind<
16796            T: Into<super::transaction_expiration::TransactionExpirationKind>,
16797        >(mut self, field: T) -> Self {
16798            self.set_kind(field.into());
16799            self
16800        }
16801        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16802        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16803            self.epoch.as_mut().map(|field| field as _)
16804        }
16805        ///Returns a mutable reference to `epoch`.
16806        ///If the field is unset, it is first initialized with the default value.
16807        pub fn epoch_mut(&mut self) -> &mut u64 {
16808            self.epoch.get_or_insert_default()
16809        }
16810        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16811        pub fn epoch_opt(&self) -> Option<u64> {
16812            self.epoch.as_ref().map(|field| *field)
16813        }
16814        ///Sets `epoch` with the provided value.
16815        pub fn set_epoch(&mut self, field: u64) {
16816            self.epoch = Some(field);
16817        }
16818        ///Sets `epoch` with the provided value.
16819        pub fn with_epoch(mut self, field: u64) -> Self {
16820            self.set_epoch(field);
16821            self
16822        }
16823        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16824        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16825            self.min_epoch.as_mut().map(|field| field as _)
16826        }
16827        ///Returns a mutable reference to `min_epoch`.
16828        ///If the field is unset, it is first initialized with the default value.
16829        pub fn min_epoch_mut(&mut self) -> &mut u64 {
16830            self.min_epoch.get_or_insert_default()
16831        }
16832        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16833        pub fn min_epoch_opt(&self) -> Option<u64> {
16834            self.min_epoch.as_ref().map(|field| *field)
16835        }
16836        ///Sets `min_epoch` with the provided value.
16837        pub fn set_min_epoch(&mut self, field: u64) {
16838            self.min_epoch = Some(field);
16839        }
16840        ///Sets `min_epoch` with the provided value.
16841        pub fn with_min_epoch(mut self, field: u64) -> Self {
16842            self.set_min_epoch(field);
16843            self
16844        }
16845        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16846        pub fn min_timestamp_opt_mut(
16847            &mut self,
16848        ) -> Option<&mut ::prost_types::Timestamp> {
16849            self.min_timestamp.as_mut().map(|field| field as _)
16850        }
16851        ///Returns a mutable reference to `min_timestamp`.
16852        ///If the field is unset, it is first initialized with the default value.
16853        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16854            self.min_timestamp.get_or_insert_default()
16855        }
16856        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16857        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16858            self.min_timestamp.as_ref().map(|field| field as _)
16859        }
16860        ///Sets `min_timestamp` with the provided value.
16861        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16862            &mut self,
16863            field: T,
16864        ) {
16865            self.min_timestamp = Some(field.into().into());
16866        }
16867        ///Sets `min_timestamp` with the provided value.
16868        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16869            mut self,
16870            field: T,
16871        ) -> Self {
16872            self.set_min_timestamp(field.into());
16873            self
16874        }
16875        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16876        pub fn max_timestamp_opt_mut(
16877            &mut self,
16878        ) -> Option<&mut ::prost_types::Timestamp> {
16879            self.max_timestamp.as_mut().map(|field| field as _)
16880        }
16881        ///Returns a mutable reference to `max_timestamp`.
16882        ///If the field is unset, it is first initialized with the default value.
16883        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16884            self.max_timestamp.get_or_insert_default()
16885        }
16886        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16887        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16888            self.max_timestamp.as_ref().map(|field| field as _)
16889        }
16890        ///Sets `max_timestamp` with the provided value.
16891        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
16892            &mut self,
16893            field: T,
16894        ) {
16895            self.max_timestamp = Some(field.into().into());
16896        }
16897        ///Sets `max_timestamp` with the provided value.
16898        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
16899            mut self,
16900            field: T,
16901        ) -> Self {
16902            self.set_max_timestamp(field.into());
16903            self
16904        }
16905        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16906        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
16907            self.chain.as_mut().map(|field| field as _)
16908        }
16909        ///Returns a mutable reference to `chain`.
16910        ///If the field is unset, it is first initialized with the default value.
16911        pub fn chain_mut(&mut self) -> &mut String {
16912            self.chain.get_or_insert_default()
16913        }
16914        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
16915        pub fn chain_opt(&self) -> Option<&str> {
16916            self.chain.as_ref().map(|field| field as _)
16917        }
16918        ///Sets `chain` with the provided value.
16919        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
16920            self.chain = Some(field.into().into());
16921        }
16922        ///Sets `chain` with the provided value.
16923        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
16924            self.set_chain(field.into());
16925            self
16926        }
16927        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16928        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
16929            self.nonce.as_mut().map(|field| field as _)
16930        }
16931        ///Returns a mutable reference to `nonce`.
16932        ///If the field is unset, it is first initialized with the default value.
16933        pub fn nonce_mut(&mut self) -> &mut u32 {
16934            self.nonce.get_or_insert_default()
16935        }
16936        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
16937        pub fn nonce_opt(&self) -> Option<u32> {
16938            self.nonce.as_ref().map(|field| *field)
16939        }
16940        ///Sets `nonce` with the provided value.
16941        pub fn set_nonce(&mut self, field: u32) {
16942            self.nonce = Some(field);
16943        }
16944        ///Sets `nonce` with the provided value.
16945        pub fn with_nonce(mut self, field: u32) -> Self {
16946            self.set_nonce(field);
16947            self
16948        }
16949        ///Returns the value of `allowed_proposers`, or the default value if `allowed_proposers` is unset.
16950        pub fn allowed_proposers(&self) -> &super::AllowedProposers {
16951            self.allowed_proposers
16952                .as_ref()
16953                .map(|field| field as _)
16954                .unwrap_or_else(|| super::AllowedProposers::default_instance() as _)
16955        }
16956        ///If `allowed_proposers` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16957        pub fn allowed_proposers_opt_mut(
16958            &mut self,
16959        ) -> Option<&mut super::AllowedProposers> {
16960            self.allowed_proposers.as_mut().map(|field| field as _)
16961        }
16962        ///Returns a mutable reference to `allowed_proposers`.
16963        ///If the field is unset, it is first initialized with the default value.
16964        pub fn allowed_proposers_mut(&mut self) -> &mut super::AllowedProposers {
16965            self.allowed_proposers.get_or_insert_default()
16966        }
16967        ///If `allowed_proposers` is set, returns [`Some`] with the value; otherwise returns [`None`].
16968        pub fn allowed_proposers_opt(&self) -> Option<&super::AllowedProposers> {
16969            self.allowed_proposers.as_ref().map(|field| field as _)
16970        }
16971        ///Sets `allowed_proposers` with the provided value.
16972        pub fn set_allowed_proposers<T: Into<super::AllowedProposers>>(
16973            &mut self,
16974            field: T,
16975        ) {
16976            self.allowed_proposers = Some(field.into().into());
16977        }
16978        ///Sets `allowed_proposers` with the provided value.
16979        pub fn with_allowed_proposers<T: Into<super::AllowedProposers>>(
16980            mut self,
16981            field: T,
16982        ) -> Self {
16983            self.set_allowed_proposers(field.into());
16984            self
16985        }
16986    }
16987    impl super::TransactionFilter {
16988        pub const fn const_default() -> Self {
16989            Self { terms: Vec::new() }
16990        }
16991        #[doc(hidden)]
16992        pub fn default_instance() -> &'static Self {
16993            static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
16994            &DEFAULT
16995        }
16996        ///Returns the value of `terms`, or the default value if `terms` is unset.
16997        pub fn terms(&self) -> &[super::TransactionTerm] {
16998            &self.terms
16999        }
17000        ///Returns a mutable reference to `terms`.
17001        ///If the field is unset, it is first initialized with the default value.
17002        pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
17003            &mut self.terms
17004        }
17005        ///Sets `terms` with the provided value.
17006        pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
17007            self.terms = field;
17008        }
17009        ///Sets `terms` with the provided value.
17010        pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
17011            self.set_terms(field);
17012            self
17013        }
17014    }
17015    impl super::TransactionKind {
17016        pub const fn const_default() -> Self {
17017            Self { kind: None, data: None }
17018        }
17019        #[doc(hidden)]
17020        pub fn default_instance() -> &'static Self {
17021            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
17022            &DEFAULT
17023        }
17024        ///Sets `kind` with the provided value.
17025        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
17026            mut self,
17027            field: T,
17028        ) -> Self {
17029            self.set_kind(field.into());
17030            self
17031        }
17032        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
17033        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
17034            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17035                .data
17036            {
17037                field as _
17038            } else {
17039                super::ProgrammableTransaction::default_instance() as _
17040            }
17041        }
17042        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
17043        pub fn programmable_transaction_opt(
17044            &self,
17045        ) -> Option<&super::ProgrammableTransaction> {
17046            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17047                .data
17048            {
17049                Some(field as _)
17050            } else {
17051                None
17052            }
17053        }
17054        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17055        pub fn programmable_transaction_opt_mut(
17056            &mut self,
17057        ) -> Option<&mut super::ProgrammableTransaction> {
17058            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
17059                .data
17060            {
17061                Some(field as _)
17062            } else {
17063                None
17064            }
17065        }
17066        ///Returns a mutable reference to `programmable_transaction`.
17067        ///If the field is unset, it is first initialized with the default value.
17068        ///If any other oneof field in the same oneof is set, it will be cleared.
17069        pub fn programmable_transaction_mut(
17070            &mut self,
17071        ) -> &mut super::ProgrammableTransaction {
17072            if self.programmable_transaction_opt_mut().is_none() {
17073                self.data = Some(
17074                    super::transaction_kind::Data::ProgrammableTransaction(
17075                        super::ProgrammableTransaction::default(),
17076                    ),
17077                );
17078            }
17079            self.programmable_transaction_opt_mut().unwrap()
17080        }
17081        ///Sets `programmable_transaction` with the provided value.
17082        ///If any other oneof field in the same oneof is set, it will be cleared.
17083        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17084            &mut self,
17085            field: T,
17086        ) {
17087            self.data = Some(
17088                super::transaction_kind::Data::ProgrammableTransaction(
17089                    field.into().into(),
17090                ),
17091            );
17092        }
17093        ///Sets `programmable_transaction` with the provided value.
17094        ///If any other oneof field in the same oneof is set, it will be cleared.
17095        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17096            mut self,
17097            field: T,
17098        ) -> Self {
17099            self.set_programmable_transaction(field.into());
17100            self
17101        }
17102        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
17103        pub fn change_epoch(&self) -> &super::ChangeEpoch {
17104            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17105                field as _
17106            } else {
17107                super::ChangeEpoch::default_instance() as _
17108            }
17109        }
17110        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17111        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
17112            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17113                Some(field as _)
17114            } else {
17115                None
17116            }
17117        }
17118        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17119        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
17120            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
17121                .data
17122            {
17123                Some(field as _)
17124            } else {
17125                None
17126            }
17127        }
17128        ///Returns a mutable reference to `change_epoch`.
17129        ///If the field is unset, it is first initialized with the default value.
17130        ///If any other oneof field in the same oneof is set, it will be cleared.
17131        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
17132            if self.change_epoch_opt_mut().is_none() {
17133                self.data = Some(
17134                    super::transaction_kind::Data::ChangeEpoch(
17135                        super::ChangeEpoch::default(),
17136                    ),
17137                );
17138            }
17139            self.change_epoch_opt_mut().unwrap()
17140        }
17141        ///Sets `change_epoch` with the provided value.
17142        ///If any other oneof field in the same oneof is set, it will be cleared.
17143        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17144            self.data = Some(
17145                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17146            );
17147        }
17148        ///Sets `change_epoch` with the provided value.
17149        ///If any other oneof field in the same oneof is set, it will be cleared.
17150        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17151            mut self,
17152            field: T,
17153        ) -> Self {
17154            self.set_change_epoch(field.into());
17155            self
17156        }
17157        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
17158        pub fn genesis(&self) -> &super::GenesisTransaction {
17159            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17160                field as _
17161            } else {
17162                super::GenesisTransaction::default_instance() as _
17163            }
17164        }
17165        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
17166        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17167            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17168                Some(field as _)
17169            } else {
17170                None
17171            }
17172        }
17173        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17174        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17175            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17176                Some(field as _)
17177            } else {
17178                None
17179            }
17180        }
17181        ///Returns a mutable reference to `genesis`.
17182        ///If the field is unset, it is first initialized with the default value.
17183        ///If any other oneof field in the same oneof is set, it will be cleared.
17184        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17185            if self.genesis_opt_mut().is_none() {
17186                self.data = Some(
17187                    super::transaction_kind::Data::Genesis(
17188                        super::GenesisTransaction::default(),
17189                    ),
17190                );
17191            }
17192            self.genesis_opt_mut().unwrap()
17193        }
17194        ///Sets `genesis` with the provided value.
17195        ///If any other oneof field in the same oneof is set, it will be cleared.
17196        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17197            self.data = Some(
17198                super::transaction_kind::Data::Genesis(field.into().into()),
17199            );
17200        }
17201        ///Sets `genesis` with the provided value.
17202        ///If any other oneof field in the same oneof is set, it will be cleared.
17203        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17204            mut self,
17205            field: T,
17206        ) -> Self {
17207            self.set_genesis(field.into());
17208            self
17209        }
17210        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
17211        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17212            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17213                .data
17214            {
17215                field as _
17216            } else {
17217                super::ConsensusCommitPrologue::default_instance() as _
17218            }
17219        }
17220        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
17221        pub fn consensus_commit_prologue_opt(
17222            &self,
17223        ) -> Option<&super::ConsensusCommitPrologue> {
17224            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17225                .data
17226            {
17227                Some(field as _)
17228            } else {
17229                None
17230            }
17231        }
17232        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17233        pub fn consensus_commit_prologue_opt_mut(
17234            &mut self,
17235        ) -> Option<&mut super::ConsensusCommitPrologue> {
17236            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17237                .data
17238            {
17239                Some(field as _)
17240            } else {
17241                None
17242            }
17243        }
17244        ///Returns a mutable reference to `consensus_commit_prologue`.
17245        ///If the field is unset, it is first initialized with the default value.
17246        ///If any other oneof field in the same oneof is set, it will be cleared.
17247        pub fn consensus_commit_prologue_mut(
17248            &mut self,
17249        ) -> &mut super::ConsensusCommitPrologue {
17250            if self.consensus_commit_prologue_opt_mut().is_none() {
17251                self.data = Some(
17252                    super::transaction_kind::Data::ConsensusCommitPrologue(
17253                        super::ConsensusCommitPrologue::default(),
17254                    ),
17255                );
17256            }
17257            self.consensus_commit_prologue_opt_mut().unwrap()
17258        }
17259        ///Sets `consensus_commit_prologue` with the provided value.
17260        ///If any other oneof field in the same oneof is set, it will be cleared.
17261        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17262            &mut self,
17263            field: T,
17264        ) {
17265            self.data = Some(
17266                super::transaction_kind::Data::ConsensusCommitPrologue(
17267                    field.into().into(),
17268                ),
17269            );
17270        }
17271        ///Sets `consensus_commit_prologue` with the provided value.
17272        ///If any other oneof field in the same oneof is set, it will be cleared.
17273        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17274            mut self,
17275            field: T,
17276        ) -> Self {
17277            self.set_consensus_commit_prologue(field.into());
17278            self
17279        }
17280        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
17281        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17282            if let Some(
17283                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17284            ) = &self.data
17285            {
17286                field as _
17287            } else {
17288                super::AuthenticatorStateUpdate::default_instance() as _
17289            }
17290        }
17291        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17292        pub fn authenticator_state_update_opt(
17293            &self,
17294        ) -> Option<&super::AuthenticatorStateUpdate> {
17295            if let Some(
17296                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17297            ) = &self.data
17298            {
17299                Some(field as _)
17300            } else {
17301                None
17302            }
17303        }
17304        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17305        pub fn authenticator_state_update_opt_mut(
17306            &mut self,
17307        ) -> Option<&mut super::AuthenticatorStateUpdate> {
17308            if let Some(
17309                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17310            ) = &mut self.data
17311            {
17312                Some(field as _)
17313            } else {
17314                None
17315            }
17316        }
17317        ///Returns a mutable reference to `authenticator_state_update`.
17318        ///If the field is unset, it is first initialized with the default value.
17319        ///If any other oneof field in the same oneof is set, it will be cleared.
17320        pub fn authenticator_state_update_mut(
17321            &mut self,
17322        ) -> &mut super::AuthenticatorStateUpdate {
17323            if self.authenticator_state_update_opt_mut().is_none() {
17324                self.data = Some(
17325                    super::transaction_kind::Data::AuthenticatorStateUpdate(
17326                        super::AuthenticatorStateUpdate::default(),
17327                    ),
17328                );
17329            }
17330            self.authenticator_state_update_opt_mut().unwrap()
17331        }
17332        ///Sets `authenticator_state_update` with the provided value.
17333        ///If any other oneof field in the same oneof is set, it will be cleared.
17334        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17335            &mut self,
17336            field: T,
17337        ) {
17338            self.data = Some(
17339                super::transaction_kind::Data::AuthenticatorStateUpdate(
17340                    field.into().into(),
17341                ),
17342            );
17343        }
17344        ///Sets `authenticator_state_update` with the provided value.
17345        ///If any other oneof field in the same oneof is set, it will be cleared.
17346        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17347            mut self,
17348            field: T,
17349        ) -> Self {
17350            self.set_authenticator_state_update(field.into());
17351            self
17352        }
17353        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
17354        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17355            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17356                field as _
17357            } else {
17358                super::EndOfEpochTransaction::default_instance() as _
17359            }
17360        }
17361        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17362        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17363            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17364                Some(field as _)
17365            } else {
17366                None
17367            }
17368        }
17369        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17370        pub fn end_of_epoch_opt_mut(
17371            &mut self,
17372        ) -> Option<&mut super::EndOfEpochTransaction> {
17373            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17374                .data
17375            {
17376                Some(field as _)
17377            } else {
17378                None
17379            }
17380        }
17381        ///Returns a mutable reference to `end_of_epoch`.
17382        ///If the field is unset, it is first initialized with the default value.
17383        ///If any other oneof field in the same oneof is set, it will be cleared.
17384        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17385            if self.end_of_epoch_opt_mut().is_none() {
17386                self.data = Some(
17387                    super::transaction_kind::Data::EndOfEpoch(
17388                        super::EndOfEpochTransaction::default(),
17389                    ),
17390                );
17391            }
17392            self.end_of_epoch_opt_mut().unwrap()
17393        }
17394        ///Sets `end_of_epoch` with the provided value.
17395        ///If any other oneof field in the same oneof is set, it will be cleared.
17396        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17397            &mut self,
17398            field: T,
17399        ) {
17400            self.data = Some(
17401                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17402            );
17403        }
17404        ///Sets `end_of_epoch` with the provided value.
17405        ///If any other oneof field in the same oneof is set, it will be cleared.
17406        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17407            mut self,
17408            field: T,
17409        ) -> Self {
17410            self.set_end_of_epoch(field.into());
17411            self
17412        }
17413        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
17414        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17415            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17416                .data
17417            {
17418                field as _
17419            } else {
17420                super::RandomnessStateUpdate::default_instance() as _
17421            }
17422        }
17423        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17424        pub fn randomness_state_update_opt(
17425            &self,
17426        ) -> Option<&super::RandomnessStateUpdate> {
17427            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17428                .data
17429            {
17430                Some(field as _)
17431            } else {
17432                None
17433            }
17434        }
17435        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17436        pub fn randomness_state_update_opt_mut(
17437            &mut self,
17438        ) -> Option<&mut super::RandomnessStateUpdate> {
17439            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17440                .data
17441            {
17442                Some(field as _)
17443            } else {
17444                None
17445            }
17446        }
17447        ///Returns a mutable reference to `randomness_state_update`.
17448        ///If the field is unset, it is first initialized with the default value.
17449        ///If any other oneof field in the same oneof is set, it will be cleared.
17450        pub fn randomness_state_update_mut(
17451            &mut self,
17452        ) -> &mut super::RandomnessStateUpdate {
17453            if self.randomness_state_update_opt_mut().is_none() {
17454                self.data = Some(
17455                    super::transaction_kind::Data::RandomnessStateUpdate(
17456                        super::RandomnessStateUpdate::default(),
17457                    ),
17458                );
17459            }
17460            self.randomness_state_update_opt_mut().unwrap()
17461        }
17462        ///Sets `randomness_state_update` with the provided value.
17463        ///If any other oneof field in the same oneof is set, it will be cleared.
17464        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17465            &mut self,
17466            field: T,
17467        ) {
17468            self.data = Some(
17469                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17470            );
17471        }
17472        ///Sets `randomness_state_update` with the provided value.
17473        ///If any other oneof field in the same oneof is set, it will be cleared.
17474        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17475            mut self,
17476            field: T,
17477        ) -> Self {
17478            self.set_randomness_state_update(field.into());
17479            self
17480        }
17481    }
17482    impl super::TransactionLiteral {
17483        pub const fn const_default() -> Self {
17484            Self {
17485                negated: false,
17486                predicate: None,
17487            }
17488        }
17489        #[doc(hidden)]
17490        pub fn default_instance() -> &'static Self {
17491            static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17492            &DEFAULT
17493        }
17494        ///Returns a mutable reference to `negated`.
17495        ///If the field is unset, it is first initialized with the default value.
17496        pub fn negated_mut(&mut self) -> &mut bool {
17497            &mut self.negated
17498        }
17499        ///Sets `negated` with the provided value.
17500        pub fn set_negated(&mut self, field: bool) {
17501            self.negated = field;
17502        }
17503        ///Sets `negated` with the provided value.
17504        pub fn with_negated(mut self, field: bool) -> Self {
17505            self.set_negated(field);
17506            self
17507        }
17508        ///Returns the value of `sender`, or the default value if `sender` is unset.
17509        pub fn sender(&self) -> &super::SenderFilter {
17510            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17511                .predicate
17512            {
17513                field as _
17514            } else {
17515                super::SenderFilter::default_instance() as _
17516            }
17517        }
17518        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
17519        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17520            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17521                .predicate
17522            {
17523                Some(field as _)
17524            } else {
17525                None
17526            }
17527        }
17528        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17529        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17530            if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17531                .predicate
17532            {
17533                Some(field as _)
17534            } else {
17535                None
17536            }
17537        }
17538        ///Returns a mutable reference to `sender`.
17539        ///If the field is unset, it is first initialized with the default value.
17540        ///If any other oneof field in the same oneof is set, it will be cleared.
17541        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17542            if self.sender_opt_mut().is_none() {
17543                self.predicate = Some(
17544                    super::transaction_literal::Predicate::Sender(
17545                        super::SenderFilter::default(),
17546                    ),
17547                );
17548            }
17549            self.sender_opt_mut().unwrap()
17550        }
17551        ///Sets `sender` with the provided value.
17552        ///If any other oneof field in the same oneof is set, it will be cleared.
17553        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17554            self.predicate = Some(
17555                super::transaction_literal::Predicate::Sender(field.into().into()),
17556            );
17557        }
17558        ///Sets `sender` with the provided value.
17559        ///If any other oneof field in the same oneof is set, it will be cleared.
17560        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17561            self.set_sender(field.into());
17562            self
17563        }
17564        ///Returns the value of `affected_address`, or the default value if `affected_address` is unset.
17565        pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17566            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17567                .predicate
17568            {
17569                field as _
17570            } else {
17571                super::AffectedAddressFilter::default_instance() as _
17572            }
17573        }
17574        ///If `affected_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17575        pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17576            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17577                .predicate
17578            {
17579                Some(field as _)
17580            } else {
17581                None
17582            }
17583        }
17584        ///If `affected_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17585        pub fn affected_address_opt_mut(
17586            &mut self,
17587        ) -> Option<&mut super::AffectedAddressFilter> {
17588            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17589                .predicate
17590            {
17591                Some(field as _)
17592            } else {
17593                None
17594            }
17595        }
17596        ///Returns a mutable reference to `affected_address`.
17597        ///If the field is unset, it is first initialized with the default value.
17598        ///If any other oneof field in the same oneof is set, it will be cleared.
17599        pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17600            if self.affected_address_opt_mut().is_none() {
17601                self.predicate = Some(
17602                    super::transaction_literal::Predicate::AffectedAddress(
17603                        super::AffectedAddressFilter::default(),
17604                    ),
17605                );
17606            }
17607            self.affected_address_opt_mut().unwrap()
17608        }
17609        ///Sets `affected_address` with the provided value.
17610        ///If any other oneof field in the same oneof is set, it will be cleared.
17611        pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17612            &mut self,
17613            field: T,
17614        ) {
17615            self.predicate = Some(
17616                super::transaction_literal::Predicate::AffectedAddress(
17617                    field.into().into(),
17618                ),
17619            );
17620        }
17621        ///Sets `affected_address` with the provided value.
17622        ///If any other oneof field in the same oneof is set, it will be cleared.
17623        pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17624            mut self,
17625            field: T,
17626        ) -> Self {
17627            self.set_affected_address(field.into());
17628            self
17629        }
17630        ///Returns the value of `affected_object`, or the default value if `affected_object` is unset.
17631        pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17632            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17633                .predicate
17634            {
17635                field as _
17636            } else {
17637                super::AffectedObjectFilter::default_instance() as _
17638            }
17639        }
17640        ///If `affected_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
17641        pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17642            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17643                .predicate
17644            {
17645                Some(field as _)
17646            } else {
17647                None
17648            }
17649        }
17650        ///If `affected_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17651        pub fn affected_object_opt_mut(
17652            &mut self,
17653        ) -> Option<&mut super::AffectedObjectFilter> {
17654            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17655                .predicate
17656            {
17657                Some(field as _)
17658            } else {
17659                None
17660            }
17661        }
17662        ///Returns a mutable reference to `affected_object`.
17663        ///If the field is unset, it is first initialized with the default value.
17664        ///If any other oneof field in the same oneof is set, it will be cleared.
17665        pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17666            if self.affected_object_opt_mut().is_none() {
17667                self.predicate = Some(
17668                    super::transaction_literal::Predicate::AffectedObject(
17669                        super::AffectedObjectFilter::default(),
17670                    ),
17671                );
17672            }
17673            self.affected_object_opt_mut().unwrap()
17674        }
17675        ///Sets `affected_object` with the provided value.
17676        ///If any other oneof field in the same oneof is set, it will be cleared.
17677        pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17678            &mut self,
17679            field: T,
17680        ) {
17681            self.predicate = Some(
17682                super::transaction_literal::Predicate::AffectedObject(
17683                    field.into().into(),
17684                ),
17685            );
17686        }
17687        ///Sets `affected_object` with the provided value.
17688        ///If any other oneof field in the same oneof is set, it will be cleared.
17689        pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17690            mut self,
17691            field: T,
17692        ) -> Self {
17693            self.set_affected_object(field.into());
17694            self
17695        }
17696        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
17697        pub fn move_call(&self) -> &super::MoveCallFilter {
17698            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17699                .predicate
17700            {
17701                field as _
17702            } else {
17703                super::MoveCallFilter::default_instance() as _
17704            }
17705        }
17706        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
17707        pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17708            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17709                .predicate
17710            {
17711                Some(field as _)
17712            } else {
17713                None
17714            }
17715        }
17716        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17717        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17718            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17719                .predicate
17720            {
17721                Some(field as _)
17722            } else {
17723                None
17724            }
17725        }
17726        ///Returns a mutable reference to `move_call`.
17727        ///If the field is unset, it is first initialized with the default value.
17728        ///If any other oneof field in the same oneof is set, it will be cleared.
17729        pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17730            if self.move_call_opt_mut().is_none() {
17731                self.predicate = Some(
17732                    super::transaction_literal::Predicate::MoveCall(
17733                        super::MoveCallFilter::default(),
17734                    ),
17735                );
17736            }
17737            self.move_call_opt_mut().unwrap()
17738        }
17739        ///Sets `move_call` with the provided value.
17740        ///If any other oneof field in the same oneof is set, it will be cleared.
17741        pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17742            self.predicate = Some(
17743                super::transaction_literal::Predicate::MoveCall(field.into().into()),
17744            );
17745        }
17746        ///Sets `move_call` with the provided value.
17747        ///If any other oneof field in the same oneof is set, it will be cleared.
17748        pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17749            mut self,
17750            field: T,
17751        ) -> Self {
17752            self.set_move_call(field.into());
17753            self
17754        }
17755        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
17756        pub fn emit_module(&self) -> &super::EmitModuleFilter {
17757            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17758                .predicate
17759            {
17760                field as _
17761            } else {
17762                super::EmitModuleFilter::default_instance() as _
17763            }
17764        }
17765        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
17766        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17767            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17768                .predicate
17769            {
17770                Some(field as _)
17771            } else {
17772                None
17773            }
17774        }
17775        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17776        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17777            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17778                .predicate
17779            {
17780                Some(field as _)
17781            } else {
17782                None
17783            }
17784        }
17785        ///Returns a mutable reference to `emit_module`.
17786        ///If the field is unset, it is first initialized with the default value.
17787        ///If any other oneof field in the same oneof is set, it will be cleared.
17788        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17789            if self.emit_module_opt_mut().is_none() {
17790                self.predicate = Some(
17791                    super::transaction_literal::Predicate::EmitModule(
17792                        super::EmitModuleFilter::default(),
17793                    ),
17794                );
17795            }
17796            self.emit_module_opt_mut().unwrap()
17797        }
17798        ///Sets `emit_module` with the provided value.
17799        ///If any other oneof field in the same oneof is set, it will be cleared.
17800        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17801            self.predicate = Some(
17802                super::transaction_literal::Predicate::EmitModule(field.into().into()),
17803            );
17804        }
17805        ///Sets `emit_module` with the provided value.
17806        ///If any other oneof field in the same oneof is set, it will be cleared.
17807        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17808            mut self,
17809            field: T,
17810        ) -> Self {
17811            self.set_emit_module(field.into());
17812            self
17813        }
17814        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
17815        pub fn event_type(&self) -> &super::EventTypeFilter {
17816            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17817                .predicate
17818            {
17819                field as _
17820            } else {
17821                super::EventTypeFilter::default_instance() as _
17822            }
17823        }
17824        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
17825        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17826            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17827                .predicate
17828            {
17829                Some(field as _)
17830            } else {
17831                None
17832            }
17833        }
17834        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17835        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17836            if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17837                .predicate
17838            {
17839                Some(field as _)
17840            } else {
17841                None
17842            }
17843        }
17844        ///Returns a mutable reference to `event_type`.
17845        ///If the field is unset, it is first initialized with the default value.
17846        ///If any other oneof field in the same oneof is set, it will be cleared.
17847        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17848            if self.event_type_opt_mut().is_none() {
17849                self.predicate = Some(
17850                    super::transaction_literal::Predicate::EventType(
17851                        super::EventTypeFilter::default(),
17852                    ),
17853                );
17854            }
17855            self.event_type_opt_mut().unwrap()
17856        }
17857        ///Sets `event_type` with the provided value.
17858        ///If any other oneof field in the same oneof is set, it will be cleared.
17859        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17860            self.predicate = Some(
17861                super::transaction_literal::Predicate::EventType(field.into().into()),
17862            );
17863        }
17864        ///Sets `event_type` with the provided value.
17865        ///If any other oneof field in the same oneof is set, it will be cleared.
17866        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17867            mut self,
17868            field: T,
17869        ) -> Self {
17870            self.set_event_type(field.into());
17871            self
17872        }
17873        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
17874        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17875            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17876                .predicate
17877            {
17878                field as _
17879            } else {
17880                super::EventStreamHeadFilter::default_instance() as _
17881            }
17882        }
17883        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
17884        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17885            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17886                .predicate
17887            {
17888                Some(field as _)
17889            } else {
17890                None
17891            }
17892        }
17893        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17894        pub fn event_stream_head_opt_mut(
17895            &mut self,
17896        ) -> Option<&mut super::EventStreamHeadFilter> {
17897            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
17898                .predicate
17899            {
17900                Some(field as _)
17901            } else {
17902                None
17903            }
17904        }
17905        ///Returns a mutable reference to `event_stream_head`.
17906        ///If the field is unset, it is first initialized with the default value.
17907        ///If any other oneof field in the same oneof is set, it will be cleared.
17908        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
17909            if self.event_stream_head_opt_mut().is_none() {
17910                self.predicate = Some(
17911                    super::transaction_literal::Predicate::EventStreamHead(
17912                        super::EventStreamHeadFilter::default(),
17913                    ),
17914                );
17915            }
17916            self.event_stream_head_opt_mut().unwrap()
17917        }
17918        ///Sets `event_stream_head` with the provided value.
17919        ///If any other oneof field in the same oneof is set, it will be cleared.
17920        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17921            &mut self,
17922            field: T,
17923        ) {
17924            self.predicate = Some(
17925                super::transaction_literal::Predicate::EventStreamHead(
17926                    field.into().into(),
17927                ),
17928            );
17929        }
17930        ///Sets `event_stream_head` with the provided value.
17931        ///If any other oneof field in the same oneof is set, it will be cleared.
17932        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17933            mut self,
17934            field: T,
17935        ) -> Self {
17936            self.set_event_stream_head(field.into());
17937            self
17938        }
17939        ///Returns the value of `package_write`, or the default value if `package_write` is unset.
17940        pub fn package_write(&self) -> &super::PackageWriteFilter {
17941            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17942                .predicate
17943            {
17944                field as _
17945            } else {
17946                super::PackageWriteFilter::default_instance() as _
17947            }
17948        }
17949        ///If `package_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
17950        pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
17951            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17952                .predicate
17953            {
17954                Some(field as _)
17955            } else {
17956                None
17957            }
17958        }
17959        ///If `package_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17960        pub fn package_write_opt_mut(
17961            &mut self,
17962        ) -> Option<&mut super::PackageWriteFilter> {
17963            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
17964                .predicate
17965            {
17966                Some(field as _)
17967            } else {
17968                None
17969            }
17970        }
17971        ///Returns a mutable reference to `package_write`.
17972        ///If the field is unset, it is first initialized with the default value.
17973        ///If any other oneof field in the same oneof is set, it will be cleared.
17974        pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
17975            if self.package_write_opt_mut().is_none() {
17976                self.predicate = Some(
17977                    super::transaction_literal::Predicate::PackageWrite(
17978                        super::PackageWriteFilter::default(),
17979                    ),
17980                );
17981            }
17982            self.package_write_opt_mut().unwrap()
17983        }
17984        ///Sets `package_write` with the provided value.
17985        ///If any other oneof field in the same oneof is set, it will be cleared.
17986        pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
17987            &mut self,
17988            field: T,
17989        ) {
17990            self.predicate = Some(
17991                super::transaction_literal::Predicate::PackageWrite(field.into().into()),
17992            );
17993        }
17994        ///Sets `package_write` with the provided value.
17995        ///If any other oneof field in the same oneof is set, it will be cleared.
17996        pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
17997            mut self,
17998            field: T,
17999        ) -> Self {
18000            self.set_package_write(field.into());
18001            self
18002        }
18003    }
18004    impl super::TransactionTerm {
18005        pub const fn const_default() -> Self {
18006            Self { literals: Vec::new() }
18007        }
18008        #[doc(hidden)]
18009        pub fn default_instance() -> &'static Self {
18010            static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
18011            &DEFAULT
18012        }
18013        ///Returns the value of `literals`, or the default value if `literals` is unset.
18014        pub fn literals(&self) -> &[super::TransactionLiteral] {
18015            &self.literals
18016        }
18017        ///Returns a mutable reference to `literals`.
18018        ///If the field is unset, it is first initialized with the default value.
18019        pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
18020            &mut self.literals
18021        }
18022        ///Sets `literals` with the provided value.
18023        pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
18024            self.literals = field;
18025        }
18026        ///Sets `literals` with the provided value.
18027        pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
18028            self.set_literals(field);
18029            self
18030        }
18031    }
18032    impl super::TransferObjects {
18033        pub const fn const_default() -> Self {
18034            Self {
18035                objects: Vec::new(),
18036                address: None,
18037            }
18038        }
18039        #[doc(hidden)]
18040        pub fn default_instance() -> &'static Self {
18041            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
18042            &DEFAULT
18043        }
18044        ///Returns the value of `objects`, or the default value if `objects` is unset.
18045        pub fn objects(&self) -> &[super::Argument] {
18046            &self.objects
18047        }
18048        ///Returns a mutable reference to `objects`.
18049        ///If the field is unset, it is first initialized with the default value.
18050        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
18051            &mut self.objects
18052        }
18053        ///Sets `objects` with the provided value.
18054        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
18055            self.objects = field;
18056        }
18057        ///Sets `objects` with the provided value.
18058        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
18059            self.set_objects(field);
18060            self
18061        }
18062        ///Returns the value of `address`, or the default value if `address` is unset.
18063        pub fn address(&self) -> &super::Argument {
18064            self.address
18065                .as_ref()
18066                .map(|field| field as _)
18067                .unwrap_or_else(|| super::Argument::default_instance() as _)
18068        }
18069        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18070        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
18071            self.address.as_mut().map(|field| field as _)
18072        }
18073        ///Returns a mutable reference to `address`.
18074        ///If the field is unset, it is first initialized with the default value.
18075        pub fn address_mut(&mut self) -> &mut super::Argument {
18076            self.address.get_or_insert_default()
18077        }
18078        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18079        pub fn address_opt(&self) -> Option<&super::Argument> {
18080            self.address.as_ref().map(|field| field as _)
18081        }
18082        ///Sets `address` with the provided value.
18083        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
18084            self.address = Some(field.into().into());
18085        }
18086        ///Sets `address` with the provided value.
18087        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
18088            self.set_address(field.into());
18089            self
18090        }
18091    }
18092    impl super::TypeArgumentError {
18093        pub const fn const_default() -> Self {
18094            Self {
18095                type_argument: None,
18096                kind: None,
18097            }
18098        }
18099        #[doc(hidden)]
18100        pub fn default_instance() -> &'static Self {
18101            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
18102            &DEFAULT
18103        }
18104        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18105        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
18106            self.type_argument.as_mut().map(|field| field as _)
18107        }
18108        ///Returns a mutable reference to `type_argument`.
18109        ///If the field is unset, it is first initialized with the default value.
18110        pub fn type_argument_mut(&mut self) -> &mut u32 {
18111            self.type_argument.get_or_insert_default()
18112        }
18113        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
18114        pub fn type_argument_opt(&self) -> Option<u32> {
18115            self.type_argument.as_ref().map(|field| *field)
18116        }
18117        ///Sets `type_argument` with the provided value.
18118        pub fn set_type_argument(&mut self, field: u32) {
18119            self.type_argument = Some(field);
18120        }
18121        ///Sets `type_argument` with the provided value.
18122        pub fn with_type_argument(mut self, field: u32) -> Self {
18123            self.set_type_argument(field);
18124            self
18125        }
18126        ///Sets `kind` with the provided value.
18127        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
18128            mut self,
18129            field: T,
18130        ) -> Self {
18131            self.set_kind(field.into());
18132            self
18133        }
18134    }
18135    impl super::TypeOrigin {
18136        pub const fn const_default() -> Self {
18137            Self {
18138                module_name: None,
18139                datatype_name: None,
18140                package_id: None,
18141            }
18142        }
18143        #[doc(hidden)]
18144        pub fn default_instance() -> &'static Self {
18145            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18146            &DEFAULT
18147        }
18148        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18149        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18150            self.module_name.as_mut().map(|field| field as _)
18151        }
18152        ///Returns a mutable reference to `module_name`.
18153        ///If the field is unset, it is first initialized with the default value.
18154        pub fn module_name_mut(&mut self) -> &mut String {
18155            self.module_name.get_or_insert_default()
18156        }
18157        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18158        pub fn module_name_opt(&self) -> Option<&str> {
18159            self.module_name.as_ref().map(|field| field as _)
18160        }
18161        ///Sets `module_name` with the provided value.
18162        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18163            self.module_name = Some(field.into().into());
18164        }
18165        ///Sets `module_name` with the provided value.
18166        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18167            self.set_module_name(field.into());
18168            self
18169        }
18170        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18171        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18172            self.datatype_name.as_mut().map(|field| field as _)
18173        }
18174        ///Returns a mutable reference to `datatype_name`.
18175        ///If the field is unset, it is first initialized with the default value.
18176        pub fn datatype_name_mut(&mut self) -> &mut String {
18177            self.datatype_name.get_or_insert_default()
18178        }
18179        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18180        pub fn datatype_name_opt(&self) -> Option<&str> {
18181            self.datatype_name.as_ref().map(|field| field as _)
18182        }
18183        ///Sets `datatype_name` with the provided value.
18184        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18185            self.datatype_name = Some(field.into().into());
18186        }
18187        ///Sets `datatype_name` with the provided value.
18188        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18189            self.set_datatype_name(field.into());
18190            self
18191        }
18192        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18193        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18194            self.package_id.as_mut().map(|field| field as _)
18195        }
18196        ///Returns a mutable reference to `package_id`.
18197        ///If the field is unset, it is first initialized with the default value.
18198        pub fn package_id_mut(&mut self) -> &mut String {
18199            self.package_id.get_or_insert_default()
18200        }
18201        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18202        pub fn package_id_opt(&self) -> Option<&str> {
18203            self.package_id.as_ref().map(|field| field as _)
18204        }
18205        ///Sets `package_id` with the provided value.
18206        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18207            self.package_id = Some(field.into().into());
18208        }
18209        ///Sets `package_id` with the provided value.
18210        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18211            self.set_package_id(field.into());
18212            self
18213        }
18214    }
18215    impl super::TypeParameter {
18216        pub const fn const_default() -> Self {
18217            Self {
18218                constraints: Vec::new(),
18219                is_phantom: None,
18220            }
18221        }
18222        #[doc(hidden)]
18223        pub fn default_instance() -> &'static Self {
18224            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18225            &DEFAULT
18226        }
18227        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18228        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18229            self.is_phantom.as_mut().map(|field| field as _)
18230        }
18231        ///Returns a mutable reference to `is_phantom`.
18232        ///If the field is unset, it is first initialized with the default value.
18233        pub fn is_phantom_mut(&mut self) -> &mut bool {
18234            self.is_phantom.get_or_insert_default()
18235        }
18236        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
18237        pub fn is_phantom_opt(&self) -> Option<bool> {
18238            self.is_phantom.as_ref().map(|field| *field)
18239        }
18240        ///Sets `is_phantom` with the provided value.
18241        pub fn set_is_phantom(&mut self, field: bool) {
18242            self.is_phantom = Some(field);
18243        }
18244        ///Sets `is_phantom` with the provided value.
18245        pub fn with_is_phantom(mut self, field: bool) -> Self {
18246            self.set_is_phantom(field);
18247            self
18248        }
18249    }
18250    impl super::UnchangedConsensusObject {
18251        pub const fn const_default() -> Self {
18252            Self {
18253                kind: None,
18254                object_id: None,
18255                version: None,
18256                digest: None,
18257                object_type: None,
18258            }
18259        }
18260        #[doc(hidden)]
18261        pub fn default_instance() -> &'static Self {
18262            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18263            &DEFAULT
18264        }
18265        ///Sets `kind` with the provided value.
18266        pub fn with_kind<
18267            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18268        >(mut self, field: T) -> Self {
18269            self.set_kind(field.into());
18270            self
18271        }
18272        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18273        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18274            self.object_id.as_mut().map(|field| field as _)
18275        }
18276        ///Returns a mutable reference to `object_id`.
18277        ///If the field is unset, it is first initialized with the default value.
18278        pub fn object_id_mut(&mut self) -> &mut String {
18279            self.object_id.get_or_insert_default()
18280        }
18281        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18282        pub fn object_id_opt(&self) -> Option<&str> {
18283            self.object_id.as_ref().map(|field| field as _)
18284        }
18285        ///Sets `object_id` with the provided value.
18286        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18287            self.object_id = Some(field.into().into());
18288        }
18289        ///Sets `object_id` with the provided value.
18290        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18291            self.set_object_id(field.into());
18292            self
18293        }
18294        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18295        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18296            self.version.as_mut().map(|field| field as _)
18297        }
18298        ///Returns a mutable reference to `version`.
18299        ///If the field is unset, it is first initialized with the default value.
18300        pub fn version_mut(&mut self) -> &mut u64 {
18301            self.version.get_or_insert_default()
18302        }
18303        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
18304        pub fn version_opt(&self) -> Option<u64> {
18305            self.version.as_ref().map(|field| *field)
18306        }
18307        ///Sets `version` with the provided value.
18308        pub fn set_version(&mut self, field: u64) {
18309            self.version = Some(field);
18310        }
18311        ///Sets `version` with the provided value.
18312        pub fn with_version(mut self, field: u64) -> Self {
18313            self.set_version(field);
18314            self
18315        }
18316        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18317        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18318            self.digest.as_mut().map(|field| field as _)
18319        }
18320        ///Returns a mutable reference to `digest`.
18321        ///If the field is unset, it is first initialized with the default value.
18322        pub fn digest_mut(&mut self) -> &mut String {
18323            self.digest.get_or_insert_default()
18324        }
18325        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18326        pub fn digest_opt(&self) -> Option<&str> {
18327            self.digest.as_ref().map(|field| field as _)
18328        }
18329        ///Sets `digest` with the provided value.
18330        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18331            self.digest = Some(field.into().into());
18332        }
18333        ///Sets `digest` with the provided value.
18334        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18335            self.set_digest(field.into());
18336            self
18337        }
18338        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18339        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18340            self.object_type.as_mut().map(|field| field as _)
18341        }
18342        ///Returns a mutable reference to `object_type`.
18343        ///If the field is unset, it is first initialized with the default value.
18344        pub fn object_type_mut(&mut self) -> &mut String {
18345            self.object_type.get_or_insert_default()
18346        }
18347        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
18348        pub fn object_type_opt(&self) -> Option<&str> {
18349            self.object_type.as_ref().map(|field| field as _)
18350        }
18351        ///Sets `object_type` with the provided value.
18352        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18353            self.object_type = Some(field.into().into());
18354        }
18355        ///Sets `object_type` with the provided value.
18356        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18357            self.set_object_type(field.into());
18358            self
18359        }
18360    }
18361    impl super::Upgrade {
18362        pub const fn const_default() -> Self {
18363            Self {
18364                modules: Vec::new(),
18365                dependencies: Vec::new(),
18366                package: None,
18367                ticket: None,
18368            }
18369        }
18370        #[doc(hidden)]
18371        pub fn default_instance() -> &'static Self {
18372            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18373            &DEFAULT
18374        }
18375        ///Returns the value of `modules`, or the default value if `modules` is unset.
18376        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18377            &self.modules
18378        }
18379        ///Returns a mutable reference to `modules`.
18380        ///If the field is unset, it is first initialized with the default value.
18381        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18382            &mut self.modules
18383        }
18384        ///Sets `modules` with the provided value.
18385        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18386            self.modules = field;
18387        }
18388        ///Sets `modules` with the provided value.
18389        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18390            self.set_modules(field);
18391            self
18392        }
18393        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
18394        pub fn dependencies(&self) -> &[String] {
18395            &self.dependencies
18396        }
18397        ///Returns a mutable reference to `dependencies`.
18398        ///If the field is unset, it is first initialized with the default value.
18399        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18400            &mut self.dependencies
18401        }
18402        ///Sets `dependencies` with the provided value.
18403        pub fn set_dependencies(&mut self, field: Vec<String>) {
18404            self.dependencies = field;
18405        }
18406        ///Sets `dependencies` with the provided value.
18407        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18408            self.set_dependencies(field);
18409            self
18410        }
18411        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18412        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18413            self.package.as_mut().map(|field| field as _)
18414        }
18415        ///Returns a mutable reference to `package`.
18416        ///If the field is unset, it is first initialized with the default value.
18417        pub fn package_mut(&mut self) -> &mut String {
18418            self.package.get_or_insert_default()
18419        }
18420        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
18421        pub fn package_opt(&self) -> Option<&str> {
18422            self.package.as_ref().map(|field| field as _)
18423        }
18424        ///Sets `package` with the provided value.
18425        pub fn set_package<T: Into<String>>(&mut self, field: T) {
18426            self.package = Some(field.into().into());
18427        }
18428        ///Sets `package` with the provided value.
18429        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18430            self.set_package(field.into());
18431            self
18432        }
18433        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
18434        pub fn ticket(&self) -> &super::Argument {
18435            self.ticket
18436                .as_ref()
18437                .map(|field| field as _)
18438                .unwrap_or_else(|| super::Argument::default_instance() as _)
18439        }
18440        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18441        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18442            self.ticket.as_mut().map(|field| field as _)
18443        }
18444        ///Returns a mutable reference to `ticket`.
18445        ///If the field is unset, it is first initialized with the default value.
18446        pub fn ticket_mut(&mut self) -> &mut super::Argument {
18447            self.ticket.get_or_insert_default()
18448        }
18449        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
18450        pub fn ticket_opt(&self) -> Option<&super::Argument> {
18451            self.ticket.as_ref().map(|field| field as _)
18452        }
18453        ///Sets `ticket` with the provided value.
18454        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18455            self.ticket = Some(field.into().into());
18456        }
18457        ///Sets `ticket` with the provided value.
18458        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18459            self.set_ticket(field.into());
18460            self
18461        }
18462    }
18463    impl super::UserSignature {
18464        pub const fn const_default() -> Self {
18465            Self {
18466                bcs: None,
18467                scheme: None,
18468                signature: None,
18469            }
18470        }
18471        #[doc(hidden)]
18472        pub fn default_instance() -> &'static Self {
18473            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18474            &DEFAULT
18475        }
18476        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
18477        pub fn bcs(&self) -> &super::Bcs {
18478            self.bcs
18479                .as_ref()
18480                .map(|field| field as _)
18481                .unwrap_or_else(|| super::Bcs::default_instance() as _)
18482        }
18483        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18484        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18485            self.bcs.as_mut().map(|field| field as _)
18486        }
18487        ///Returns a mutable reference to `bcs`.
18488        ///If the field is unset, it is first initialized with the default value.
18489        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18490            self.bcs.get_or_insert_default()
18491        }
18492        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
18493        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18494            self.bcs.as_ref().map(|field| field as _)
18495        }
18496        ///Sets `bcs` with the provided value.
18497        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18498            self.bcs = Some(field.into().into());
18499        }
18500        ///Sets `bcs` with the provided value.
18501        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18502            self.set_bcs(field.into());
18503            self
18504        }
18505        ///Sets `scheme` with the provided value.
18506        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18507            self.set_scheme(field.into());
18508            self
18509        }
18510        ///Returns the value of `simple`, or the default value if `simple` is unset.
18511        pub fn simple(&self) -> &super::SimpleSignature {
18512            if let Some(super::user_signature::Signature::Simple(field)) = &self
18513                .signature
18514            {
18515                field as _
18516            } else {
18517                super::SimpleSignature::default_instance() as _
18518            }
18519        }
18520        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
18521        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18522            if let Some(super::user_signature::Signature::Simple(field)) = &self
18523                .signature
18524            {
18525                Some(field as _)
18526            } else {
18527                None
18528            }
18529        }
18530        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18531        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18532            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18533                .signature
18534            {
18535                Some(field as _)
18536            } else {
18537                None
18538            }
18539        }
18540        ///Returns a mutable reference to `simple`.
18541        ///If the field is unset, it is first initialized with the default value.
18542        ///If any other oneof field in the same oneof is set, it will be cleared.
18543        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18544            if self.simple_opt_mut().is_none() {
18545                self.signature = Some(
18546                    super::user_signature::Signature::Simple(
18547                        super::SimpleSignature::default(),
18548                    ),
18549                );
18550            }
18551            self.simple_opt_mut().unwrap()
18552        }
18553        ///Sets `simple` with the provided value.
18554        ///If any other oneof field in the same oneof is set, it will be cleared.
18555        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18556            self.signature = Some(
18557                super::user_signature::Signature::Simple(field.into().into()),
18558            );
18559        }
18560        ///Sets `simple` with the provided value.
18561        ///If any other oneof field in the same oneof is set, it will be cleared.
18562        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18563            self.set_simple(field.into());
18564            self
18565        }
18566        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
18567        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18568            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18569                .signature
18570            {
18571                field as _
18572            } else {
18573                super::MultisigAggregatedSignature::default_instance() as _
18574            }
18575        }
18576        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
18577        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18578            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18579                .signature
18580            {
18581                Some(field as _)
18582            } else {
18583                None
18584            }
18585        }
18586        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18587        pub fn multisig_opt_mut(
18588            &mut self,
18589        ) -> Option<&mut super::MultisigAggregatedSignature> {
18590            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18591                .signature
18592            {
18593                Some(field as _)
18594            } else {
18595                None
18596            }
18597        }
18598        ///Returns a mutable reference to `multisig`.
18599        ///If the field is unset, it is first initialized with the default value.
18600        ///If any other oneof field in the same oneof is set, it will be cleared.
18601        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18602            if self.multisig_opt_mut().is_none() {
18603                self.signature = Some(
18604                    super::user_signature::Signature::Multisig(
18605                        super::MultisigAggregatedSignature::default(),
18606                    ),
18607                );
18608            }
18609            self.multisig_opt_mut().unwrap()
18610        }
18611        ///Sets `multisig` with the provided value.
18612        ///If any other oneof field in the same oneof is set, it will be cleared.
18613        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18614            &mut self,
18615            field: T,
18616        ) {
18617            self.signature = Some(
18618                super::user_signature::Signature::Multisig(field.into().into()),
18619            );
18620        }
18621        ///Sets `multisig` with the provided value.
18622        ///If any other oneof field in the same oneof is set, it will be cleared.
18623        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18624            mut self,
18625            field: T,
18626        ) -> Self {
18627            self.set_multisig(field.into());
18628            self
18629        }
18630        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
18631        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18632            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18633                .signature
18634            {
18635                field as _
18636            } else {
18637                super::ZkLoginAuthenticator::default_instance() as _
18638            }
18639        }
18640        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
18641        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18642            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18643                .signature
18644            {
18645                Some(field as _)
18646            } else {
18647                None
18648            }
18649        }
18650        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18651        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18652            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18653                .signature
18654            {
18655                Some(field as _)
18656            } else {
18657                None
18658            }
18659        }
18660        ///Returns a mutable reference to `zklogin`.
18661        ///If the field is unset, it is first initialized with the default value.
18662        ///If any other oneof field in the same oneof is set, it will be cleared.
18663        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18664            if self.zklogin_opt_mut().is_none() {
18665                self.signature = Some(
18666                    super::user_signature::Signature::Zklogin(
18667                        super::ZkLoginAuthenticator::default(),
18668                    ),
18669                );
18670            }
18671            self.zklogin_opt_mut().unwrap()
18672        }
18673        ///Sets `zklogin` with the provided value.
18674        ///If any other oneof field in the same oneof is set, it will be cleared.
18675        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18676            self.signature = Some(
18677                super::user_signature::Signature::Zklogin(field.into().into()),
18678            );
18679        }
18680        ///Sets `zklogin` with the provided value.
18681        ///If any other oneof field in the same oneof is set, it will be cleared.
18682        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18683            mut self,
18684            field: T,
18685        ) -> Self {
18686            self.set_zklogin(field.into());
18687            self
18688        }
18689        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
18690        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18691            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18692                .signature
18693            {
18694                field as _
18695            } else {
18696                super::PasskeyAuthenticator::default_instance() as _
18697            }
18698        }
18699        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
18700        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18701            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18702                .signature
18703            {
18704                Some(field as _)
18705            } else {
18706                None
18707            }
18708        }
18709        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18710        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18711            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18712                .signature
18713            {
18714                Some(field as _)
18715            } else {
18716                None
18717            }
18718        }
18719        ///Returns a mutable reference to `passkey`.
18720        ///If the field is unset, it is first initialized with the default value.
18721        ///If any other oneof field in the same oneof is set, it will be cleared.
18722        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18723            if self.passkey_opt_mut().is_none() {
18724                self.signature = Some(
18725                    super::user_signature::Signature::Passkey(
18726                        super::PasskeyAuthenticator::default(),
18727                    ),
18728                );
18729            }
18730            self.passkey_opt_mut().unwrap()
18731        }
18732        ///Sets `passkey` with the provided value.
18733        ///If any other oneof field in the same oneof is set, it will be cleared.
18734        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18735            self.signature = Some(
18736                super::user_signature::Signature::Passkey(field.into().into()),
18737            );
18738        }
18739        ///Sets `passkey` with the provided value.
18740        ///If any other oneof field in the same oneof is set, it will be cleared.
18741        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18742            mut self,
18743            field: T,
18744        ) -> Self {
18745            self.set_passkey(field.into());
18746            self
18747        }
18748    }
18749    impl super::Validator {
18750        pub const fn const_default() -> Self {
18751            Self {
18752                name: None,
18753                address: None,
18754                description: None,
18755                image_url: None,
18756                project_url: None,
18757                protocol_public_key: None,
18758                proof_of_possession: None,
18759                network_public_key: None,
18760                worker_public_key: None,
18761                network_address: None,
18762                p2p_address: None,
18763                primary_address: None,
18764                worker_address: None,
18765                next_epoch_protocol_public_key: None,
18766                next_epoch_proof_of_possession: None,
18767                next_epoch_network_public_key: None,
18768                next_epoch_worker_public_key: None,
18769                next_epoch_network_address: None,
18770                next_epoch_p2p_address: None,
18771                next_epoch_primary_address: None,
18772                next_epoch_worker_address: None,
18773                metadata_extra_fields: None,
18774                voting_power: None,
18775                operation_cap_id: None,
18776                gas_price: None,
18777                staking_pool: None,
18778                commission_rate: None,
18779                next_epoch_stake: None,
18780                next_epoch_gas_price: None,
18781                next_epoch_commission_rate: None,
18782                extra_fields: None,
18783            }
18784        }
18785        #[doc(hidden)]
18786        pub fn default_instance() -> &'static Self {
18787            static DEFAULT: super::Validator = super::Validator::const_default();
18788            &DEFAULT
18789        }
18790        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18791        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18792            self.name.as_mut().map(|field| field as _)
18793        }
18794        ///Returns a mutable reference to `name`.
18795        ///If the field is unset, it is first initialized with the default value.
18796        pub fn name_mut(&mut self) -> &mut String {
18797            self.name.get_or_insert_default()
18798        }
18799        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18800        pub fn name_opt(&self) -> Option<&str> {
18801            self.name.as_ref().map(|field| field as _)
18802        }
18803        ///Sets `name` with the provided value.
18804        pub fn set_name<T: Into<String>>(&mut self, field: T) {
18805            self.name = Some(field.into().into());
18806        }
18807        ///Sets `name` with the provided value.
18808        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18809            self.set_name(field.into());
18810            self
18811        }
18812        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18813        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18814            self.address.as_mut().map(|field| field as _)
18815        }
18816        ///Returns a mutable reference to `address`.
18817        ///If the field is unset, it is first initialized with the default value.
18818        pub fn address_mut(&mut self) -> &mut String {
18819            self.address.get_or_insert_default()
18820        }
18821        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18822        pub fn address_opt(&self) -> Option<&str> {
18823            self.address.as_ref().map(|field| field as _)
18824        }
18825        ///Sets `address` with the provided value.
18826        pub fn set_address<T: Into<String>>(&mut self, field: T) {
18827            self.address = Some(field.into().into());
18828        }
18829        ///Sets `address` with the provided value.
18830        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18831            self.set_address(field.into());
18832            self
18833        }
18834        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18835        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18836            self.description.as_mut().map(|field| field as _)
18837        }
18838        ///Returns a mutable reference to `description`.
18839        ///If the field is unset, it is first initialized with the default value.
18840        pub fn description_mut(&mut self) -> &mut String {
18841            self.description.get_or_insert_default()
18842        }
18843        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
18844        pub fn description_opt(&self) -> Option<&str> {
18845            self.description.as_ref().map(|field| field as _)
18846        }
18847        ///Sets `description` with the provided value.
18848        pub fn set_description<T: Into<String>>(&mut self, field: T) {
18849            self.description = Some(field.into().into());
18850        }
18851        ///Sets `description` with the provided value.
18852        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18853            self.set_description(field.into());
18854            self
18855        }
18856        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18857        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18858            self.image_url.as_mut().map(|field| field as _)
18859        }
18860        ///Returns a mutable reference to `image_url`.
18861        ///If the field is unset, it is first initialized with the default value.
18862        pub fn image_url_mut(&mut self) -> &mut String {
18863            self.image_url.get_or_insert_default()
18864        }
18865        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18866        pub fn image_url_opt(&self) -> Option<&str> {
18867            self.image_url.as_ref().map(|field| field as _)
18868        }
18869        ///Sets `image_url` with the provided value.
18870        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18871            self.image_url = Some(field.into().into());
18872        }
18873        ///Sets `image_url` with the provided value.
18874        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18875            self.set_image_url(field.into());
18876            self
18877        }
18878        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18879        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18880            self.project_url.as_mut().map(|field| field as _)
18881        }
18882        ///Returns a mutable reference to `project_url`.
18883        ///If the field is unset, it is first initialized with the default value.
18884        pub fn project_url_mut(&mut self) -> &mut String {
18885            self.project_url.get_or_insert_default()
18886        }
18887        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18888        pub fn project_url_opt(&self) -> Option<&str> {
18889            self.project_url.as_ref().map(|field| field as _)
18890        }
18891        ///Sets `project_url` with the provided value.
18892        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
18893            self.project_url = Some(field.into().into());
18894        }
18895        ///Sets `project_url` with the provided value.
18896        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
18897            self.set_project_url(field.into());
18898            self
18899        }
18900        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18901        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
18902            self.protocol_public_key.as_ref().map(|field| field as _)
18903        }
18904        ///Sets `protocol_public_key` with the provided value.
18905        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18906            &mut self,
18907            field: T,
18908        ) {
18909            self.protocol_public_key = Some(field.into().into());
18910        }
18911        ///Sets `protocol_public_key` with the provided value.
18912        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18913            mut self,
18914            field: T,
18915        ) -> Self {
18916            self.set_protocol_public_key(field.into());
18917            self
18918        }
18919        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
18920        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
18921            self.proof_of_possession.as_ref().map(|field| field as _)
18922        }
18923        ///Sets `proof_of_possession` with the provided value.
18924        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18925            &mut self,
18926            field: T,
18927        ) {
18928            self.proof_of_possession = Some(field.into().into());
18929        }
18930        ///Sets `proof_of_possession` with the provided value.
18931        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18932            mut self,
18933            field: T,
18934        ) -> Self {
18935            self.set_proof_of_possession(field.into());
18936            self
18937        }
18938        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18939        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
18940            self.network_public_key.as_ref().map(|field| field as _)
18941        }
18942        ///Sets `network_public_key` with the provided value.
18943        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
18944            &mut self,
18945            field: T,
18946        ) {
18947            self.network_public_key = Some(field.into().into());
18948        }
18949        ///Sets `network_public_key` with the provided value.
18950        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
18951            mut self,
18952            field: T,
18953        ) -> Self {
18954            self.set_network_public_key(field.into());
18955            self
18956        }
18957        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
18958        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
18959            self.worker_public_key.as_ref().map(|field| field as _)
18960        }
18961        ///Sets `worker_public_key` with the provided value.
18962        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18963            &mut self,
18964            field: T,
18965        ) {
18966            self.worker_public_key = Some(field.into().into());
18967        }
18968        ///Sets `worker_public_key` with the provided value.
18969        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18970            mut self,
18971            field: T,
18972        ) -> Self {
18973            self.set_worker_public_key(field.into());
18974            self
18975        }
18976        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18977        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
18978            self.network_address.as_mut().map(|field| field as _)
18979        }
18980        ///Returns a mutable reference to `network_address`.
18981        ///If the field is unset, it is first initialized with the default value.
18982        pub fn network_address_mut(&mut self) -> &mut String {
18983            self.network_address.get_or_insert_default()
18984        }
18985        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18986        pub fn network_address_opt(&self) -> Option<&str> {
18987            self.network_address.as_ref().map(|field| field as _)
18988        }
18989        ///Sets `network_address` with the provided value.
18990        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
18991            self.network_address = Some(field.into().into());
18992        }
18993        ///Sets `network_address` with the provided value.
18994        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
18995            self.set_network_address(field.into());
18996            self
18997        }
18998        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18999        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19000            self.p2p_address.as_mut().map(|field| field as _)
19001        }
19002        ///Returns a mutable reference to `p2p_address`.
19003        ///If the field is unset, it is first initialized with the default value.
19004        pub fn p2p_address_mut(&mut self) -> &mut String {
19005            self.p2p_address.get_or_insert_default()
19006        }
19007        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19008        pub fn p2p_address_opt(&self) -> Option<&str> {
19009            self.p2p_address.as_ref().map(|field| field as _)
19010        }
19011        ///Sets `p2p_address` with the provided value.
19012        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
19013            self.p2p_address = Some(field.into().into());
19014        }
19015        ///Sets `p2p_address` with the provided value.
19016        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19017            self.set_p2p_address(field.into());
19018            self
19019        }
19020        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19021        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
19022            self.primary_address.as_mut().map(|field| field as _)
19023        }
19024        ///Returns a mutable reference to `primary_address`.
19025        ///If the field is unset, it is first initialized with the default value.
19026        pub fn primary_address_mut(&mut self) -> &mut String {
19027            self.primary_address.get_or_insert_default()
19028        }
19029        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19030        pub fn primary_address_opt(&self) -> Option<&str> {
19031            self.primary_address.as_ref().map(|field| field as _)
19032        }
19033        ///Sets `primary_address` with the provided value.
19034        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
19035            self.primary_address = Some(field.into().into());
19036        }
19037        ///Sets `primary_address` with the provided value.
19038        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
19039            self.set_primary_address(field.into());
19040            self
19041        }
19042        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19043        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
19044            self.worker_address.as_mut().map(|field| field as _)
19045        }
19046        ///Returns a mutable reference to `worker_address`.
19047        ///If the field is unset, it is first initialized with the default value.
19048        pub fn worker_address_mut(&mut self) -> &mut String {
19049            self.worker_address.get_or_insert_default()
19050        }
19051        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19052        pub fn worker_address_opt(&self) -> Option<&str> {
19053            self.worker_address.as_ref().map(|field| field as _)
19054        }
19055        ///Sets `worker_address` with the provided value.
19056        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
19057            self.worker_address = Some(field.into().into());
19058        }
19059        ///Sets `worker_address` with the provided value.
19060        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
19061            self.set_worker_address(field.into());
19062            self
19063        }
19064        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19065        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
19066            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
19067        }
19068        ///Sets `next_epoch_protocol_public_key` with the provided value.
19069        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19070            &mut self,
19071            field: T,
19072        ) {
19073            self.next_epoch_protocol_public_key = Some(field.into().into());
19074        }
19075        ///Sets `next_epoch_protocol_public_key` with the provided value.
19076        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19077            mut self,
19078            field: T,
19079        ) -> Self {
19080            self.set_next_epoch_protocol_public_key(field.into());
19081            self
19082        }
19083        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
19084        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
19085            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
19086        }
19087        ///Sets `next_epoch_proof_of_possession` with the provided value.
19088        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19089            &mut self,
19090            field: T,
19091        ) {
19092            self.next_epoch_proof_of_possession = Some(field.into().into());
19093        }
19094        ///Sets `next_epoch_proof_of_possession` with the provided value.
19095        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19096            mut self,
19097            field: T,
19098        ) -> Self {
19099            self.set_next_epoch_proof_of_possession(field.into());
19100            self
19101        }
19102        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19103        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
19104            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
19105        }
19106        ///Sets `next_epoch_network_public_key` with the provided value.
19107        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19108            &mut self,
19109            field: T,
19110        ) {
19111            self.next_epoch_network_public_key = Some(field.into().into());
19112        }
19113        ///Sets `next_epoch_network_public_key` with the provided value.
19114        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19115            mut self,
19116            field: T,
19117        ) -> Self {
19118            self.set_next_epoch_network_public_key(field.into());
19119            self
19120        }
19121        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19122        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
19123            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
19124        }
19125        ///Sets `next_epoch_worker_public_key` with the provided value.
19126        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19127            &mut self,
19128            field: T,
19129        ) {
19130            self.next_epoch_worker_public_key = Some(field.into().into());
19131        }
19132        ///Sets `next_epoch_worker_public_key` with the provided value.
19133        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19134            mut self,
19135            field: T,
19136        ) -> Self {
19137            self.set_next_epoch_worker_public_key(field.into());
19138            self
19139        }
19140        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19141        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19142            self.next_epoch_network_address.as_mut().map(|field| field as _)
19143        }
19144        ///Returns a mutable reference to `next_epoch_network_address`.
19145        ///If the field is unset, it is first initialized with the default value.
19146        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19147            self.next_epoch_network_address.get_or_insert_default()
19148        }
19149        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19150        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19151            self.next_epoch_network_address.as_ref().map(|field| field as _)
19152        }
19153        ///Sets `next_epoch_network_address` with the provided value.
19154        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19155            self.next_epoch_network_address = Some(field.into().into());
19156        }
19157        ///Sets `next_epoch_network_address` with the provided value.
19158        pub fn with_next_epoch_network_address<T: Into<String>>(
19159            mut self,
19160            field: T,
19161        ) -> Self {
19162            self.set_next_epoch_network_address(field.into());
19163            self
19164        }
19165        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19166        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19167            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19168        }
19169        ///Returns a mutable reference to `next_epoch_p2p_address`.
19170        ///If the field is unset, it is first initialized with the default value.
19171        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19172            self.next_epoch_p2p_address.get_or_insert_default()
19173        }
19174        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19175        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19176            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19177        }
19178        ///Sets `next_epoch_p2p_address` with the provided value.
19179        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19180            self.next_epoch_p2p_address = Some(field.into().into());
19181        }
19182        ///Sets `next_epoch_p2p_address` with the provided value.
19183        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19184            self.set_next_epoch_p2p_address(field.into());
19185            self
19186        }
19187        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19188        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19189            self.next_epoch_primary_address.as_mut().map(|field| field as _)
19190        }
19191        ///Returns a mutable reference to `next_epoch_primary_address`.
19192        ///If the field is unset, it is first initialized with the default value.
19193        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19194            self.next_epoch_primary_address.get_or_insert_default()
19195        }
19196        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19197        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19198            self.next_epoch_primary_address.as_ref().map(|field| field as _)
19199        }
19200        ///Sets `next_epoch_primary_address` with the provided value.
19201        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19202            self.next_epoch_primary_address = Some(field.into().into());
19203        }
19204        ///Sets `next_epoch_primary_address` with the provided value.
19205        pub fn with_next_epoch_primary_address<T: Into<String>>(
19206            mut self,
19207            field: T,
19208        ) -> Self {
19209            self.set_next_epoch_primary_address(field.into());
19210            self
19211        }
19212        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19213        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19214            self.next_epoch_worker_address.as_mut().map(|field| field as _)
19215        }
19216        ///Returns a mutable reference to `next_epoch_worker_address`.
19217        ///If the field is unset, it is first initialized with the default value.
19218        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19219            self.next_epoch_worker_address.get_or_insert_default()
19220        }
19221        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19222        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19223            self.next_epoch_worker_address.as_ref().map(|field| field as _)
19224        }
19225        ///Sets `next_epoch_worker_address` with the provided value.
19226        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19227            self.next_epoch_worker_address = Some(field.into().into());
19228        }
19229        ///Sets `next_epoch_worker_address` with the provided value.
19230        pub fn with_next_epoch_worker_address<T: Into<String>>(
19231            mut self,
19232            field: T,
19233        ) -> Self {
19234            self.set_next_epoch_worker_address(field.into());
19235            self
19236        }
19237        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
19238        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19239            self.metadata_extra_fields
19240                .as_ref()
19241                .map(|field| field as _)
19242                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19243        }
19244        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19245        pub fn metadata_extra_fields_opt_mut(
19246            &mut self,
19247        ) -> Option<&mut super::MoveTable> {
19248            self.metadata_extra_fields.as_mut().map(|field| field as _)
19249        }
19250        ///Returns a mutable reference to `metadata_extra_fields`.
19251        ///If the field is unset, it is first initialized with the default value.
19252        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19253            self.metadata_extra_fields.get_or_insert_default()
19254        }
19255        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19256        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19257            self.metadata_extra_fields.as_ref().map(|field| field as _)
19258        }
19259        ///Sets `metadata_extra_fields` with the provided value.
19260        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19261            &mut self,
19262            field: T,
19263        ) {
19264            self.metadata_extra_fields = Some(field.into().into());
19265        }
19266        ///Sets `metadata_extra_fields` with the provided value.
19267        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19268            mut self,
19269            field: T,
19270        ) -> Self {
19271            self.set_metadata_extra_fields(field.into());
19272            self
19273        }
19274        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19275        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19276            self.voting_power.as_mut().map(|field| field as _)
19277        }
19278        ///Returns a mutable reference to `voting_power`.
19279        ///If the field is unset, it is first initialized with the default value.
19280        pub fn voting_power_mut(&mut self) -> &mut u64 {
19281            self.voting_power.get_or_insert_default()
19282        }
19283        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
19284        pub fn voting_power_opt(&self) -> Option<u64> {
19285            self.voting_power.as_ref().map(|field| *field)
19286        }
19287        ///Sets `voting_power` with the provided value.
19288        pub fn set_voting_power(&mut self, field: u64) {
19289            self.voting_power = Some(field);
19290        }
19291        ///Sets `voting_power` with the provided value.
19292        pub fn with_voting_power(mut self, field: u64) -> Self {
19293            self.set_voting_power(field);
19294            self
19295        }
19296        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19297        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19298            self.operation_cap_id.as_mut().map(|field| field as _)
19299        }
19300        ///Returns a mutable reference to `operation_cap_id`.
19301        ///If the field is unset, it is first initialized with the default value.
19302        pub fn operation_cap_id_mut(&mut self) -> &mut String {
19303            self.operation_cap_id.get_or_insert_default()
19304        }
19305        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
19306        pub fn operation_cap_id_opt(&self) -> Option<&str> {
19307            self.operation_cap_id.as_ref().map(|field| field as _)
19308        }
19309        ///Sets `operation_cap_id` with the provided value.
19310        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19311            self.operation_cap_id = Some(field.into().into());
19312        }
19313        ///Sets `operation_cap_id` with the provided value.
19314        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19315            self.set_operation_cap_id(field.into());
19316            self
19317        }
19318        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19319        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19320            self.gas_price.as_mut().map(|field| field as _)
19321        }
19322        ///Returns a mutable reference to `gas_price`.
19323        ///If the field is unset, it is first initialized with the default value.
19324        pub fn gas_price_mut(&mut self) -> &mut u64 {
19325            self.gas_price.get_or_insert_default()
19326        }
19327        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19328        pub fn gas_price_opt(&self) -> Option<u64> {
19329            self.gas_price.as_ref().map(|field| *field)
19330        }
19331        ///Sets `gas_price` with the provided value.
19332        pub fn set_gas_price(&mut self, field: u64) {
19333            self.gas_price = Some(field);
19334        }
19335        ///Sets `gas_price` with the provided value.
19336        pub fn with_gas_price(mut self, field: u64) -> Self {
19337            self.set_gas_price(field);
19338            self
19339        }
19340        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
19341        pub fn staking_pool(&self) -> &super::StakingPool {
19342            self.staking_pool
19343                .as_ref()
19344                .map(|field| field as _)
19345                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19346        }
19347        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19348        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19349            self.staking_pool.as_mut().map(|field| field as _)
19350        }
19351        ///Returns a mutable reference to `staking_pool`.
19352        ///If the field is unset, it is first initialized with the default value.
19353        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19354            self.staking_pool.get_or_insert_default()
19355        }
19356        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
19357        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19358            self.staking_pool.as_ref().map(|field| field as _)
19359        }
19360        ///Sets `staking_pool` with the provided value.
19361        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19362            self.staking_pool = Some(field.into().into());
19363        }
19364        ///Sets `staking_pool` with the provided value.
19365        pub fn with_staking_pool<T: Into<super::StakingPool>>(
19366            mut self,
19367            field: T,
19368        ) -> Self {
19369            self.set_staking_pool(field.into());
19370            self
19371        }
19372        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19373        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19374            self.commission_rate.as_mut().map(|field| field as _)
19375        }
19376        ///Returns a mutable reference to `commission_rate`.
19377        ///If the field is unset, it is first initialized with the default value.
19378        pub fn commission_rate_mut(&mut self) -> &mut u64 {
19379            self.commission_rate.get_or_insert_default()
19380        }
19381        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19382        pub fn commission_rate_opt(&self) -> Option<u64> {
19383            self.commission_rate.as_ref().map(|field| *field)
19384        }
19385        ///Sets `commission_rate` with the provided value.
19386        pub fn set_commission_rate(&mut self, field: u64) {
19387            self.commission_rate = Some(field);
19388        }
19389        ///Sets `commission_rate` with the provided value.
19390        pub fn with_commission_rate(mut self, field: u64) -> Self {
19391            self.set_commission_rate(field);
19392            self
19393        }
19394        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19395        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19396            self.next_epoch_stake.as_mut().map(|field| field as _)
19397        }
19398        ///Returns a mutable reference to `next_epoch_stake`.
19399        ///If the field is unset, it is first initialized with the default value.
19400        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19401            self.next_epoch_stake.get_or_insert_default()
19402        }
19403        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19404        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19405            self.next_epoch_stake.as_ref().map(|field| *field)
19406        }
19407        ///Sets `next_epoch_stake` with the provided value.
19408        pub fn set_next_epoch_stake(&mut self, field: u64) {
19409            self.next_epoch_stake = Some(field);
19410        }
19411        ///Sets `next_epoch_stake` with the provided value.
19412        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19413            self.set_next_epoch_stake(field);
19414            self
19415        }
19416        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19417        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19418            self.next_epoch_gas_price.as_mut().map(|field| field as _)
19419        }
19420        ///Returns a mutable reference to `next_epoch_gas_price`.
19421        ///If the field is unset, it is first initialized with the default value.
19422        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19423            self.next_epoch_gas_price.get_or_insert_default()
19424        }
19425        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19426        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19427            self.next_epoch_gas_price.as_ref().map(|field| *field)
19428        }
19429        ///Sets `next_epoch_gas_price` with the provided value.
19430        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19431            self.next_epoch_gas_price = Some(field);
19432        }
19433        ///Sets `next_epoch_gas_price` with the provided value.
19434        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19435            self.set_next_epoch_gas_price(field);
19436            self
19437        }
19438        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19439        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19440            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19441        }
19442        ///Returns a mutable reference to `next_epoch_commission_rate`.
19443        ///If the field is unset, it is first initialized with the default value.
19444        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19445            self.next_epoch_commission_rate.get_or_insert_default()
19446        }
19447        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19448        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19449            self.next_epoch_commission_rate.as_ref().map(|field| *field)
19450        }
19451        ///Sets `next_epoch_commission_rate` with the provided value.
19452        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19453            self.next_epoch_commission_rate = Some(field);
19454        }
19455        ///Sets `next_epoch_commission_rate` with the provided value.
19456        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19457            self.set_next_epoch_commission_rate(field);
19458            self
19459        }
19460        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
19461        pub fn extra_fields(&self) -> &super::MoveTable {
19462            self.extra_fields
19463                .as_ref()
19464                .map(|field| field as _)
19465                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19466        }
19467        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19468        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19469            self.extra_fields.as_mut().map(|field| field as _)
19470        }
19471        ///Returns a mutable reference to `extra_fields`.
19472        ///If the field is unset, it is first initialized with the default value.
19473        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19474            self.extra_fields.get_or_insert_default()
19475        }
19476        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19477        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19478            self.extra_fields.as_ref().map(|field| field as _)
19479        }
19480        ///Sets `extra_fields` with the provided value.
19481        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19482            self.extra_fields = Some(field.into().into());
19483        }
19484        ///Sets `extra_fields` with the provided value.
19485        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19486            self.set_extra_fields(field.into());
19487            self
19488        }
19489    }
19490    impl super::ValidatorAggregatedSignature {
19491        pub const fn const_default() -> Self {
19492            Self {
19493                epoch: None,
19494                signature: None,
19495                bitmap: None,
19496            }
19497        }
19498        #[doc(hidden)]
19499        pub fn default_instance() -> &'static Self {
19500            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19501            &DEFAULT
19502        }
19503        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19504        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19505            self.epoch.as_mut().map(|field| field as _)
19506        }
19507        ///Returns a mutable reference to `epoch`.
19508        ///If the field is unset, it is first initialized with the default value.
19509        pub fn epoch_mut(&mut self) -> &mut u64 {
19510            self.epoch.get_or_insert_default()
19511        }
19512        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19513        pub fn epoch_opt(&self) -> Option<u64> {
19514            self.epoch.as_ref().map(|field| *field)
19515        }
19516        ///Sets `epoch` with the provided value.
19517        pub fn set_epoch(&mut self, field: u64) {
19518            self.epoch = Some(field);
19519        }
19520        ///Sets `epoch` with the provided value.
19521        pub fn with_epoch(mut self, field: u64) -> Self {
19522            self.set_epoch(field);
19523            self
19524        }
19525        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
19526        pub fn signature_opt(&self) -> Option<&[u8]> {
19527            self.signature.as_ref().map(|field| field as _)
19528        }
19529        ///Sets `signature` with the provided value.
19530        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19531            self.signature = Some(field.into().into());
19532        }
19533        ///Sets `signature` with the provided value.
19534        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19535            mut self,
19536            field: T,
19537        ) -> Self {
19538            self.set_signature(field.into());
19539            self
19540        }
19541        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
19542        pub fn bitmap_opt(&self) -> Option<&[u8]> {
19543            self.bitmap.as_ref().map(|field| field as _)
19544        }
19545        ///Sets `bitmap` with the provided value.
19546        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19547            self.bitmap = Some(field.into().into());
19548        }
19549        ///Sets `bitmap` with the provided value.
19550        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19551            self.set_bitmap(field.into());
19552            self
19553        }
19554    }
19555    impl super::ValidatorCommittee {
19556        pub const fn const_default() -> Self {
19557            Self {
19558                epoch: None,
19559                members: Vec::new(),
19560            }
19561        }
19562        #[doc(hidden)]
19563        pub fn default_instance() -> &'static Self {
19564            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19565            &DEFAULT
19566        }
19567        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19568        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19569            self.epoch.as_mut().map(|field| field as _)
19570        }
19571        ///Returns a mutable reference to `epoch`.
19572        ///If the field is unset, it is first initialized with the default value.
19573        pub fn epoch_mut(&mut self) -> &mut u64 {
19574            self.epoch.get_or_insert_default()
19575        }
19576        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19577        pub fn epoch_opt(&self) -> Option<u64> {
19578            self.epoch.as_ref().map(|field| *field)
19579        }
19580        ///Sets `epoch` with the provided value.
19581        pub fn set_epoch(&mut self, field: u64) {
19582            self.epoch = Some(field);
19583        }
19584        ///Sets `epoch` with the provided value.
19585        pub fn with_epoch(mut self, field: u64) -> Self {
19586            self.set_epoch(field);
19587            self
19588        }
19589        ///Returns the value of `members`, or the default value if `members` is unset.
19590        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19591            &self.members
19592        }
19593        ///Returns a mutable reference to `members`.
19594        ///If the field is unset, it is first initialized with the default value.
19595        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19596            &mut self.members
19597        }
19598        ///Sets `members` with the provided value.
19599        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19600            self.members = field;
19601        }
19602        ///Sets `members` with the provided value.
19603        pub fn with_members(
19604            mut self,
19605            field: Vec<super::ValidatorCommitteeMember>,
19606        ) -> Self {
19607            self.set_members(field);
19608            self
19609        }
19610    }
19611    impl super::ValidatorCommitteeMember {
19612        pub const fn const_default() -> Self {
19613            Self {
19614                public_key: None,
19615                weight: None,
19616            }
19617        }
19618        #[doc(hidden)]
19619        pub fn default_instance() -> &'static Self {
19620            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19621            &DEFAULT
19622        }
19623        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19624        pub fn public_key_opt(&self) -> Option<&[u8]> {
19625            self.public_key.as_ref().map(|field| field as _)
19626        }
19627        ///Sets `public_key` with the provided value.
19628        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19629            self.public_key = Some(field.into().into());
19630        }
19631        ///Sets `public_key` with the provided value.
19632        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19633            mut self,
19634            field: T,
19635        ) -> Self {
19636            self.set_public_key(field.into());
19637            self
19638        }
19639        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19640        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19641            self.weight.as_mut().map(|field| field as _)
19642        }
19643        ///Returns a mutable reference to `weight`.
19644        ///If the field is unset, it is first initialized with the default value.
19645        pub fn weight_mut(&mut self) -> &mut u64 {
19646            self.weight.get_or_insert_default()
19647        }
19648        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
19649        pub fn weight_opt(&self) -> Option<u64> {
19650            self.weight.as_ref().map(|field| *field)
19651        }
19652        ///Sets `weight` with the provided value.
19653        pub fn set_weight(&mut self, field: u64) {
19654            self.weight = Some(field);
19655        }
19656        ///Sets `weight` with the provided value.
19657        pub fn with_weight(mut self, field: u64) -> Self {
19658            self.set_weight(field);
19659            self
19660        }
19661    }
19662    impl super::ValidatorExecutionTimeObservation {
19663        pub const fn const_default() -> Self {
19664            Self {
19665                validator: None,
19666                duration: None,
19667            }
19668        }
19669        #[doc(hidden)]
19670        pub fn default_instance() -> &'static Self {
19671            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19672            &DEFAULT
19673        }
19674        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
19675        pub fn validator_opt(&self) -> Option<&[u8]> {
19676            self.validator.as_ref().map(|field| field as _)
19677        }
19678        ///Sets `validator` with the provided value.
19679        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19680            self.validator = Some(field.into().into());
19681        }
19682        ///Sets `validator` with the provided value.
19683        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19684            mut self,
19685            field: T,
19686        ) -> Self {
19687            self.set_validator(field.into());
19688            self
19689        }
19690        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19691        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19692            self.duration.as_mut().map(|field| field as _)
19693        }
19694        ///Returns a mutable reference to `duration`.
19695        ///If the field is unset, it is first initialized with the default value.
19696        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19697            self.duration.get_or_insert_default()
19698        }
19699        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
19700        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19701            self.duration.as_ref().map(|field| field as _)
19702        }
19703        ///Sets `duration` with the provided value.
19704        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19705            self.duration = Some(field.into().into());
19706        }
19707        ///Sets `duration` with the provided value.
19708        pub fn with_duration<T: Into<::prost_types::Duration>>(
19709            mut self,
19710            field: T,
19711        ) -> Self {
19712            self.set_duration(field.into());
19713            self
19714        }
19715    }
19716    impl super::ValidatorReportRecord {
19717        pub const fn const_default() -> Self {
19718            Self {
19719                reported: None,
19720                reporters: Vec::new(),
19721            }
19722        }
19723        #[doc(hidden)]
19724        pub fn default_instance() -> &'static Self {
19725            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19726            &DEFAULT
19727        }
19728        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19729        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19730            self.reported.as_mut().map(|field| field as _)
19731        }
19732        ///Returns a mutable reference to `reported`.
19733        ///If the field is unset, it is first initialized with the default value.
19734        pub fn reported_mut(&mut self) -> &mut String {
19735            self.reported.get_or_insert_default()
19736        }
19737        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
19738        pub fn reported_opt(&self) -> Option<&str> {
19739            self.reported.as_ref().map(|field| field as _)
19740        }
19741        ///Sets `reported` with the provided value.
19742        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19743            self.reported = Some(field.into().into());
19744        }
19745        ///Sets `reported` with the provided value.
19746        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19747            self.set_reported(field.into());
19748            self
19749        }
19750        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
19751        pub fn reporters(&self) -> &[String] {
19752            &self.reporters
19753        }
19754        ///Returns a mutable reference to `reporters`.
19755        ///If the field is unset, it is first initialized with the default value.
19756        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19757            &mut self.reporters
19758        }
19759        ///Sets `reporters` with the provided value.
19760        pub fn set_reporters(&mut self, field: Vec<String>) {
19761            self.reporters = field;
19762        }
19763        ///Sets `reporters` with the provided value.
19764        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19765            self.set_reporters(field);
19766            self
19767        }
19768    }
19769    impl super::ValidatorSet {
19770        pub const fn const_default() -> Self {
19771            Self {
19772                total_stake: None,
19773                active_validators: Vec::new(),
19774                pending_active_validators: None,
19775                pending_removals: Vec::new(),
19776                staking_pool_mappings: None,
19777                inactive_validators: None,
19778                validator_candidates: None,
19779                at_risk_validators: std::collections::BTreeMap::new(),
19780                extra_fields: None,
19781            }
19782        }
19783        #[doc(hidden)]
19784        pub fn default_instance() -> &'static Self {
19785            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19786            &DEFAULT
19787        }
19788        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19789        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19790            self.total_stake.as_mut().map(|field| field as _)
19791        }
19792        ///Returns a mutable reference to `total_stake`.
19793        ///If the field is unset, it is first initialized with the default value.
19794        pub fn total_stake_mut(&mut self) -> &mut u64 {
19795            self.total_stake.get_or_insert_default()
19796        }
19797        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19798        pub fn total_stake_opt(&self) -> Option<u64> {
19799            self.total_stake.as_ref().map(|field| *field)
19800        }
19801        ///Sets `total_stake` with the provided value.
19802        pub fn set_total_stake(&mut self, field: u64) {
19803            self.total_stake = Some(field);
19804        }
19805        ///Sets `total_stake` with the provided value.
19806        pub fn with_total_stake(mut self, field: u64) -> Self {
19807            self.set_total_stake(field);
19808            self
19809        }
19810        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
19811        pub fn active_validators(&self) -> &[super::Validator] {
19812            &self.active_validators
19813        }
19814        ///Returns a mutable reference to `active_validators`.
19815        ///If the field is unset, it is first initialized with the default value.
19816        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19817            &mut self.active_validators
19818        }
19819        ///Sets `active_validators` with the provided value.
19820        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19821            self.active_validators = field;
19822        }
19823        ///Sets `active_validators` with the provided value.
19824        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19825            self.set_active_validators(field);
19826            self
19827        }
19828        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
19829        pub fn pending_active_validators(&self) -> &super::MoveTable {
19830            self.pending_active_validators
19831                .as_ref()
19832                .map(|field| field as _)
19833                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19834        }
19835        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19836        pub fn pending_active_validators_opt_mut(
19837            &mut self,
19838        ) -> Option<&mut super::MoveTable> {
19839            self.pending_active_validators.as_mut().map(|field| field as _)
19840        }
19841        ///Returns a mutable reference to `pending_active_validators`.
19842        ///If the field is unset, it is first initialized with the default value.
19843        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19844            self.pending_active_validators.get_or_insert_default()
19845        }
19846        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19847        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19848            self.pending_active_validators.as_ref().map(|field| field as _)
19849        }
19850        ///Sets `pending_active_validators` with the provided value.
19851        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19852            &mut self,
19853            field: T,
19854        ) {
19855            self.pending_active_validators = Some(field.into().into());
19856        }
19857        ///Sets `pending_active_validators` with the provided value.
19858        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19859            mut self,
19860            field: T,
19861        ) -> Self {
19862            self.set_pending_active_validators(field.into());
19863            self
19864        }
19865        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
19866        pub fn pending_removals(&self) -> &[u64] {
19867            &self.pending_removals
19868        }
19869        ///Returns a mutable reference to `pending_removals`.
19870        ///If the field is unset, it is first initialized with the default value.
19871        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19872            &mut self.pending_removals
19873        }
19874        ///Sets `pending_removals` with the provided value.
19875        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19876            self.pending_removals = field;
19877        }
19878        ///Sets `pending_removals` with the provided value.
19879        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19880            self.set_pending_removals(field);
19881            self
19882        }
19883        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
19884        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19885            self.staking_pool_mappings
19886                .as_ref()
19887                .map(|field| field as _)
19888                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19889        }
19890        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19891        pub fn staking_pool_mappings_opt_mut(
19892            &mut self,
19893        ) -> Option<&mut super::MoveTable> {
19894            self.staking_pool_mappings.as_mut().map(|field| field as _)
19895        }
19896        ///Returns a mutable reference to `staking_pool_mappings`.
19897        ///If the field is unset, it is first initialized with the default value.
19898        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
19899            self.staking_pool_mappings.get_or_insert_default()
19900        }
19901        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
19902        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
19903            self.staking_pool_mappings.as_ref().map(|field| field as _)
19904        }
19905        ///Sets `staking_pool_mappings` with the provided value.
19906        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
19907            &mut self,
19908            field: T,
19909        ) {
19910            self.staking_pool_mappings = Some(field.into().into());
19911        }
19912        ///Sets `staking_pool_mappings` with the provided value.
19913        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
19914            mut self,
19915            field: T,
19916        ) -> Self {
19917            self.set_staking_pool_mappings(field.into());
19918            self
19919        }
19920        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
19921        pub fn inactive_validators(&self) -> &super::MoveTable {
19922            self.inactive_validators
19923                .as_ref()
19924                .map(|field| field as _)
19925                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19926        }
19927        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19928        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19929            self.inactive_validators.as_mut().map(|field| field as _)
19930        }
19931        ///Returns a mutable reference to `inactive_validators`.
19932        ///If the field is unset, it is first initialized with the default value.
19933        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
19934            self.inactive_validators.get_or_insert_default()
19935        }
19936        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19937        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
19938            self.inactive_validators.as_ref().map(|field| field as _)
19939        }
19940        ///Sets `inactive_validators` with the provided value.
19941        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
19942            self.inactive_validators = Some(field.into().into());
19943        }
19944        ///Sets `inactive_validators` with the provided value.
19945        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
19946            mut self,
19947            field: T,
19948        ) -> Self {
19949            self.set_inactive_validators(field.into());
19950            self
19951        }
19952        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
19953        pub fn validator_candidates(&self) -> &super::MoveTable {
19954            self.validator_candidates
19955                .as_ref()
19956                .map(|field| field as _)
19957                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19958        }
19959        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19960        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19961            self.validator_candidates.as_mut().map(|field| field as _)
19962        }
19963        ///Returns a mutable reference to `validator_candidates`.
19964        ///If the field is unset, it is first initialized with the default value.
19965        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
19966            self.validator_candidates.get_or_insert_default()
19967        }
19968        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
19969        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
19970            self.validator_candidates.as_ref().map(|field| field as _)
19971        }
19972        ///Sets `validator_candidates` with the provided value.
19973        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
19974            self.validator_candidates = Some(field.into().into());
19975        }
19976        ///Sets `validator_candidates` with the provided value.
19977        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
19978            mut self,
19979            field: T,
19980        ) -> Self {
19981            self.set_validator_candidates(field.into());
19982            self
19983        }
19984        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
19985        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
19986            &self.at_risk_validators
19987        }
19988        ///Returns a mutable reference to `at_risk_validators`.
19989        ///If the field is unset, it is first initialized with the default value.
19990        pub fn at_risk_validators_mut(
19991            &mut self,
19992        ) -> &mut ::std::collections::BTreeMap<String, u64> {
19993            &mut self.at_risk_validators
19994        }
19995        ///Sets `at_risk_validators` with the provided value.
19996        pub fn set_at_risk_validators(
19997            &mut self,
19998            field: ::std::collections::BTreeMap<String, u64>,
19999        ) {
20000            self.at_risk_validators = field;
20001        }
20002        ///Sets `at_risk_validators` with the provided value.
20003        pub fn with_at_risk_validators(
20004            mut self,
20005            field: ::std::collections::BTreeMap<String, u64>,
20006        ) -> Self {
20007            self.set_at_risk_validators(field);
20008            self
20009        }
20010        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
20011        pub fn extra_fields(&self) -> &super::MoveTable {
20012            self.extra_fields
20013                .as_ref()
20014                .map(|field| field as _)
20015                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20016        }
20017        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20018        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20019            self.extra_fields.as_mut().map(|field| field as _)
20020        }
20021        ///Returns a mutable reference to `extra_fields`.
20022        ///If the field is unset, it is first initialized with the default value.
20023        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
20024            self.extra_fields.get_or_insert_default()
20025        }
20026        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
20027        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
20028            self.extra_fields.as_ref().map(|field| field as _)
20029        }
20030        ///Sets `extra_fields` with the provided value.
20031        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
20032            self.extra_fields = Some(field.into().into());
20033        }
20034        ///Sets `extra_fields` with the provided value.
20035        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
20036            self.set_extra_fields(field.into());
20037            self
20038        }
20039    }
20040    impl super::VariantDescriptor {
20041        pub const fn const_default() -> Self {
20042            Self {
20043                name: None,
20044                position: None,
20045                fields: Vec::new(),
20046            }
20047        }
20048        #[doc(hidden)]
20049        pub fn default_instance() -> &'static Self {
20050            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
20051            &DEFAULT
20052        }
20053        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20054        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
20055            self.name.as_mut().map(|field| field as _)
20056        }
20057        ///Returns a mutable reference to `name`.
20058        ///If the field is unset, it is first initialized with the default value.
20059        pub fn name_mut(&mut self) -> &mut String {
20060            self.name.get_or_insert_default()
20061        }
20062        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
20063        pub fn name_opt(&self) -> Option<&str> {
20064            self.name.as_ref().map(|field| field as _)
20065        }
20066        ///Sets `name` with the provided value.
20067        pub fn set_name<T: Into<String>>(&mut self, field: T) {
20068            self.name = Some(field.into().into());
20069        }
20070        ///Sets `name` with the provided value.
20071        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
20072            self.set_name(field.into());
20073            self
20074        }
20075        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20076        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
20077            self.position.as_mut().map(|field| field as _)
20078        }
20079        ///Returns a mutable reference to `position`.
20080        ///If the field is unset, it is first initialized with the default value.
20081        pub fn position_mut(&mut self) -> &mut u32 {
20082            self.position.get_or_insert_default()
20083        }
20084        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
20085        pub fn position_opt(&self) -> Option<u32> {
20086            self.position.as_ref().map(|field| *field)
20087        }
20088        ///Sets `position` with the provided value.
20089        pub fn set_position(&mut self, field: u32) {
20090            self.position = Some(field);
20091        }
20092        ///Sets `position` with the provided value.
20093        pub fn with_position(mut self, field: u32) -> Self {
20094            self.set_position(field);
20095            self
20096        }
20097        ///Returns the value of `fields`, or the default value if `fields` is unset.
20098        pub fn fields(&self) -> &[super::FieldDescriptor] {
20099            &self.fields
20100        }
20101        ///Returns a mutable reference to `fields`.
20102        ///If the field is unset, it is first initialized with the default value.
20103        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
20104            &mut self.fields
20105        }
20106        ///Sets `fields` with the provided value.
20107        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
20108            self.fields = field;
20109        }
20110        ///Sets `fields` with the provided value.
20111        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
20112            self.set_fields(field);
20113            self
20114        }
20115    }
20116    impl super::VerifySignatureRequest {
20117        pub const fn const_default() -> Self {
20118            Self {
20119                message: None,
20120                signature: None,
20121                address: None,
20122                jwks: Vec::new(),
20123            }
20124        }
20125        #[doc(hidden)]
20126        pub fn default_instance() -> &'static Self {
20127            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
20128            &DEFAULT
20129        }
20130        ///Returns the value of `message`, or the default value if `message` is unset.
20131        pub fn message(&self) -> &super::Bcs {
20132            self.message
20133                .as_ref()
20134                .map(|field| field as _)
20135                .unwrap_or_else(|| super::Bcs::default_instance() as _)
20136        }
20137        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20138        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20139            self.message.as_mut().map(|field| field as _)
20140        }
20141        ///Returns a mutable reference to `message`.
20142        ///If the field is unset, it is first initialized with the default value.
20143        pub fn message_mut(&mut self) -> &mut super::Bcs {
20144            self.message.get_or_insert_default()
20145        }
20146        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
20147        pub fn message_opt(&self) -> Option<&super::Bcs> {
20148            self.message.as_ref().map(|field| field as _)
20149        }
20150        ///Sets `message` with the provided value.
20151        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20152            self.message = Some(field.into().into());
20153        }
20154        ///Sets `message` with the provided value.
20155        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20156            self.set_message(field.into());
20157            self
20158        }
20159        ///Returns the value of `signature`, or the default value if `signature` is unset.
20160        pub fn signature(&self) -> &super::UserSignature {
20161            self.signature
20162                .as_ref()
20163                .map(|field| field as _)
20164                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20165        }
20166        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20167        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20168            self.signature.as_mut().map(|field| field as _)
20169        }
20170        ///Returns a mutable reference to `signature`.
20171        ///If the field is unset, it is first initialized with the default value.
20172        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20173            self.signature.get_or_insert_default()
20174        }
20175        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20176        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20177            self.signature.as_ref().map(|field| field as _)
20178        }
20179        ///Sets `signature` with the provided value.
20180        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20181            self.signature = Some(field.into().into());
20182        }
20183        ///Sets `signature` with the provided value.
20184        pub fn with_signature<T: Into<super::UserSignature>>(
20185            mut self,
20186            field: T,
20187        ) -> Self {
20188            self.set_signature(field.into());
20189            self
20190        }
20191        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20192        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20193            self.address.as_mut().map(|field| field as _)
20194        }
20195        ///Returns a mutable reference to `address`.
20196        ///If the field is unset, it is first initialized with the default value.
20197        pub fn address_mut(&mut self) -> &mut String {
20198            self.address.get_or_insert_default()
20199        }
20200        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20201        pub fn address_opt(&self) -> Option<&str> {
20202            self.address.as_ref().map(|field| field as _)
20203        }
20204        ///Sets `address` with the provided value.
20205        pub fn set_address<T: Into<String>>(&mut self, field: T) {
20206            self.address = Some(field.into().into());
20207        }
20208        ///Sets `address` with the provided value.
20209        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20210            self.set_address(field.into());
20211            self
20212        }
20213        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
20214        pub fn jwks(&self) -> &[super::ActiveJwk] {
20215            &self.jwks
20216        }
20217        ///Returns a mutable reference to `jwks`.
20218        ///If the field is unset, it is first initialized with the default value.
20219        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20220            &mut self.jwks
20221        }
20222        ///Sets `jwks` with the provided value.
20223        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20224            self.jwks = field;
20225        }
20226        ///Sets `jwks` with the provided value.
20227        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20228            self.set_jwks(field);
20229            self
20230        }
20231    }
20232    impl super::VerifySignatureResponse {
20233        pub const fn const_default() -> Self {
20234            Self {
20235                is_valid: None,
20236                reason: None,
20237            }
20238        }
20239        #[doc(hidden)]
20240        pub fn default_instance() -> &'static Self {
20241            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20242            &DEFAULT
20243        }
20244        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20245        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20246            self.is_valid.as_mut().map(|field| field as _)
20247        }
20248        ///Returns a mutable reference to `is_valid`.
20249        ///If the field is unset, it is first initialized with the default value.
20250        pub fn is_valid_mut(&mut self) -> &mut bool {
20251            self.is_valid.get_or_insert_default()
20252        }
20253        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
20254        pub fn is_valid_opt(&self) -> Option<bool> {
20255            self.is_valid.as_ref().map(|field| *field)
20256        }
20257        ///Sets `is_valid` with the provided value.
20258        pub fn set_is_valid(&mut self, field: bool) {
20259            self.is_valid = Some(field);
20260        }
20261        ///Sets `is_valid` with the provided value.
20262        pub fn with_is_valid(mut self, field: bool) -> Self {
20263            self.set_is_valid(field);
20264            self
20265        }
20266        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20267        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20268            self.reason.as_mut().map(|field| field as _)
20269        }
20270        ///Returns a mutable reference to `reason`.
20271        ///If the field is unset, it is first initialized with the default value.
20272        pub fn reason_mut(&mut self) -> &mut String {
20273            self.reason.get_or_insert_default()
20274        }
20275        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
20276        pub fn reason_opt(&self) -> Option<&str> {
20277            self.reason.as_ref().map(|field| field as _)
20278        }
20279        ///Sets `reason` with the provided value.
20280        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20281            self.reason = Some(field.into().into());
20282        }
20283        ///Sets `reason` with the provided value.
20284        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20285            self.set_reason(field.into());
20286            self
20287        }
20288    }
20289    impl super::VersionAssignment {
20290        pub const fn const_default() -> Self {
20291            Self {
20292                object_id: None,
20293                start_version: None,
20294                version: None,
20295            }
20296        }
20297        #[doc(hidden)]
20298        pub fn default_instance() -> &'static Self {
20299            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20300            &DEFAULT
20301        }
20302        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20303        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20304            self.object_id.as_mut().map(|field| field as _)
20305        }
20306        ///Returns a mutable reference to `object_id`.
20307        ///If the field is unset, it is first initialized with the default value.
20308        pub fn object_id_mut(&mut self) -> &mut String {
20309            self.object_id.get_or_insert_default()
20310        }
20311        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20312        pub fn object_id_opt(&self) -> Option<&str> {
20313            self.object_id.as_ref().map(|field| field as _)
20314        }
20315        ///Sets `object_id` with the provided value.
20316        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20317            self.object_id = Some(field.into().into());
20318        }
20319        ///Sets `object_id` with the provided value.
20320        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20321            self.set_object_id(field.into());
20322            self
20323        }
20324        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20325        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20326            self.start_version.as_mut().map(|field| field as _)
20327        }
20328        ///Returns a mutable reference to `start_version`.
20329        ///If the field is unset, it is first initialized with the default value.
20330        pub fn start_version_mut(&mut self) -> &mut u64 {
20331            self.start_version.get_or_insert_default()
20332        }
20333        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20334        pub fn start_version_opt(&self) -> Option<u64> {
20335            self.start_version.as_ref().map(|field| *field)
20336        }
20337        ///Sets `start_version` with the provided value.
20338        pub fn set_start_version(&mut self, field: u64) {
20339            self.start_version = Some(field);
20340        }
20341        ///Sets `start_version` with the provided value.
20342        pub fn with_start_version(mut self, field: u64) -> Self {
20343            self.set_start_version(field);
20344            self
20345        }
20346        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20347        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20348            self.version.as_mut().map(|field| field as _)
20349        }
20350        ///Returns a mutable reference to `version`.
20351        ///If the field is unset, it is first initialized with the default value.
20352        pub fn version_mut(&mut self) -> &mut u64 {
20353            self.version.get_or_insert_default()
20354        }
20355        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20356        pub fn version_opt(&self) -> Option<u64> {
20357            self.version.as_ref().map(|field| *field)
20358        }
20359        ///Sets `version` with the provided value.
20360        pub fn set_version(&mut self, field: u64) {
20361            self.version = Some(field);
20362        }
20363        ///Sets `version` with the provided value.
20364        pub fn with_version(mut self, field: u64) -> Self {
20365            self.set_version(field);
20366            self
20367        }
20368    }
20369    impl super::Watermark {
20370        pub const fn const_default() -> Self {
20371            Self {
20372                cursor: None,
20373                checkpoint: None,
20374            }
20375        }
20376        #[doc(hidden)]
20377        pub fn default_instance() -> &'static Self {
20378            static DEFAULT: super::Watermark = super::Watermark::const_default();
20379            &DEFAULT
20380        }
20381        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
20382        pub fn cursor_opt(&self) -> Option<&[u8]> {
20383            self.cursor.as_ref().map(|field| field as _)
20384        }
20385        ///Sets `cursor` with the provided value.
20386        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20387            self.cursor = Some(field.into().into());
20388        }
20389        ///Sets `cursor` with the provided value.
20390        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20391            self.set_cursor(field.into());
20392            self
20393        }
20394        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20395        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20396            self.checkpoint.as_mut().map(|field| field as _)
20397        }
20398        ///Returns a mutable reference to `checkpoint`.
20399        ///If the field is unset, it is first initialized with the default value.
20400        pub fn checkpoint_mut(&mut self) -> &mut u64 {
20401            self.checkpoint.get_or_insert_default()
20402        }
20403        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
20404        pub fn checkpoint_opt(&self) -> Option<u64> {
20405            self.checkpoint.as_ref().map(|field| *field)
20406        }
20407        ///Sets `checkpoint` with the provided value.
20408        pub fn set_checkpoint(&mut self, field: u64) {
20409            self.checkpoint = Some(field);
20410        }
20411        ///Sets `checkpoint` with the provided value.
20412        pub fn with_checkpoint(mut self, field: u64) -> Self {
20413            self.set_checkpoint(field);
20414            self
20415        }
20416    }
20417    impl super::ZkLoginAuthenticator {
20418        pub const fn const_default() -> Self {
20419            Self {
20420                inputs: None,
20421                max_epoch: None,
20422                signature: None,
20423                public_identifier: None,
20424                jwk_id: None,
20425            }
20426        }
20427        #[doc(hidden)]
20428        pub fn default_instance() -> &'static Self {
20429            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20430            &DEFAULT
20431        }
20432        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
20433        pub fn inputs(&self) -> &super::ZkLoginInputs {
20434            self.inputs
20435                .as_ref()
20436                .map(|field| field as _)
20437                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20438        }
20439        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20440        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20441            self.inputs.as_mut().map(|field| field as _)
20442        }
20443        ///Returns a mutable reference to `inputs`.
20444        ///If the field is unset, it is first initialized with the default value.
20445        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20446            self.inputs.get_or_insert_default()
20447        }
20448        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
20449        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20450            self.inputs.as_ref().map(|field| field as _)
20451        }
20452        ///Sets `inputs` with the provided value.
20453        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20454            self.inputs = Some(field.into().into());
20455        }
20456        ///Sets `inputs` with the provided value.
20457        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20458            self.set_inputs(field.into());
20459            self
20460        }
20461        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20462        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20463            self.max_epoch.as_mut().map(|field| field as _)
20464        }
20465        ///Returns a mutable reference to `max_epoch`.
20466        ///If the field is unset, it is first initialized with the default value.
20467        pub fn max_epoch_mut(&mut self) -> &mut u64 {
20468            self.max_epoch.get_or_insert_default()
20469        }
20470        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
20471        pub fn max_epoch_opt(&self) -> Option<u64> {
20472            self.max_epoch.as_ref().map(|field| *field)
20473        }
20474        ///Sets `max_epoch` with the provided value.
20475        pub fn set_max_epoch(&mut self, field: u64) {
20476            self.max_epoch = Some(field);
20477        }
20478        ///Sets `max_epoch` with the provided value.
20479        pub fn with_max_epoch(mut self, field: u64) -> Self {
20480            self.set_max_epoch(field);
20481            self
20482        }
20483        ///Returns the value of `signature`, or the default value if `signature` is unset.
20484        pub fn signature(&self) -> &super::SimpleSignature {
20485            self.signature
20486                .as_ref()
20487                .map(|field| field as _)
20488                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20489        }
20490        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20491        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20492            self.signature.as_mut().map(|field| field as _)
20493        }
20494        ///Returns a mutable reference to `signature`.
20495        ///If the field is unset, it is first initialized with the default value.
20496        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20497            self.signature.get_or_insert_default()
20498        }
20499        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20500        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20501            self.signature.as_ref().map(|field| field as _)
20502        }
20503        ///Sets `signature` with the provided value.
20504        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20505            self.signature = Some(field.into().into());
20506        }
20507        ///Sets `signature` with the provided value.
20508        pub fn with_signature<T: Into<super::SimpleSignature>>(
20509            mut self,
20510            field: T,
20511        ) -> Self {
20512            self.set_signature(field.into());
20513            self
20514        }
20515        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
20516        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20517            self.public_identifier
20518                .as_ref()
20519                .map(|field| field as _)
20520                .unwrap_or_else(|| {
20521                    super::ZkLoginPublicIdentifier::default_instance() as _
20522                })
20523        }
20524        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20525        pub fn public_identifier_opt_mut(
20526            &mut self,
20527        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20528            self.public_identifier.as_mut().map(|field| field as _)
20529        }
20530        ///Returns a mutable reference to `public_identifier`.
20531        ///If the field is unset, it is first initialized with the default value.
20532        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20533            self.public_identifier.get_or_insert_default()
20534        }
20535        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
20536        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20537            self.public_identifier.as_ref().map(|field| field as _)
20538        }
20539        ///Sets `public_identifier` with the provided value.
20540        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20541            &mut self,
20542            field: T,
20543        ) {
20544            self.public_identifier = Some(field.into().into());
20545        }
20546        ///Sets `public_identifier` with the provided value.
20547        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20548            mut self,
20549            field: T,
20550        ) -> Self {
20551            self.set_public_identifier(field.into());
20552            self
20553        }
20554        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
20555        pub fn jwk_id(&self) -> &super::JwkId {
20556            self.jwk_id
20557                .as_ref()
20558                .map(|field| field as _)
20559                .unwrap_or_else(|| super::JwkId::default_instance() as _)
20560        }
20561        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20562        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20563            self.jwk_id.as_mut().map(|field| field as _)
20564        }
20565        ///Returns a mutable reference to `jwk_id`.
20566        ///If the field is unset, it is first initialized with the default value.
20567        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20568            self.jwk_id.get_or_insert_default()
20569        }
20570        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20571        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20572            self.jwk_id.as_ref().map(|field| field as _)
20573        }
20574        ///Sets `jwk_id` with the provided value.
20575        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20576            self.jwk_id = Some(field.into().into());
20577        }
20578        ///Sets `jwk_id` with the provided value.
20579        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20580            self.set_jwk_id(field.into());
20581            self
20582        }
20583    }
20584    impl super::ZkLoginClaim {
20585        pub const fn const_default() -> Self {
20586            Self {
20587                value: None,
20588                index_mod_4: None,
20589            }
20590        }
20591        #[doc(hidden)]
20592        pub fn default_instance() -> &'static Self {
20593            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20594            &DEFAULT
20595        }
20596        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20597        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20598            self.value.as_mut().map(|field| field as _)
20599        }
20600        ///Returns a mutable reference to `value`.
20601        ///If the field is unset, it is first initialized with the default value.
20602        pub fn value_mut(&mut self) -> &mut String {
20603            self.value.get_or_insert_default()
20604        }
20605        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
20606        pub fn value_opt(&self) -> Option<&str> {
20607            self.value.as_ref().map(|field| field as _)
20608        }
20609        ///Sets `value` with the provided value.
20610        pub fn set_value<T: Into<String>>(&mut self, field: T) {
20611            self.value = Some(field.into().into());
20612        }
20613        ///Sets `value` with the provided value.
20614        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20615            self.set_value(field.into());
20616            self
20617        }
20618        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20619        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20620            self.index_mod_4.as_mut().map(|field| field as _)
20621        }
20622        ///Returns a mutable reference to `index_mod_4`.
20623        ///If the field is unset, it is first initialized with the default value.
20624        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20625            self.index_mod_4.get_or_insert_default()
20626        }
20627        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
20628        pub fn index_mod_4_opt(&self) -> Option<u32> {
20629            self.index_mod_4.as_ref().map(|field| *field)
20630        }
20631        ///Sets `index_mod_4` with the provided value.
20632        pub fn set_index_mod_4(&mut self, field: u32) {
20633            self.index_mod_4 = Some(field);
20634        }
20635        ///Sets `index_mod_4` with the provided value.
20636        pub fn with_index_mod_4(mut self, field: u32) -> Self {
20637            self.set_index_mod_4(field);
20638            self
20639        }
20640    }
20641    impl super::ZkLoginInputs {
20642        pub const fn const_default() -> Self {
20643            Self {
20644                proof_points: None,
20645                iss_base64_details: None,
20646                header_base64: None,
20647                address_seed: None,
20648            }
20649        }
20650        #[doc(hidden)]
20651        pub fn default_instance() -> &'static Self {
20652            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20653            &DEFAULT
20654        }
20655        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
20656        pub fn proof_points(&self) -> &super::ZkLoginProof {
20657            self.proof_points
20658                .as_ref()
20659                .map(|field| field as _)
20660                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20661        }
20662        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20663        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20664            self.proof_points.as_mut().map(|field| field as _)
20665        }
20666        ///Returns a mutable reference to `proof_points`.
20667        ///If the field is unset, it is first initialized with the default value.
20668        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20669            self.proof_points.get_or_insert_default()
20670        }
20671        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
20672        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20673            self.proof_points.as_ref().map(|field| field as _)
20674        }
20675        ///Sets `proof_points` with the provided value.
20676        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20677            self.proof_points = Some(field.into().into());
20678        }
20679        ///Sets `proof_points` with the provided value.
20680        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20681            mut self,
20682            field: T,
20683        ) -> Self {
20684            self.set_proof_points(field.into());
20685            self
20686        }
20687        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
20688        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20689            self.iss_base64_details
20690                .as_ref()
20691                .map(|field| field as _)
20692                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20693        }
20694        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20695        pub fn iss_base64_details_opt_mut(
20696            &mut self,
20697        ) -> Option<&mut super::ZkLoginClaim> {
20698            self.iss_base64_details.as_mut().map(|field| field as _)
20699        }
20700        ///Returns a mutable reference to `iss_base64_details`.
20701        ///If the field is unset, it is first initialized with the default value.
20702        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20703            self.iss_base64_details.get_or_insert_default()
20704        }
20705        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
20706        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20707            self.iss_base64_details.as_ref().map(|field| field as _)
20708        }
20709        ///Sets `iss_base64_details` with the provided value.
20710        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20711            &mut self,
20712            field: T,
20713        ) {
20714            self.iss_base64_details = Some(field.into().into());
20715        }
20716        ///Sets `iss_base64_details` with the provided value.
20717        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20718            mut self,
20719            field: T,
20720        ) -> Self {
20721            self.set_iss_base64_details(field.into());
20722            self
20723        }
20724        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20725        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20726            self.header_base64.as_mut().map(|field| field as _)
20727        }
20728        ///Returns a mutable reference to `header_base64`.
20729        ///If the field is unset, it is first initialized with the default value.
20730        pub fn header_base64_mut(&mut self) -> &mut String {
20731            self.header_base64.get_or_insert_default()
20732        }
20733        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
20734        pub fn header_base64_opt(&self) -> Option<&str> {
20735            self.header_base64.as_ref().map(|field| field as _)
20736        }
20737        ///Sets `header_base64` with the provided value.
20738        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20739            self.header_base64 = Some(field.into().into());
20740        }
20741        ///Sets `header_base64` with the provided value.
20742        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20743            self.set_header_base64(field.into());
20744            self
20745        }
20746        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20747        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20748            self.address_seed.as_mut().map(|field| field as _)
20749        }
20750        ///Returns a mutable reference to `address_seed`.
20751        ///If the field is unset, it is first initialized with the default value.
20752        pub fn address_seed_mut(&mut self) -> &mut String {
20753            self.address_seed.get_or_insert_default()
20754        }
20755        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20756        pub fn address_seed_opt(&self) -> Option<&str> {
20757            self.address_seed.as_ref().map(|field| field as _)
20758        }
20759        ///Sets `address_seed` with the provided value.
20760        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20761            self.address_seed = Some(field.into().into());
20762        }
20763        ///Sets `address_seed` with the provided value.
20764        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20765            self.set_address_seed(field.into());
20766            self
20767        }
20768    }
20769    impl super::ZkLoginProof {
20770        pub const fn const_default() -> Self {
20771            Self { a: None, b: None, c: None }
20772        }
20773        #[doc(hidden)]
20774        pub fn default_instance() -> &'static Self {
20775            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20776            &DEFAULT
20777        }
20778        ///Returns the value of `a`, or the default value if `a` is unset.
20779        pub fn a(&self) -> &super::CircomG1 {
20780            self.a
20781                .as_ref()
20782                .map(|field| field as _)
20783                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20784        }
20785        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20786        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20787            self.a.as_mut().map(|field| field as _)
20788        }
20789        ///Returns a mutable reference to `a`.
20790        ///If the field is unset, it is first initialized with the default value.
20791        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20792            self.a.get_or_insert_default()
20793        }
20794        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
20795        pub fn a_opt(&self) -> Option<&super::CircomG1> {
20796            self.a.as_ref().map(|field| field as _)
20797        }
20798        ///Sets `a` with the provided value.
20799        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20800            self.a = Some(field.into().into());
20801        }
20802        ///Sets `a` with the provided value.
20803        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20804            self.set_a(field.into());
20805            self
20806        }
20807        ///Returns the value of `b`, or the default value if `b` is unset.
20808        pub fn b(&self) -> &super::CircomG2 {
20809            self.b
20810                .as_ref()
20811                .map(|field| field as _)
20812                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20813        }
20814        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20815        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20816            self.b.as_mut().map(|field| field as _)
20817        }
20818        ///Returns a mutable reference to `b`.
20819        ///If the field is unset, it is first initialized with the default value.
20820        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20821            self.b.get_or_insert_default()
20822        }
20823        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
20824        pub fn b_opt(&self) -> Option<&super::CircomG2> {
20825            self.b.as_ref().map(|field| field as _)
20826        }
20827        ///Sets `b` with the provided value.
20828        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20829            self.b = Some(field.into().into());
20830        }
20831        ///Sets `b` with the provided value.
20832        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20833            self.set_b(field.into());
20834            self
20835        }
20836        ///Returns the value of `c`, or the default value if `c` is unset.
20837        pub fn c(&self) -> &super::CircomG1 {
20838            self.c
20839                .as_ref()
20840                .map(|field| field as _)
20841                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20842        }
20843        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20844        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20845            self.c.as_mut().map(|field| field as _)
20846        }
20847        ///Returns a mutable reference to `c`.
20848        ///If the field is unset, it is first initialized with the default value.
20849        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20850            self.c.get_or_insert_default()
20851        }
20852        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
20853        pub fn c_opt(&self) -> Option<&super::CircomG1> {
20854            self.c.as_ref().map(|field| field as _)
20855        }
20856        ///Sets `c` with the provided value.
20857        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20858            self.c = Some(field.into().into());
20859        }
20860        ///Sets `c` with the provided value.
20861        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20862            self.set_c(field.into());
20863            self
20864        }
20865    }
20866    impl super::ZkLoginPublicIdentifier {
20867        pub const fn const_default() -> Self {
20868            Self {
20869                iss: None,
20870                address_seed: None,
20871            }
20872        }
20873        #[doc(hidden)]
20874        pub fn default_instance() -> &'static Self {
20875            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20876            &DEFAULT
20877        }
20878        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20879        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20880            self.iss.as_mut().map(|field| field as _)
20881        }
20882        ///Returns a mutable reference to `iss`.
20883        ///If the field is unset, it is first initialized with the default value.
20884        pub fn iss_mut(&mut self) -> &mut String {
20885            self.iss.get_or_insert_default()
20886        }
20887        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
20888        pub fn iss_opt(&self) -> Option<&str> {
20889            self.iss.as_ref().map(|field| field as _)
20890        }
20891        ///Sets `iss` with the provided value.
20892        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
20893            self.iss = Some(field.into().into());
20894        }
20895        ///Sets `iss` with the provided value.
20896        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
20897            self.set_iss(field.into());
20898            self
20899        }
20900        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20901        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20902            self.address_seed.as_mut().map(|field| field as _)
20903        }
20904        ///Returns a mutable reference to `address_seed`.
20905        ///If the field is unset, it is first initialized with the default value.
20906        pub fn address_seed_mut(&mut self) -> &mut String {
20907            self.address_seed.get_or_insert_default()
20908        }
20909        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20910        pub fn address_seed_opt(&self) -> Option<&str> {
20911            self.address_seed.as_ref().map(|field| field as _)
20912        }
20913        ///Sets `address_seed` with the provided value.
20914        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20915            self.address_seed = Some(field.into().into());
20916        }
20917        ///Sets `address_seed` with the provided value.
20918        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20919            self.set_address_seed(field.into());
20920            self
20921        }
20922    }
20923}