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 {
8786                package_id: None,
8787                selector: None,
8788            }
8789        }
8790        #[doc(hidden)]
8791        pub fn default_instance() -> &'static Self {
8792            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8793            &DEFAULT
8794        }
8795        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8796        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8797            self.package_id.as_mut().map(|field| field as _)
8798        }
8799        ///Returns a mutable reference to `package_id`.
8800        ///If the field is unset, it is first initialized with the default value.
8801        pub fn package_id_mut(&mut self) -> &mut String {
8802            self.package_id.get_or_insert_default()
8803        }
8804        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8805        pub fn package_id_opt(&self) -> Option<&str> {
8806            self.package_id.as_ref().map(|field| field as _)
8807        }
8808        ///Sets `package_id` with the provided value.
8809        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8810            self.package_id = Some(field.into().into());
8811        }
8812        ///Sets `package_id` with the provided value.
8813        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8814            self.set_package_id(field.into());
8815            self
8816        }
8817        ///Returns the value of `version`, or the default value if `version` is unset.
8818        pub fn version(&self) -> u64 {
8819            if let Some(super::get_package_request::Selector::Version(field)) = &self
8820                .selector
8821            {
8822                *field
8823            } else {
8824                0u64
8825            }
8826        }
8827        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8828        pub fn version_opt(&self) -> Option<u64> {
8829            if let Some(super::get_package_request::Selector::Version(field)) = &self
8830                .selector
8831            {
8832                Some(*field)
8833            } else {
8834                None
8835            }
8836        }
8837        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8838        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8839            if let Some(super::get_package_request::Selector::Version(field)) = &mut self
8840                .selector
8841            {
8842                Some(field as _)
8843            } else {
8844                None
8845            }
8846        }
8847        ///Returns a mutable reference to `version`.
8848        ///If the field is unset, it is first initialized with the default value.
8849        ///If any other oneof field in the same oneof is set, it will be cleared.
8850        pub fn version_mut(&mut self) -> &mut u64 {
8851            if self.version_opt_mut().is_none() {
8852                self.selector = Some(
8853                    super::get_package_request::Selector::Version(u64::default()),
8854                );
8855            }
8856            self.version_opt_mut().unwrap()
8857        }
8858        ///Sets `version` with the provided value.
8859        ///If any other oneof field in the same oneof is set, it will be cleared.
8860        pub fn set_version(&mut self, field: u64) {
8861            self.selector = Some(super::get_package_request::Selector::Version(field));
8862        }
8863        ///Sets `version` with the provided value.
8864        ///If any other oneof field in the same oneof is set, it will be cleared.
8865        pub fn with_version(mut self, field: u64) -> Self {
8866            self.set_version(field);
8867            self
8868        }
8869        ///Returns the value of `at_checkpoint`, or the default value if `at_checkpoint` is unset.
8870        pub fn at_checkpoint(&self) -> u64 {
8871            if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
8872                .selector
8873            {
8874                *field
8875            } else {
8876                0u64
8877            }
8878        }
8879        ///If `at_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8880        pub fn at_checkpoint_opt(&self) -> Option<u64> {
8881            if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
8882                .selector
8883            {
8884                Some(*field)
8885            } else {
8886                None
8887            }
8888        }
8889        ///If `at_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8890        pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8891            if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &mut self
8892                .selector
8893            {
8894                Some(field as _)
8895            } else {
8896                None
8897            }
8898        }
8899        ///Returns a mutable reference to `at_checkpoint`.
8900        ///If the field is unset, it is first initialized with the default value.
8901        ///If any other oneof field in the same oneof is set, it will be cleared.
8902        pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
8903            if self.at_checkpoint_opt_mut().is_none() {
8904                self.selector = Some(
8905                    super::get_package_request::Selector::AtCheckpoint(u64::default()),
8906                );
8907            }
8908            self.at_checkpoint_opt_mut().unwrap()
8909        }
8910        ///Sets `at_checkpoint` with the provided value.
8911        ///If any other oneof field in the same oneof is set, it will be cleared.
8912        pub fn set_at_checkpoint(&mut self, field: u64) {
8913            self.selector = Some(
8914                super::get_package_request::Selector::AtCheckpoint(field),
8915            );
8916        }
8917        ///Sets `at_checkpoint` with the provided value.
8918        ///If any other oneof field in the same oneof is set, it will be cleared.
8919        pub fn with_at_checkpoint(mut self, field: u64) -> Self {
8920            self.set_at_checkpoint(field);
8921            self
8922        }
8923    }
8924    impl super::GetPackageResponse {
8925        pub const fn const_default() -> Self {
8926            Self { package: None }
8927        }
8928        #[doc(hidden)]
8929        pub fn default_instance() -> &'static Self {
8930            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8931            &DEFAULT
8932        }
8933        ///Returns the value of `package`, or the default value if `package` is unset.
8934        pub fn package(&self) -> &super::Package {
8935            self.package
8936                .as_ref()
8937                .map(|field| field as _)
8938                .unwrap_or_else(|| super::Package::default_instance() as _)
8939        }
8940        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8941        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8942            self.package.as_mut().map(|field| field as _)
8943        }
8944        ///Returns a mutable reference to `package`.
8945        ///If the field is unset, it is first initialized with the default value.
8946        pub fn package_mut(&mut self) -> &mut super::Package {
8947            self.package.get_or_insert_default()
8948        }
8949        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
8950        pub fn package_opt(&self) -> Option<&super::Package> {
8951            self.package.as_ref().map(|field| field as _)
8952        }
8953        ///Sets `package` with the provided value.
8954        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8955            self.package = Some(field.into().into());
8956        }
8957        ///Sets `package` with the provided value.
8958        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8959            self.set_package(field.into());
8960            self
8961        }
8962    }
8963    impl super::GetServiceInfoRequest {
8964        pub const fn const_default() -> Self {
8965            Self {}
8966        }
8967        #[doc(hidden)]
8968        pub fn default_instance() -> &'static Self {
8969            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8970            &DEFAULT
8971        }
8972    }
8973    impl super::GetServiceInfoResponse {
8974        pub const fn const_default() -> Self {
8975            Self {
8976                chain_id: None,
8977                chain: None,
8978                epoch: None,
8979                checkpoint_height: None,
8980                timestamp: None,
8981                lowest_available_checkpoint: None,
8982                lowest_available_checkpoint_objects: None,
8983                server: None,
8984            }
8985        }
8986        #[doc(hidden)]
8987        pub fn default_instance() -> &'static Self {
8988            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8989            &DEFAULT
8990        }
8991        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8992        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8993            self.chain_id.as_mut().map(|field| field as _)
8994        }
8995        ///Returns a mutable reference to `chain_id`.
8996        ///If the field is unset, it is first initialized with the default value.
8997        pub fn chain_id_mut(&mut self) -> &mut String {
8998            self.chain_id.get_or_insert_default()
8999        }
9000        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9001        pub fn chain_id_opt(&self) -> Option<&str> {
9002            self.chain_id.as_ref().map(|field| field as _)
9003        }
9004        ///Sets `chain_id` with the provided value.
9005        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
9006            self.chain_id = Some(field.into().into());
9007        }
9008        ///Sets `chain_id` with the provided value.
9009        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
9010            self.set_chain_id(field.into());
9011            self
9012        }
9013        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9014        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
9015            self.chain.as_mut().map(|field| field as _)
9016        }
9017        ///Returns a mutable reference to `chain`.
9018        ///If the field is unset, it is first initialized with the default value.
9019        pub fn chain_mut(&mut self) -> &mut String {
9020            self.chain.get_or_insert_default()
9021        }
9022        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
9023        pub fn chain_opt(&self) -> Option<&str> {
9024            self.chain.as_ref().map(|field| field as _)
9025        }
9026        ///Sets `chain` with the provided value.
9027        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
9028            self.chain = Some(field.into().into());
9029        }
9030        ///Sets `chain` with the provided value.
9031        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
9032            self.set_chain(field.into());
9033            self
9034        }
9035        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9036        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
9037            self.epoch.as_mut().map(|field| field as _)
9038        }
9039        ///Returns a mutable reference to `epoch`.
9040        ///If the field is unset, it is first initialized with the default value.
9041        pub fn epoch_mut(&mut self) -> &mut u64 {
9042            self.epoch.get_or_insert_default()
9043        }
9044        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
9045        pub fn epoch_opt(&self) -> Option<u64> {
9046            self.epoch.as_ref().map(|field| *field)
9047        }
9048        ///Sets `epoch` with the provided value.
9049        pub fn set_epoch(&mut self, field: u64) {
9050            self.epoch = Some(field);
9051        }
9052        ///Sets `epoch` with the provided value.
9053        pub fn with_epoch(mut self, field: u64) -> Self {
9054            self.set_epoch(field);
9055            self
9056        }
9057        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9058        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
9059            self.checkpoint_height.as_mut().map(|field| field as _)
9060        }
9061        ///Returns a mutable reference to `checkpoint_height`.
9062        ///If the field is unset, it is first initialized with the default value.
9063        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
9064            self.checkpoint_height.get_or_insert_default()
9065        }
9066        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
9067        pub fn checkpoint_height_opt(&self) -> Option<u64> {
9068            self.checkpoint_height.as_ref().map(|field| *field)
9069        }
9070        ///Sets `checkpoint_height` with the provided value.
9071        pub fn set_checkpoint_height(&mut self, field: u64) {
9072            self.checkpoint_height = Some(field);
9073        }
9074        ///Sets `checkpoint_height` with the provided value.
9075        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
9076            self.set_checkpoint_height(field);
9077            self
9078        }
9079        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9080        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
9081            self.timestamp.as_mut().map(|field| field as _)
9082        }
9083        ///Returns a mutable reference to `timestamp`.
9084        ///If the field is unset, it is first initialized with the default value.
9085        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
9086            self.timestamp.get_or_insert_default()
9087        }
9088        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
9089        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
9090            self.timestamp.as_ref().map(|field| field as _)
9091        }
9092        ///Sets `timestamp` with the provided value.
9093        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
9094            self.timestamp = Some(field.into().into());
9095        }
9096        ///Sets `timestamp` with the provided value.
9097        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
9098            mut self,
9099            field: T,
9100        ) -> Self {
9101            self.set_timestamp(field.into());
9102            self
9103        }
9104        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9105        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9106            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
9107        }
9108        ///Returns a mutable reference to `lowest_available_checkpoint`.
9109        ///If the field is unset, it is first initialized with the default value.
9110        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
9111            self.lowest_available_checkpoint.get_or_insert_default()
9112        }
9113        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9114        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
9115            self.lowest_available_checkpoint.as_ref().map(|field| *field)
9116        }
9117        ///Sets `lowest_available_checkpoint` with the provided value.
9118        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
9119            self.lowest_available_checkpoint = Some(field);
9120        }
9121        ///Sets `lowest_available_checkpoint` with the provided value.
9122        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
9123            self.set_lowest_available_checkpoint(field);
9124            self
9125        }
9126        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9127        pub fn lowest_available_checkpoint_objects_opt_mut(
9128            &mut self,
9129        ) -> Option<&mut u64> {
9130            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
9131        }
9132        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
9133        ///If the field is unset, it is first initialized with the default value.
9134        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
9135            self.lowest_available_checkpoint_objects.get_or_insert_default()
9136        }
9137        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
9138        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
9139            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
9140        }
9141        ///Sets `lowest_available_checkpoint_objects` with the provided value.
9142        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
9143            self.lowest_available_checkpoint_objects = Some(field);
9144        }
9145        ///Sets `lowest_available_checkpoint_objects` with the provided value.
9146        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
9147            self.set_lowest_available_checkpoint_objects(field);
9148            self
9149        }
9150        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9151        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
9152            self.server.as_mut().map(|field| field as _)
9153        }
9154        ///Returns a mutable reference to `server`.
9155        ///If the field is unset, it is first initialized with the default value.
9156        pub fn server_mut(&mut self) -> &mut String {
9157            self.server.get_or_insert_default()
9158        }
9159        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
9160        pub fn server_opt(&self) -> Option<&str> {
9161            self.server.as_ref().map(|field| field as _)
9162        }
9163        ///Sets `server` with the provided value.
9164        pub fn set_server<T: Into<String>>(&mut self, field: T) {
9165            self.server = Some(field.into().into());
9166        }
9167        ///Sets `server` with the provided value.
9168        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9169            self.set_server(field.into());
9170            self
9171        }
9172    }
9173    impl super::GetTransactionRequest {
9174        pub const fn const_default() -> Self {
9175            Self {
9176                digest: None,
9177                read_mask: None,
9178            }
9179        }
9180        #[doc(hidden)]
9181        pub fn default_instance() -> &'static Self {
9182            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9183            &DEFAULT
9184        }
9185        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9186        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9187            self.digest.as_mut().map(|field| field as _)
9188        }
9189        ///Returns a mutable reference to `digest`.
9190        ///If the field is unset, it is first initialized with the default value.
9191        pub fn digest_mut(&mut self) -> &mut String {
9192            self.digest.get_or_insert_default()
9193        }
9194        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9195        pub fn digest_opt(&self) -> Option<&str> {
9196            self.digest.as_ref().map(|field| field as _)
9197        }
9198        ///Sets `digest` with the provided value.
9199        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9200            self.digest = Some(field.into().into());
9201        }
9202        ///Sets `digest` with the provided value.
9203        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9204            self.set_digest(field.into());
9205            self
9206        }
9207        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9208        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9209            self.read_mask.as_mut().map(|field| field as _)
9210        }
9211        ///Returns a mutable reference to `read_mask`.
9212        ///If the field is unset, it is first initialized with the default value.
9213        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9214            self.read_mask.get_or_insert_default()
9215        }
9216        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9217        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9218            self.read_mask.as_ref().map(|field| field as _)
9219        }
9220        ///Sets `read_mask` with the provided value.
9221        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9222            self.read_mask = Some(field.into().into());
9223        }
9224        ///Sets `read_mask` with the provided value.
9225        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9226            mut self,
9227            field: T,
9228        ) -> Self {
9229            self.set_read_mask(field.into());
9230            self
9231        }
9232    }
9233    impl super::GetTransactionResponse {
9234        pub const fn const_default() -> Self {
9235            Self { transaction: None }
9236        }
9237        #[doc(hidden)]
9238        pub fn default_instance() -> &'static Self {
9239            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9240            &DEFAULT
9241        }
9242        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9243        pub fn transaction(&self) -> &super::ExecutedTransaction {
9244            self.transaction
9245                .as_ref()
9246                .map(|field| field as _)
9247                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9248        }
9249        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9250        pub fn transaction_opt_mut(
9251            &mut self,
9252        ) -> Option<&mut super::ExecutedTransaction> {
9253            self.transaction.as_mut().map(|field| field as _)
9254        }
9255        ///Returns a mutable reference to `transaction`.
9256        ///If the field is unset, it is first initialized with the default value.
9257        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9258            self.transaction.get_or_insert_default()
9259        }
9260        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9261        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9262            self.transaction.as_ref().map(|field| field as _)
9263        }
9264        ///Sets `transaction` with the provided value.
9265        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9266            &mut self,
9267            field: T,
9268        ) {
9269            self.transaction = Some(field.into().into());
9270        }
9271        ///Sets `transaction` with the provided value.
9272        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9273            mut self,
9274            field: T,
9275        ) -> Self {
9276            self.set_transaction(field.into());
9277            self
9278        }
9279    }
9280    impl super::GetTransactionResult {
9281        pub const fn const_default() -> Self {
9282            Self { result: None }
9283        }
9284        #[doc(hidden)]
9285        pub fn default_instance() -> &'static Self {
9286            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9287            &DEFAULT
9288        }
9289        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9290        pub fn transaction(&self) -> &super::ExecutedTransaction {
9291            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9292                .result
9293            {
9294                field as _
9295            } else {
9296                super::ExecutedTransaction::default_instance() as _
9297            }
9298        }
9299        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9300        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9301            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9302                .result
9303            {
9304                Some(field as _)
9305            } else {
9306                None
9307            }
9308        }
9309        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9310        pub fn transaction_opt_mut(
9311            &mut self,
9312        ) -> Option<&mut super::ExecutedTransaction> {
9313            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9314                .result
9315            {
9316                Some(field as _)
9317            } else {
9318                None
9319            }
9320        }
9321        ///Returns a mutable reference to `transaction`.
9322        ///If the field is unset, it is first initialized with the default value.
9323        ///If any other oneof field in the same oneof is set, it will be cleared.
9324        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9325            if self.transaction_opt_mut().is_none() {
9326                self.result = Some(
9327                    super::get_transaction_result::Result::Transaction(
9328                        super::ExecutedTransaction::default(),
9329                    ),
9330                );
9331            }
9332            self.transaction_opt_mut().unwrap()
9333        }
9334        ///Sets `transaction` with the provided value.
9335        ///If any other oneof field in the same oneof is set, it will be cleared.
9336        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9337            &mut self,
9338            field: T,
9339        ) {
9340            self.result = Some(
9341                super::get_transaction_result::Result::Transaction(field.into().into()),
9342            );
9343        }
9344        ///Sets `transaction` with the provided value.
9345        ///If any other oneof field in the same oneof is set, it will be cleared.
9346        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9347            mut self,
9348            field: T,
9349        ) -> Self {
9350            self.set_transaction(field.into());
9351            self
9352        }
9353        ///Returns the value of `error`, or the default value if `error` is unset.
9354        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9355            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9356                .result
9357            {
9358                field as _
9359            } else {
9360                super::super::super::super::google::rpc::Status::default_instance() as _
9361            }
9362        }
9363        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9364        pub fn error_opt(
9365            &self,
9366        ) -> Option<&super::super::super::super::google::rpc::Status> {
9367            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9368                .result
9369            {
9370                Some(field as _)
9371            } else {
9372                None
9373            }
9374        }
9375        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9376        pub fn error_opt_mut(
9377            &mut self,
9378        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9379            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9380                .result
9381            {
9382                Some(field as _)
9383            } else {
9384                None
9385            }
9386        }
9387        ///Returns a mutable reference to `error`.
9388        ///If the field is unset, it is first initialized with the default value.
9389        ///If any other oneof field in the same oneof is set, it will be cleared.
9390        pub fn error_mut(
9391            &mut self,
9392        ) -> &mut super::super::super::super::google::rpc::Status {
9393            if self.error_opt_mut().is_none() {
9394                self.result = Some(
9395                    super::get_transaction_result::Result::Error(
9396                        super::super::super::super::google::rpc::Status::default(),
9397                    ),
9398                );
9399            }
9400            self.error_opt_mut().unwrap()
9401        }
9402        ///Sets `error` with the provided value.
9403        ///If any other oneof field in the same oneof is set, it will be cleared.
9404        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9405            &mut self,
9406            field: T,
9407        ) {
9408            self.result = Some(
9409                super::get_transaction_result::Result::Error(field.into().into()),
9410            );
9411        }
9412        ///Sets `error` with the provided value.
9413        ///If any other oneof field in the same oneof is set, it will be cleared.
9414        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9415            mut self,
9416            field: T,
9417        ) -> Self {
9418            self.set_error(field.into());
9419            self
9420        }
9421    }
9422    impl super::IndexError {
9423        pub const fn const_default() -> Self {
9424            Self {
9425                index: None,
9426                subresult: None,
9427            }
9428        }
9429        #[doc(hidden)]
9430        pub fn default_instance() -> &'static Self {
9431            static DEFAULT: super::IndexError = super::IndexError::const_default();
9432            &DEFAULT
9433        }
9434        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9435        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9436            self.index.as_mut().map(|field| field as _)
9437        }
9438        ///Returns a mutable reference to `index`.
9439        ///If the field is unset, it is first initialized with the default value.
9440        pub fn index_mut(&mut self) -> &mut u32 {
9441            self.index.get_or_insert_default()
9442        }
9443        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
9444        pub fn index_opt(&self) -> Option<u32> {
9445            self.index.as_ref().map(|field| *field)
9446        }
9447        ///Sets `index` with the provided value.
9448        pub fn set_index(&mut self, field: u32) {
9449            self.index = Some(field);
9450        }
9451        ///Sets `index` with the provided value.
9452        pub fn with_index(mut self, field: u32) -> Self {
9453            self.set_index(field);
9454            self
9455        }
9456        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9457        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9458            self.subresult.as_mut().map(|field| field as _)
9459        }
9460        ///Returns a mutable reference to `subresult`.
9461        ///If the field is unset, it is first initialized with the default value.
9462        pub fn subresult_mut(&mut self) -> &mut u32 {
9463            self.subresult.get_or_insert_default()
9464        }
9465        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
9466        pub fn subresult_opt(&self) -> Option<u32> {
9467            self.subresult.as_ref().map(|field| *field)
9468        }
9469        ///Sets `subresult` with the provided value.
9470        pub fn set_subresult(&mut self, field: u32) {
9471            self.subresult = Some(field);
9472        }
9473        ///Sets `subresult` with the provided value.
9474        pub fn with_subresult(mut self, field: u32) -> Self {
9475            self.set_subresult(field);
9476            self
9477        }
9478    }
9479    impl super::Input {
9480        pub const fn const_default() -> Self {
9481            Self {
9482                kind: None,
9483                pure: None,
9484                object_id: None,
9485                version: None,
9486                digest: None,
9487                mutable: None,
9488                mutability: None,
9489                funds_withdrawal: None,
9490                literal: None,
9491            }
9492        }
9493        #[doc(hidden)]
9494        pub fn default_instance() -> &'static Self {
9495            static DEFAULT: super::Input = super::Input::const_default();
9496            &DEFAULT
9497        }
9498        ///Sets `kind` with the provided value.
9499        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9500            self.set_kind(field.into());
9501            self
9502        }
9503        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
9504        pub fn pure_opt(&self) -> Option<&[u8]> {
9505            self.pure.as_ref().map(|field| field as _)
9506        }
9507        ///Sets `pure` with the provided value.
9508        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9509            self.pure = Some(field.into().into());
9510        }
9511        ///Sets `pure` with the provided value.
9512        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9513            self.set_pure(field.into());
9514            self
9515        }
9516        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9517        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9518            self.object_id.as_mut().map(|field| field as _)
9519        }
9520        ///Returns a mutable reference to `object_id`.
9521        ///If the field is unset, it is first initialized with the default value.
9522        pub fn object_id_mut(&mut self) -> &mut String {
9523            self.object_id.get_or_insert_default()
9524        }
9525        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9526        pub fn object_id_opt(&self) -> Option<&str> {
9527            self.object_id.as_ref().map(|field| field as _)
9528        }
9529        ///Sets `object_id` with the provided value.
9530        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9531            self.object_id = Some(field.into().into());
9532        }
9533        ///Sets `object_id` with the provided value.
9534        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9535            self.set_object_id(field.into());
9536            self
9537        }
9538        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9539        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9540            self.version.as_mut().map(|field| field as _)
9541        }
9542        ///Returns a mutable reference to `version`.
9543        ///If the field is unset, it is first initialized with the default value.
9544        pub fn version_mut(&mut self) -> &mut u64 {
9545            self.version.get_or_insert_default()
9546        }
9547        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9548        pub fn version_opt(&self) -> Option<u64> {
9549            self.version.as_ref().map(|field| *field)
9550        }
9551        ///Sets `version` with the provided value.
9552        pub fn set_version(&mut self, field: u64) {
9553            self.version = Some(field);
9554        }
9555        ///Sets `version` with the provided value.
9556        pub fn with_version(mut self, field: u64) -> Self {
9557            self.set_version(field);
9558            self
9559        }
9560        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9561        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9562            self.digest.as_mut().map(|field| field as _)
9563        }
9564        ///Returns a mutable reference to `digest`.
9565        ///If the field is unset, it is first initialized with the default value.
9566        pub fn digest_mut(&mut self) -> &mut String {
9567            self.digest.get_or_insert_default()
9568        }
9569        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9570        pub fn digest_opt(&self) -> Option<&str> {
9571            self.digest.as_ref().map(|field| field as _)
9572        }
9573        ///Sets `digest` with the provided value.
9574        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9575            self.digest = Some(field.into().into());
9576        }
9577        ///Sets `digest` with the provided value.
9578        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9579            self.set_digest(field.into());
9580            self
9581        }
9582        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9583        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9584            self.mutable.as_mut().map(|field| field as _)
9585        }
9586        ///Returns a mutable reference to `mutable`.
9587        ///If the field is unset, it is first initialized with the default value.
9588        pub fn mutable_mut(&mut self) -> &mut bool {
9589            self.mutable.get_or_insert_default()
9590        }
9591        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
9592        pub fn mutable_opt(&self) -> Option<bool> {
9593            self.mutable.as_ref().map(|field| *field)
9594        }
9595        ///Sets `mutable` with the provided value.
9596        pub fn set_mutable(&mut self, field: bool) {
9597            self.mutable = Some(field);
9598        }
9599        ///Sets `mutable` with the provided value.
9600        pub fn with_mutable(mut self, field: bool) -> Self {
9601            self.set_mutable(field);
9602            self
9603        }
9604        ///Sets `mutability` with the provided value.
9605        pub fn with_mutability<T: Into<super::input::Mutability>>(
9606            mut self,
9607            field: T,
9608        ) -> Self {
9609            self.set_mutability(field.into());
9610            self
9611        }
9612        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
9613        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9614            self.funds_withdrawal
9615                .as_ref()
9616                .map(|field| field as _)
9617                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9618        }
9619        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9620        pub fn funds_withdrawal_opt_mut(
9621            &mut self,
9622        ) -> Option<&mut super::FundsWithdrawal> {
9623            self.funds_withdrawal.as_mut().map(|field| field as _)
9624        }
9625        ///Returns a mutable reference to `funds_withdrawal`.
9626        ///If the field is unset, it is first initialized with the default value.
9627        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9628            self.funds_withdrawal.get_or_insert_default()
9629        }
9630        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9631        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9632            self.funds_withdrawal.as_ref().map(|field| field as _)
9633        }
9634        ///Sets `funds_withdrawal` with the provided value.
9635        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9636            &mut self,
9637            field: T,
9638        ) {
9639            self.funds_withdrawal = Some(field.into().into());
9640        }
9641        ///Sets `funds_withdrawal` with the provided value.
9642        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9643            mut self,
9644            field: T,
9645        ) -> Self {
9646            self.set_funds_withdrawal(field.into());
9647            self
9648        }
9649        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9650        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9651            self.literal.as_mut().map(|field| field as _)
9652        }
9653        ///Returns a mutable reference to `literal`.
9654        ///If the field is unset, it is first initialized with the default value.
9655        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9656            self.literal.get_or_insert_default()
9657        }
9658        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9659        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9660            self.literal.as_ref().map(|field| field as _)
9661        }
9662        ///Sets `literal` with the provided value.
9663        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9664            self.literal = Some(field.into().into());
9665        }
9666        ///Sets `literal` with the provided value.
9667        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9668            self.set_literal(field.into());
9669            self
9670        }
9671    }
9672    impl super::Jwk {
9673        pub const fn const_default() -> Self {
9674            Self {
9675                kty: None,
9676                e: None,
9677                n: None,
9678                alg: None,
9679            }
9680        }
9681        #[doc(hidden)]
9682        pub fn default_instance() -> &'static Self {
9683            static DEFAULT: super::Jwk = super::Jwk::const_default();
9684            &DEFAULT
9685        }
9686        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9687        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9688            self.kty.as_mut().map(|field| field as _)
9689        }
9690        ///Returns a mutable reference to `kty`.
9691        ///If the field is unset, it is first initialized with the default value.
9692        pub fn kty_mut(&mut self) -> &mut String {
9693            self.kty.get_or_insert_default()
9694        }
9695        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
9696        pub fn kty_opt(&self) -> Option<&str> {
9697            self.kty.as_ref().map(|field| field as _)
9698        }
9699        ///Sets `kty` with the provided value.
9700        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9701            self.kty = Some(field.into().into());
9702        }
9703        ///Sets `kty` with the provided value.
9704        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9705            self.set_kty(field.into());
9706            self
9707        }
9708        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9709        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9710            self.e.as_mut().map(|field| field as _)
9711        }
9712        ///Returns a mutable reference to `e`.
9713        ///If the field is unset, it is first initialized with the default value.
9714        pub fn e_mut(&mut self) -> &mut String {
9715            self.e.get_or_insert_default()
9716        }
9717        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
9718        pub fn e_opt(&self) -> Option<&str> {
9719            self.e.as_ref().map(|field| field as _)
9720        }
9721        ///Sets `e` with the provided value.
9722        pub fn set_e<T: Into<String>>(&mut self, field: T) {
9723            self.e = Some(field.into().into());
9724        }
9725        ///Sets `e` with the provided value.
9726        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9727            self.set_e(field.into());
9728            self
9729        }
9730        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9731        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9732            self.n.as_mut().map(|field| field as _)
9733        }
9734        ///Returns a mutable reference to `n`.
9735        ///If the field is unset, it is first initialized with the default value.
9736        pub fn n_mut(&mut self) -> &mut String {
9737            self.n.get_or_insert_default()
9738        }
9739        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
9740        pub fn n_opt(&self) -> Option<&str> {
9741            self.n.as_ref().map(|field| field as _)
9742        }
9743        ///Sets `n` with the provided value.
9744        pub fn set_n<T: Into<String>>(&mut self, field: T) {
9745            self.n = Some(field.into().into());
9746        }
9747        ///Sets `n` with the provided value.
9748        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9749            self.set_n(field.into());
9750            self
9751        }
9752        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9753        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9754            self.alg.as_mut().map(|field| field as _)
9755        }
9756        ///Returns a mutable reference to `alg`.
9757        ///If the field is unset, it is first initialized with the default value.
9758        pub fn alg_mut(&mut self) -> &mut String {
9759            self.alg.get_or_insert_default()
9760        }
9761        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
9762        pub fn alg_opt(&self) -> Option<&str> {
9763            self.alg.as_ref().map(|field| field as _)
9764        }
9765        ///Sets `alg` with the provided value.
9766        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9767            self.alg = Some(field.into().into());
9768        }
9769        ///Sets `alg` with the provided value.
9770        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9771            self.set_alg(field.into());
9772            self
9773        }
9774    }
9775    impl super::JwkId {
9776        pub const fn const_default() -> Self {
9777            Self { iss: None, kid: None }
9778        }
9779        #[doc(hidden)]
9780        pub fn default_instance() -> &'static Self {
9781            static DEFAULT: super::JwkId = super::JwkId::const_default();
9782            &DEFAULT
9783        }
9784        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9785        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9786            self.iss.as_mut().map(|field| field as _)
9787        }
9788        ///Returns a mutable reference to `iss`.
9789        ///If the field is unset, it is first initialized with the default value.
9790        pub fn iss_mut(&mut self) -> &mut String {
9791            self.iss.get_or_insert_default()
9792        }
9793        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
9794        pub fn iss_opt(&self) -> Option<&str> {
9795            self.iss.as_ref().map(|field| field as _)
9796        }
9797        ///Sets `iss` with the provided value.
9798        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9799            self.iss = Some(field.into().into());
9800        }
9801        ///Sets `iss` with the provided value.
9802        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9803            self.set_iss(field.into());
9804            self
9805        }
9806        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9807        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9808            self.kid.as_mut().map(|field| field as _)
9809        }
9810        ///Returns a mutable reference to `kid`.
9811        ///If the field is unset, it is first initialized with the default value.
9812        pub fn kid_mut(&mut self) -> &mut String {
9813            self.kid.get_or_insert_default()
9814        }
9815        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
9816        pub fn kid_opt(&self) -> Option<&str> {
9817            self.kid.as_ref().map(|field| field as _)
9818        }
9819        ///Sets `kid` with the provided value.
9820        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9821            self.kid = Some(field.into().into());
9822        }
9823        ///Sets `kid` with the provided value.
9824        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9825            self.set_kid(field.into());
9826            self
9827        }
9828    }
9829    impl super::Linkage {
9830        pub const fn const_default() -> Self {
9831            Self {
9832                original_id: None,
9833                upgraded_id: None,
9834                upgraded_version: None,
9835            }
9836        }
9837        #[doc(hidden)]
9838        pub fn default_instance() -> &'static Self {
9839            static DEFAULT: super::Linkage = super::Linkage::const_default();
9840            &DEFAULT
9841        }
9842        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9843        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9844            self.original_id.as_mut().map(|field| field as _)
9845        }
9846        ///Returns a mutable reference to `original_id`.
9847        ///If the field is unset, it is first initialized with the default value.
9848        pub fn original_id_mut(&mut self) -> &mut String {
9849            self.original_id.get_or_insert_default()
9850        }
9851        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9852        pub fn original_id_opt(&self) -> Option<&str> {
9853            self.original_id.as_ref().map(|field| field as _)
9854        }
9855        ///Sets `original_id` with the provided value.
9856        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9857            self.original_id = Some(field.into().into());
9858        }
9859        ///Sets `original_id` with the provided value.
9860        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9861            self.set_original_id(field.into());
9862            self
9863        }
9864        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9865        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9866            self.upgraded_id.as_mut().map(|field| field as _)
9867        }
9868        ///Returns a mutable reference to `upgraded_id`.
9869        ///If the field is unset, it is first initialized with the default value.
9870        pub fn upgraded_id_mut(&mut self) -> &mut String {
9871            self.upgraded_id.get_or_insert_default()
9872        }
9873        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9874        pub fn upgraded_id_opt(&self) -> Option<&str> {
9875            self.upgraded_id.as_ref().map(|field| field as _)
9876        }
9877        ///Sets `upgraded_id` with the provided value.
9878        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9879            self.upgraded_id = Some(field.into().into());
9880        }
9881        ///Sets `upgraded_id` with the provided value.
9882        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9883            self.set_upgraded_id(field.into());
9884            self
9885        }
9886        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9887        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9888            self.upgraded_version.as_mut().map(|field| field as _)
9889        }
9890        ///Returns a mutable reference to `upgraded_version`.
9891        ///If the field is unset, it is first initialized with the default value.
9892        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9893            self.upgraded_version.get_or_insert_default()
9894        }
9895        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9896        pub fn upgraded_version_opt(&self) -> Option<u64> {
9897            self.upgraded_version.as_ref().map(|field| *field)
9898        }
9899        ///Sets `upgraded_version` with the provided value.
9900        pub fn set_upgraded_version(&mut self, field: u64) {
9901            self.upgraded_version = Some(field);
9902        }
9903        ///Sets `upgraded_version` with the provided value.
9904        pub fn with_upgraded_version(mut self, field: u64) -> Self {
9905            self.set_upgraded_version(field);
9906            self
9907        }
9908    }
9909    impl super::ListBalancesRequest {
9910        pub const fn const_default() -> Self {
9911            Self {
9912                owner: None,
9913                page_size: None,
9914                page_token: None,
9915            }
9916        }
9917        #[doc(hidden)]
9918        pub fn default_instance() -> &'static Self {
9919            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9920            &DEFAULT
9921        }
9922        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9923        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9924            self.owner.as_mut().map(|field| field as _)
9925        }
9926        ///Returns a mutable reference to `owner`.
9927        ///If the field is unset, it is first initialized with the default value.
9928        pub fn owner_mut(&mut self) -> &mut String {
9929            self.owner.get_or_insert_default()
9930        }
9931        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9932        pub fn owner_opt(&self) -> Option<&str> {
9933            self.owner.as_ref().map(|field| field as _)
9934        }
9935        ///Sets `owner` with the provided value.
9936        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9937            self.owner = Some(field.into().into());
9938        }
9939        ///Sets `owner` with the provided value.
9940        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9941            self.set_owner(field.into());
9942            self
9943        }
9944        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9945        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9946            self.page_size.as_mut().map(|field| field as _)
9947        }
9948        ///Returns a mutable reference to `page_size`.
9949        ///If the field is unset, it is first initialized with the default value.
9950        pub fn page_size_mut(&mut self) -> &mut u32 {
9951            self.page_size.get_or_insert_default()
9952        }
9953        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9954        pub fn page_size_opt(&self) -> Option<u32> {
9955            self.page_size.as_ref().map(|field| *field)
9956        }
9957        ///Sets `page_size` with the provided value.
9958        pub fn set_page_size(&mut self, field: u32) {
9959            self.page_size = Some(field);
9960        }
9961        ///Sets `page_size` with the provided value.
9962        pub fn with_page_size(mut self, field: u32) -> Self {
9963            self.set_page_size(field);
9964            self
9965        }
9966        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9967        pub fn page_token_opt(&self) -> Option<&[u8]> {
9968            self.page_token.as_ref().map(|field| field as _)
9969        }
9970        ///Sets `page_token` with the provided value.
9971        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9972            self.page_token = Some(field.into().into());
9973        }
9974        ///Sets `page_token` with the provided value.
9975        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9976            mut self,
9977            field: T,
9978        ) -> Self {
9979            self.set_page_token(field.into());
9980            self
9981        }
9982    }
9983    impl super::ListBalancesResponse {
9984        pub const fn const_default() -> Self {
9985            Self {
9986                balances: Vec::new(),
9987                next_page_token: None,
9988            }
9989        }
9990        #[doc(hidden)]
9991        pub fn default_instance() -> &'static Self {
9992            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9993            &DEFAULT
9994        }
9995        ///Returns the value of `balances`, or the default value if `balances` is unset.
9996        pub fn balances(&self) -> &[super::Balance] {
9997            &self.balances
9998        }
9999        ///Returns a mutable reference to `balances`.
10000        ///If the field is unset, it is first initialized with the default value.
10001        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
10002            &mut self.balances
10003        }
10004        ///Sets `balances` with the provided value.
10005        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
10006            self.balances = field;
10007        }
10008        ///Sets `balances` with the provided value.
10009        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
10010            self.set_balances(field);
10011            self
10012        }
10013        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10014        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10015            self.next_page_token.as_ref().map(|field| field as _)
10016        }
10017        ///Sets `next_page_token` with the provided value.
10018        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10019            self.next_page_token = Some(field.into().into());
10020        }
10021        ///Sets `next_page_token` with the provided value.
10022        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10023            mut self,
10024            field: T,
10025        ) -> Self {
10026            self.set_next_page_token(field.into());
10027            self
10028        }
10029    }
10030    impl super::ListCheckpointsRequest {
10031        pub const fn const_default() -> Self {
10032            Self {
10033                read_mask: None,
10034                start_checkpoint: None,
10035                end_checkpoint: None,
10036                filter: None,
10037                options: None,
10038            }
10039        }
10040        #[doc(hidden)]
10041        pub fn default_instance() -> &'static Self {
10042            static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
10043            &DEFAULT
10044        }
10045        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10046        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10047            self.read_mask.as_mut().map(|field| field as _)
10048        }
10049        ///Returns a mutable reference to `read_mask`.
10050        ///If the field is unset, it is first initialized with the default value.
10051        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10052            self.read_mask.get_or_insert_default()
10053        }
10054        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10055        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10056            self.read_mask.as_ref().map(|field| field as _)
10057        }
10058        ///Sets `read_mask` with the provided value.
10059        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10060            self.read_mask = Some(field.into().into());
10061        }
10062        ///Sets `read_mask` with the provided value.
10063        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10064            mut self,
10065            field: T,
10066        ) -> Self {
10067            self.set_read_mask(field.into());
10068            self
10069        }
10070        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10071        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10072            self.start_checkpoint.as_mut().map(|field| field as _)
10073        }
10074        ///Returns a mutable reference to `start_checkpoint`.
10075        ///If the field is unset, it is first initialized with the default value.
10076        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10077            self.start_checkpoint.get_or_insert_default()
10078        }
10079        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10080        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10081            self.start_checkpoint.as_ref().map(|field| *field)
10082        }
10083        ///Sets `start_checkpoint` with the provided value.
10084        pub fn set_start_checkpoint(&mut self, field: u64) {
10085            self.start_checkpoint = Some(field);
10086        }
10087        ///Sets `start_checkpoint` with the provided value.
10088        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10089            self.set_start_checkpoint(field);
10090            self
10091        }
10092        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10093        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10094            self.end_checkpoint.as_mut().map(|field| field as _)
10095        }
10096        ///Returns a mutable reference to `end_checkpoint`.
10097        ///If the field is unset, it is first initialized with the default value.
10098        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10099            self.end_checkpoint.get_or_insert_default()
10100        }
10101        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10102        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10103            self.end_checkpoint.as_ref().map(|field| *field)
10104        }
10105        ///Sets `end_checkpoint` with the provided value.
10106        pub fn set_end_checkpoint(&mut self, field: u64) {
10107            self.end_checkpoint = Some(field);
10108        }
10109        ///Sets `end_checkpoint` with the provided value.
10110        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10111            self.set_end_checkpoint(field);
10112            self
10113        }
10114        ///Returns the value of `filter`, or the default value if `filter` is unset.
10115        pub fn filter(&self) -> &super::TransactionFilter {
10116            self.filter
10117                .as_ref()
10118                .map(|field| field as _)
10119                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10120        }
10121        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10122        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10123            self.filter.as_mut().map(|field| field as _)
10124        }
10125        ///Returns a mutable reference to `filter`.
10126        ///If the field is unset, it is first initialized with the default value.
10127        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10128            self.filter.get_or_insert_default()
10129        }
10130        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10131        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10132            self.filter.as_ref().map(|field| field as _)
10133        }
10134        ///Sets `filter` with the provided value.
10135        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10136            self.filter = Some(field.into().into());
10137        }
10138        ///Sets `filter` with the provided value.
10139        pub fn with_filter<T: Into<super::TransactionFilter>>(
10140            mut self,
10141            field: T,
10142        ) -> Self {
10143            self.set_filter(field.into());
10144            self
10145        }
10146        ///Returns the value of `options`, or the default value if `options` is unset.
10147        pub fn options(&self) -> &super::QueryOptions {
10148            self.options
10149                .as_ref()
10150                .map(|field| field as _)
10151                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10152        }
10153        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10154        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10155            self.options.as_mut().map(|field| field as _)
10156        }
10157        ///Returns a mutable reference to `options`.
10158        ///If the field is unset, it is first initialized with the default value.
10159        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10160            self.options.get_or_insert_default()
10161        }
10162        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10163        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10164            self.options.as_ref().map(|field| field as _)
10165        }
10166        ///Sets `options` with the provided value.
10167        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10168            self.options = Some(field.into().into());
10169        }
10170        ///Sets `options` with the provided value.
10171        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10172            self.set_options(field.into());
10173            self
10174        }
10175    }
10176    impl super::ListCheckpointsResponse {
10177        pub const fn const_default() -> Self {
10178            Self {
10179                checkpoint: None,
10180                watermark: None,
10181                end: None,
10182            }
10183        }
10184        #[doc(hidden)]
10185        pub fn default_instance() -> &'static Self {
10186            static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10187            &DEFAULT
10188        }
10189        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
10190        pub fn checkpoint(&self) -> &super::Checkpoint {
10191            self.checkpoint
10192                .as_ref()
10193                .map(|field| field as _)
10194                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10195        }
10196        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10197        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10198            self.checkpoint.as_mut().map(|field| field as _)
10199        }
10200        ///Returns a mutable reference to `checkpoint`.
10201        ///If the field is unset, it is first initialized with the default value.
10202        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10203            self.checkpoint.get_or_insert_default()
10204        }
10205        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10206        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10207            self.checkpoint.as_ref().map(|field| field as _)
10208        }
10209        ///Sets `checkpoint` with the provided value.
10210        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10211            self.checkpoint = Some(field.into().into());
10212        }
10213        ///Sets `checkpoint` with the provided value.
10214        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10215            self.set_checkpoint(field.into());
10216            self
10217        }
10218        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10219        pub fn watermark(&self) -> &super::Watermark {
10220            self.watermark
10221                .as_ref()
10222                .map(|field| field as _)
10223                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10224        }
10225        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10226        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10227            self.watermark.as_mut().map(|field| field as _)
10228        }
10229        ///Returns a mutable reference to `watermark`.
10230        ///If the field is unset, it is first initialized with the default value.
10231        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10232            self.watermark.get_or_insert_default()
10233        }
10234        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10235        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10236            self.watermark.as_ref().map(|field| field as _)
10237        }
10238        ///Sets `watermark` with the provided value.
10239        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10240            self.watermark = Some(field.into().into());
10241        }
10242        ///Sets `watermark` with the provided value.
10243        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10244            self.set_watermark(field.into());
10245            self
10246        }
10247        ///Returns the value of `end`, or the default value if `end` is unset.
10248        pub fn end(&self) -> &super::QueryEnd {
10249            self.end
10250                .as_ref()
10251                .map(|field| field as _)
10252                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10253        }
10254        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10255        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10256            self.end.as_mut().map(|field| field as _)
10257        }
10258        ///Returns a mutable reference to `end`.
10259        ///If the field is unset, it is first initialized with the default value.
10260        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10261            self.end.get_or_insert_default()
10262        }
10263        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10264        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10265            self.end.as_ref().map(|field| field as _)
10266        }
10267        ///Sets `end` with the provided value.
10268        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10269            self.end = Some(field.into().into());
10270        }
10271        ///Sets `end` with the provided value.
10272        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10273            self.set_end(field.into());
10274            self
10275        }
10276    }
10277    impl super::ListDynamicFieldsRequest {
10278        pub const fn const_default() -> Self {
10279            Self {
10280                parent: None,
10281                page_size: None,
10282                page_token: None,
10283                read_mask: None,
10284            }
10285        }
10286        #[doc(hidden)]
10287        pub fn default_instance() -> &'static Self {
10288            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10289            &DEFAULT
10290        }
10291        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10292        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10293            self.parent.as_mut().map(|field| field as _)
10294        }
10295        ///Returns a mutable reference to `parent`.
10296        ///If the field is unset, it is first initialized with the default value.
10297        pub fn parent_mut(&mut self) -> &mut String {
10298            self.parent.get_or_insert_default()
10299        }
10300        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
10301        pub fn parent_opt(&self) -> Option<&str> {
10302            self.parent.as_ref().map(|field| field as _)
10303        }
10304        ///Sets `parent` with the provided value.
10305        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10306            self.parent = Some(field.into().into());
10307        }
10308        ///Sets `parent` with the provided value.
10309        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10310            self.set_parent(field.into());
10311            self
10312        }
10313        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10314        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10315            self.page_size.as_mut().map(|field| field as _)
10316        }
10317        ///Returns a mutable reference to `page_size`.
10318        ///If the field is unset, it is first initialized with the default value.
10319        pub fn page_size_mut(&mut self) -> &mut u32 {
10320            self.page_size.get_or_insert_default()
10321        }
10322        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10323        pub fn page_size_opt(&self) -> Option<u32> {
10324            self.page_size.as_ref().map(|field| *field)
10325        }
10326        ///Sets `page_size` with the provided value.
10327        pub fn set_page_size(&mut self, field: u32) {
10328            self.page_size = Some(field);
10329        }
10330        ///Sets `page_size` with the provided value.
10331        pub fn with_page_size(mut self, field: u32) -> Self {
10332            self.set_page_size(field);
10333            self
10334        }
10335        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10336        pub fn page_token_opt(&self) -> Option<&[u8]> {
10337            self.page_token.as_ref().map(|field| field as _)
10338        }
10339        ///Sets `page_token` with the provided value.
10340        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10341            self.page_token = Some(field.into().into());
10342        }
10343        ///Sets `page_token` with the provided value.
10344        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10345            mut self,
10346            field: T,
10347        ) -> Self {
10348            self.set_page_token(field.into());
10349            self
10350        }
10351        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10352        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10353            self.read_mask.as_mut().map(|field| field as _)
10354        }
10355        ///Returns a mutable reference to `read_mask`.
10356        ///If the field is unset, it is first initialized with the default value.
10357        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10358            self.read_mask.get_or_insert_default()
10359        }
10360        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10361        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10362            self.read_mask.as_ref().map(|field| field as _)
10363        }
10364        ///Sets `read_mask` with the provided value.
10365        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10366            self.read_mask = Some(field.into().into());
10367        }
10368        ///Sets `read_mask` with the provided value.
10369        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10370            mut self,
10371            field: T,
10372        ) -> Self {
10373            self.set_read_mask(field.into());
10374            self
10375        }
10376    }
10377    impl super::ListDynamicFieldsResponse {
10378        pub const fn const_default() -> Self {
10379            Self {
10380                dynamic_fields: Vec::new(),
10381                next_page_token: None,
10382            }
10383        }
10384        #[doc(hidden)]
10385        pub fn default_instance() -> &'static Self {
10386            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10387            &DEFAULT
10388        }
10389        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
10390        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10391            &self.dynamic_fields
10392        }
10393        ///Returns a mutable reference to `dynamic_fields`.
10394        ///If the field is unset, it is first initialized with the default value.
10395        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10396            &mut self.dynamic_fields
10397        }
10398        ///Sets `dynamic_fields` with the provided value.
10399        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10400            self.dynamic_fields = field;
10401        }
10402        ///Sets `dynamic_fields` with the provided value.
10403        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10404            self.set_dynamic_fields(field);
10405            self
10406        }
10407        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10408        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10409            self.next_page_token.as_ref().map(|field| field as _)
10410        }
10411        ///Sets `next_page_token` with the provided value.
10412        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10413            self.next_page_token = Some(field.into().into());
10414        }
10415        ///Sets `next_page_token` with the provided value.
10416        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10417            mut self,
10418            field: T,
10419        ) -> Self {
10420            self.set_next_page_token(field.into());
10421            self
10422        }
10423    }
10424    impl super::ListEventsRequest {
10425        pub const fn const_default() -> Self {
10426            Self {
10427                read_mask: None,
10428                start_checkpoint: None,
10429                end_checkpoint: None,
10430                filter: None,
10431                options: None,
10432            }
10433        }
10434        #[doc(hidden)]
10435        pub fn default_instance() -> &'static Self {
10436            static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10437            &DEFAULT
10438        }
10439        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10440        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10441            self.read_mask.as_mut().map(|field| field as _)
10442        }
10443        ///Returns a mutable reference to `read_mask`.
10444        ///If the field is unset, it is first initialized with the default value.
10445        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10446            self.read_mask.get_or_insert_default()
10447        }
10448        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10449        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10450            self.read_mask.as_ref().map(|field| field as _)
10451        }
10452        ///Sets `read_mask` with the provided value.
10453        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10454            self.read_mask = Some(field.into().into());
10455        }
10456        ///Sets `read_mask` with the provided value.
10457        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10458            mut self,
10459            field: T,
10460        ) -> Self {
10461            self.set_read_mask(field.into());
10462            self
10463        }
10464        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10465        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10466            self.start_checkpoint.as_mut().map(|field| field as _)
10467        }
10468        ///Returns a mutable reference to `start_checkpoint`.
10469        ///If the field is unset, it is first initialized with the default value.
10470        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10471            self.start_checkpoint.get_or_insert_default()
10472        }
10473        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10474        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10475            self.start_checkpoint.as_ref().map(|field| *field)
10476        }
10477        ///Sets `start_checkpoint` with the provided value.
10478        pub fn set_start_checkpoint(&mut self, field: u64) {
10479            self.start_checkpoint = Some(field);
10480        }
10481        ///Sets `start_checkpoint` with the provided value.
10482        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10483            self.set_start_checkpoint(field);
10484            self
10485        }
10486        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10487        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10488            self.end_checkpoint.as_mut().map(|field| field as _)
10489        }
10490        ///Returns a mutable reference to `end_checkpoint`.
10491        ///If the field is unset, it is first initialized with the default value.
10492        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10493            self.end_checkpoint.get_or_insert_default()
10494        }
10495        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10496        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10497            self.end_checkpoint.as_ref().map(|field| *field)
10498        }
10499        ///Sets `end_checkpoint` with the provided value.
10500        pub fn set_end_checkpoint(&mut self, field: u64) {
10501            self.end_checkpoint = Some(field);
10502        }
10503        ///Sets `end_checkpoint` with the provided value.
10504        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10505            self.set_end_checkpoint(field);
10506            self
10507        }
10508        ///Returns the value of `filter`, or the default value if `filter` is unset.
10509        pub fn filter(&self) -> &super::EventFilter {
10510            self.filter
10511                .as_ref()
10512                .map(|field| field as _)
10513                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10514        }
10515        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10516        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10517            self.filter.as_mut().map(|field| field as _)
10518        }
10519        ///Returns a mutable reference to `filter`.
10520        ///If the field is unset, it is first initialized with the default value.
10521        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10522            self.filter.get_or_insert_default()
10523        }
10524        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10525        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10526            self.filter.as_ref().map(|field| field as _)
10527        }
10528        ///Sets `filter` with the provided value.
10529        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10530            self.filter = Some(field.into().into());
10531        }
10532        ///Sets `filter` with the provided value.
10533        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10534            self.set_filter(field.into());
10535            self
10536        }
10537        ///Returns the value of `options`, or the default value if `options` is unset.
10538        pub fn options(&self) -> &super::QueryOptions {
10539            self.options
10540                .as_ref()
10541                .map(|field| field as _)
10542                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10543        }
10544        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10545        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10546            self.options.as_mut().map(|field| field as _)
10547        }
10548        ///Returns a mutable reference to `options`.
10549        ///If the field is unset, it is first initialized with the default value.
10550        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10551            self.options.get_or_insert_default()
10552        }
10553        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10554        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10555            self.options.as_ref().map(|field| field as _)
10556        }
10557        ///Sets `options` with the provided value.
10558        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10559            self.options = Some(field.into().into());
10560        }
10561        ///Sets `options` with the provided value.
10562        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10563            self.set_options(field.into());
10564            self
10565        }
10566    }
10567    impl super::ListEventsResponse {
10568        pub const fn const_default() -> Self {
10569            Self {
10570                event: None,
10571                watermark: None,
10572                end: None,
10573            }
10574        }
10575        #[doc(hidden)]
10576        pub fn default_instance() -> &'static Self {
10577            static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10578            &DEFAULT
10579        }
10580        ///Returns the value of `event`, or the default value if `event` is unset.
10581        pub fn event(&self) -> &super::Event {
10582            self.event
10583                .as_ref()
10584                .map(|field| field as _)
10585                .unwrap_or_else(|| super::Event::default_instance() as _)
10586        }
10587        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10588        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10589            self.event.as_mut().map(|field| field as _)
10590        }
10591        ///Returns a mutable reference to `event`.
10592        ///If the field is unset, it is first initialized with the default value.
10593        pub fn event_mut(&mut self) -> &mut super::Event {
10594            self.event.get_or_insert_default()
10595        }
10596        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
10597        pub fn event_opt(&self) -> Option<&super::Event> {
10598            self.event.as_ref().map(|field| field as _)
10599        }
10600        ///Sets `event` with the provided value.
10601        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10602            self.event = Some(field.into().into());
10603        }
10604        ///Sets `event` with the provided value.
10605        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10606            self.set_event(field.into());
10607            self
10608        }
10609        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10610        pub fn watermark(&self) -> &super::Watermark {
10611            self.watermark
10612                .as_ref()
10613                .map(|field| field as _)
10614                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10615        }
10616        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10617        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10618            self.watermark.as_mut().map(|field| field as _)
10619        }
10620        ///Returns a mutable reference to `watermark`.
10621        ///If the field is unset, it is first initialized with the default value.
10622        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10623            self.watermark.get_or_insert_default()
10624        }
10625        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10626        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10627            self.watermark.as_ref().map(|field| field as _)
10628        }
10629        ///Sets `watermark` with the provided value.
10630        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10631            self.watermark = Some(field.into().into());
10632        }
10633        ///Sets `watermark` with the provided value.
10634        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10635            self.set_watermark(field.into());
10636            self
10637        }
10638        ///Returns the value of `end`, or the default value if `end` is unset.
10639        pub fn end(&self) -> &super::QueryEnd {
10640            self.end
10641                .as_ref()
10642                .map(|field| field as _)
10643                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10644        }
10645        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10646        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10647            self.end.as_mut().map(|field| field as _)
10648        }
10649        ///Returns a mutable reference to `end`.
10650        ///If the field is unset, it is first initialized with the default value.
10651        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10652            self.end.get_or_insert_default()
10653        }
10654        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10655        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10656            self.end.as_ref().map(|field| field as _)
10657        }
10658        ///Sets `end` with the provided value.
10659        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10660            self.end = Some(field.into().into());
10661        }
10662        ///Sets `end` with the provided value.
10663        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10664            self.set_end(field.into());
10665            self
10666        }
10667    }
10668    impl super::ListOwnedObjectsRequest {
10669        pub const fn const_default() -> Self {
10670            Self {
10671                owner: None,
10672                page_size: None,
10673                page_token: None,
10674                read_mask: None,
10675                object_type: None,
10676            }
10677        }
10678        #[doc(hidden)]
10679        pub fn default_instance() -> &'static Self {
10680            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10681            &DEFAULT
10682        }
10683        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10684        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10685            self.owner.as_mut().map(|field| field as _)
10686        }
10687        ///Returns a mutable reference to `owner`.
10688        ///If the field is unset, it is first initialized with the default value.
10689        pub fn owner_mut(&mut self) -> &mut String {
10690            self.owner.get_or_insert_default()
10691        }
10692        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10693        pub fn owner_opt(&self) -> Option<&str> {
10694            self.owner.as_ref().map(|field| field as _)
10695        }
10696        ///Sets `owner` with the provided value.
10697        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10698            self.owner = Some(field.into().into());
10699        }
10700        ///Sets `owner` with the provided value.
10701        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10702            self.set_owner(field.into());
10703            self
10704        }
10705        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10706        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10707            self.page_size.as_mut().map(|field| field as _)
10708        }
10709        ///Returns a mutable reference to `page_size`.
10710        ///If the field is unset, it is first initialized with the default value.
10711        pub fn page_size_mut(&mut self) -> &mut u32 {
10712            self.page_size.get_or_insert_default()
10713        }
10714        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10715        pub fn page_size_opt(&self) -> Option<u32> {
10716            self.page_size.as_ref().map(|field| *field)
10717        }
10718        ///Sets `page_size` with the provided value.
10719        pub fn set_page_size(&mut self, field: u32) {
10720            self.page_size = Some(field);
10721        }
10722        ///Sets `page_size` with the provided value.
10723        pub fn with_page_size(mut self, field: u32) -> Self {
10724            self.set_page_size(field);
10725            self
10726        }
10727        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10728        pub fn page_token_opt(&self) -> Option<&[u8]> {
10729            self.page_token.as_ref().map(|field| field as _)
10730        }
10731        ///Sets `page_token` with the provided value.
10732        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10733            self.page_token = Some(field.into().into());
10734        }
10735        ///Sets `page_token` with the provided value.
10736        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10737            mut self,
10738            field: T,
10739        ) -> Self {
10740            self.set_page_token(field.into());
10741            self
10742        }
10743        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10744        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10745            self.read_mask.as_mut().map(|field| field as _)
10746        }
10747        ///Returns a mutable reference to `read_mask`.
10748        ///If the field is unset, it is first initialized with the default value.
10749        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10750            self.read_mask.get_or_insert_default()
10751        }
10752        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10753        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10754            self.read_mask.as_ref().map(|field| field as _)
10755        }
10756        ///Sets `read_mask` with the provided value.
10757        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10758            self.read_mask = Some(field.into().into());
10759        }
10760        ///Sets `read_mask` with the provided value.
10761        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10762            mut self,
10763            field: T,
10764        ) -> Self {
10765            self.set_read_mask(field.into());
10766            self
10767        }
10768        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10769        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10770            self.object_type.as_mut().map(|field| field as _)
10771        }
10772        ///Returns a mutable reference to `object_type`.
10773        ///If the field is unset, it is first initialized with the default value.
10774        pub fn object_type_mut(&mut self) -> &mut String {
10775            self.object_type.get_or_insert_default()
10776        }
10777        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10778        pub fn object_type_opt(&self) -> Option<&str> {
10779            self.object_type.as_ref().map(|field| field as _)
10780        }
10781        ///Sets `object_type` with the provided value.
10782        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10783            self.object_type = Some(field.into().into());
10784        }
10785        ///Sets `object_type` with the provided value.
10786        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10787            self.set_object_type(field.into());
10788            self
10789        }
10790    }
10791    impl super::ListOwnedObjectsResponse {
10792        pub const fn const_default() -> Self {
10793            Self {
10794                objects: Vec::new(),
10795                next_page_token: None,
10796            }
10797        }
10798        #[doc(hidden)]
10799        pub fn default_instance() -> &'static Self {
10800            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10801            &DEFAULT
10802        }
10803        ///Returns the value of `objects`, or the default value if `objects` is unset.
10804        pub fn objects(&self) -> &[super::Object] {
10805            &self.objects
10806        }
10807        ///Returns a mutable reference to `objects`.
10808        ///If the field is unset, it is first initialized with the default value.
10809        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10810            &mut self.objects
10811        }
10812        ///Sets `objects` with the provided value.
10813        pub fn set_objects(&mut self, field: Vec<super::Object>) {
10814            self.objects = field;
10815        }
10816        ///Sets `objects` with the provided value.
10817        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10818            self.set_objects(field);
10819            self
10820        }
10821        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10822        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10823            self.next_page_token.as_ref().map(|field| field as _)
10824        }
10825        ///Sets `next_page_token` with the provided value.
10826        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10827            self.next_page_token = Some(field.into().into());
10828        }
10829        ///Sets `next_page_token` with the provided value.
10830        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10831            mut self,
10832            field: T,
10833        ) -> Self {
10834            self.set_next_page_token(field.into());
10835            self
10836        }
10837    }
10838    impl super::ListPackageVersionsRequest {
10839        pub const fn const_default() -> Self {
10840            Self {
10841                package_id: None,
10842                page_size: None,
10843                page_token: None,
10844            }
10845        }
10846        #[doc(hidden)]
10847        pub fn default_instance() -> &'static Self {
10848            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10849            &DEFAULT
10850        }
10851        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10852        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10853            self.package_id.as_mut().map(|field| field as _)
10854        }
10855        ///Returns a mutable reference to `package_id`.
10856        ///If the field is unset, it is first initialized with the default value.
10857        pub fn package_id_mut(&mut self) -> &mut String {
10858            self.package_id.get_or_insert_default()
10859        }
10860        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10861        pub fn package_id_opt(&self) -> Option<&str> {
10862            self.package_id.as_ref().map(|field| field as _)
10863        }
10864        ///Sets `package_id` with the provided value.
10865        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10866            self.package_id = Some(field.into().into());
10867        }
10868        ///Sets `package_id` with the provided value.
10869        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10870            self.set_package_id(field.into());
10871            self
10872        }
10873        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10874        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10875            self.page_size.as_mut().map(|field| field as _)
10876        }
10877        ///Returns a mutable reference to `page_size`.
10878        ///If the field is unset, it is first initialized with the default value.
10879        pub fn page_size_mut(&mut self) -> &mut u32 {
10880            self.page_size.get_or_insert_default()
10881        }
10882        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10883        pub fn page_size_opt(&self) -> Option<u32> {
10884            self.page_size.as_ref().map(|field| *field)
10885        }
10886        ///Sets `page_size` with the provided value.
10887        pub fn set_page_size(&mut self, field: u32) {
10888            self.page_size = Some(field);
10889        }
10890        ///Sets `page_size` with the provided value.
10891        pub fn with_page_size(mut self, field: u32) -> Self {
10892            self.set_page_size(field);
10893            self
10894        }
10895        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10896        pub fn page_token_opt(&self) -> Option<&[u8]> {
10897            self.page_token.as_ref().map(|field| field as _)
10898        }
10899        ///Sets `page_token` with the provided value.
10900        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10901            self.page_token = Some(field.into().into());
10902        }
10903        ///Sets `page_token` with the provided value.
10904        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10905            mut self,
10906            field: T,
10907        ) -> Self {
10908            self.set_page_token(field.into());
10909            self
10910        }
10911    }
10912    impl super::ListPackageVersionsResponse {
10913        pub const fn const_default() -> Self {
10914            Self {
10915                versions: Vec::new(),
10916                next_page_token: None,
10917            }
10918        }
10919        #[doc(hidden)]
10920        pub fn default_instance() -> &'static Self {
10921            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10922            &DEFAULT
10923        }
10924        ///Returns the value of `versions`, or the default value if `versions` is unset.
10925        pub fn versions(&self) -> &[super::PackageVersion] {
10926            &self.versions
10927        }
10928        ///Returns a mutable reference to `versions`.
10929        ///If the field is unset, it is first initialized with the default value.
10930        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10931            &mut self.versions
10932        }
10933        ///Sets `versions` with the provided value.
10934        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10935            self.versions = field;
10936        }
10937        ///Sets `versions` with the provided value.
10938        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10939            self.set_versions(field);
10940            self
10941        }
10942        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10943        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10944            self.next_page_token.as_ref().map(|field| field as _)
10945        }
10946        ///Sets `next_page_token` with the provided value.
10947        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10948            self.next_page_token = Some(field.into().into());
10949        }
10950        ///Sets `next_page_token` with the provided value.
10951        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10952            mut self,
10953            field: T,
10954        ) -> Self {
10955            self.set_next_page_token(field.into());
10956            self
10957        }
10958    }
10959    impl super::ListTransactionsRequest {
10960        pub const fn const_default() -> Self {
10961            Self {
10962                read_mask: None,
10963                start_checkpoint: None,
10964                end_checkpoint: None,
10965                filter: None,
10966                options: None,
10967            }
10968        }
10969        #[doc(hidden)]
10970        pub fn default_instance() -> &'static Self {
10971            static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10972            &DEFAULT
10973        }
10974        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10975        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10976            self.read_mask.as_mut().map(|field| field as _)
10977        }
10978        ///Returns a mutable reference to `read_mask`.
10979        ///If the field is unset, it is first initialized with the default value.
10980        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10981            self.read_mask.get_or_insert_default()
10982        }
10983        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10984        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10985            self.read_mask.as_ref().map(|field| field as _)
10986        }
10987        ///Sets `read_mask` with the provided value.
10988        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10989            self.read_mask = Some(field.into().into());
10990        }
10991        ///Sets `read_mask` with the provided value.
10992        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10993            mut self,
10994            field: T,
10995        ) -> Self {
10996            self.set_read_mask(field.into());
10997            self
10998        }
10999        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11000        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11001            self.start_checkpoint.as_mut().map(|field| field as _)
11002        }
11003        ///Returns a mutable reference to `start_checkpoint`.
11004        ///If the field is unset, it is first initialized with the default value.
11005        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
11006            self.start_checkpoint.get_or_insert_default()
11007        }
11008        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
11009        pub fn start_checkpoint_opt(&self) -> Option<u64> {
11010            self.start_checkpoint.as_ref().map(|field| *field)
11011        }
11012        ///Sets `start_checkpoint` with the provided value.
11013        pub fn set_start_checkpoint(&mut self, field: u64) {
11014            self.start_checkpoint = Some(field);
11015        }
11016        ///Sets `start_checkpoint` with the provided value.
11017        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
11018            self.set_start_checkpoint(field);
11019            self
11020        }
11021        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11022        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11023            self.end_checkpoint.as_mut().map(|field| field as _)
11024        }
11025        ///Returns a mutable reference to `end_checkpoint`.
11026        ///If the field is unset, it is first initialized with the default value.
11027        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
11028            self.end_checkpoint.get_or_insert_default()
11029        }
11030        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
11031        pub fn end_checkpoint_opt(&self) -> Option<u64> {
11032            self.end_checkpoint.as_ref().map(|field| *field)
11033        }
11034        ///Sets `end_checkpoint` with the provided value.
11035        pub fn set_end_checkpoint(&mut self, field: u64) {
11036            self.end_checkpoint = Some(field);
11037        }
11038        ///Sets `end_checkpoint` with the provided value.
11039        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
11040            self.set_end_checkpoint(field);
11041            self
11042        }
11043        ///Returns the value of `filter`, or the default value if `filter` is unset.
11044        pub fn filter(&self) -> &super::TransactionFilter {
11045            self.filter
11046                .as_ref()
11047                .map(|field| field as _)
11048                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
11049        }
11050        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11051        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
11052            self.filter.as_mut().map(|field| field as _)
11053        }
11054        ///Returns a mutable reference to `filter`.
11055        ///If the field is unset, it is first initialized with the default value.
11056        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
11057            self.filter.get_or_insert_default()
11058        }
11059        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
11060        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
11061            self.filter.as_ref().map(|field| field as _)
11062        }
11063        ///Sets `filter` with the provided value.
11064        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
11065            self.filter = Some(field.into().into());
11066        }
11067        ///Sets `filter` with the provided value.
11068        pub fn with_filter<T: Into<super::TransactionFilter>>(
11069            mut self,
11070            field: T,
11071        ) -> Self {
11072            self.set_filter(field.into());
11073            self
11074        }
11075        ///Returns the value of `options`, or the default value if `options` is unset.
11076        pub fn options(&self) -> &super::QueryOptions {
11077            self.options
11078                .as_ref()
11079                .map(|field| field as _)
11080                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
11081        }
11082        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11083        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
11084            self.options.as_mut().map(|field| field as _)
11085        }
11086        ///Returns a mutable reference to `options`.
11087        ///If the field is unset, it is first initialized with the default value.
11088        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
11089            self.options.get_or_insert_default()
11090        }
11091        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
11092        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
11093            self.options.as_ref().map(|field| field as _)
11094        }
11095        ///Sets `options` with the provided value.
11096        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
11097            self.options = Some(field.into().into());
11098        }
11099        ///Sets `options` with the provided value.
11100        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
11101            self.set_options(field.into());
11102            self
11103        }
11104    }
11105    impl super::ListTransactionsResponse {
11106        pub const fn const_default() -> Self {
11107            Self {
11108                transaction: None,
11109                watermark: None,
11110                end: None,
11111            }
11112        }
11113        #[doc(hidden)]
11114        pub fn default_instance() -> &'static Self {
11115            static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
11116            &DEFAULT
11117        }
11118        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
11119        pub fn transaction(&self) -> &super::ExecutedTransaction {
11120            self.transaction
11121                .as_ref()
11122                .map(|field| field as _)
11123                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
11124        }
11125        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11126        pub fn transaction_opt_mut(
11127            &mut self,
11128        ) -> Option<&mut super::ExecutedTransaction> {
11129            self.transaction.as_mut().map(|field| field as _)
11130        }
11131        ///Returns a mutable reference to `transaction`.
11132        ///If the field is unset, it is first initialized with the default value.
11133        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
11134            self.transaction.get_or_insert_default()
11135        }
11136        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11137        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
11138            self.transaction.as_ref().map(|field| field as _)
11139        }
11140        ///Sets `transaction` with the provided value.
11141        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
11142            &mut self,
11143            field: T,
11144        ) {
11145            self.transaction = Some(field.into().into());
11146        }
11147        ///Sets `transaction` with the provided value.
11148        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
11149            mut self,
11150            field: T,
11151        ) -> Self {
11152            self.set_transaction(field.into());
11153            self
11154        }
11155        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
11156        pub fn watermark(&self) -> &super::Watermark {
11157            self.watermark
11158                .as_ref()
11159                .map(|field| field as _)
11160                .unwrap_or_else(|| super::Watermark::default_instance() as _)
11161        }
11162        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11163        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11164            self.watermark.as_mut().map(|field| field as _)
11165        }
11166        ///Returns a mutable reference to `watermark`.
11167        ///If the field is unset, it is first initialized with the default value.
11168        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11169            self.watermark.get_or_insert_default()
11170        }
11171        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
11172        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11173            self.watermark.as_ref().map(|field| field as _)
11174        }
11175        ///Sets `watermark` with the provided value.
11176        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11177            self.watermark = Some(field.into().into());
11178        }
11179        ///Sets `watermark` with the provided value.
11180        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11181            self.set_watermark(field.into());
11182            self
11183        }
11184        ///Returns the value of `end`, or the default value if `end` is unset.
11185        pub fn end(&self) -> &super::QueryEnd {
11186            self.end
11187                .as_ref()
11188                .map(|field| field as _)
11189                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11190        }
11191        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11192        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11193            self.end.as_mut().map(|field| field as _)
11194        }
11195        ///Returns a mutable reference to `end`.
11196        ///If the field is unset, it is first initialized with the default value.
11197        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11198            self.end.get_or_insert_default()
11199        }
11200        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
11201        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11202            self.end.as_ref().map(|field| field as _)
11203        }
11204        ///Sets `end` with the provided value.
11205        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11206            self.end = Some(field.into().into());
11207        }
11208        ///Sets `end` with the provided value.
11209        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11210            self.set_end(field.into());
11211            self
11212        }
11213    }
11214    impl super::LookupNameRequest {
11215        pub const fn const_default() -> Self {
11216            Self { name: None }
11217        }
11218        #[doc(hidden)]
11219        pub fn default_instance() -> &'static Self {
11220            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11221            &DEFAULT
11222        }
11223        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11224        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11225            self.name.as_mut().map(|field| field as _)
11226        }
11227        ///Returns a mutable reference to `name`.
11228        ///If the field is unset, it is first initialized with the default value.
11229        pub fn name_mut(&mut self) -> &mut String {
11230            self.name.get_or_insert_default()
11231        }
11232        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11233        pub fn name_opt(&self) -> Option<&str> {
11234            self.name.as_ref().map(|field| field as _)
11235        }
11236        ///Sets `name` with the provided value.
11237        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11238            self.name = Some(field.into().into());
11239        }
11240        ///Sets `name` with the provided value.
11241        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11242            self.set_name(field.into());
11243            self
11244        }
11245    }
11246    impl super::LookupNameResponse {
11247        pub const fn const_default() -> Self {
11248            Self { record: None }
11249        }
11250        #[doc(hidden)]
11251        pub fn default_instance() -> &'static Self {
11252            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11253            &DEFAULT
11254        }
11255        ///Returns the value of `record`, or the default value if `record` is unset.
11256        pub fn record(&self) -> &super::NameRecord {
11257            self.record
11258                .as_ref()
11259                .map(|field| field as _)
11260                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11261        }
11262        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11263        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11264            self.record.as_mut().map(|field| field as _)
11265        }
11266        ///Returns a mutable reference to `record`.
11267        ///If the field is unset, it is first initialized with the default value.
11268        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11269            self.record.get_or_insert_default()
11270        }
11271        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11272        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11273            self.record.as_ref().map(|field| field as _)
11274        }
11275        ///Sets `record` with the provided value.
11276        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11277            self.record = Some(field.into().into());
11278        }
11279        ///Sets `record` with the provided value.
11280        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11281            self.set_record(field.into());
11282            self
11283        }
11284    }
11285    impl super::MakeMoveVector {
11286        pub const fn const_default() -> Self {
11287            Self {
11288                element_type: None,
11289                elements: Vec::new(),
11290            }
11291        }
11292        #[doc(hidden)]
11293        pub fn default_instance() -> &'static Self {
11294            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11295            &DEFAULT
11296        }
11297        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11298        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11299            self.element_type.as_mut().map(|field| field as _)
11300        }
11301        ///Returns a mutable reference to `element_type`.
11302        ///If the field is unset, it is first initialized with the default value.
11303        pub fn element_type_mut(&mut self) -> &mut String {
11304            self.element_type.get_or_insert_default()
11305        }
11306        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
11307        pub fn element_type_opt(&self) -> Option<&str> {
11308            self.element_type.as_ref().map(|field| field as _)
11309        }
11310        ///Sets `element_type` with the provided value.
11311        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11312            self.element_type = Some(field.into().into());
11313        }
11314        ///Sets `element_type` with the provided value.
11315        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11316            self.set_element_type(field.into());
11317            self
11318        }
11319        ///Returns the value of `elements`, or the default value if `elements` is unset.
11320        pub fn elements(&self) -> &[super::Argument] {
11321            &self.elements
11322        }
11323        ///Returns a mutable reference to `elements`.
11324        ///If the field is unset, it is first initialized with the default value.
11325        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11326            &mut self.elements
11327        }
11328        ///Sets `elements` with the provided value.
11329        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11330            self.elements = field;
11331        }
11332        ///Sets `elements` with the provided value.
11333        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11334            self.set_elements(field);
11335            self
11336        }
11337    }
11338    impl super::MergeCoins {
11339        pub const fn const_default() -> Self {
11340            Self {
11341                coin: None,
11342                coins_to_merge: Vec::new(),
11343            }
11344        }
11345        #[doc(hidden)]
11346        pub fn default_instance() -> &'static Self {
11347            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11348            &DEFAULT
11349        }
11350        ///Returns the value of `coin`, or the default value if `coin` is unset.
11351        pub fn coin(&self) -> &super::Argument {
11352            self.coin
11353                .as_ref()
11354                .map(|field| field as _)
11355                .unwrap_or_else(|| super::Argument::default_instance() as _)
11356        }
11357        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11358        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11359            self.coin.as_mut().map(|field| field as _)
11360        }
11361        ///Returns a mutable reference to `coin`.
11362        ///If the field is unset, it is first initialized with the default value.
11363        pub fn coin_mut(&mut self) -> &mut super::Argument {
11364            self.coin.get_or_insert_default()
11365        }
11366        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
11367        pub fn coin_opt(&self) -> Option<&super::Argument> {
11368            self.coin.as_ref().map(|field| field as _)
11369        }
11370        ///Sets `coin` with the provided value.
11371        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11372            self.coin = Some(field.into().into());
11373        }
11374        ///Sets `coin` with the provided value.
11375        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11376            self.set_coin(field.into());
11377            self
11378        }
11379        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
11380        pub fn coins_to_merge(&self) -> &[super::Argument] {
11381            &self.coins_to_merge
11382        }
11383        ///Returns a mutable reference to `coins_to_merge`.
11384        ///If the field is unset, it is first initialized with the default value.
11385        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11386            &mut self.coins_to_merge
11387        }
11388        ///Sets `coins_to_merge` with the provided value.
11389        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11390            self.coins_to_merge = field;
11391        }
11392        ///Sets `coins_to_merge` with the provided value.
11393        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11394            self.set_coins_to_merge(field);
11395            self
11396        }
11397    }
11398    impl super::Module {
11399        pub const fn const_default() -> Self {
11400            Self {
11401                name: None,
11402                contents: None,
11403                datatypes: Vec::new(),
11404                functions: Vec::new(),
11405            }
11406        }
11407        #[doc(hidden)]
11408        pub fn default_instance() -> &'static Self {
11409            static DEFAULT: super::Module = super::Module::const_default();
11410            &DEFAULT
11411        }
11412        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11413        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11414            self.name.as_mut().map(|field| field as _)
11415        }
11416        ///Returns a mutable reference to `name`.
11417        ///If the field is unset, it is first initialized with the default value.
11418        pub fn name_mut(&mut self) -> &mut String {
11419            self.name.get_or_insert_default()
11420        }
11421        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11422        pub fn name_opt(&self) -> Option<&str> {
11423            self.name.as_ref().map(|field| field as _)
11424        }
11425        ///Sets `name` with the provided value.
11426        pub fn set_name<T: Into<String>>(&mut self, field: T) {
11427            self.name = Some(field.into().into());
11428        }
11429        ///Sets `name` with the provided value.
11430        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11431            self.set_name(field.into());
11432            self
11433        }
11434        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
11435        pub fn contents_opt(&self) -> Option<&[u8]> {
11436            self.contents.as_ref().map(|field| field as _)
11437        }
11438        ///Sets `contents` with the provided value.
11439        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11440            self.contents = Some(field.into().into());
11441        }
11442        ///Sets `contents` with the provided value.
11443        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11444            mut self,
11445            field: T,
11446        ) -> Self {
11447            self.set_contents(field.into());
11448            self
11449        }
11450        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
11451        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11452            &self.datatypes
11453        }
11454        ///Returns a mutable reference to `datatypes`.
11455        ///If the field is unset, it is first initialized with the default value.
11456        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11457            &mut self.datatypes
11458        }
11459        ///Sets `datatypes` with the provided value.
11460        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11461            self.datatypes = field;
11462        }
11463        ///Sets `datatypes` with the provided value.
11464        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11465            self.set_datatypes(field);
11466            self
11467        }
11468        ///Returns the value of `functions`, or the default value if `functions` is unset.
11469        pub fn functions(&self) -> &[super::FunctionDescriptor] {
11470            &self.functions
11471        }
11472        ///Returns a mutable reference to `functions`.
11473        ///If the field is unset, it is first initialized with the default value.
11474        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11475            &mut self.functions
11476        }
11477        ///Sets `functions` with the provided value.
11478        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11479            self.functions = field;
11480        }
11481        ///Sets `functions` with the provided value.
11482        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11483            self.set_functions(field);
11484            self
11485        }
11486    }
11487    impl super::MoveAbort {
11488        pub const fn const_default() -> Self {
11489            Self {
11490                abort_code: None,
11491                location: None,
11492                clever_error: None,
11493            }
11494        }
11495        #[doc(hidden)]
11496        pub fn default_instance() -> &'static Self {
11497            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11498            &DEFAULT
11499        }
11500        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11501        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11502            self.abort_code.as_mut().map(|field| field as _)
11503        }
11504        ///Returns a mutable reference to `abort_code`.
11505        ///If the field is unset, it is first initialized with the default value.
11506        pub fn abort_code_mut(&mut self) -> &mut u64 {
11507            self.abort_code.get_or_insert_default()
11508        }
11509        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
11510        pub fn abort_code_opt(&self) -> Option<u64> {
11511            self.abort_code.as_ref().map(|field| *field)
11512        }
11513        ///Sets `abort_code` with the provided value.
11514        pub fn set_abort_code(&mut self, field: u64) {
11515            self.abort_code = Some(field);
11516        }
11517        ///Sets `abort_code` with the provided value.
11518        pub fn with_abort_code(mut self, field: u64) -> Self {
11519            self.set_abort_code(field);
11520            self
11521        }
11522        ///Returns the value of `location`, or the default value if `location` is unset.
11523        pub fn location(&self) -> &super::MoveLocation {
11524            self.location
11525                .as_ref()
11526                .map(|field| field as _)
11527                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11528        }
11529        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11530        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11531            self.location.as_mut().map(|field| field as _)
11532        }
11533        ///Returns a mutable reference to `location`.
11534        ///If the field is unset, it is first initialized with the default value.
11535        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11536            self.location.get_or_insert_default()
11537        }
11538        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
11539        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11540            self.location.as_ref().map(|field| field as _)
11541        }
11542        ///Sets `location` with the provided value.
11543        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11544            self.location = Some(field.into().into());
11545        }
11546        ///Sets `location` with the provided value.
11547        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11548            self.set_location(field.into());
11549            self
11550        }
11551        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
11552        pub fn clever_error(&self) -> &super::CleverError {
11553            self.clever_error
11554                .as_ref()
11555                .map(|field| field as _)
11556                .unwrap_or_else(|| super::CleverError::default_instance() as _)
11557        }
11558        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11559        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11560            self.clever_error.as_mut().map(|field| field as _)
11561        }
11562        ///Returns a mutable reference to `clever_error`.
11563        ///If the field is unset, it is first initialized with the default value.
11564        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11565            self.clever_error.get_or_insert_default()
11566        }
11567        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
11568        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11569            self.clever_error.as_ref().map(|field| field as _)
11570        }
11571        ///Sets `clever_error` with the provided value.
11572        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11573            self.clever_error = Some(field.into().into());
11574        }
11575        ///Sets `clever_error` with the provided value.
11576        pub fn with_clever_error<T: Into<super::CleverError>>(
11577            mut self,
11578            field: T,
11579        ) -> Self {
11580            self.set_clever_error(field.into());
11581            self
11582        }
11583    }
11584    impl super::MoveCall {
11585        pub const fn const_default() -> Self {
11586            Self {
11587                package: None,
11588                module: None,
11589                function: None,
11590                type_arguments: Vec::new(),
11591                arguments: Vec::new(),
11592            }
11593        }
11594        #[doc(hidden)]
11595        pub fn default_instance() -> &'static Self {
11596            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11597            &DEFAULT
11598        }
11599        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11600        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11601            self.package.as_mut().map(|field| field as _)
11602        }
11603        ///Returns a mutable reference to `package`.
11604        ///If the field is unset, it is first initialized with the default value.
11605        pub fn package_mut(&mut self) -> &mut String {
11606            self.package.get_or_insert_default()
11607        }
11608        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11609        pub fn package_opt(&self) -> Option<&str> {
11610            self.package.as_ref().map(|field| field as _)
11611        }
11612        ///Sets `package` with the provided value.
11613        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11614            self.package = Some(field.into().into());
11615        }
11616        ///Sets `package` with the provided value.
11617        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11618            self.set_package(field.into());
11619            self
11620        }
11621        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11622        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11623            self.module.as_mut().map(|field| field as _)
11624        }
11625        ///Returns a mutable reference to `module`.
11626        ///If the field is unset, it is first initialized with the default value.
11627        pub fn module_mut(&mut self) -> &mut String {
11628            self.module.get_or_insert_default()
11629        }
11630        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11631        pub fn module_opt(&self) -> Option<&str> {
11632            self.module.as_ref().map(|field| field as _)
11633        }
11634        ///Sets `module` with the provided value.
11635        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11636            self.module = Some(field.into().into());
11637        }
11638        ///Sets `module` with the provided value.
11639        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11640            self.set_module(field.into());
11641            self
11642        }
11643        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11644        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11645            self.function.as_mut().map(|field| field as _)
11646        }
11647        ///Returns a mutable reference to `function`.
11648        ///If the field is unset, it is first initialized with the default value.
11649        pub fn function_mut(&mut self) -> &mut String {
11650            self.function.get_or_insert_default()
11651        }
11652        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11653        pub fn function_opt(&self) -> Option<&str> {
11654            self.function.as_ref().map(|field| field as _)
11655        }
11656        ///Sets `function` with the provided value.
11657        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11658            self.function = Some(field.into().into());
11659        }
11660        ///Sets `function` with the provided value.
11661        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11662            self.set_function(field.into());
11663            self
11664        }
11665        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
11666        pub fn type_arguments(&self) -> &[String] {
11667            &self.type_arguments
11668        }
11669        ///Returns a mutable reference to `type_arguments`.
11670        ///If the field is unset, it is first initialized with the default value.
11671        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11672            &mut self.type_arguments
11673        }
11674        ///Sets `type_arguments` with the provided value.
11675        pub fn set_type_arguments(&mut self, field: Vec<String>) {
11676            self.type_arguments = field;
11677        }
11678        ///Sets `type_arguments` with the provided value.
11679        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11680            self.set_type_arguments(field);
11681            self
11682        }
11683        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
11684        pub fn arguments(&self) -> &[super::Argument] {
11685            &self.arguments
11686        }
11687        ///Returns a mutable reference to `arguments`.
11688        ///If the field is unset, it is first initialized with the default value.
11689        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11690            &mut self.arguments
11691        }
11692        ///Sets `arguments` with the provided value.
11693        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11694            self.arguments = field;
11695        }
11696        ///Sets `arguments` with the provided value.
11697        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11698            self.set_arguments(field);
11699            self
11700        }
11701    }
11702    impl super::MoveCallFilter {
11703        pub const fn const_default() -> Self {
11704            Self { function: None }
11705        }
11706        #[doc(hidden)]
11707        pub fn default_instance() -> &'static Self {
11708            static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11709            &DEFAULT
11710        }
11711        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11712        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11713            self.function.as_mut().map(|field| field as _)
11714        }
11715        ///Returns a mutable reference to `function`.
11716        ///If the field is unset, it is first initialized with the default value.
11717        pub fn function_mut(&mut self) -> &mut String {
11718            self.function.get_or_insert_default()
11719        }
11720        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11721        pub fn function_opt(&self) -> Option<&str> {
11722            self.function.as_ref().map(|field| field as _)
11723        }
11724        ///Sets `function` with the provided value.
11725        pub fn set_function<T: Into<String>>(&mut self, field: T) {
11726            self.function = Some(field.into().into());
11727        }
11728        ///Sets `function` with the provided value.
11729        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11730            self.set_function(field.into());
11731            self
11732        }
11733    }
11734    impl super::MoveLocation {
11735        pub const fn const_default() -> Self {
11736            Self {
11737                package: None,
11738                module: None,
11739                function: None,
11740                instruction: None,
11741                function_name: None,
11742            }
11743        }
11744        #[doc(hidden)]
11745        pub fn default_instance() -> &'static Self {
11746            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11747            &DEFAULT
11748        }
11749        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11750        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11751            self.package.as_mut().map(|field| field as _)
11752        }
11753        ///Returns a mutable reference to `package`.
11754        ///If the field is unset, it is first initialized with the default value.
11755        pub fn package_mut(&mut self) -> &mut String {
11756            self.package.get_or_insert_default()
11757        }
11758        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
11759        pub fn package_opt(&self) -> Option<&str> {
11760            self.package.as_ref().map(|field| field as _)
11761        }
11762        ///Sets `package` with the provided value.
11763        pub fn set_package<T: Into<String>>(&mut self, field: T) {
11764            self.package = Some(field.into().into());
11765        }
11766        ///Sets `package` with the provided value.
11767        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11768            self.set_package(field.into());
11769            self
11770        }
11771        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11772        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11773            self.module.as_mut().map(|field| field as _)
11774        }
11775        ///Returns a mutable reference to `module`.
11776        ///If the field is unset, it is first initialized with the default value.
11777        pub fn module_mut(&mut self) -> &mut String {
11778            self.module.get_or_insert_default()
11779        }
11780        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
11781        pub fn module_opt(&self) -> Option<&str> {
11782            self.module.as_ref().map(|field| field as _)
11783        }
11784        ///Sets `module` with the provided value.
11785        pub fn set_module<T: Into<String>>(&mut self, field: T) {
11786            self.module = Some(field.into().into());
11787        }
11788        ///Sets `module` with the provided value.
11789        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11790            self.set_module(field.into());
11791            self
11792        }
11793        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11794        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11795            self.function.as_mut().map(|field| field as _)
11796        }
11797        ///Returns a mutable reference to `function`.
11798        ///If the field is unset, it is first initialized with the default value.
11799        pub fn function_mut(&mut self) -> &mut u32 {
11800            self.function.get_or_insert_default()
11801        }
11802        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
11803        pub fn function_opt(&self) -> Option<u32> {
11804            self.function.as_ref().map(|field| *field)
11805        }
11806        ///Sets `function` with the provided value.
11807        pub fn set_function(&mut self, field: u32) {
11808            self.function = Some(field);
11809        }
11810        ///Sets `function` with the provided value.
11811        pub fn with_function(mut self, field: u32) -> Self {
11812            self.set_function(field);
11813            self
11814        }
11815        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11816        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11817            self.instruction.as_mut().map(|field| field as _)
11818        }
11819        ///Returns a mutable reference to `instruction`.
11820        ///If the field is unset, it is first initialized with the default value.
11821        pub fn instruction_mut(&mut self) -> &mut u32 {
11822            self.instruction.get_or_insert_default()
11823        }
11824        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11825        pub fn instruction_opt(&self) -> Option<u32> {
11826            self.instruction.as_ref().map(|field| *field)
11827        }
11828        ///Sets `instruction` with the provided value.
11829        pub fn set_instruction(&mut self, field: u32) {
11830            self.instruction = Some(field);
11831        }
11832        ///Sets `instruction` with the provided value.
11833        pub fn with_instruction(mut self, field: u32) -> Self {
11834            self.set_instruction(field);
11835            self
11836        }
11837        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11838        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11839            self.function_name.as_mut().map(|field| field as _)
11840        }
11841        ///Returns a mutable reference to `function_name`.
11842        ///If the field is unset, it is first initialized with the default value.
11843        pub fn function_name_mut(&mut self) -> &mut String {
11844            self.function_name.get_or_insert_default()
11845        }
11846        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11847        pub fn function_name_opt(&self) -> Option<&str> {
11848            self.function_name.as_ref().map(|field| field as _)
11849        }
11850        ///Sets `function_name` with the provided value.
11851        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11852            self.function_name = Some(field.into().into());
11853        }
11854        ///Sets `function_name` with the provided value.
11855        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11856            self.set_function_name(field.into());
11857            self
11858        }
11859    }
11860    impl super::MoveTable {
11861        pub const fn const_default() -> Self {
11862            Self { id: None, size: None }
11863        }
11864        #[doc(hidden)]
11865        pub fn default_instance() -> &'static Self {
11866            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11867            &DEFAULT
11868        }
11869        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11870        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11871            self.id.as_mut().map(|field| field as _)
11872        }
11873        ///Returns a mutable reference to `id`.
11874        ///If the field is unset, it is first initialized with the default value.
11875        pub fn id_mut(&mut self) -> &mut String {
11876            self.id.get_or_insert_default()
11877        }
11878        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11879        pub fn id_opt(&self) -> Option<&str> {
11880            self.id.as_ref().map(|field| field as _)
11881        }
11882        ///Sets `id` with the provided value.
11883        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11884            self.id = Some(field.into().into());
11885        }
11886        ///Sets `id` with the provided value.
11887        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11888            self.set_id(field.into());
11889            self
11890        }
11891        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11892        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11893            self.size.as_mut().map(|field| field as _)
11894        }
11895        ///Returns a mutable reference to `size`.
11896        ///If the field is unset, it is first initialized with the default value.
11897        pub fn size_mut(&mut self) -> &mut u64 {
11898            self.size.get_or_insert_default()
11899        }
11900        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
11901        pub fn size_opt(&self) -> Option<u64> {
11902            self.size.as_ref().map(|field| *field)
11903        }
11904        ///Sets `size` with the provided value.
11905        pub fn set_size(&mut self, field: u64) {
11906            self.size = Some(field);
11907        }
11908        ///Sets `size` with the provided value.
11909        pub fn with_size(mut self, field: u64) -> Self {
11910            self.set_size(field);
11911            self
11912        }
11913    }
11914    impl super::MultisigAggregatedSignature {
11915        pub const fn const_default() -> Self {
11916            Self {
11917                signatures: Vec::new(),
11918                bitmap: None,
11919                legacy_bitmap: None,
11920                committee: None,
11921            }
11922        }
11923        #[doc(hidden)]
11924        pub fn default_instance() -> &'static Self {
11925            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11926            &DEFAULT
11927        }
11928        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
11929        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11930            &self.signatures
11931        }
11932        ///Returns a mutable reference to `signatures`.
11933        ///If the field is unset, it is first initialized with the default value.
11934        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11935            &mut self.signatures
11936        }
11937        ///Sets `signatures` with the provided value.
11938        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11939            self.signatures = field;
11940        }
11941        ///Sets `signatures` with the provided value.
11942        pub fn with_signatures(
11943            mut self,
11944            field: Vec<super::MultisigMemberSignature>,
11945        ) -> Self {
11946            self.set_signatures(field);
11947            self
11948        }
11949        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11950        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11951            self.bitmap.as_mut().map(|field| field as _)
11952        }
11953        ///Returns a mutable reference to `bitmap`.
11954        ///If the field is unset, it is first initialized with the default value.
11955        pub fn bitmap_mut(&mut self) -> &mut u32 {
11956            self.bitmap.get_or_insert_default()
11957        }
11958        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11959        pub fn bitmap_opt(&self) -> Option<u32> {
11960            self.bitmap.as_ref().map(|field| *field)
11961        }
11962        ///Sets `bitmap` with the provided value.
11963        pub fn set_bitmap(&mut self, field: u32) {
11964            self.bitmap = Some(field);
11965        }
11966        ///Sets `bitmap` with the provided value.
11967        pub fn with_bitmap(mut self, field: u32) -> Self {
11968            self.set_bitmap(field);
11969            self
11970        }
11971        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
11972        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11973            self.legacy_bitmap.as_ref().map(|field| field as _)
11974        }
11975        ///Sets `legacy_bitmap` with the provided value.
11976        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11977            self.legacy_bitmap = Some(field.into().into());
11978        }
11979        ///Sets `legacy_bitmap` with the provided value.
11980        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11981            mut self,
11982            field: T,
11983        ) -> Self {
11984            self.set_legacy_bitmap(field.into());
11985            self
11986        }
11987        ///Returns the value of `committee`, or the default value if `committee` is unset.
11988        pub fn committee(&self) -> &super::MultisigCommittee {
11989            self.committee
11990                .as_ref()
11991                .map(|field| field as _)
11992                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11993        }
11994        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11995        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11996            self.committee.as_mut().map(|field| field as _)
11997        }
11998        ///Returns a mutable reference to `committee`.
11999        ///If the field is unset, it is first initialized with the default value.
12000        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
12001            self.committee.get_or_insert_default()
12002        }
12003        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
12004        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
12005            self.committee.as_ref().map(|field| field as _)
12006        }
12007        ///Sets `committee` with the provided value.
12008        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
12009            self.committee = Some(field.into().into());
12010        }
12011        ///Sets `committee` with the provided value.
12012        pub fn with_committee<T: Into<super::MultisigCommittee>>(
12013            mut self,
12014            field: T,
12015        ) -> Self {
12016            self.set_committee(field.into());
12017            self
12018        }
12019    }
12020    impl super::MultisigCommittee {
12021        pub const fn const_default() -> Self {
12022            Self {
12023                members: Vec::new(),
12024                threshold: None,
12025            }
12026        }
12027        #[doc(hidden)]
12028        pub fn default_instance() -> &'static Self {
12029            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
12030            &DEFAULT
12031        }
12032        ///Returns the value of `members`, or the default value if `members` is unset.
12033        pub fn members(&self) -> &[super::MultisigMember] {
12034            &self.members
12035        }
12036        ///Returns a mutable reference to `members`.
12037        ///If the field is unset, it is first initialized with the default value.
12038        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
12039            &mut self.members
12040        }
12041        ///Sets `members` with the provided value.
12042        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
12043            self.members = field;
12044        }
12045        ///Sets `members` with the provided value.
12046        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
12047            self.set_members(field);
12048            self
12049        }
12050        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12051        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
12052            self.threshold.as_mut().map(|field| field as _)
12053        }
12054        ///Returns a mutable reference to `threshold`.
12055        ///If the field is unset, it is first initialized with the default value.
12056        pub fn threshold_mut(&mut self) -> &mut u32 {
12057            self.threshold.get_or_insert_default()
12058        }
12059        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
12060        pub fn threshold_opt(&self) -> Option<u32> {
12061            self.threshold.as_ref().map(|field| *field)
12062        }
12063        ///Sets `threshold` with the provided value.
12064        pub fn set_threshold(&mut self, field: u32) {
12065            self.threshold = Some(field);
12066        }
12067        ///Sets `threshold` with the provided value.
12068        pub fn with_threshold(mut self, field: u32) -> Self {
12069            self.set_threshold(field);
12070            self
12071        }
12072    }
12073    impl super::MultisigMember {
12074        pub const fn const_default() -> Self {
12075            Self {
12076                public_key: None,
12077                weight: None,
12078            }
12079        }
12080        #[doc(hidden)]
12081        pub fn default_instance() -> &'static Self {
12082            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
12083            &DEFAULT
12084        }
12085        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
12086        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
12087            self.public_key
12088                .as_ref()
12089                .map(|field| field as _)
12090                .unwrap_or_else(|| {
12091                    super::MultisigMemberPublicKey::default_instance() as _
12092                })
12093        }
12094        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12095        pub fn public_key_opt_mut(
12096            &mut self,
12097        ) -> Option<&mut super::MultisigMemberPublicKey> {
12098            self.public_key.as_mut().map(|field| field as _)
12099        }
12100        ///Returns a mutable reference to `public_key`.
12101        ///If the field is unset, it is first initialized with the default value.
12102        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
12103            self.public_key.get_or_insert_default()
12104        }
12105        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12106        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
12107            self.public_key.as_ref().map(|field| field as _)
12108        }
12109        ///Sets `public_key` with the provided value.
12110        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
12111            &mut self,
12112            field: T,
12113        ) {
12114            self.public_key = Some(field.into().into());
12115        }
12116        ///Sets `public_key` with the provided value.
12117        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
12118            mut self,
12119            field: T,
12120        ) -> Self {
12121            self.set_public_key(field.into());
12122            self
12123        }
12124        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12125        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
12126            self.weight.as_mut().map(|field| field as _)
12127        }
12128        ///Returns a mutable reference to `weight`.
12129        ///If the field is unset, it is first initialized with the default value.
12130        pub fn weight_mut(&mut self) -> &mut u32 {
12131            self.weight.get_or_insert_default()
12132        }
12133        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
12134        pub fn weight_opt(&self) -> Option<u32> {
12135            self.weight.as_ref().map(|field| *field)
12136        }
12137        ///Sets `weight` with the provided value.
12138        pub fn set_weight(&mut self, field: u32) {
12139            self.weight = Some(field);
12140        }
12141        ///Sets `weight` with the provided value.
12142        pub fn with_weight(mut self, field: u32) -> Self {
12143            self.set_weight(field);
12144            self
12145        }
12146    }
12147    impl super::MultisigMemberPublicKey {
12148        pub const fn const_default() -> Self {
12149            Self {
12150                scheme: None,
12151                public_key: None,
12152                zklogin: None,
12153            }
12154        }
12155        #[doc(hidden)]
12156        pub fn default_instance() -> &'static Self {
12157            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
12158            &DEFAULT
12159        }
12160        ///Sets `scheme` with the provided value.
12161        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12162            self.set_scheme(field.into());
12163            self
12164        }
12165        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12166        pub fn public_key_opt(&self) -> Option<&[u8]> {
12167            self.public_key.as_ref().map(|field| field as _)
12168        }
12169        ///Sets `public_key` with the provided value.
12170        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12171            self.public_key = Some(field.into().into());
12172        }
12173        ///Sets `public_key` with the provided value.
12174        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12175            mut self,
12176            field: T,
12177        ) -> Self {
12178            self.set_public_key(field.into());
12179            self
12180        }
12181        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12182        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
12183            self.zklogin
12184                .as_ref()
12185                .map(|field| field as _)
12186                .unwrap_or_else(|| {
12187                    super::ZkLoginPublicIdentifier::default_instance() as _
12188                })
12189        }
12190        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12191        pub fn zklogin_opt_mut(
12192            &mut self,
12193        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
12194            self.zklogin.as_mut().map(|field| field as _)
12195        }
12196        ///Returns a mutable reference to `zklogin`.
12197        ///If the field is unset, it is first initialized with the default value.
12198        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
12199            self.zklogin.get_or_insert_default()
12200        }
12201        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12202        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
12203            self.zklogin.as_ref().map(|field| field as _)
12204        }
12205        ///Sets `zklogin` with the provided value.
12206        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12207            &mut self,
12208            field: T,
12209        ) {
12210            self.zklogin = Some(field.into().into());
12211        }
12212        ///Sets `zklogin` with the provided value.
12213        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12214            mut self,
12215            field: T,
12216        ) -> Self {
12217            self.set_zklogin(field.into());
12218            self
12219        }
12220    }
12221    impl super::MultisigMemberSignature {
12222        pub const fn const_default() -> Self {
12223            Self {
12224                scheme: None,
12225                signature: None,
12226                zklogin: None,
12227                passkey: None,
12228            }
12229        }
12230        #[doc(hidden)]
12231        pub fn default_instance() -> &'static Self {
12232            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12233            &DEFAULT
12234        }
12235        ///Sets `scheme` with the provided value.
12236        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12237            self.set_scheme(field.into());
12238            self
12239        }
12240        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12241        pub fn signature_opt(&self) -> Option<&[u8]> {
12242            self.signature.as_ref().map(|field| field as _)
12243        }
12244        ///Sets `signature` with the provided value.
12245        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12246            self.signature = Some(field.into().into());
12247        }
12248        ///Sets `signature` with the provided value.
12249        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12250            mut self,
12251            field: T,
12252        ) -> Self {
12253            self.set_signature(field.into());
12254            self
12255        }
12256        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
12257        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12258            self.zklogin
12259                .as_ref()
12260                .map(|field| field as _)
12261                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12262        }
12263        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12264        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12265            self.zklogin.as_mut().map(|field| field as _)
12266        }
12267        ///Returns a mutable reference to `zklogin`.
12268        ///If the field is unset, it is first initialized with the default value.
12269        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12270            self.zklogin.get_or_insert_default()
12271        }
12272        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12273        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12274            self.zklogin.as_ref().map(|field| field as _)
12275        }
12276        ///Sets `zklogin` with the provided value.
12277        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12278            self.zklogin = Some(field.into().into());
12279        }
12280        ///Sets `zklogin` with the provided value.
12281        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12282            mut self,
12283            field: T,
12284        ) -> Self {
12285            self.set_zklogin(field.into());
12286            self
12287        }
12288        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
12289        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12290            self.passkey
12291                .as_ref()
12292                .map(|field| field as _)
12293                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12294        }
12295        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12296        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12297            self.passkey.as_mut().map(|field| field as _)
12298        }
12299        ///Returns a mutable reference to `passkey`.
12300        ///If the field is unset, it is first initialized with the default value.
12301        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12302            self.passkey.get_or_insert_default()
12303        }
12304        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
12305        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12306            self.passkey.as_ref().map(|field| field as _)
12307        }
12308        ///Sets `passkey` with the provided value.
12309        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12310            self.passkey = Some(field.into().into());
12311        }
12312        ///Sets `passkey` with the provided value.
12313        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12314            mut self,
12315            field: T,
12316        ) -> Self {
12317            self.set_passkey(field.into());
12318            self
12319        }
12320    }
12321    impl super::NameRecord {
12322        pub const fn const_default() -> Self {
12323            Self {
12324                id: None,
12325                name: None,
12326                registration_nft_id: None,
12327                expiration_timestamp: None,
12328                target_address: None,
12329                data: std::collections::BTreeMap::new(),
12330            }
12331        }
12332        #[doc(hidden)]
12333        pub fn default_instance() -> &'static Self {
12334            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12335            &DEFAULT
12336        }
12337        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12338        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12339            self.id.as_mut().map(|field| field as _)
12340        }
12341        ///Returns a mutable reference to `id`.
12342        ///If the field is unset, it is first initialized with the default value.
12343        pub fn id_mut(&mut self) -> &mut String {
12344            self.id.get_or_insert_default()
12345        }
12346        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12347        pub fn id_opt(&self) -> Option<&str> {
12348            self.id.as_ref().map(|field| field as _)
12349        }
12350        ///Sets `id` with the provided value.
12351        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12352            self.id = Some(field.into().into());
12353        }
12354        ///Sets `id` with the provided value.
12355        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12356            self.set_id(field.into());
12357            self
12358        }
12359        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12360        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12361            self.name.as_mut().map(|field| field as _)
12362        }
12363        ///Returns a mutable reference to `name`.
12364        ///If the field is unset, it is first initialized with the default value.
12365        pub fn name_mut(&mut self) -> &mut String {
12366            self.name.get_or_insert_default()
12367        }
12368        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12369        pub fn name_opt(&self) -> Option<&str> {
12370            self.name.as_ref().map(|field| field as _)
12371        }
12372        ///Sets `name` with the provided value.
12373        pub fn set_name<T: Into<String>>(&mut self, field: T) {
12374            self.name = Some(field.into().into());
12375        }
12376        ///Sets `name` with the provided value.
12377        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12378            self.set_name(field.into());
12379            self
12380        }
12381        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12382        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12383            self.registration_nft_id.as_mut().map(|field| field as _)
12384        }
12385        ///Returns a mutable reference to `registration_nft_id`.
12386        ///If the field is unset, it is first initialized with the default value.
12387        pub fn registration_nft_id_mut(&mut self) -> &mut String {
12388            self.registration_nft_id.get_or_insert_default()
12389        }
12390        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12391        pub fn registration_nft_id_opt(&self) -> Option<&str> {
12392            self.registration_nft_id.as_ref().map(|field| field as _)
12393        }
12394        ///Sets `registration_nft_id` with the provided value.
12395        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12396            self.registration_nft_id = Some(field.into().into());
12397        }
12398        ///Sets `registration_nft_id` with the provided value.
12399        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12400            self.set_registration_nft_id(field.into());
12401            self
12402        }
12403        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12404        pub fn expiration_timestamp_opt_mut(
12405            &mut self,
12406        ) -> Option<&mut ::prost_types::Timestamp> {
12407            self.expiration_timestamp.as_mut().map(|field| field as _)
12408        }
12409        ///Returns a mutable reference to `expiration_timestamp`.
12410        ///If the field is unset, it is first initialized with the default value.
12411        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12412            self.expiration_timestamp.get_or_insert_default()
12413        }
12414        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
12415        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12416            self.expiration_timestamp.as_ref().map(|field| field as _)
12417        }
12418        ///Sets `expiration_timestamp` with the provided value.
12419        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12420            &mut self,
12421            field: T,
12422        ) {
12423            self.expiration_timestamp = Some(field.into().into());
12424        }
12425        ///Sets `expiration_timestamp` with the provided value.
12426        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12427            mut self,
12428            field: T,
12429        ) -> Self {
12430            self.set_expiration_timestamp(field.into());
12431            self
12432        }
12433        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12434        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12435            self.target_address.as_mut().map(|field| field as _)
12436        }
12437        ///Returns a mutable reference to `target_address`.
12438        ///If the field is unset, it is first initialized with the default value.
12439        pub fn target_address_mut(&mut self) -> &mut String {
12440            self.target_address.get_or_insert_default()
12441        }
12442        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12443        pub fn target_address_opt(&self) -> Option<&str> {
12444            self.target_address.as_ref().map(|field| field as _)
12445        }
12446        ///Sets `target_address` with the provided value.
12447        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12448            self.target_address = Some(field.into().into());
12449        }
12450        ///Sets `target_address` with the provided value.
12451        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12452            self.set_target_address(field.into());
12453            self
12454        }
12455        ///Returns the value of `data`, or the default value if `data` is unset.
12456        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12457            &self.data
12458        }
12459        ///Returns a mutable reference to `data`.
12460        ///If the field is unset, it is first initialized with the default value.
12461        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12462            &mut self.data
12463        }
12464        ///Sets `data` with the provided value.
12465        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12466            self.data = field;
12467        }
12468        ///Sets `data` with the provided value.
12469        pub fn with_data(
12470            mut self,
12471            field: ::std::collections::BTreeMap<String, String>,
12472        ) -> Self {
12473            self.set_data(field);
12474            self
12475        }
12476    }
12477    impl super::Object {
12478        pub const fn const_default() -> Self {
12479            Self {
12480                bcs: None,
12481                object_id: None,
12482                version: None,
12483                digest: None,
12484                owner: None,
12485                object_type: None,
12486                has_public_transfer: None,
12487                contents: None,
12488                package: None,
12489                previous_transaction: None,
12490                storage_rebate: None,
12491                json: None,
12492                balance: None,
12493                display: None,
12494            }
12495        }
12496        #[doc(hidden)]
12497        pub fn default_instance() -> &'static Self {
12498            static DEFAULT: super::Object = super::Object::const_default();
12499            &DEFAULT
12500        }
12501        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
12502        pub fn bcs(&self) -> &super::Bcs {
12503            self.bcs
12504                .as_ref()
12505                .map(|field| field as _)
12506                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12507        }
12508        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12509        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12510            self.bcs.as_mut().map(|field| field as _)
12511        }
12512        ///Returns a mutable reference to `bcs`.
12513        ///If the field is unset, it is first initialized with the default value.
12514        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12515            self.bcs.get_or_insert_default()
12516        }
12517        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
12518        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12519            self.bcs.as_ref().map(|field| field as _)
12520        }
12521        ///Sets `bcs` with the provided value.
12522        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12523            self.bcs = Some(field.into().into());
12524        }
12525        ///Sets `bcs` with the provided value.
12526        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12527            self.set_bcs(field.into());
12528            self
12529        }
12530        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12531        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12532            self.object_id.as_mut().map(|field| field as _)
12533        }
12534        ///Returns a mutable reference to `object_id`.
12535        ///If the field is unset, it is first initialized with the default value.
12536        pub fn object_id_mut(&mut self) -> &mut String {
12537            self.object_id.get_or_insert_default()
12538        }
12539        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12540        pub fn object_id_opt(&self) -> Option<&str> {
12541            self.object_id.as_ref().map(|field| field as _)
12542        }
12543        ///Sets `object_id` with the provided value.
12544        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12545            self.object_id = Some(field.into().into());
12546        }
12547        ///Sets `object_id` with the provided value.
12548        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12549            self.set_object_id(field.into());
12550            self
12551        }
12552        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12553        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12554            self.version.as_mut().map(|field| field as _)
12555        }
12556        ///Returns a mutable reference to `version`.
12557        ///If the field is unset, it is first initialized with the default value.
12558        pub fn version_mut(&mut self) -> &mut u64 {
12559            self.version.get_or_insert_default()
12560        }
12561        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12562        pub fn version_opt(&self) -> Option<u64> {
12563            self.version.as_ref().map(|field| *field)
12564        }
12565        ///Sets `version` with the provided value.
12566        pub fn set_version(&mut self, field: u64) {
12567            self.version = Some(field);
12568        }
12569        ///Sets `version` with the provided value.
12570        pub fn with_version(mut self, field: u64) -> Self {
12571            self.set_version(field);
12572            self
12573        }
12574        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12575        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12576            self.digest.as_mut().map(|field| field as _)
12577        }
12578        ///Returns a mutable reference to `digest`.
12579        ///If the field is unset, it is first initialized with the default value.
12580        pub fn digest_mut(&mut self) -> &mut String {
12581            self.digest.get_or_insert_default()
12582        }
12583        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12584        pub fn digest_opt(&self) -> Option<&str> {
12585            self.digest.as_ref().map(|field| field as _)
12586        }
12587        ///Sets `digest` with the provided value.
12588        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12589            self.digest = Some(field.into().into());
12590        }
12591        ///Sets `digest` with the provided value.
12592        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12593            self.set_digest(field.into());
12594            self
12595        }
12596        ///Returns the value of `owner`, or the default value if `owner` is unset.
12597        pub fn owner(&self) -> &super::Owner {
12598            self.owner
12599                .as_ref()
12600                .map(|field| field as _)
12601                .unwrap_or_else(|| super::Owner::default_instance() as _)
12602        }
12603        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12604        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12605            self.owner.as_mut().map(|field| field as _)
12606        }
12607        ///Returns a mutable reference to `owner`.
12608        ///If the field is unset, it is first initialized with the default value.
12609        pub fn owner_mut(&mut self) -> &mut super::Owner {
12610            self.owner.get_or_insert_default()
12611        }
12612        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
12613        pub fn owner_opt(&self) -> Option<&super::Owner> {
12614            self.owner.as_ref().map(|field| field as _)
12615        }
12616        ///Sets `owner` with the provided value.
12617        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12618            self.owner = Some(field.into().into());
12619        }
12620        ///Sets `owner` with the provided value.
12621        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12622            self.set_owner(field.into());
12623            self
12624        }
12625        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12626        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12627            self.object_type.as_mut().map(|field| field as _)
12628        }
12629        ///Returns a mutable reference to `object_type`.
12630        ///If the field is unset, it is first initialized with the default value.
12631        pub fn object_type_mut(&mut self) -> &mut String {
12632            self.object_type.get_or_insert_default()
12633        }
12634        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
12635        pub fn object_type_opt(&self) -> Option<&str> {
12636            self.object_type.as_ref().map(|field| field as _)
12637        }
12638        ///Sets `object_type` with the provided value.
12639        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12640            self.object_type = Some(field.into().into());
12641        }
12642        ///Sets `object_type` with the provided value.
12643        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12644            self.set_object_type(field.into());
12645            self
12646        }
12647        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12648        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12649            self.has_public_transfer.as_mut().map(|field| field as _)
12650        }
12651        ///Returns a mutable reference to `has_public_transfer`.
12652        ///If the field is unset, it is first initialized with the default value.
12653        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12654            self.has_public_transfer.get_or_insert_default()
12655        }
12656        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
12657        pub fn has_public_transfer_opt(&self) -> Option<bool> {
12658            self.has_public_transfer.as_ref().map(|field| *field)
12659        }
12660        ///Sets `has_public_transfer` with the provided value.
12661        pub fn set_has_public_transfer(&mut self, field: bool) {
12662            self.has_public_transfer = Some(field);
12663        }
12664        ///Sets `has_public_transfer` with the provided value.
12665        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12666            self.set_has_public_transfer(field);
12667            self
12668        }
12669        ///Returns the value of `contents`, or the default value if `contents` is unset.
12670        pub fn contents(&self) -> &super::Bcs {
12671            self.contents
12672                .as_ref()
12673                .map(|field| field as _)
12674                .unwrap_or_else(|| super::Bcs::default_instance() as _)
12675        }
12676        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12677        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12678            self.contents.as_mut().map(|field| field as _)
12679        }
12680        ///Returns a mutable reference to `contents`.
12681        ///If the field is unset, it is first initialized with the default value.
12682        pub fn contents_mut(&mut self) -> &mut super::Bcs {
12683            self.contents.get_or_insert_default()
12684        }
12685        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
12686        pub fn contents_opt(&self) -> Option<&super::Bcs> {
12687            self.contents.as_ref().map(|field| field as _)
12688        }
12689        ///Sets `contents` with the provided value.
12690        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12691            self.contents = Some(field.into().into());
12692        }
12693        ///Sets `contents` with the provided value.
12694        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12695            self.set_contents(field.into());
12696            self
12697        }
12698        ///Returns the value of `package`, or the default value if `package` is unset.
12699        pub fn package(&self) -> &super::Package {
12700            self.package
12701                .as_ref()
12702                .map(|field| field as _)
12703                .unwrap_or_else(|| super::Package::default_instance() as _)
12704        }
12705        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12706        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12707            self.package.as_mut().map(|field| field as _)
12708        }
12709        ///Returns a mutable reference to `package`.
12710        ///If the field is unset, it is first initialized with the default value.
12711        pub fn package_mut(&mut self) -> &mut super::Package {
12712            self.package.get_or_insert_default()
12713        }
12714        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
12715        pub fn package_opt(&self) -> Option<&super::Package> {
12716            self.package.as_ref().map(|field| field as _)
12717        }
12718        ///Sets `package` with the provided value.
12719        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12720            self.package = Some(field.into().into());
12721        }
12722        ///Sets `package` with the provided value.
12723        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12724            self.set_package(field.into());
12725            self
12726        }
12727        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12728        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12729            self.previous_transaction.as_mut().map(|field| field as _)
12730        }
12731        ///Returns a mutable reference to `previous_transaction`.
12732        ///If the field is unset, it is first initialized with the default value.
12733        pub fn previous_transaction_mut(&mut self) -> &mut String {
12734            self.previous_transaction.get_or_insert_default()
12735        }
12736        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12737        pub fn previous_transaction_opt(&self) -> Option<&str> {
12738            self.previous_transaction.as_ref().map(|field| field as _)
12739        }
12740        ///Sets `previous_transaction` with the provided value.
12741        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12742            self.previous_transaction = Some(field.into().into());
12743        }
12744        ///Sets `previous_transaction` with the provided value.
12745        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12746            self.set_previous_transaction(field.into());
12747            self
12748        }
12749        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12750        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12751            self.storage_rebate.as_mut().map(|field| field as _)
12752        }
12753        ///Returns a mutable reference to `storage_rebate`.
12754        ///If the field is unset, it is first initialized with the default value.
12755        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12756            self.storage_rebate.get_or_insert_default()
12757        }
12758        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12759        pub fn storage_rebate_opt(&self) -> Option<u64> {
12760            self.storage_rebate.as_ref().map(|field| *field)
12761        }
12762        ///Sets `storage_rebate` with the provided value.
12763        pub fn set_storage_rebate(&mut self, field: u64) {
12764            self.storage_rebate = Some(field);
12765        }
12766        ///Sets `storage_rebate` with the provided value.
12767        pub fn with_storage_rebate(mut self, field: u64) -> Self {
12768            self.set_storage_rebate(field);
12769            self
12770        }
12771        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12772        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12773            self.json.as_mut().map(|field| field as _)
12774        }
12775        ///Returns a mutable reference to `json`.
12776        ///If the field is unset, it is first initialized with the default value.
12777        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12778            self.json.get_or_insert_default()
12779        }
12780        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
12781        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12782            self.json.as_ref().map(|field| field as _)
12783        }
12784        ///Sets `json` with the provided value.
12785        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12786            self.json = Some(field.into().into());
12787        }
12788        ///Sets `json` with the provided value.
12789        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12790            self.set_json(field.into());
12791            self
12792        }
12793        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12794        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12795            self.balance.as_mut().map(|field| field as _)
12796        }
12797        ///Returns a mutable reference to `balance`.
12798        ///If the field is unset, it is first initialized with the default value.
12799        pub fn balance_mut(&mut self) -> &mut u64 {
12800            self.balance.get_or_insert_default()
12801        }
12802        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12803        pub fn balance_opt(&self) -> Option<u64> {
12804            self.balance.as_ref().map(|field| *field)
12805        }
12806        ///Sets `balance` with the provided value.
12807        pub fn set_balance(&mut self, field: u64) {
12808            self.balance = Some(field);
12809        }
12810        ///Sets `balance` with the provided value.
12811        pub fn with_balance(mut self, field: u64) -> Self {
12812            self.set_balance(field);
12813            self
12814        }
12815        ///Returns the value of `display`, or the default value if `display` is unset.
12816        pub fn display(&self) -> &super::Display {
12817            self.display
12818                .as_ref()
12819                .map(|field| field as _)
12820                .unwrap_or_else(|| super::Display::default_instance() as _)
12821        }
12822        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12823        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12824            self.display.as_mut().map(|field| field as _)
12825        }
12826        ///Returns a mutable reference to `display`.
12827        ///If the field is unset, it is first initialized with the default value.
12828        pub fn display_mut(&mut self) -> &mut super::Display {
12829            self.display.get_or_insert_default()
12830        }
12831        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
12832        pub fn display_opt(&self) -> Option<&super::Display> {
12833            self.display.as_ref().map(|field| field as _)
12834        }
12835        ///Sets `display` with the provided value.
12836        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12837            self.display = Some(field.into().into());
12838        }
12839        ///Sets `display` with the provided value.
12840        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12841            self.set_display(field.into());
12842            self
12843        }
12844    }
12845    impl super::ObjectReference {
12846        pub const fn const_default() -> Self {
12847            Self {
12848                object_id: None,
12849                version: None,
12850                digest: None,
12851            }
12852        }
12853        #[doc(hidden)]
12854        pub fn default_instance() -> &'static Self {
12855            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12856            &DEFAULT
12857        }
12858        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12859        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12860            self.object_id.as_mut().map(|field| field as _)
12861        }
12862        ///Returns a mutable reference to `object_id`.
12863        ///If the field is unset, it is first initialized with the default value.
12864        pub fn object_id_mut(&mut self) -> &mut String {
12865            self.object_id.get_or_insert_default()
12866        }
12867        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12868        pub fn object_id_opt(&self) -> Option<&str> {
12869            self.object_id.as_ref().map(|field| field as _)
12870        }
12871        ///Sets `object_id` with the provided value.
12872        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12873            self.object_id = Some(field.into().into());
12874        }
12875        ///Sets `object_id` with the provided value.
12876        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12877            self.set_object_id(field.into());
12878            self
12879        }
12880        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12881        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12882            self.version.as_mut().map(|field| field as _)
12883        }
12884        ///Returns a mutable reference to `version`.
12885        ///If the field is unset, it is first initialized with the default value.
12886        pub fn version_mut(&mut self) -> &mut u64 {
12887            self.version.get_or_insert_default()
12888        }
12889        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12890        pub fn version_opt(&self) -> Option<u64> {
12891            self.version.as_ref().map(|field| *field)
12892        }
12893        ///Sets `version` with the provided value.
12894        pub fn set_version(&mut self, field: u64) {
12895            self.version = Some(field);
12896        }
12897        ///Sets `version` with the provided value.
12898        pub fn with_version(mut self, field: u64) -> Self {
12899            self.set_version(field);
12900            self
12901        }
12902        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12903        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12904            self.digest.as_mut().map(|field| field as _)
12905        }
12906        ///Returns a mutable reference to `digest`.
12907        ///If the field is unset, it is first initialized with the default value.
12908        pub fn digest_mut(&mut self) -> &mut String {
12909            self.digest.get_or_insert_default()
12910        }
12911        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
12912        pub fn digest_opt(&self) -> Option<&str> {
12913            self.digest.as_ref().map(|field| field as _)
12914        }
12915        ///Sets `digest` with the provided value.
12916        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12917            self.digest = Some(field.into().into());
12918        }
12919        ///Sets `digest` with the provided value.
12920        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12921            self.set_digest(field.into());
12922            self
12923        }
12924    }
12925    impl super::ObjectSet {
12926        pub const fn const_default() -> Self {
12927            Self { objects: Vec::new() }
12928        }
12929        #[doc(hidden)]
12930        pub fn default_instance() -> &'static Self {
12931            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12932            &DEFAULT
12933        }
12934        ///Returns the value of `objects`, or the default value if `objects` is unset.
12935        pub fn objects(&self) -> &[super::Object] {
12936            &self.objects
12937        }
12938        ///Returns a mutable reference to `objects`.
12939        ///If the field is unset, it is first initialized with the default value.
12940        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12941            &mut self.objects
12942        }
12943        ///Sets `objects` with the provided value.
12944        pub fn set_objects(&mut self, field: Vec<super::Object>) {
12945            self.objects = field;
12946        }
12947        ///Sets `objects` with the provided value.
12948        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12949            self.set_objects(field);
12950            self
12951        }
12952    }
12953    impl super::OpenSignature {
12954        pub const fn const_default() -> Self {
12955            Self {
12956                reference: None,
12957                body: None,
12958            }
12959        }
12960        #[doc(hidden)]
12961        pub fn default_instance() -> &'static Self {
12962            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12963            &DEFAULT
12964        }
12965        ///Sets `reference` with the provided value.
12966        pub fn with_reference<T: Into<super::open_signature::Reference>>(
12967            mut self,
12968            field: T,
12969        ) -> Self {
12970            self.set_reference(field.into());
12971            self
12972        }
12973        ///Returns the value of `body`, or the default value if `body` is unset.
12974        pub fn body(&self) -> &super::OpenSignatureBody {
12975            self.body
12976                .as_ref()
12977                .map(|field| field as _)
12978                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12979        }
12980        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12981        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12982            self.body.as_mut().map(|field| field as _)
12983        }
12984        ///Returns a mutable reference to `body`.
12985        ///If the field is unset, it is first initialized with the default value.
12986        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12987            self.body.get_or_insert_default()
12988        }
12989        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
12990        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12991            self.body.as_ref().map(|field| field as _)
12992        }
12993        ///Sets `body` with the provided value.
12994        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12995            self.body = Some(field.into().into());
12996        }
12997        ///Sets `body` with the provided value.
12998        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12999            self.set_body(field.into());
13000            self
13001        }
13002    }
13003    impl super::OpenSignatureBody {
13004        pub const fn const_default() -> Self {
13005            Self {
13006                r#type: None,
13007                type_name: None,
13008                type_parameter_instantiation: Vec::new(),
13009                type_parameter: None,
13010            }
13011        }
13012        #[doc(hidden)]
13013        pub fn default_instance() -> &'static Self {
13014            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
13015            &DEFAULT
13016        }
13017        ///Sets `r#type` with the provided value.
13018        pub fn with_type<T: Into<super::open_signature_body::Type>>(
13019            mut self,
13020            field: T,
13021        ) -> Self {
13022            self.set_type(field.into());
13023            self
13024        }
13025        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13026        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
13027            self.type_name.as_mut().map(|field| field as _)
13028        }
13029        ///Returns a mutable reference to `type_name`.
13030        ///If the field is unset, it is first initialized with the default value.
13031        pub fn type_name_mut(&mut self) -> &mut String {
13032            self.type_name.get_or_insert_default()
13033        }
13034        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
13035        pub fn type_name_opt(&self) -> Option<&str> {
13036            self.type_name.as_ref().map(|field| field as _)
13037        }
13038        ///Sets `type_name` with the provided value.
13039        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
13040            self.type_name = Some(field.into().into());
13041        }
13042        ///Sets `type_name` with the provided value.
13043        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
13044            self.set_type_name(field.into());
13045            self
13046        }
13047        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
13048        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
13049            &self.type_parameter_instantiation
13050        }
13051        ///Returns a mutable reference to `type_parameter_instantiation`.
13052        ///If the field is unset, it is first initialized with the default value.
13053        pub fn type_parameter_instantiation_mut(
13054            &mut self,
13055        ) -> &mut Vec<super::OpenSignatureBody> {
13056            &mut self.type_parameter_instantiation
13057        }
13058        ///Sets `type_parameter_instantiation` with the provided value.
13059        pub fn set_type_parameter_instantiation(
13060            &mut self,
13061            field: Vec<super::OpenSignatureBody>,
13062        ) {
13063            self.type_parameter_instantiation = field;
13064        }
13065        ///Sets `type_parameter_instantiation` with the provided value.
13066        pub fn with_type_parameter_instantiation(
13067            mut self,
13068            field: Vec<super::OpenSignatureBody>,
13069        ) -> Self {
13070            self.set_type_parameter_instantiation(field);
13071            self
13072        }
13073        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13074        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
13075            self.type_parameter.as_mut().map(|field| field as _)
13076        }
13077        ///Returns a mutable reference to `type_parameter`.
13078        ///If the field is unset, it is first initialized with the default value.
13079        pub fn type_parameter_mut(&mut self) -> &mut u32 {
13080            self.type_parameter.get_or_insert_default()
13081        }
13082        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
13083        pub fn type_parameter_opt(&self) -> Option<u32> {
13084            self.type_parameter.as_ref().map(|field| *field)
13085        }
13086        ///Sets `type_parameter` with the provided value.
13087        pub fn set_type_parameter(&mut self, field: u32) {
13088            self.type_parameter = Some(field);
13089        }
13090        ///Sets `type_parameter` with the provided value.
13091        pub fn with_type_parameter(mut self, field: u32) -> Self {
13092            self.set_type_parameter(field);
13093            self
13094        }
13095    }
13096    impl super::Owner {
13097        pub const fn const_default() -> Self {
13098            Self {
13099                kind: None,
13100                address: None,
13101                version: None,
13102            }
13103        }
13104        #[doc(hidden)]
13105        pub fn default_instance() -> &'static Self {
13106            static DEFAULT: super::Owner = super::Owner::const_default();
13107            &DEFAULT
13108        }
13109        ///Sets `kind` with the provided value.
13110        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
13111            self.set_kind(field.into());
13112            self
13113        }
13114        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13115        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13116            self.address.as_mut().map(|field| field as _)
13117        }
13118        ///Returns a mutable reference to `address`.
13119        ///If the field is unset, it is first initialized with the default value.
13120        pub fn address_mut(&mut self) -> &mut String {
13121            self.address.get_or_insert_default()
13122        }
13123        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
13124        pub fn address_opt(&self) -> Option<&str> {
13125            self.address.as_ref().map(|field| field as _)
13126        }
13127        ///Sets `address` with the provided value.
13128        pub fn set_address<T: Into<String>>(&mut self, field: T) {
13129            self.address = Some(field.into().into());
13130        }
13131        ///Sets `address` with the provided value.
13132        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13133            self.set_address(field.into());
13134            self
13135        }
13136        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13137        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13138            self.version.as_mut().map(|field| field as _)
13139        }
13140        ///Returns a mutable reference to `version`.
13141        ///If the field is unset, it is first initialized with the default value.
13142        pub fn version_mut(&mut self) -> &mut u64 {
13143            self.version.get_or_insert_default()
13144        }
13145        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13146        pub fn version_opt(&self) -> Option<u64> {
13147            self.version.as_ref().map(|field| *field)
13148        }
13149        ///Sets `version` with the provided value.
13150        pub fn set_version(&mut self, field: u64) {
13151            self.version = Some(field);
13152        }
13153        ///Sets `version` with the provided value.
13154        pub fn with_version(mut self, field: u64) -> Self {
13155            self.set_version(field);
13156            self
13157        }
13158    }
13159    impl super::Package {
13160        pub const fn const_default() -> Self {
13161            Self {
13162                storage_id: None,
13163                original_id: None,
13164                version: None,
13165                modules: Vec::new(),
13166                type_origins: Vec::new(),
13167                linkage: Vec::new(),
13168            }
13169        }
13170        #[doc(hidden)]
13171        pub fn default_instance() -> &'static Self {
13172            static DEFAULT: super::Package = super::Package::const_default();
13173            &DEFAULT
13174        }
13175        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13176        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
13177            self.storage_id.as_mut().map(|field| field as _)
13178        }
13179        ///Returns a mutable reference to `storage_id`.
13180        ///If the field is unset, it is first initialized with the default value.
13181        pub fn storage_id_mut(&mut self) -> &mut String {
13182            self.storage_id.get_or_insert_default()
13183        }
13184        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13185        pub fn storage_id_opt(&self) -> Option<&str> {
13186            self.storage_id.as_ref().map(|field| field as _)
13187        }
13188        ///Sets `storage_id` with the provided value.
13189        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
13190            self.storage_id = Some(field.into().into());
13191        }
13192        ///Sets `storage_id` with the provided value.
13193        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
13194            self.set_storage_id(field.into());
13195            self
13196        }
13197        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13198        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
13199            self.original_id.as_mut().map(|field| field as _)
13200        }
13201        ///Returns a mutable reference to `original_id`.
13202        ///If the field is unset, it is first initialized with the default value.
13203        pub fn original_id_mut(&mut self) -> &mut String {
13204            self.original_id.get_or_insert_default()
13205        }
13206        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13207        pub fn original_id_opt(&self) -> Option<&str> {
13208            self.original_id.as_ref().map(|field| field as _)
13209        }
13210        ///Sets `original_id` with the provided value.
13211        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13212            self.original_id = Some(field.into().into());
13213        }
13214        ///Sets `original_id` with the provided value.
13215        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13216            self.set_original_id(field.into());
13217            self
13218        }
13219        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13220        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13221            self.version.as_mut().map(|field| field as _)
13222        }
13223        ///Returns a mutable reference to `version`.
13224        ///If the field is unset, it is first initialized with the default value.
13225        pub fn version_mut(&mut self) -> &mut u64 {
13226            self.version.get_or_insert_default()
13227        }
13228        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13229        pub fn version_opt(&self) -> Option<u64> {
13230            self.version.as_ref().map(|field| *field)
13231        }
13232        ///Sets `version` with the provided value.
13233        pub fn set_version(&mut self, field: u64) {
13234            self.version = Some(field);
13235        }
13236        ///Sets `version` with the provided value.
13237        pub fn with_version(mut self, field: u64) -> Self {
13238            self.set_version(field);
13239            self
13240        }
13241        ///Returns the value of `modules`, or the default value if `modules` is unset.
13242        pub fn modules(&self) -> &[super::Module] {
13243            &self.modules
13244        }
13245        ///Returns a mutable reference to `modules`.
13246        ///If the field is unset, it is first initialized with the default value.
13247        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13248            &mut self.modules
13249        }
13250        ///Sets `modules` with the provided value.
13251        pub fn set_modules(&mut self, field: Vec<super::Module>) {
13252            self.modules = field;
13253        }
13254        ///Sets `modules` with the provided value.
13255        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13256            self.set_modules(field);
13257            self
13258        }
13259        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
13260        pub fn type_origins(&self) -> &[super::TypeOrigin] {
13261            &self.type_origins
13262        }
13263        ///Returns a mutable reference to `type_origins`.
13264        ///If the field is unset, it is first initialized with the default value.
13265        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13266            &mut self.type_origins
13267        }
13268        ///Sets `type_origins` with the provided value.
13269        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13270            self.type_origins = field;
13271        }
13272        ///Sets `type_origins` with the provided value.
13273        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13274            self.set_type_origins(field);
13275            self
13276        }
13277        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
13278        pub fn linkage(&self) -> &[super::Linkage] {
13279            &self.linkage
13280        }
13281        ///Returns a mutable reference to `linkage`.
13282        ///If the field is unset, it is first initialized with the default value.
13283        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13284            &mut self.linkage
13285        }
13286        ///Sets `linkage` with the provided value.
13287        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13288            self.linkage = field;
13289        }
13290        ///Sets `linkage` with the provided value.
13291        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13292            self.set_linkage(field);
13293            self
13294        }
13295    }
13296    impl super::PackageUpgradeError {
13297        pub const fn const_default() -> Self {
13298            Self {
13299                kind: None,
13300                package_id: None,
13301                digest: None,
13302                policy: None,
13303                ticket_id: None,
13304            }
13305        }
13306        #[doc(hidden)]
13307        pub fn default_instance() -> &'static Self {
13308            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13309            &DEFAULT
13310        }
13311        ///Sets `kind` with the provided value.
13312        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13313            mut self,
13314            field: T,
13315        ) -> Self {
13316            self.set_kind(field.into());
13317            self
13318        }
13319        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13320        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13321            self.package_id.as_mut().map(|field| field as _)
13322        }
13323        ///Returns a mutable reference to `package_id`.
13324        ///If the field is unset, it is first initialized with the default value.
13325        pub fn package_id_mut(&mut self) -> &mut String {
13326            self.package_id.get_or_insert_default()
13327        }
13328        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13329        pub fn package_id_opt(&self) -> Option<&str> {
13330            self.package_id.as_ref().map(|field| field as _)
13331        }
13332        ///Sets `package_id` with the provided value.
13333        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13334            self.package_id = Some(field.into().into());
13335        }
13336        ///Sets `package_id` with the provided value.
13337        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13338            self.set_package_id(field.into());
13339            self
13340        }
13341        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13342        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13343            self.digest.as_mut().map(|field| field as _)
13344        }
13345        ///Returns a mutable reference to `digest`.
13346        ///If the field is unset, it is first initialized with the default value.
13347        pub fn digest_mut(&mut self) -> &mut String {
13348            self.digest.get_or_insert_default()
13349        }
13350        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13351        pub fn digest_opt(&self) -> Option<&str> {
13352            self.digest.as_ref().map(|field| field as _)
13353        }
13354        ///Sets `digest` with the provided value.
13355        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13356            self.digest = Some(field.into().into());
13357        }
13358        ///Sets `digest` with the provided value.
13359        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13360            self.set_digest(field.into());
13361            self
13362        }
13363        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13364        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13365            self.policy.as_mut().map(|field| field as _)
13366        }
13367        ///Returns a mutable reference to `policy`.
13368        ///If the field is unset, it is first initialized with the default value.
13369        pub fn policy_mut(&mut self) -> &mut u32 {
13370            self.policy.get_or_insert_default()
13371        }
13372        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13373        pub fn policy_opt(&self) -> Option<u32> {
13374            self.policy.as_ref().map(|field| *field)
13375        }
13376        ///Sets `policy` with the provided value.
13377        pub fn set_policy(&mut self, field: u32) {
13378            self.policy = Some(field);
13379        }
13380        ///Sets `policy` with the provided value.
13381        pub fn with_policy(mut self, field: u32) -> Self {
13382            self.set_policy(field);
13383            self
13384        }
13385        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13386        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13387            self.ticket_id.as_mut().map(|field| field as _)
13388        }
13389        ///Returns a mutable reference to `ticket_id`.
13390        ///If the field is unset, it is first initialized with the default value.
13391        pub fn ticket_id_mut(&mut self) -> &mut String {
13392            self.ticket_id.get_or_insert_default()
13393        }
13394        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13395        pub fn ticket_id_opt(&self) -> Option<&str> {
13396            self.ticket_id.as_ref().map(|field| field as _)
13397        }
13398        ///Sets `ticket_id` with the provided value.
13399        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13400            self.ticket_id = Some(field.into().into());
13401        }
13402        ///Sets `ticket_id` with the provided value.
13403        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13404            self.set_ticket_id(field.into());
13405            self
13406        }
13407    }
13408    impl super::PackageVersion {
13409        pub const fn const_default() -> Self {
13410            Self {
13411                package_id: None,
13412                version: None,
13413            }
13414        }
13415        #[doc(hidden)]
13416        pub fn default_instance() -> &'static Self {
13417            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13418            &DEFAULT
13419        }
13420        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13421        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13422            self.package_id.as_mut().map(|field| field as _)
13423        }
13424        ///Returns a mutable reference to `package_id`.
13425        ///If the field is unset, it is first initialized with the default value.
13426        pub fn package_id_mut(&mut self) -> &mut String {
13427            self.package_id.get_or_insert_default()
13428        }
13429        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13430        pub fn package_id_opt(&self) -> Option<&str> {
13431            self.package_id.as_ref().map(|field| field as _)
13432        }
13433        ///Sets `package_id` with the provided value.
13434        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13435            self.package_id = Some(field.into().into());
13436        }
13437        ///Sets `package_id` with the provided value.
13438        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13439            self.set_package_id(field.into());
13440            self
13441        }
13442        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13443        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13444            self.version.as_mut().map(|field| field as _)
13445        }
13446        ///Returns a mutable reference to `version`.
13447        ///If the field is unset, it is first initialized with the default value.
13448        pub fn version_mut(&mut self) -> &mut u64 {
13449            self.version.get_or_insert_default()
13450        }
13451        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13452        pub fn version_opt(&self) -> Option<u64> {
13453            self.version.as_ref().map(|field| *field)
13454        }
13455        ///Sets `version` with the provided value.
13456        pub fn set_version(&mut self, field: u64) {
13457            self.version = Some(field);
13458        }
13459        ///Sets `version` with the provided value.
13460        pub fn with_version(mut self, field: u64) -> Self {
13461            self.set_version(field);
13462            self
13463        }
13464    }
13465    impl super::PackageWriteFilter {
13466        pub const fn const_default() -> Self {
13467            Self {}
13468        }
13469        #[doc(hidden)]
13470        pub fn default_instance() -> &'static Self {
13471            static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13472            &DEFAULT
13473        }
13474    }
13475    impl super::PasskeyAuthenticator {
13476        pub const fn const_default() -> Self {
13477            Self {
13478                authenticator_data: None,
13479                client_data_json: None,
13480                signature: None,
13481            }
13482        }
13483        #[doc(hidden)]
13484        pub fn default_instance() -> &'static Self {
13485            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13486            &DEFAULT
13487        }
13488        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
13489        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13490            self.authenticator_data.as_ref().map(|field| field as _)
13491        }
13492        ///Sets `authenticator_data` with the provided value.
13493        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13494            &mut self,
13495            field: T,
13496        ) {
13497            self.authenticator_data = Some(field.into().into());
13498        }
13499        ///Sets `authenticator_data` with the provided value.
13500        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13501            mut self,
13502            field: T,
13503        ) -> Self {
13504            self.set_authenticator_data(field.into());
13505            self
13506        }
13507        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13508        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13509            self.client_data_json.as_mut().map(|field| field as _)
13510        }
13511        ///Returns a mutable reference to `client_data_json`.
13512        ///If the field is unset, it is first initialized with the default value.
13513        pub fn client_data_json_mut(&mut self) -> &mut String {
13514            self.client_data_json.get_or_insert_default()
13515        }
13516        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
13517        pub fn client_data_json_opt(&self) -> Option<&str> {
13518            self.client_data_json.as_ref().map(|field| field as _)
13519        }
13520        ///Sets `client_data_json` with the provided value.
13521        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13522            self.client_data_json = Some(field.into().into());
13523        }
13524        ///Sets `client_data_json` with the provided value.
13525        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13526            self.set_client_data_json(field.into());
13527            self
13528        }
13529        ///Returns the value of `signature`, or the default value if `signature` is unset.
13530        pub fn signature(&self) -> &super::SimpleSignature {
13531            self.signature
13532                .as_ref()
13533                .map(|field| field as _)
13534                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13535        }
13536        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13537        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13538            self.signature.as_mut().map(|field| field as _)
13539        }
13540        ///Returns a mutable reference to `signature`.
13541        ///If the field is unset, it is first initialized with the default value.
13542        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13543            self.signature.get_or_insert_default()
13544        }
13545        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
13546        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13547            self.signature.as_ref().map(|field| field as _)
13548        }
13549        ///Sets `signature` with the provided value.
13550        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13551            self.signature = Some(field.into().into());
13552        }
13553        ///Sets `signature` with the provided value.
13554        pub fn with_signature<T: Into<super::SimpleSignature>>(
13555            mut self,
13556            field: T,
13557        ) -> Self {
13558            self.set_signature(field.into());
13559            self
13560        }
13561    }
13562    impl super::ProgrammableTransaction {
13563        pub const fn const_default() -> Self {
13564            Self {
13565                inputs: Vec::new(),
13566                commands: Vec::new(),
13567            }
13568        }
13569        #[doc(hidden)]
13570        pub fn default_instance() -> &'static Self {
13571            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13572            &DEFAULT
13573        }
13574        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
13575        pub fn inputs(&self) -> &[super::Input] {
13576            &self.inputs
13577        }
13578        ///Returns a mutable reference to `inputs`.
13579        ///If the field is unset, it is first initialized with the default value.
13580        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13581            &mut self.inputs
13582        }
13583        ///Sets `inputs` with the provided value.
13584        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13585            self.inputs = field;
13586        }
13587        ///Sets `inputs` with the provided value.
13588        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13589            self.set_inputs(field);
13590            self
13591        }
13592        ///Returns the value of `commands`, or the default value if `commands` is unset.
13593        pub fn commands(&self) -> &[super::Command] {
13594            &self.commands
13595        }
13596        ///Returns a mutable reference to `commands`.
13597        ///If the field is unset, it is first initialized with the default value.
13598        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13599            &mut self.commands
13600        }
13601        ///Sets `commands` with the provided value.
13602        pub fn set_commands(&mut self, field: Vec<super::Command>) {
13603            self.commands = field;
13604        }
13605        ///Sets `commands` with the provided value.
13606        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13607            self.set_commands(field);
13608            self
13609        }
13610    }
13611    impl super::ProtocolConfig {
13612        pub const fn const_default() -> Self {
13613            Self {
13614                protocol_version: None,
13615                feature_flags: std::collections::BTreeMap::new(),
13616                attributes: std::collections::BTreeMap::new(),
13617                configs: std::collections::BTreeMap::new(),
13618            }
13619        }
13620        #[doc(hidden)]
13621        pub fn default_instance() -> &'static Self {
13622            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13623            &DEFAULT
13624        }
13625        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13626        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13627            self.protocol_version.as_mut().map(|field| field as _)
13628        }
13629        ///Returns a mutable reference to `protocol_version`.
13630        ///If the field is unset, it is first initialized with the default value.
13631        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13632            self.protocol_version.get_or_insert_default()
13633        }
13634        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13635        pub fn protocol_version_opt(&self) -> Option<u64> {
13636            self.protocol_version.as_ref().map(|field| *field)
13637        }
13638        ///Sets `protocol_version` with the provided value.
13639        pub fn set_protocol_version(&mut self, field: u64) {
13640            self.protocol_version = Some(field);
13641        }
13642        ///Sets `protocol_version` with the provided value.
13643        pub fn with_protocol_version(mut self, field: u64) -> Self {
13644            self.set_protocol_version(field);
13645            self
13646        }
13647        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
13648        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13649            &self.feature_flags
13650        }
13651        ///Returns a mutable reference to `feature_flags`.
13652        ///If the field is unset, it is first initialized with the default value.
13653        pub fn feature_flags_mut(
13654            &mut self,
13655        ) -> &mut ::std::collections::BTreeMap<String, bool> {
13656            &mut self.feature_flags
13657        }
13658        ///Sets `feature_flags` with the provided value.
13659        pub fn set_feature_flags(
13660            &mut self,
13661            field: ::std::collections::BTreeMap<String, bool>,
13662        ) {
13663            self.feature_flags = field;
13664        }
13665        ///Sets `feature_flags` with the provided value.
13666        pub fn with_feature_flags(
13667            mut self,
13668            field: ::std::collections::BTreeMap<String, bool>,
13669        ) -> Self {
13670            self.set_feature_flags(field);
13671            self
13672        }
13673        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
13674        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13675            &self.attributes
13676        }
13677        ///Returns a mutable reference to `attributes`.
13678        ///If the field is unset, it is first initialized with the default value.
13679        pub fn attributes_mut(
13680            &mut self,
13681        ) -> &mut ::std::collections::BTreeMap<String, String> {
13682            &mut self.attributes
13683        }
13684        ///Sets `attributes` with the provided value.
13685        pub fn set_attributes(
13686            &mut self,
13687            field: ::std::collections::BTreeMap<String, String>,
13688        ) {
13689            self.attributes = field;
13690        }
13691        ///Sets `attributes` with the provided value.
13692        pub fn with_attributes(
13693            mut self,
13694            field: ::std::collections::BTreeMap<String, String>,
13695        ) -> Self {
13696            self.set_attributes(field);
13697            self
13698        }
13699        ///Returns the value of `configs`, or the default value if `configs` is unset.
13700        pub fn configs(
13701            &self,
13702        ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13703            &self.configs
13704        }
13705        ///Returns a mutable reference to `configs`.
13706        ///If the field is unset, it is first initialized with the default value.
13707        pub fn configs_mut(
13708            &mut self,
13709        ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13710            &mut self.configs
13711        }
13712        ///Sets `configs` with the provided value.
13713        pub fn set_configs(
13714            &mut self,
13715            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13716        ) {
13717            self.configs = field;
13718        }
13719        ///Sets `configs` with the provided value.
13720        pub fn with_configs(
13721            mut self,
13722            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13723        ) -> Self {
13724            self.set_configs(field);
13725            self
13726        }
13727    }
13728    impl super::Publish {
13729        pub const fn const_default() -> Self {
13730            Self {
13731                modules: Vec::new(),
13732                dependencies: Vec::new(),
13733            }
13734        }
13735        #[doc(hidden)]
13736        pub fn default_instance() -> &'static Self {
13737            static DEFAULT: super::Publish = super::Publish::const_default();
13738            &DEFAULT
13739        }
13740        ///Returns the value of `modules`, or the default value if `modules` is unset.
13741        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13742            &self.modules
13743        }
13744        ///Returns a mutable reference to `modules`.
13745        ///If the field is unset, it is first initialized with the default value.
13746        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13747            &mut self.modules
13748        }
13749        ///Sets `modules` with the provided value.
13750        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13751            self.modules = field;
13752        }
13753        ///Sets `modules` with the provided value.
13754        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13755            self.set_modules(field);
13756            self
13757        }
13758        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13759        pub fn dependencies(&self) -> &[String] {
13760            &self.dependencies
13761        }
13762        ///Returns a mutable reference to `dependencies`.
13763        ///If the field is unset, it is first initialized with the default value.
13764        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13765            &mut self.dependencies
13766        }
13767        ///Sets `dependencies` with the provided value.
13768        pub fn set_dependencies(&mut self, field: Vec<String>) {
13769            self.dependencies = field;
13770        }
13771        ///Sets `dependencies` with the provided value.
13772        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13773            self.set_dependencies(field);
13774            self
13775        }
13776    }
13777    impl super::QueryEnd {
13778        pub const fn const_default() -> Self {
13779            Self { reason: None }
13780        }
13781        #[doc(hidden)]
13782        pub fn default_instance() -> &'static Self {
13783            static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13784            &DEFAULT
13785        }
13786        ///Sets `reason` with the provided value.
13787        pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13788            self.set_reason(field.into());
13789            self
13790        }
13791    }
13792    impl super::QueryOptions {
13793        pub const fn const_default() -> Self {
13794            Self {
13795                limit: None,
13796                after: None,
13797                before: None,
13798                ordering: None,
13799            }
13800        }
13801        #[doc(hidden)]
13802        pub fn default_instance() -> &'static Self {
13803            static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13804            &DEFAULT
13805        }
13806        ///If `limit` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13807        pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13808            self.limit.as_mut().map(|field| field as _)
13809        }
13810        ///Returns a mutable reference to `limit`.
13811        ///If the field is unset, it is first initialized with the default value.
13812        pub fn limit_mut(&mut self) -> &mut u32 {
13813            self.limit.get_or_insert_default()
13814        }
13815        ///If `limit` is set, returns [`Some`] with the value; otherwise returns [`None`].
13816        pub fn limit_opt(&self) -> Option<u32> {
13817            self.limit.as_ref().map(|field| *field)
13818        }
13819        ///Sets `limit` with the provided value.
13820        pub fn set_limit(&mut self, field: u32) {
13821            self.limit = Some(field);
13822        }
13823        ///Sets `limit` with the provided value.
13824        pub fn with_limit(mut self, field: u32) -> Self {
13825            self.set_limit(field);
13826            self
13827        }
13828        ///If `after` is set, returns [`Some`] with the value; otherwise returns [`None`].
13829        pub fn after_opt(&self) -> Option<&[u8]> {
13830            self.after.as_ref().map(|field| field as _)
13831        }
13832        ///Sets `after` with the provided value.
13833        pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13834            self.after = Some(field.into().into());
13835        }
13836        ///Sets `after` with the provided value.
13837        pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13838            self.set_after(field.into());
13839            self
13840        }
13841        ///If `before` is set, returns [`Some`] with the value; otherwise returns [`None`].
13842        pub fn before_opt(&self) -> Option<&[u8]> {
13843            self.before.as_ref().map(|field| field as _)
13844        }
13845        ///Sets `before` with the provided value.
13846        pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13847            self.before = Some(field.into().into());
13848        }
13849        ///Sets `before` with the provided value.
13850        pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13851            self.set_before(field.into());
13852            self
13853        }
13854        ///Sets `ordering` with the provided value.
13855        pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13856            self.set_ordering(field.into());
13857            self
13858        }
13859    }
13860    impl super::RandomnessStateUpdate {
13861        pub const fn const_default() -> Self {
13862            Self {
13863                epoch: None,
13864                randomness_round: None,
13865                random_bytes: None,
13866                randomness_object_initial_shared_version: None,
13867            }
13868        }
13869        #[doc(hidden)]
13870        pub fn default_instance() -> &'static Self {
13871            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13872            &DEFAULT
13873        }
13874        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13875        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13876            self.epoch.as_mut().map(|field| field as _)
13877        }
13878        ///Returns a mutable reference to `epoch`.
13879        ///If the field is unset, it is first initialized with the default value.
13880        pub fn epoch_mut(&mut self) -> &mut u64 {
13881            self.epoch.get_or_insert_default()
13882        }
13883        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13884        pub fn epoch_opt(&self) -> Option<u64> {
13885            self.epoch.as_ref().map(|field| *field)
13886        }
13887        ///Sets `epoch` with the provided value.
13888        pub fn set_epoch(&mut self, field: u64) {
13889            self.epoch = Some(field);
13890        }
13891        ///Sets `epoch` with the provided value.
13892        pub fn with_epoch(mut self, field: u64) -> Self {
13893            self.set_epoch(field);
13894            self
13895        }
13896        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13897        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13898            self.randomness_round.as_mut().map(|field| field as _)
13899        }
13900        ///Returns a mutable reference to `randomness_round`.
13901        ///If the field is unset, it is first initialized with the default value.
13902        pub fn randomness_round_mut(&mut self) -> &mut u64 {
13903            self.randomness_round.get_or_insert_default()
13904        }
13905        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
13906        pub fn randomness_round_opt(&self) -> Option<u64> {
13907            self.randomness_round.as_ref().map(|field| *field)
13908        }
13909        ///Sets `randomness_round` with the provided value.
13910        pub fn set_randomness_round(&mut self, field: u64) {
13911            self.randomness_round = Some(field);
13912        }
13913        ///Sets `randomness_round` with the provided value.
13914        pub fn with_randomness_round(mut self, field: u64) -> Self {
13915            self.set_randomness_round(field);
13916            self
13917        }
13918        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
13919        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13920            self.random_bytes.as_ref().map(|field| field as _)
13921        }
13922        ///Sets `random_bytes` with the provided value.
13923        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13924            self.random_bytes = Some(field.into().into());
13925        }
13926        ///Sets `random_bytes` with the provided value.
13927        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13928            mut self,
13929            field: T,
13930        ) -> Self {
13931            self.set_random_bytes(field.into());
13932            self
13933        }
13934        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13935        pub fn randomness_object_initial_shared_version_opt_mut(
13936            &mut self,
13937        ) -> Option<&mut u64> {
13938            self.randomness_object_initial_shared_version
13939                .as_mut()
13940                .map(|field| field as _)
13941        }
13942        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
13943        ///If the field is unset, it is first initialized with the default value.
13944        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13945            self.randomness_object_initial_shared_version.get_or_insert_default()
13946        }
13947        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13948        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13949            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13950        }
13951        ///Sets `randomness_object_initial_shared_version` with the provided value.
13952        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13953            self.randomness_object_initial_shared_version = Some(field);
13954        }
13955        ///Sets `randomness_object_initial_shared_version` with the provided value.
13956        pub fn with_randomness_object_initial_shared_version(
13957            mut self,
13958            field: u64,
13959        ) -> Self {
13960            self.set_randomness_object_initial_shared_version(field);
13961            self
13962        }
13963    }
13964    impl super::RegulatedCoinMetadata {
13965        pub const fn const_default() -> Self {
13966            Self {
13967                id: None,
13968                coin_metadata_object: None,
13969                deny_cap_object: None,
13970                allow_global_pause: None,
13971                variant: None,
13972                coin_regulated_state: None,
13973            }
13974        }
13975        #[doc(hidden)]
13976        pub fn default_instance() -> &'static Self {
13977            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13978            &DEFAULT
13979        }
13980        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13981        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13982            self.id.as_mut().map(|field| field as _)
13983        }
13984        ///Returns a mutable reference to `id`.
13985        ///If the field is unset, it is first initialized with the default value.
13986        pub fn id_mut(&mut self) -> &mut String {
13987            self.id.get_or_insert_default()
13988        }
13989        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13990        pub fn id_opt(&self) -> Option<&str> {
13991            self.id.as_ref().map(|field| field as _)
13992        }
13993        ///Sets `id` with the provided value.
13994        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13995            self.id = Some(field.into().into());
13996        }
13997        ///Sets `id` with the provided value.
13998        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13999            self.set_id(field.into());
14000            self
14001        }
14002        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14003        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
14004            self.coin_metadata_object.as_mut().map(|field| field as _)
14005        }
14006        ///Returns a mutable reference to `coin_metadata_object`.
14007        ///If the field is unset, it is first initialized with the default value.
14008        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
14009            self.coin_metadata_object.get_or_insert_default()
14010        }
14011        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14012        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
14013            self.coin_metadata_object.as_ref().map(|field| field as _)
14014        }
14015        ///Sets `coin_metadata_object` with the provided value.
14016        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
14017            self.coin_metadata_object = Some(field.into().into());
14018        }
14019        ///Sets `coin_metadata_object` with the provided value.
14020        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
14021            self.set_coin_metadata_object(field.into());
14022            self
14023        }
14024        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14025        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
14026            self.deny_cap_object.as_mut().map(|field| field as _)
14027        }
14028        ///Returns a mutable reference to `deny_cap_object`.
14029        ///If the field is unset, it is first initialized with the default value.
14030        pub fn deny_cap_object_mut(&mut self) -> &mut String {
14031            self.deny_cap_object.get_or_insert_default()
14032        }
14033        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14034        pub fn deny_cap_object_opt(&self) -> Option<&str> {
14035            self.deny_cap_object.as_ref().map(|field| field as _)
14036        }
14037        ///Sets `deny_cap_object` with the provided value.
14038        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
14039            self.deny_cap_object = Some(field.into().into());
14040        }
14041        ///Sets `deny_cap_object` with the provided value.
14042        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
14043            self.set_deny_cap_object(field.into());
14044            self
14045        }
14046        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14047        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
14048            self.allow_global_pause.as_mut().map(|field| field as _)
14049        }
14050        ///Returns a mutable reference to `allow_global_pause`.
14051        ///If the field is unset, it is first initialized with the default value.
14052        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
14053            self.allow_global_pause.get_or_insert_default()
14054        }
14055        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
14056        pub fn allow_global_pause_opt(&self) -> Option<bool> {
14057            self.allow_global_pause.as_ref().map(|field| *field)
14058        }
14059        ///Sets `allow_global_pause` with the provided value.
14060        pub fn set_allow_global_pause(&mut self, field: bool) {
14061            self.allow_global_pause = Some(field);
14062        }
14063        ///Sets `allow_global_pause` with the provided value.
14064        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
14065            self.set_allow_global_pause(field);
14066            self
14067        }
14068        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14069        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
14070            self.variant.as_mut().map(|field| field as _)
14071        }
14072        ///Returns a mutable reference to `variant`.
14073        ///If the field is unset, it is first initialized with the default value.
14074        pub fn variant_mut(&mut self) -> &mut u32 {
14075            self.variant.get_or_insert_default()
14076        }
14077        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
14078        pub fn variant_opt(&self) -> Option<u32> {
14079            self.variant.as_ref().map(|field| *field)
14080        }
14081        ///Sets `variant` with the provided value.
14082        pub fn set_variant(&mut self, field: u32) {
14083            self.variant = Some(field);
14084        }
14085        ///Sets `variant` with the provided value.
14086        pub fn with_variant(mut self, field: u32) -> Self {
14087            self.set_variant(field);
14088            self
14089        }
14090        ///Sets `coin_regulated_state` with the provided value.
14091        pub fn with_coin_regulated_state<
14092            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
14093        >(mut self, field: T) -> Self {
14094            self.set_coin_regulated_state(field.into());
14095            self
14096        }
14097    }
14098    impl super::ReverseLookupNameRequest {
14099        pub const fn const_default() -> Self {
14100            Self { address: None }
14101        }
14102        #[doc(hidden)]
14103        pub fn default_instance() -> &'static Self {
14104            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
14105            &DEFAULT
14106        }
14107        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14108        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14109            self.address.as_mut().map(|field| field as _)
14110        }
14111        ///Returns a mutable reference to `address`.
14112        ///If the field is unset, it is first initialized with the default value.
14113        pub fn address_mut(&mut self) -> &mut String {
14114            self.address.get_or_insert_default()
14115        }
14116        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14117        pub fn address_opt(&self) -> Option<&str> {
14118            self.address.as_ref().map(|field| field as _)
14119        }
14120        ///Sets `address` with the provided value.
14121        pub fn set_address<T: Into<String>>(&mut self, field: T) {
14122            self.address = Some(field.into().into());
14123        }
14124        ///Sets `address` with the provided value.
14125        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14126            self.set_address(field.into());
14127            self
14128        }
14129    }
14130    impl super::ReverseLookupNameResponse {
14131        pub const fn const_default() -> Self {
14132            Self { record: None }
14133        }
14134        #[doc(hidden)]
14135        pub fn default_instance() -> &'static Self {
14136            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
14137            &DEFAULT
14138        }
14139        ///Returns the value of `record`, or the default value if `record` is unset.
14140        pub fn record(&self) -> &super::NameRecord {
14141            self.record
14142                .as_ref()
14143                .map(|field| field as _)
14144                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
14145        }
14146        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14147        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
14148            self.record.as_mut().map(|field| field as _)
14149        }
14150        ///Returns a mutable reference to `record`.
14151        ///If the field is unset, it is first initialized with the default value.
14152        pub fn record_mut(&mut self) -> &mut super::NameRecord {
14153            self.record.get_or_insert_default()
14154        }
14155        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
14156        pub fn record_opt(&self) -> Option<&super::NameRecord> {
14157            self.record.as_ref().map(|field| field as _)
14158        }
14159        ///Sets `record` with the provided value.
14160        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
14161            self.record = Some(field.into().into());
14162        }
14163        ///Sets `record` with the provided value.
14164        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
14165            self.set_record(field.into());
14166            self
14167        }
14168    }
14169    impl super::SenderFilter {
14170        pub const fn const_default() -> Self {
14171            Self { address: None }
14172        }
14173        #[doc(hidden)]
14174        pub fn default_instance() -> &'static Self {
14175            static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
14176            &DEFAULT
14177        }
14178        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14179        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14180            self.address.as_mut().map(|field| field as _)
14181        }
14182        ///Returns a mutable reference to `address`.
14183        ///If the field is unset, it is first initialized with the default value.
14184        pub fn address_mut(&mut self) -> &mut String {
14185            self.address.get_or_insert_default()
14186        }
14187        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14188        pub fn address_opt(&self) -> Option<&str> {
14189            self.address.as_ref().map(|field| field as _)
14190        }
14191        ///Sets `address` with the provided value.
14192        pub fn set_address<T: Into<String>>(&mut self, field: T) {
14193            self.address = Some(field.into().into());
14194        }
14195        ///Sets `address` with the provided value.
14196        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14197            self.set_address(field.into());
14198            self
14199        }
14200    }
14201    impl super::SimpleSignature {
14202        pub const fn const_default() -> Self {
14203            Self {
14204                scheme: None,
14205                signature: None,
14206                public_key: None,
14207            }
14208        }
14209        #[doc(hidden)]
14210        pub fn default_instance() -> &'static Self {
14211            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14212            &DEFAULT
14213        }
14214        ///Sets `scheme` with the provided value.
14215        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14216            self.set_scheme(field.into());
14217            self
14218        }
14219        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
14220        pub fn signature_opt(&self) -> Option<&[u8]> {
14221            self.signature.as_ref().map(|field| field as _)
14222        }
14223        ///Sets `signature` with the provided value.
14224        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14225            self.signature = Some(field.into().into());
14226        }
14227        ///Sets `signature` with the provided value.
14228        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14229            mut self,
14230            field: T,
14231        ) -> Self {
14232            self.set_signature(field.into());
14233            self
14234        }
14235        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
14236        pub fn public_key_opt(&self) -> Option<&[u8]> {
14237            self.public_key.as_ref().map(|field| field as _)
14238        }
14239        ///Sets `public_key` with the provided value.
14240        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14241            self.public_key = Some(field.into().into());
14242        }
14243        ///Sets `public_key` with the provided value.
14244        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14245            mut self,
14246            field: T,
14247        ) -> Self {
14248            self.set_public_key(field.into());
14249            self
14250        }
14251    }
14252    impl super::SimulateTransactionRequest {
14253        pub const fn const_default() -> Self {
14254            Self {
14255                transaction: None,
14256                read_mask: None,
14257                checks: None,
14258                do_gas_selection: None,
14259            }
14260        }
14261        #[doc(hidden)]
14262        pub fn default_instance() -> &'static Self {
14263            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14264            &DEFAULT
14265        }
14266        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14267        pub fn transaction(&self) -> &super::Transaction {
14268            self.transaction
14269                .as_ref()
14270                .map(|field| field as _)
14271                .unwrap_or_else(|| super::Transaction::default_instance() as _)
14272        }
14273        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14274        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14275            self.transaction.as_mut().map(|field| field as _)
14276        }
14277        ///Returns a mutable reference to `transaction`.
14278        ///If the field is unset, it is first initialized with the default value.
14279        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14280            self.transaction.get_or_insert_default()
14281        }
14282        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14283        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14284            self.transaction.as_ref().map(|field| field as _)
14285        }
14286        ///Sets `transaction` with the provided value.
14287        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14288            self.transaction = Some(field.into().into());
14289        }
14290        ///Sets `transaction` with the provided value.
14291        pub fn with_transaction<T: Into<super::Transaction>>(
14292            mut self,
14293            field: T,
14294        ) -> Self {
14295            self.set_transaction(field.into());
14296            self
14297        }
14298        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14299        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14300            self.read_mask.as_mut().map(|field| field as _)
14301        }
14302        ///Returns a mutable reference to `read_mask`.
14303        ///If the field is unset, it is first initialized with the default value.
14304        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14305            self.read_mask.get_or_insert_default()
14306        }
14307        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
14308        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14309            self.read_mask.as_ref().map(|field| field as _)
14310        }
14311        ///Sets `read_mask` with the provided value.
14312        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14313            self.read_mask = Some(field.into().into());
14314        }
14315        ///Sets `read_mask` with the provided value.
14316        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14317            mut self,
14318            field: T,
14319        ) -> Self {
14320            self.set_read_mask(field.into());
14321            self
14322        }
14323        ///Sets `checks` with the provided value.
14324        pub fn with_checks<
14325            T: Into<super::simulate_transaction_request::TransactionChecks>,
14326        >(mut self, field: T) -> Self {
14327            self.set_checks(field.into());
14328            self
14329        }
14330        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14331        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14332            self.do_gas_selection.as_mut().map(|field| field as _)
14333        }
14334        ///Returns a mutable reference to `do_gas_selection`.
14335        ///If the field is unset, it is first initialized with the default value.
14336        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14337            self.do_gas_selection.get_or_insert_default()
14338        }
14339        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
14340        pub fn do_gas_selection_opt(&self) -> Option<bool> {
14341            self.do_gas_selection.as_ref().map(|field| *field)
14342        }
14343        ///Sets `do_gas_selection` with the provided value.
14344        pub fn set_do_gas_selection(&mut self, field: bool) {
14345            self.do_gas_selection = Some(field);
14346        }
14347        ///Sets `do_gas_selection` with the provided value.
14348        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14349            self.set_do_gas_selection(field);
14350            self
14351        }
14352    }
14353    impl super::SimulateTransactionResponse {
14354        pub const fn const_default() -> Self {
14355            Self {
14356                transaction: None,
14357                command_outputs: Vec::new(),
14358                suggested_gas_price: None,
14359            }
14360        }
14361        #[doc(hidden)]
14362        pub fn default_instance() -> &'static Self {
14363            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14364            &DEFAULT
14365        }
14366        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
14367        pub fn transaction(&self) -> &super::ExecutedTransaction {
14368            self.transaction
14369                .as_ref()
14370                .map(|field| field as _)
14371                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14372        }
14373        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14374        pub fn transaction_opt_mut(
14375            &mut self,
14376        ) -> Option<&mut super::ExecutedTransaction> {
14377            self.transaction.as_mut().map(|field| field as _)
14378        }
14379        ///Returns a mutable reference to `transaction`.
14380        ///If the field is unset, it is first initialized with the default value.
14381        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14382            self.transaction.get_or_insert_default()
14383        }
14384        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14385        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14386            self.transaction.as_ref().map(|field| field as _)
14387        }
14388        ///Sets `transaction` with the provided value.
14389        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14390            &mut self,
14391            field: T,
14392        ) {
14393            self.transaction = Some(field.into().into());
14394        }
14395        ///Sets `transaction` with the provided value.
14396        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14397            mut self,
14398            field: T,
14399        ) -> Self {
14400            self.set_transaction(field.into());
14401            self
14402        }
14403        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
14404        pub fn command_outputs(&self) -> &[super::CommandResult] {
14405            &self.command_outputs
14406        }
14407        ///Returns a mutable reference to `command_outputs`.
14408        ///If the field is unset, it is first initialized with the default value.
14409        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14410            &mut self.command_outputs
14411        }
14412        ///Sets `command_outputs` with the provided value.
14413        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14414            self.command_outputs = field;
14415        }
14416        ///Sets `command_outputs` with the provided value.
14417        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14418            self.set_command_outputs(field);
14419            self
14420        }
14421        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14422        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14423            self.suggested_gas_price.as_mut().map(|field| field as _)
14424        }
14425        ///Returns a mutable reference to `suggested_gas_price`.
14426        ///If the field is unset, it is first initialized with the default value.
14427        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14428            self.suggested_gas_price.get_or_insert_default()
14429        }
14430        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
14431        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14432            self.suggested_gas_price.as_ref().map(|field| *field)
14433        }
14434        ///Sets `suggested_gas_price` with the provided value.
14435        pub fn set_suggested_gas_price(&mut self, field: u64) {
14436            self.suggested_gas_price = Some(field);
14437        }
14438        ///Sets `suggested_gas_price` with the provided value.
14439        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14440            self.set_suggested_gas_price(field);
14441            self
14442        }
14443    }
14444    impl super::SizeError {
14445        pub const fn const_default() -> Self {
14446            Self { size: None, max_size: None }
14447        }
14448        #[doc(hidden)]
14449        pub fn default_instance() -> &'static Self {
14450            static DEFAULT: super::SizeError = super::SizeError::const_default();
14451            &DEFAULT
14452        }
14453        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14454        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14455            self.size.as_mut().map(|field| field as _)
14456        }
14457        ///Returns a mutable reference to `size`.
14458        ///If the field is unset, it is first initialized with the default value.
14459        pub fn size_mut(&mut self) -> &mut u64 {
14460            self.size.get_or_insert_default()
14461        }
14462        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14463        pub fn size_opt(&self) -> Option<u64> {
14464            self.size.as_ref().map(|field| *field)
14465        }
14466        ///Sets `size` with the provided value.
14467        pub fn set_size(&mut self, field: u64) {
14468            self.size = Some(field);
14469        }
14470        ///Sets `size` with the provided value.
14471        pub fn with_size(mut self, field: u64) -> Self {
14472            self.set_size(field);
14473            self
14474        }
14475        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14476        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14477            self.max_size.as_mut().map(|field| field as _)
14478        }
14479        ///Returns a mutable reference to `max_size`.
14480        ///If the field is unset, it is first initialized with the default value.
14481        pub fn max_size_mut(&mut self) -> &mut u64 {
14482            self.max_size.get_or_insert_default()
14483        }
14484        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
14485        pub fn max_size_opt(&self) -> Option<u64> {
14486            self.max_size.as_ref().map(|field| *field)
14487        }
14488        ///Sets `max_size` with the provided value.
14489        pub fn set_max_size(&mut self, field: u64) {
14490            self.max_size = Some(field);
14491        }
14492        ///Sets `max_size` with the provided value.
14493        pub fn with_max_size(mut self, field: u64) -> Self {
14494            self.set_max_size(field);
14495            self
14496        }
14497    }
14498    impl super::SplitCoins {
14499        pub const fn const_default() -> Self {
14500            Self {
14501                coin: None,
14502                amounts: Vec::new(),
14503            }
14504        }
14505        #[doc(hidden)]
14506        pub fn default_instance() -> &'static Self {
14507            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14508            &DEFAULT
14509        }
14510        ///Returns the value of `coin`, or the default value if `coin` is unset.
14511        pub fn coin(&self) -> &super::Argument {
14512            self.coin
14513                .as_ref()
14514                .map(|field| field as _)
14515                .unwrap_or_else(|| super::Argument::default_instance() as _)
14516        }
14517        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14518        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14519            self.coin.as_mut().map(|field| field as _)
14520        }
14521        ///Returns a mutable reference to `coin`.
14522        ///If the field is unset, it is first initialized with the default value.
14523        pub fn coin_mut(&mut self) -> &mut super::Argument {
14524            self.coin.get_or_insert_default()
14525        }
14526        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
14527        pub fn coin_opt(&self) -> Option<&super::Argument> {
14528            self.coin.as_ref().map(|field| field as _)
14529        }
14530        ///Sets `coin` with the provided value.
14531        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14532            self.coin = Some(field.into().into());
14533        }
14534        ///Sets `coin` with the provided value.
14535        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14536            self.set_coin(field.into());
14537            self
14538        }
14539        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
14540        pub fn amounts(&self) -> &[super::Argument] {
14541            &self.amounts
14542        }
14543        ///Returns a mutable reference to `amounts`.
14544        ///If the field is unset, it is first initialized with the default value.
14545        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14546            &mut self.amounts
14547        }
14548        ///Sets `amounts` with the provided value.
14549        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14550            self.amounts = field;
14551        }
14552        ///Sets `amounts` with the provided value.
14553        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14554            self.set_amounts(field);
14555            self
14556        }
14557    }
14558    impl super::StakeSubsidy {
14559        pub const fn const_default() -> Self {
14560            Self {
14561                balance: None,
14562                distribution_counter: None,
14563                current_distribution_amount: None,
14564                stake_subsidy_period_length: None,
14565                stake_subsidy_decrease_rate: None,
14566                extra_fields: None,
14567            }
14568        }
14569        #[doc(hidden)]
14570        pub fn default_instance() -> &'static Self {
14571            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14572            &DEFAULT
14573        }
14574        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14575        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14576            self.balance.as_mut().map(|field| field as _)
14577        }
14578        ///Returns a mutable reference to `balance`.
14579        ///If the field is unset, it is first initialized with the default value.
14580        pub fn balance_mut(&mut self) -> &mut u64 {
14581            self.balance.get_or_insert_default()
14582        }
14583        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14584        pub fn balance_opt(&self) -> Option<u64> {
14585            self.balance.as_ref().map(|field| *field)
14586        }
14587        ///Sets `balance` with the provided value.
14588        pub fn set_balance(&mut self, field: u64) {
14589            self.balance = Some(field);
14590        }
14591        ///Sets `balance` with the provided value.
14592        pub fn with_balance(mut self, field: u64) -> Self {
14593            self.set_balance(field);
14594            self
14595        }
14596        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14597        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14598            self.distribution_counter.as_mut().map(|field| field as _)
14599        }
14600        ///Returns a mutable reference to `distribution_counter`.
14601        ///If the field is unset, it is first initialized with the default value.
14602        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14603            self.distribution_counter.get_or_insert_default()
14604        }
14605        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14606        pub fn distribution_counter_opt(&self) -> Option<u64> {
14607            self.distribution_counter.as_ref().map(|field| *field)
14608        }
14609        ///Sets `distribution_counter` with the provided value.
14610        pub fn set_distribution_counter(&mut self, field: u64) {
14611            self.distribution_counter = Some(field);
14612        }
14613        ///Sets `distribution_counter` with the provided value.
14614        pub fn with_distribution_counter(mut self, field: u64) -> Self {
14615            self.set_distribution_counter(field);
14616            self
14617        }
14618        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14619        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14620            self.current_distribution_amount.as_mut().map(|field| field as _)
14621        }
14622        ///Returns a mutable reference to `current_distribution_amount`.
14623        ///If the field is unset, it is first initialized with the default value.
14624        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14625            self.current_distribution_amount.get_or_insert_default()
14626        }
14627        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
14628        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14629            self.current_distribution_amount.as_ref().map(|field| *field)
14630        }
14631        ///Sets `current_distribution_amount` with the provided value.
14632        pub fn set_current_distribution_amount(&mut self, field: u64) {
14633            self.current_distribution_amount = Some(field);
14634        }
14635        ///Sets `current_distribution_amount` with the provided value.
14636        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14637            self.set_current_distribution_amount(field);
14638            self
14639        }
14640        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14641        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14642            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14643        }
14644        ///Returns a mutable reference to `stake_subsidy_period_length`.
14645        ///If the field is unset, it is first initialized with the default value.
14646        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14647            self.stake_subsidy_period_length.get_or_insert_default()
14648        }
14649        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
14650        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14651            self.stake_subsidy_period_length.as_ref().map(|field| *field)
14652        }
14653        ///Sets `stake_subsidy_period_length` with the provided value.
14654        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14655            self.stake_subsidy_period_length = Some(field);
14656        }
14657        ///Sets `stake_subsidy_period_length` with the provided value.
14658        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14659            self.set_stake_subsidy_period_length(field);
14660            self
14661        }
14662        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14663        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14664            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14665        }
14666        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
14667        ///If the field is unset, it is first initialized with the default value.
14668        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14669            self.stake_subsidy_decrease_rate.get_or_insert_default()
14670        }
14671        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
14672        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14673            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14674        }
14675        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14676        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14677            self.stake_subsidy_decrease_rate = Some(field);
14678        }
14679        ///Sets `stake_subsidy_decrease_rate` with the provided value.
14680        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14681            self.set_stake_subsidy_decrease_rate(field);
14682            self
14683        }
14684        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14685        pub fn extra_fields(&self) -> &super::MoveTable {
14686            self.extra_fields
14687                .as_ref()
14688                .map(|field| field as _)
14689                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14690        }
14691        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14692        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14693            self.extra_fields.as_mut().map(|field| field as _)
14694        }
14695        ///Returns a mutable reference to `extra_fields`.
14696        ///If the field is unset, it is first initialized with the default value.
14697        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14698            self.extra_fields.get_or_insert_default()
14699        }
14700        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14701        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14702            self.extra_fields.as_ref().map(|field| field as _)
14703        }
14704        ///Sets `extra_fields` with the provided value.
14705        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14706            self.extra_fields = Some(field.into().into());
14707        }
14708        ///Sets `extra_fields` with the provided value.
14709        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14710            self.set_extra_fields(field.into());
14711            self
14712        }
14713    }
14714    impl super::StakingPool {
14715        pub const fn const_default() -> Self {
14716            Self {
14717                id: None,
14718                activation_epoch: None,
14719                deactivation_epoch: None,
14720                sui_balance: None,
14721                rewards_pool: None,
14722                pool_token_balance: None,
14723                exchange_rates: None,
14724                pending_stake: None,
14725                pending_total_sui_withdraw: None,
14726                pending_pool_token_withdraw: None,
14727                extra_fields: None,
14728            }
14729        }
14730        #[doc(hidden)]
14731        pub fn default_instance() -> &'static Self {
14732            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14733            &DEFAULT
14734        }
14735        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14736        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14737            self.id.as_mut().map(|field| field as _)
14738        }
14739        ///Returns a mutable reference to `id`.
14740        ///If the field is unset, it is first initialized with the default value.
14741        pub fn id_mut(&mut self) -> &mut String {
14742            self.id.get_or_insert_default()
14743        }
14744        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14745        pub fn id_opt(&self) -> Option<&str> {
14746            self.id.as_ref().map(|field| field as _)
14747        }
14748        ///Sets `id` with the provided value.
14749        pub fn set_id<T: Into<String>>(&mut self, field: T) {
14750            self.id = Some(field.into().into());
14751        }
14752        ///Sets `id` with the provided value.
14753        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14754            self.set_id(field.into());
14755            self
14756        }
14757        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14758        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14759            self.activation_epoch.as_mut().map(|field| field as _)
14760        }
14761        ///Returns a mutable reference to `activation_epoch`.
14762        ///If the field is unset, it is first initialized with the default value.
14763        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14764            self.activation_epoch.get_or_insert_default()
14765        }
14766        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14767        pub fn activation_epoch_opt(&self) -> Option<u64> {
14768            self.activation_epoch.as_ref().map(|field| *field)
14769        }
14770        ///Sets `activation_epoch` with the provided value.
14771        pub fn set_activation_epoch(&mut self, field: u64) {
14772            self.activation_epoch = Some(field);
14773        }
14774        ///Sets `activation_epoch` with the provided value.
14775        pub fn with_activation_epoch(mut self, field: u64) -> Self {
14776            self.set_activation_epoch(field);
14777            self
14778        }
14779        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14780        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14781            self.deactivation_epoch.as_mut().map(|field| field as _)
14782        }
14783        ///Returns a mutable reference to `deactivation_epoch`.
14784        ///If the field is unset, it is first initialized with the default value.
14785        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14786            self.deactivation_epoch.get_or_insert_default()
14787        }
14788        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14789        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14790            self.deactivation_epoch.as_ref().map(|field| *field)
14791        }
14792        ///Sets `deactivation_epoch` with the provided value.
14793        pub fn set_deactivation_epoch(&mut self, field: u64) {
14794            self.deactivation_epoch = Some(field);
14795        }
14796        ///Sets `deactivation_epoch` with the provided value.
14797        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14798            self.set_deactivation_epoch(field);
14799            self
14800        }
14801        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14802        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14803            self.sui_balance.as_mut().map(|field| field as _)
14804        }
14805        ///Returns a mutable reference to `sui_balance`.
14806        ///If the field is unset, it is first initialized with the default value.
14807        pub fn sui_balance_mut(&mut self) -> &mut u64 {
14808            self.sui_balance.get_or_insert_default()
14809        }
14810        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14811        pub fn sui_balance_opt(&self) -> Option<u64> {
14812            self.sui_balance.as_ref().map(|field| *field)
14813        }
14814        ///Sets `sui_balance` with the provided value.
14815        pub fn set_sui_balance(&mut self, field: u64) {
14816            self.sui_balance = Some(field);
14817        }
14818        ///Sets `sui_balance` with the provided value.
14819        pub fn with_sui_balance(mut self, field: u64) -> Self {
14820            self.set_sui_balance(field);
14821            self
14822        }
14823        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14824        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14825            self.rewards_pool.as_mut().map(|field| field as _)
14826        }
14827        ///Returns a mutable reference to `rewards_pool`.
14828        ///If the field is unset, it is first initialized with the default value.
14829        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14830            self.rewards_pool.get_or_insert_default()
14831        }
14832        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
14833        pub fn rewards_pool_opt(&self) -> Option<u64> {
14834            self.rewards_pool.as_ref().map(|field| *field)
14835        }
14836        ///Sets `rewards_pool` with the provided value.
14837        pub fn set_rewards_pool(&mut self, field: u64) {
14838            self.rewards_pool = Some(field);
14839        }
14840        ///Sets `rewards_pool` with the provided value.
14841        pub fn with_rewards_pool(mut self, field: u64) -> Self {
14842            self.set_rewards_pool(field);
14843            self
14844        }
14845        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14846        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14847            self.pool_token_balance.as_mut().map(|field| field as _)
14848        }
14849        ///Returns a mutable reference to `pool_token_balance`.
14850        ///If the field is unset, it is first initialized with the default value.
14851        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14852            self.pool_token_balance.get_or_insert_default()
14853        }
14854        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
14855        pub fn pool_token_balance_opt(&self) -> Option<u64> {
14856            self.pool_token_balance.as_ref().map(|field| *field)
14857        }
14858        ///Sets `pool_token_balance` with the provided value.
14859        pub fn set_pool_token_balance(&mut self, field: u64) {
14860            self.pool_token_balance = Some(field);
14861        }
14862        ///Sets `pool_token_balance` with the provided value.
14863        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14864            self.set_pool_token_balance(field);
14865            self
14866        }
14867        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
14868        pub fn exchange_rates(&self) -> &super::MoveTable {
14869            self.exchange_rates
14870                .as_ref()
14871                .map(|field| field as _)
14872                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14873        }
14874        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14875        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14876            self.exchange_rates.as_mut().map(|field| field as _)
14877        }
14878        ///Returns a mutable reference to `exchange_rates`.
14879        ///If the field is unset, it is first initialized with the default value.
14880        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14881            self.exchange_rates.get_or_insert_default()
14882        }
14883        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
14884        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14885            self.exchange_rates.as_ref().map(|field| field as _)
14886        }
14887        ///Sets `exchange_rates` with the provided value.
14888        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14889            self.exchange_rates = Some(field.into().into());
14890        }
14891        ///Sets `exchange_rates` with the provided value.
14892        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14893            mut self,
14894            field: T,
14895        ) -> Self {
14896            self.set_exchange_rates(field.into());
14897            self
14898        }
14899        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14900        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14901            self.pending_stake.as_mut().map(|field| field as _)
14902        }
14903        ///Returns a mutable reference to `pending_stake`.
14904        ///If the field is unset, it is first initialized with the default value.
14905        pub fn pending_stake_mut(&mut self) -> &mut u64 {
14906            self.pending_stake.get_or_insert_default()
14907        }
14908        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
14909        pub fn pending_stake_opt(&self) -> Option<u64> {
14910            self.pending_stake.as_ref().map(|field| *field)
14911        }
14912        ///Sets `pending_stake` with the provided value.
14913        pub fn set_pending_stake(&mut self, field: u64) {
14914            self.pending_stake = Some(field);
14915        }
14916        ///Sets `pending_stake` with the provided value.
14917        pub fn with_pending_stake(mut self, field: u64) -> Self {
14918            self.set_pending_stake(field);
14919            self
14920        }
14921        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14922        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14923            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14924        }
14925        ///Returns a mutable reference to `pending_total_sui_withdraw`.
14926        ///If the field is unset, it is first initialized with the default value.
14927        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14928            self.pending_total_sui_withdraw.get_or_insert_default()
14929        }
14930        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14931        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14932            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14933        }
14934        ///Sets `pending_total_sui_withdraw` with the provided value.
14935        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14936            self.pending_total_sui_withdraw = Some(field);
14937        }
14938        ///Sets `pending_total_sui_withdraw` with the provided value.
14939        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14940            self.set_pending_total_sui_withdraw(field);
14941            self
14942        }
14943        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14944        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14945            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14946        }
14947        ///Returns a mutable reference to `pending_pool_token_withdraw`.
14948        ///If the field is unset, it is first initialized with the default value.
14949        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14950            self.pending_pool_token_withdraw.get_or_insert_default()
14951        }
14952        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
14953        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14954            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14955        }
14956        ///Sets `pending_pool_token_withdraw` with the provided value.
14957        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14958            self.pending_pool_token_withdraw = Some(field);
14959        }
14960        ///Sets `pending_pool_token_withdraw` with the provided value.
14961        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14962            self.set_pending_pool_token_withdraw(field);
14963            self
14964        }
14965        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
14966        pub fn extra_fields(&self) -> &super::MoveTable {
14967            self.extra_fields
14968                .as_ref()
14969                .map(|field| field as _)
14970                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14971        }
14972        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14973        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14974            self.extra_fields.as_mut().map(|field| field as _)
14975        }
14976        ///Returns a mutable reference to `extra_fields`.
14977        ///If the field is unset, it is first initialized with the default value.
14978        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14979            self.extra_fields.get_or_insert_default()
14980        }
14981        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
14982        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14983            self.extra_fields.as_ref().map(|field| field as _)
14984        }
14985        ///Sets `extra_fields` with the provided value.
14986        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14987            self.extra_fields = Some(field.into().into());
14988        }
14989        ///Sets `extra_fields` with the provided value.
14990        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14991            self.set_extra_fields(field.into());
14992            self
14993        }
14994    }
14995    impl super::StorageFund {
14996        pub const fn const_default() -> Self {
14997            Self {
14998                total_object_storage_rebates: None,
14999                non_refundable_balance: None,
15000            }
15001        }
15002        #[doc(hidden)]
15003        pub fn default_instance() -> &'static Self {
15004            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
15005            &DEFAULT
15006        }
15007        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15008        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15009            self.total_object_storage_rebates.as_mut().map(|field| field as _)
15010        }
15011        ///Returns a mutable reference to `total_object_storage_rebates`.
15012        ///If the field is unset, it is first initialized with the default value.
15013        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
15014            self.total_object_storage_rebates.get_or_insert_default()
15015        }
15016        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
15017        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
15018            self.total_object_storage_rebates.as_ref().map(|field| *field)
15019        }
15020        ///Sets `total_object_storage_rebates` with the provided value.
15021        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
15022            self.total_object_storage_rebates = Some(field);
15023        }
15024        ///Sets `total_object_storage_rebates` with the provided value.
15025        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
15026            self.set_total_object_storage_rebates(field);
15027            self
15028        }
15029        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15030        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
15031            self.non_refundable_balance.as_mut().map(|field| field as _)
15032        }
15033        ///Returns a mutable reference to `non_refundable_balance`.
15034        ///If the field is unset, it is first initialized with the default value.
15035        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
15036            self.non_refundable_balance.get_or_insert_default()
15037        }
15038        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
15039        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
15040            self.non_refundable_balance.as_ref().map(|field| *field)
15041        }
15042        ///Sets `non_refundable_balance` with the provided value.
15043        pub fn set_non_refundable_balance(&mut self, field: u64) {
15044            self.non_refundable_balance = Some(field);
15045        }
15046        ///Sets `non_refundable_balance` with the provided value.
15047        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
15048            self.set_non_refundable_balance(field);
15049            self
15050        }
15051    }
15052    impl super::SubscribeCheckpointsRequest {
15053        pub const fn const_default() -> Self {
15054            Self {
15055                read_mask: None,
15056                filter: None,
15057            }
15058        }
15059        #[doc(hidden)]
15060        pub fn default_instance() -> &'static Self {
15061            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
15062            &DEFAULT
15063        }
15064        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15065        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15066            self.read_mask.as_mut().map(|field| field as _)
15067        }
15068        ///Returns a mutable reference to `read_mask`.
15069        ///If the field is unset, it is first initialized with the default value.
15070        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15071            self.read_mask.get_or_insert_default()
15072        }
15073        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15074        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15075            self.read_mask.as_ref().map(|field| field as _)
15076        }
15077        ///Sets `read_mask` with the provided value.
15078        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15079            self.read_mask = Some(field.into().into());
15080        }
15081        ///Sets `read_mask` with the provided value.
15082        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15083            mut self,
15084            field: T,
15085        ) -> Self {
15086            self.set_read_mask(field.into());
15087            self
15088        }
15089        ///Returns the value of `filter`, or the default value if `filter` is unset.
15090        pub fn filter(&self) -> &super::TransactionFilter {
15091            self.filter
15092                .as_ref()
15093                .map(|field| field as _)
15094                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15095        }
15096        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15097        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15098            self.filter.as_mut().map(|field| field as _)
15099        }
15100        ///Returns a mutable reference to `filter`.
15101        ///If the field is unset, it is first initialized with the default value.
15102        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15103            self.filter.get_or_insert_default()
15104        }
15105        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15106        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15107            self.filter.as_ref().map(|field| field as _)
15108        }
15109        ///Sets `filter` with the provided value.
15110        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15111            self.filter = Some(field.into().into());
15112        }
15113        ///Sets `filter` with the provided value.
15114        pub fn with_filter<T: Into<super::TransactionFilter>>(
15115            mut self,
15116            field: T,
15117        ) -> Self {
15118            self.set_filter(field.into());
15119            self
15120        }
15121    }
15122    impl super::SubscribeCheckpointsResponse {
15123        pub const fn const_default() -> Self {
15124            Self {
15125                cursor: None,
15126                checkpoint: None,
15127            }
15128        }
15129        #[doc(hidden)]
15130        pub fn default_instance() -> &'static Self {
15131            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
15132            &DEFAULT
15133        }
15134        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15135        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
15136            self.cursor.as_mut().map(|field| field as _)
15137        }
15138        ///Returns a mutable reference to `cursor`.
15139        ///If the field is unset, it is first initialized with the default value.
15140        pub fn cursor_mut(&mut self) -> &mut u64 {
15141            self.cursor.get_or_insert_default()
15142        }
15143        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
15144        pub fn cursor_opt(&self) -> Option<u64> {
15145            self.cursor.as_ref().map(|field| *field)
15146        }
15147        ///Sets `cursor` with the provided value.
15148        pub fn set_cursor(&mut self, field: u64) {
15149            self.cursor = Some(field);
15150        }
15151        ///Sets `cursor` with the provided value.
15152        pub fn with_cursor(mut self, field: u64) -> Self {
15153            self.set_cursor(field);
15154            self
15155        }
15156        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
15157        pub fn checkpoint(&self) -> &super::Checkpoint {
15158            self.checkpoint
15159                .as_ref()
15160                .map(|field| field as _)
15161                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
15162        }
15163        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15164        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
15165            self.checkpoint.as_mut().map(|field| field as _)
15166        }
15167        ///Returns a mutable reference to `checkpoint`.
15168        ///If the field is unset, it is first initialized with the default value.
15169        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
15170            self.checkpoint.get_or_insert_default()
15171        }
15172        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
15173        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
15174            self.checkpoint.as_ref().map(|field| field as _)
15175        }
15176        ///Sets `checkpoint` with the provided value.
15177        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
15178            self.checkpoint = Some(field.into().into());
15179        }
15180        ///Sets `checkpoint` with the provided value.
15181        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
15182            self.set_checkpoint(field.into());
15183            self
15184        }
15185    }
15186    impl super::SubscribeEventsRequest {
15187        pub const fn const_default() -> Self {
15188            Self {
15189                read_mask: None,
15190                filter: None,
15191            }
15192        }
15193        #[doc(hidden)]
15194        pub fn default_instance() -> &'static Self {
15195            static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
15196            &DEFAULT
15197        }
15198        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15199        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15200            self.read_mask.as_mut().map(|field| field as _)
15201        }
15202        ///Returns a mutable reference to `read_mask`.
15203        ///If the field is unset, it is first initialized with the default value.
15204        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15205            self.read_mask.get_or_insert_default()
15206        }
15207        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15208        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15209            self.read_mask.as_ref().map(|field| field as _)
15210        }
15211        ///Sets `read_mask` with the provided value.
15212        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15213            self.read_mask = Some(field.into().into());
15214        }
15215        ///Sets `read_mask` with the provided value.
15216        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15217            mut self,
15218            field: T,
15219        ) -> Self {
15220            self.set_read_mask(field.into());
15221            self
15222        }
15223        ///Returns the value of `filter`, or the default value if `filter` is unset.
15224        pub fn filter(&self) -> &super::EventFilter {
15225            self.filter
15226                .as_ref()
15227                .map(|field| field as _)
15228                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15229        }
15230        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15231        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15232            self.filter.as_mut().map(|field| field as _)
15233        }
15234        ///Returns a mutable reference to `filter`.
15235        ///If the field is unset, it is first initialized with the default value.
15236        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15237            self.filter.get_or_insert_default()
15238        }
15239        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15240        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15241            self.filter.as_ref().map(|field| field as _)
15242        }
15243        ///Sets `filter` with the provided value.
15244        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15245            self.filter = Some(field.into().into());
15246        }
15247        ///Sets `filter` with the provided value.
15248        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15249            self.set_filter(field.into());
15250            self
15251        }
15252    }
15253    impl super::SubscribeEventsResponse {
15254        pub const fn const_default() -> Self {
15255            Self {
15256                event: None,
15257                watermark: None,
15258            }
15259        }
15260        #[doc(hidden)]
15261        pub fn default_instance() -> &'static Self {
15262            static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15263            &DEFAULT
15264        }
15265        ///Returns the value of `event`, or the default value if `event` is unset.
15266        pub fn event(&self) -> &super::Event {
15267            self.event
15268                .as_ref()
15269                .map(|field| field as _)
15270                .unwrap_or_else(|| super::Event::default_instance() as _)
15271        }
15272        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15273        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15274            self.event.as_mut().map(|field| field as _)
15275        }
15276        ///Returns a mutable reference to `event`.
15277        ///If the field is unset, it is first initialized with the default value.
15278        pub fn event_mut(&mut self) -> &mut super::Event {
15279            self.event.get_or_insert_default()
15280        }
15281        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
15282        pub fn event_opt(&self) -> Option<&super::Event> {
15283            self.event.as_ref().map(|field| field as _)
15284        }
15285        ///Sets `event` with the provided value.
15286        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15287            self.event = Some(field.into().into());
15288        }
15289        ///Sets `event` with the provided value.
15290        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15291            self.set_event(field.into());
15292            self
15293        }
15294        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15295        pub fn watermark(&self) -> &super::Watermark {
15296            self.watermark
15297                .as_ref()
15298                .map(|field| field as _)
15299                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15300        }
15301        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15302        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15303            self.watermark.as_mut().map(|field| field as _)
15304        }
15305        ///Returns a mutable reference to `watermark`.
15306        ///If the field is unset, it is first initialized with the default value.
15307        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15308            self.watermark.get_or_insert_default()
15309        }
15310        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15311        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15312            self.watermark.as_ref().map(|field| field as _)
15313        }
15314        ///Sets `watermark` with the provided value.
15315        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15316            self.watermark = Some(field.into().into());
15317        }
15318        ///Sets `watermark` with the provided value.
15319        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15320            self.set_watermark(field.into());
15321            self
15322        }
15323    }
15324    impl super::SubscribeTransactionsRequest {
15325        pub const fn const_default() -> Self {
15326            Self {
15327                read_mask: None,
15328                filter: None,
15329            }
15330        }
15331        #[doc(hidden)]
15332        pub fn default_instance() -> &'static Self {
15333            static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15334            &DEFAULT
15335        }
15336        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15337        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15338            self.read_mask.as_mut().map(|field| field as _)
15339        }
15340        ///Returns a mutable reference to `read_mask`.
15341        ///If the field is unset, it is first initialized with the default value.
15342        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15343            self.read_mask.get_or_insert_default()
15344        }
15345        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15346        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15347            self.read_mask.as_ref().map(|field| field as _)
15348        }
15349        ///Sets `read_mask` with the provided value.
15350        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15351            self.read_mask = Some(field.into().into());
15352        }
15353        ///Sets `read_mask` with the provided value.
15354        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15355            mut self,
15356            field: T,
15357        ) -> Self {
15358            self.set_read_mask(field.into());
15359            self
15360        }
15361        ///Returns the value of `filter`, or the default value if `filter` is unset.
15362        pub fn filter(&self) -> &super::TransactionFilter {
15363            self.filter
15364                .as_ref()
15365                .map(|field| field as _)
15366                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15367        }
15368        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15369        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15370            self.filter.as_mut().map(|field| field as _)
15371        }
15372        ///Returns a mutable reference to `filter`.
15373        ///If the field is unset, it is first initialized with the default value.
15374        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15375            self.filter.get_or_insert_default()
15376        }
15377        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15378        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15379            self.filter.as_ref().map(|field| field as _)
15380        }
15381        ///Sets `filter` with the provided value.
15382        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15383            self.filter = Some(field.into().into());
15384        }
15385        ///Sets `filter` with the provided value.
15386        pub fn with_filter<T: Into<super::TransactionFilter>>(
15387            mut self,
15388            field: T,
15389        ) -> Self {
15390            self.set_filter(field.into());
15391            self
15392        }
15393    }
15394    impl super::SubscribeTransactionsResponse {
15395        pub const fn const_default() -> Self {
15396            Self {
15397                transaction: None,
15398                watermark: None,
15399            }
15400        }
15401        #[doc(hidden)]
15402        pub fn default_instance() -> &'static Self {
15403            static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15404            &DEFAULT
15405        }
15406        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
15407        pub fn transaction(&self) -> &super::ExecutedTransaction {
15408            self.transaction
15409                .as_ref()
15410                .map(|field| field as _)
15411                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15412        }
15413        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15414        pub fn transaction_opt_mut(
15415            &mut self,
15416        ) -> Option<&mut super::ExecutedTransaction> {
15417            self.transaction.as_mut().map(|field| field as _)
15418        }
15419        ///Returns a mutable reference to `transaction`.
15420        ///If the field is unset, it is first initialized with the default value.
15421        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15422            self.transaction.get_or_insert_default()
15423        }
15424        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15425        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15426            self.transaction.as_ref().map(|field| field as _)
15427        }
15428        ///Sets `transaction` with the provided value.
15429        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15430            &mut self,
15431            field: T,
15432        ) {
15433            self.transaction = Some(field.into().into());
15434        }
15435        ///Sets `transaction` with the provided value.
15436        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15437            mut self,
15438            field: T,
15439        ) -> Self {
15440            self.set_transaction(field.into());
15441            self
15442        }
15443        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
15444        pub fn watermark(&self) -> &super::Watermark {
15445            self.watermark
15446                .as_ref()
15447                .map(|field| field as _)
15448                .unwrap_or_else(|| super::Watermark::default_instance() as _)
15449        }
15450        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15451        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15452            self.watermark.as_mut().map(|field| field as _)
15453        }
15454        ///Returns a mutable reference to `watermark`.
15455        ///If the field is unset, it is first initialized with the default value.
15456        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15457            self.watermark.get_or_insert_default()
15458        }
15459        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
15460        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15461            self.watermark.as_ref().map(|field| field as _)
15462        }
15463        ///Sets `watermark` with the provided value.
15464        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15465            self.watermark = Some(field.into().into());
15466        }
15467        ///Sets `watermark` with the provided value.
15468        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15469            self.set_watermark(field.into());
15470            self
15471        }
15472    }
15473    impl super::SystemPackage {
15474        pub const fn const_default() -> Self {
15475            Self {
15476                version: None,
15477                modules: Vec::new(),
15478                dependencies: Vec::new(),
15479            }
15480        }
15481        #[doc(hidden)]
15482        pub fn default_instance() -> &'static Self {
15483            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15484            &DEFAULT
15485        }
15486        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15487        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15488            self.version.as_mut().map(|field| field as _)
15489        }
15490        ///Returns a mutable reference to `version`.
15491        ///If the field is unset, it is first initialized with the default value.
15492        pub fn version_mut(&mut self) -> &mut u64 {
15493            self.version.get_or_insert_default()
15494        }
15495        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15496        pub fn version_opt(&self) -> Option<u64> {
15497            self.version.as_ref().map(|field| *field)
15498        }
15499        ///Sets `version` with the provided value.
15500        pub fn set_version(&mut self, field: u64) {
15501            self.version = Some(field);
15502        }
15503        ///Sets `version` with the provided value.
15504        pub fn with_version(mut self, field: u64) -> Self {
15505            self.set_version(field);
15506            self
15507        }
15508        ///Returns the value of `modules`, or the default value if `modules` is unset.
15509        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15510            &self.modules
15511        }
15512        ///Returns a mutable reference to `modules`.
15513        ///If the field is unset, it is first initialized with the default value.
15514        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15515            &mut self.modules
15516        }
15517        ///Sets `modules` with the provided value.
15518        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15519            self.modules = field;
15520        }
15521        ///Sets `modules` with the provided value.
15522        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15523            self.set_modules(field);
15524            self
15525        }
15526        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15527        pub fn dependencies(&self) -> &[String] {
15528            &self.dependencies
15529        }
15530        ///Returns a mutable reference to `dependencies`.
15531        ///If the field is unset, it is first initialized with the default value.
15532        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15533            &mut self.dependencies
15534        }
15535        ///Sets `dependencies` with the provided value.
15536        pub fn set_dependencies(&mut self, field: Vec<String>) {
15537            self.dependencies = field;
15538        }
15539        ///Sets `dependencies` with the provided value.
15540        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15541            self.set_dependencies(field);
15542            self
15543        }
15544    }
15545    impl super::SystemParameters {
15546        pub const fn const_default() -> Self {
15547            Self {
15548                epoch_duration_ms: None,
15549                stake_subsidy_start_epoch: None,
15550                min_validator_count: None,
15551                max_validator_count: None,
15552                min_validator_joining_stake: None,
15553                validator_low_stake_threshold: None,
15554                validator_very_low_stake_threshold: None,
15555                validator_low_stake_grace_period: None,
15556                extra_fields: None,
15557            }
15558        }
15559        #[doc(hidden)]
15560        pub fn default_instance() -> &'static Self {
15561            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15562            &DEFAULT
15563        }
15564        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15565        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15566            self.epoch_duration_ms.as_mut().map(|field| field as _)
15567        }
15568        ///Returns a mutable reference to `epoch_duration_ms`.
15569        ///If the field is unset, it is first initialized with the default value.
15570        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15571            self.epoch_duration_ms.get_or_insert_default()
15572        }
15573        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
15574        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15575            self.epoch_duration_ms.as_ref().map(|field| *field)
15576        }
15577        ///Sets `epoch_duration_ms` with the provided value.
15578        pub fn set_epoch_duration_ms(&mut self, field: u64) {
15579            self.epoch_duration_ms = Some(field);
15580        }
15581        ///Sets `epoch_duration_ms` with the provided value.
15582        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15583            self.set_epoch_duration_ms(field);
15584            self
15585        }
15586        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15587        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15588            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15589        }
15590        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
15591        ///If the field is unset, it is first initialized with the default value.
15592        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15593            self.stake_subsidy_start_epoch.get_or_insert_default()
15594        }
15595        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15596        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15597            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15598        }
15599        ///Sets `stake_subsidy_start_epoch` with the provided value.
15600        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15601            self.stake_subsidy_start_epoch = Some(field);
15602        }
15603        ///Sets `stake_subsidy_start_epoch` with the provided value.
15604        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15605            self.set_stake_subsidy_start_epoch(field);
15606            self
15607        }
15608        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15609        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15610            self.min_validator_count.as_mut().map(|field| field as _)
15611        }
15612        ///Returns a mutable reference to `min_validator_count`.
15613        ///If the field is unset, it is first initialized with the default value.
15614        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15615            self.min_validator_count.get_or_insert_default()
15616        }
15617        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15618        pub fn min_validator_count_opt(&self) -> Option<u64> {
15619            self.min_validator_count.as_ref().map(|field| *field)
15620        }
15621        ///Sets `min_validator_count` with the provided value.
15622        pub fn set_min_validator_count(&mut self, field: u64) {
15623            self.min_validator_count = Some(field);
15624        }
15625        ///Sets `min_validator_count` with the provided value.
15626        pub fn with_min_validator_count(mut self, field: u64) -> Self {
15627            self.set_min_validator_count(field);
15628            self
15629        }
15630        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15631        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15632            self.max_validator_count.as_mut().map(|field| field as _)
15633        }
15634        ///Returns a mutable reference to `max_validator_count`.
15635        ///If the field is unset, it is first initialized with the default value.
15636        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15637            self.max_validator_count.get_or_insert_default()
15638        }
15639        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
15640        pub fn max_validator_count_opt(&self) -> Option<u64> {
15641            self.max_validator_count.as_ref().map(|field| *field)
15642        }
15643        ///Sets `max_validator_count` with the provided value.
15644        pub fn set_max_validator_count(&mut self, field: u64) {
15645            self.max_validator_count = Some(field);
15646        }
15647        ///Sets `max_validator_count` with the provided value.
15648        pub fn with_max_validator_count(mut self, field: u64) -> Self {
15649            self.set_max_validator_count(field);
15650            self
15651        }
15652        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15653        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15654            self.min_validator_joining_stake.as_mut().map(|field| field as _)
15655        }
15656        ///Returns a mutable reference to `min_validator_joining_stake`.
15657        ///If the field is unset, it is first initialized with the default value.
15658        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15659            self.min_validator_joining_stake.get_or_insert_default()
15660        }
15661        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
15662        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15663            self.min_validator_joining_stake.as_ref().map(|field| *field)
15664        }
15665        ///Sets `min_validator_joining_stake` with the provided value.
15666        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15667            self.min_validator_joining_stake = Some(field);
15668        }
15669        ///Sets `min_validator_joining_stake` with the provided value.
15670        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15671            self.set_min_validator_joining_stake(field);
15672            self
15673        }
15674        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15675        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15676            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15677        }
15678        ///Returns a mutable reference to `validator_low_stake_threshold`.
15679        ///If the field is unset, it is first initialized with the default value.
15680        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15681            self.validator_low_stake_threshold.get_or_insert_default()
15682        }
15683        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15684        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15685            self.validator_low_stake_threshold.as_ref().map(|field| *field)
15686        }
15687        ///Sets `validator_low_stake_threshold` with the provided value.
15688        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15689            self.validator_low_stake_threshold = Some(field);
15690        }
15691        ///Sets `validator_low_stake_threshold` with the provided value.
15692        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15693            self.set_validator_low_stake_threshold(field);
15694            self
15695        }
15696        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15697        pub fn validator_very_low_stake_threshold_opt_mut(
15698            &mut self,
15699        ) -> Option<&mut u64> {
15700            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15701        }
15702        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
15703        ///If the field is unset, it is first initialized with the default value.
15704        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15705            self.validator_very_low_stake_threshold.get_or_insert_default()
15706        }
15707        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
15708        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15709            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15710        }
15711        ///Sets `validator_very_low_stake_threshold` with the provided value.
15712        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15713            self.validator_very_low_stake_threshold = Some(field);
15714        }
15715        ///Sets `validator_very_low_stake_threshold` with the provided value.
15716        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15717            self.set_validator_very_low_stake_threshold(field);
15718            self
15719        }
15720        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15721        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15722            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15723        }
15724        ///Returns a mutable reference to `validator_low_stake_grace_period`.
15725        ///If the field is unset, it is first initialized with the default value.
15726        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15727            self.validator_low_stake_grace_period.get_or_insert_default()
15728        }
15729        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
15730        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15731            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15732        }
15733        ///Sets `validator_low_stake_grace_period` with the provided value.
15734        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15735            self.validator_low_stake_grace_period = Some(field);
15736        }
15737        ///Sets `validator_low_stake_grace_period` with the provided value.
15738        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15739            self.set_validator_low_stake_grace_period(field);
15740            self
15741        }
15742        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
15743        pub fn extra_fields(&self) -> &super::MoveTable {
15744            self.extra_fields
15745                .as_ref()
15746                .map(|field| field as _)
15747                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15748        }
15749        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15750        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15751            self.extra_fields.as_mut().map(|field| field as _)
15752        }
15753        ///Returns a mutable reference to `extra_fields`.
15754        ///If the field is unset, it is first initialized with the default value.
15755        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15756            self.extra_fields.get_or_insert_default()
15757        }
15758        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15759        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15760            self.extra_fields.as_ref().map(|field| field as _)
15761        }
15762        ///Sets `extra_fields` with the provided value.
15763        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15764            self.extra_fields = Some(field.into().into());
15765        }
15766        ///Sets `extra_fields` with the provided value.
15767        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15768            self.set_extra_fields(field.into());
15769            self
15770        }
15771    }
15772    impl super::SystemState {
15773        pub const fn const_default() -> Self {
15774            Self {
15775                version: None,
15776                epoch: None,
15777                protocol_version: None,
15778                validators: None,
15779                storage_fund: None,
15780                parameters: None,
15781                reference_gas_price: None,
15782                validator_report_records: Vec::new(),
15783                stake_subsidy: None,
15784                safe_mode: None,
15785                safe_mode_storage_rewards: None,
15786                safe_mode_computation_rewards: None,
15787                safe_mode_storage_rebates: None,
15788                safe_mode_non_refundable_storage_fee: None,
15789                epoch_start_timestamp_ms: None,
15790                extra_fields: None,
15791            }
15792        }
15793        #[doc(hidden)]
15794        pub fn default_instance() -> &'static Self {
15795            static DEFAULT: super::SystemState = super::SystemState::const_default();
15796            &DEFAULT
15797        }
15798        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15799        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15800            self.version.as_mut().map(|field| field as _)
15801        }
15802        ///Returns a mutable reference to `version`.
15803        ///If the field is unset, it is first initialized with the default value.
15804        pub fn version_mut(&mut self) -> &mut u64 {
15805            self.version.get_or_insert_default()
15806        }
15807        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15808        pub fn version_opt(&self) -> Option<u64> {
15809            self.version.as_ref().map(|field| *field)
15810        }
15811        ///Sets `version` with the provided value.
15812        pub fn set_version(&mut self, field: u64) {
15813            self.version = Some(field);
15814        }
15815        ///Sets `version` with the provided value.
15816        pub fn with_version(mut self, field: u64) -> Self {
15817            self.set_version(field);
15818            self
15819        }
15820        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15821        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15822            self.epoch.as_mut().map(|field| field as _)
15823        }
15824        ///Returns a mutable reference to `epoch`.
15825        ///If the field is unset, it is first initialized with the default value.
15826        pub fn epoch_mut(&mut self) -> &mut u64 {
15827            self.epoch.get_or_insert_default()
15828        }
15829        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15830        pub fn epoch_opt(&self) -> Option<u64> {
15831            self.epoch.as_ref().map(|field| *field)
15832        }
15833        ///Sets `epoch` with the provided value.
15834        pub fn set_epoch(&mut self, field: u64) {
15835            self.epoch = Some(field);
15836        }
15837        ///Sets `epoch` with the provided value.
15838        pub fn with_epoch(mut self, field: u64) -> Self {
15839            self.set_epoch(field);
15840            self
15841        }
15842        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15843        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15844            self.protocol_version.as_mut().map(|field| field as _)
15845        }
15846        ///Returns a mutable reference to `protocol_version`.
15847        ///If the field is unset, it is first initialized with the default value.
15848        pub fn protocol_version_mut(&mut self) -> &mut u64 {
15849            self.protocol_version.get_or_insert_default()
15850        }
15851        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15852        pub fn protocol_version_opt(&self) -> Option<u64> {
15853            self.protocol_version.as_ref().map(|field| *field)
15854        }
15855        ///Sets `protocol_version` with the provided value.
15856        pub fn set_protocol_version(&mut self, field: u64) {
15857            self.protocol_version = Some(field);
15858        }
15859        ///Sets `protocol_version` with the provided value.
15860        pub fn with_protocol_version(mut self, field: u64) -> Self {
15861            self.set_protocol_version(field);
15862            self
15863        }
15864        ///Returns the value of `validators`, or the default value if `validators` is unset.
15865        pub fn validators(&self) -> &super::ValidatorSet {
15866            self.validators
15867                .as_ref()
15868                .map(|field| field as _)
15869                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15870        }
15871        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15872        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15873            self.validators.as_mut().map(|field| field as _)
15874        }
15875        ///Returns a mutable reference to `validators`.
15876        ///If the field is unset, it is first initialized with the default value.
15877        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15878            self.validators.get_or_insert_default()
15879        }
15880        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
15881        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15882            self.validators.as_ref().map(|field| field as _)
15883        }
15884        ///Sets `validators` with the provided value.
15885        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15886            self.validators = Some(field.into().into());
15887        }
15888        ///Sets `validators` with the provided value.
15889        pub fn with_validators<T: Into<super::ValidatorSet>>(
15890            mut self,
15891            field: T,
15892        ) -> Self {
15893            self.set_validators(field.into());
15894            self
15895        }
15896        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
15897        pub fn storage_fund(&self) -> &super::StorageFund {
15898            self.storage_fund
15899                .as_ref()
15900                .map(|field| field as _)
15901                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15902        }
15903        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15904        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15905            self.storage_fund.as_mut().map(|field| field as _)
15906        }
15907        ///Returns a mutable reference to `storage_fund`.
15908        ///If the field is unset, it is first initialized with the default value.
15909        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15910            self.storage_fund.get_or_insert_default()
15911        }
15912        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
15913        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15914            self.storage_fund.as_ref().map(|field| field as _)
15915        }
15916        ///Sets `storage_fund` with the provided value.
15917        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15918            self.storage_fund = Some(field.into().into());
15919        }
15920        ///Sets `storage_fund` with the provided value.
15921        pub fn with_storage_fund<T: Into<super::StorageFund>>(
15922            mut self,
15923            field: T,
15924        ) -> Self {
15925            self.set_storage_fund(field.into());
15926            self
15927        }
15928        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
15929        pub fn parameters(&self) -> &super::SystemParameters {
15930            self.parameters
15931                .as_ref()
15932                .map(|field| field as _)
15933                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15934        }
15935        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15936        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15937            self.parameters.as_mut().map(|field| field as _)
15938        }
15939        ///Returns a mutable reference to `parameters`.
15940        ///If the field is unset, it is first initialized with the default value.
15941        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15942            self.parameters.get_or_insert_default()
15943        }
15944        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
15945        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15946            self.parameters.as_ref().map(|field| field as _)
15947        }
15948        ///Sets `parameters` with the provided value.
15949        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15950            self.parameters = Some(field.into().into());
15951        }
15952        ///Sets `parameters` with the provided value.
15953        pub fn with_parameters<T: Into<super::SystemParameters>>(
15954            mut self,
15955            field: T,
15956        ) -> Self {
15957            self.set_parameters(field.into());
15958            self
15959        }
15960        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15961        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15962            self.reference_gas_price.as_mut().map(|field| field as _)
15963        }
15964        ///Returns a mutable reference to `reference_gas_price`.
15965        ///If the field is unset, it is first initialized with the default value.
15966        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15967            self.reference_gas_price.get_or_insert_default()
15968        }
15969        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
15970        pub fn reference_gas_price_opt(&self) -> Option<u64> {
15971            self.reference_gas_price.as_ref().map(|field| *field)
15972        }
15973        ///Sets `reference_gas_price` with the provided value.
15974        pub fn set_reference_gas_price(&mut self, field: u64) {
15975            self.reference_gas_price = Some(field);
15976        }
15977        ///Sets `reference_gas_price` with the provided value.
15978        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15979            self.set_reference_gas_price(field);
15980            self
15981        }
15982        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
15983        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15984            &self.validator_report_records
15985        }
15986        ///Returns a mutable reference to `validator_report_records`.
15987        ///If the field is unset, it is first initialized with the default value.
15988        pub fn validator_report_records_mut(
15989            &mut self,
15990        ) -> &mut Vec<super::ValidatorReportRecord> {
15991            &mut self.validator_report_records
15992        }
15993        ///Sets `validator_report_records` with the provided value.
15994        pub fn set_validator_report_records(
15995            &mut self,
15996            field: Vec<super::ValidatorReportRecord>,
15997        ) {
15998            self.validator_report_records = field;
15999        }
16000        ///Sets `validator_report_records` with the provided value.
16001        pub fn with_validator_report_records(
16002            mut self,
16003            field: Vec<super::ValidatorReportRecord>,
16004        ) -> Self {
16005            self.set_validator_report_records(field);
16006            self
16007        }
16008        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
16009        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
16010            self.stake_subsidy
16011                .as_ref()
16012                .map(|field| field as _)
16013                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
16014        }
16015        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16016        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
16017            self.stake_subsidy.as_mut().map(|field| field as _)
16018        }
16019        ///Returns a mutable reference to `stake_subsidy`.
16020        ///If the field is unset, it is first initialized with the default value.
16021        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
16022            self.stake_subsidy.get_or_insert_default()
16023        }
16024        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
16025        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
16026            self.stake_subsidy.as_ref().map(|field| field as _)
16027        }
16028        ///Sets `stake_subsidy` with the provided value.
16029        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
16030            self.stake_subsidy = Some(field.into().into());
16031        }
16032        ///Sets `stake_subsidy` with the provided value.
16033        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
16034            mut self,
16035            field: T,
16036        ) -> Self {
16037            self.set_stake_subsidy(field.into());
16038            self
16039        }
16040        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16041        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
16042            self.safe_mode.as_mut().map(|field| field as _)
16043        }
16044        ///Returns a mutable reference to `safe_mode`.
16045        ///If the field is unset, it is first initialized with the default value.
16046        pub fn safe_mode_mut(&mut self) -> &mut bool {
16047            self.safe_mode.get_or_insert_default()
16048        }
16049        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
16050        pub fn safe_mode_opt(&self) -> Option<bool> {
16051            self.safe_mode.as_ref().map(|field| *field)
16052        }
16053        ///Sets `safe_mode` with the provided value.
16054        pub fn set_safe_mode(&mut self, field: bool) {
16055            self.safe_mode = Some(field);
16056        }
16057        ///Sets `safe_mode` with the provided value.
16058        pub fn with_safe_mode(mut self, field: bool) -> Self {
16059            self.set_safe_mode(field);
16060            self
16061        }
16062        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16063        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
16064            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
16065        }
16066        ///Returns a mutable reference to `safe_mode_storage_rewards`.
16067        ///If the field is unset, it is first initialized with the default value.
16068        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
16069            self.safe_mode_storage_rewards.get_or_insert_default()
16070        }
16071        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
16072        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
16073            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
16074        }
16075        ///Sets `safe_mode_storage_rewards` with the provided value.
16076        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
16077            self.safe_mode_storage_rewards = Some(field);
16078        }
16079        ///Sets `safe_mode_storage_rewards` with the provided value.
16080        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
16081            self.set_safe_mode_storage_rewards(field);
16082            self
16083        }
16084        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16085        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
16086            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
16087        }
16088        ///Returns a mutable reference to `safe_mode_computation_rewards`.
16089        ///If the field is unset, it is first initialized with the default value.
16090        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
16091            self.safe_mode_computation_rewards.get_or_insert_default()
16092        }
16093        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
16094        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
16095            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
16096        }
16097        ///Sets `safe_mode_computation_rewards` with the provided value.
16098        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
16099            self.safe_mode_computation_rewards = Some(field);
16100        }
16101        ///Sets `safe_mode_computation_rewards` with the provided value.
16102        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
16103            self.set_safe_mode_computation_rewards(field);
16104            self
16105        }
16106        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16107        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
16108            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
16109        }
16110        ///Returns a mutable reference to `safe_mode_storage_rebates`.
16111        ///If the field is unset, it is first initialized with the default value.
16112        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
16113            self.safe_mode_storage_rebates.get_or_insert_default()
16114        }
16115        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
16116        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
16117            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
16118        }
16119        ///Sets `safe_mode_storage_rebates` with the provided value.
16120        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
16121            self.safe_mode_storage_rebates = Some(field);
16122        }
16123        ///Sets `safe_mode_storage_rebates` with the provided value.
16124        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
16125            self.set_safe_mode_storage_rebates(field);
16126            self
16127        }
16128        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16129        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
16130            &mut self,
16131        ) -> Option<&mut u64> {
16132            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
16133        }
16134        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
16135        ///If the field is unset, it is first initialized with the default value.
16136        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
16137            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
16138        }
16139        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
16140        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
16141            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
16142        }
16143        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
16144        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
16145            self.safe_mode_non_refundable_storage_fee = Some(field);
16146        }
16147        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
16148        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
16149            self.set_safe_mode_non_refundable_storage_fee(field);
16150            self
16151        }
16152        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16153        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
16154            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
16155        }
16156        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
16157        ///If the field is unset, it is first initialized with the default value.
16158        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
16159            self.epoch_start_timestamp_ms.get_or_insert_default()
16160        }
16161        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
16162        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
16163            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
16164        }
16165        ///Sets `epoch_start_timestamp_ms` with the provided value.
16166        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
16167            self.epoch_start_timestamp_ms = Some(field);
16168        }
16169        ///Sets `epoch_start_timestamp_ms` with the provided value.
16170        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
16171            self.set_epoch_start_timestamp_ms(field);
16172            self
16173        }
16174        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16175        pub fn extra_fields(&self) -> &super::MoveTable {
16176            self.extra_fields
16177                .as_ref()
16178                .map(|field| field as _)
16179                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16180        }
16181        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16182        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16183            self.extra_fields.as_mut().map(|field| field as _)
16184        }
16185        ///Returns a mutable reference to `extra_fields`.
16186        ///If the field is unset, it is first initialized with the default value.
16187        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16188            self.extra_fields.get_or_insert_default()
16189        }
16190        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16191        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16192            self.extra_fields.as_ref().map(|field| field as _)
16193        }
16194        ///Sets `extra_fields` with the provided value.
16195        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16196            self.extra_fields = Some(field.into().into());
16197        }
16198        ///Sets `extra_fields` with the provided value.
16199        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16200            self.set_extra_fields(field.into());
16201            self
16202        }
16203    }
16204    impl super::Transaction {
16205        pub const fn const_default() -> Self {
16206            Self {
16207                bcs: None,
16208                digest: None,
16209                version: None,
16210                kind: None,
16211                sender: None,
16212                gas_payment: None,
16213                expiration: None,
16214            }
16215        }
16216        #[doc(hidden)]
16217        pub fn default_instance() -> &'static Self {
16218            static DEFAULT: super::Transaction = super::Transaction::const_default();
16219            &DEFAULT
16220        }
16221        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16222        pub fn bcs(&self) -> &super::Bcs {
16223            self.bcs
16224                .as_ref()
16225                .map(|field| field as _)
16226                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16227        }
16228        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16229        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16230            self.bcs.as_mut().map(|field| field as _)
16231        }
16232        ///Returns a mutable reference to `bcs`.
16233        ///If the field is unset, it is first initialized with the default value.
16234        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16235            self.bcs.get_or_insert_default()
16236        }
16237        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16238        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16239            self.bcs.as_ref().map(|field| field as _)
16240        }
16241        ///Sets `bcs` with the provided value.
16242        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16243            self.bcs = Some(field.into().into());
16244        }
16245        ///Sets `bcs` with the provided value.
16246        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16247            self.set_bcs(field.into());
16248            self
16249        }
16250        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16251        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16252            self.digest.as_mut().map(|field| field as _)
16253        }
16254        ///Returns a mutable reference to `digest`.
16255        ///If the field is unset, it is first initialized with the default value.
16256        pub fn digest_mut(&mut self) -> &mut String {
16257            self.digest.get_or_insert_default()
16258        }
16259        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16260        pub fn digest_opt(&self) -> Option<&str> {
16261            self.digest.as_ref().map(|field| field as _)
16262        }
16263        ///Sets `digest` with the provided value.
16264        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16265            self.digest = Some(field.into().into());
16266        }
16267        ///Sets `digest` with the provided value.
16268        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16269            self.set_digest(field.into());
16270            self
16271        }
16272        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16273        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16274            self.version.as_mut().map(|field| field as _)
16275        }
16276        ///Returns a mutable reference to `version`.
16277        ///If the field is unset, it is first initialized with the default value.
16278        pub fn version_mut(&mut self) -> &mut i32 {
16279            self.version.get_or_insert_default()
16280        }
16281        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16282        pub fn version_opt(&self) -> Option<i32> {
16283            self.version.as_ref().map(|field| *field)
16284        }
16285        ///Sets `version` with the provided value.
16286        pub fn set_version(&mut self, field: i32) {
16287            self.version = Some(field);
16288        }
16289        ///Sets `version` with the provided value.
16290        pub fn with_version(mut self, field: i32) -> Self {
16291            self.set_version(field);
16292            self
16293        }
16294        ///Returns the value of `kind`, or the default value if `kind` is unset.
16295        pub fn kind(&self) -> &super::TransactionKind {
16296            self.kind
16297                .as_ref()
16298                .map(|field| field as _)
16299                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16300        }
16301        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16302        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16303            self.kind.as_mut().map(|field| field as _)
16304        }
16305        ///Returns a mutable reference to `kind`.
16306        ///If the field is unset, it is first initialized with the default value.
16307        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16308            self.kind.get_or_insert_default()
16309        }
16310        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
16311        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16312            self.kind.as_ref().map(|field| field as _)
16313        }
16314        ///Sets `kind` with the provided value.
16315        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16316            self.kind = Some(field.into().into());
16317        }
16318        ///Sets `kind` with the provided value.
16319        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16320            self.set_kind(field.into());
16321            self
16322        }
16323        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16324        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16325            self.sender.as_mut().map(|field| field as _)
16326        }
16327        ///Returns a mutable reference to `sender`.
16328        ///If the field is unset, it is first initialized with the default value.
16329        pub fn sender_mut(&mut self) -> &mut String {
16330            self.sender.get_or_insert_default()
16331        }
16332        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
16333        pub fn sender_opt(&self) -> Option<&str> {
16334            self.sender.as_ref().map(|field| field as _)
16335        }
16336        ///Sets `sender` with the provided value.
16337        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16338            self.sender = Some(field.into().into());
16339        }
16340        ///Sets `sender` with the provided value.
16341        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16342            self.set_sender(field.into());
16343            self
16344        }
16345        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
16346        pub fn gas_payment(&self) -> &super::GasPayment {
16347            self.gas_payment
16348                .as_ref()
16349                .map(|field| field as _)
16350                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16351        }
16352        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16353        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16354            self.gas_payment.as_mut().map(|field| field as _)
16355        }
16356        ///Returns a mutable reference to `gas_payment`.
16357        ///If the field is unset, it is first initialized with the default value.
16358        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16359            self.gas_payment.get_or_insert_default()
16360        }
16361        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
16362        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16363            self.gas_payment.as_ref().map(|field| field as _)
16364        }
16365        ///Sets `gas_payment` with the provided value.
16366        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16367            self.gas_payment = Some(field.into().into());
16368        }
16369        ///Sets `gas_payment` with the provided value.
16370        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16371            self.set_gas_payment(field.into());
16372            self
16373        }
16374        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
16375        pub fn expiration(&self) -> &super::TransactionExpiration {
16376            self.expiration
16377                .as_ref()
16378                .map(|field| field as _)
16379                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16380        }
16381        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16382        pub fn expiration_opt_mut(
16383            &mut self,
16384        ) -> Option<&mut super::TransactionExpiration> {
16385            self.expiration.as_mut().map(|field| field as _)
16386        }
16387        ///Returns a mutable reference to `expiration`.
16388        ///If the field is unset, it is first initialized with the default value.
16389        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16390            self.expiration.get_or_insert_default()
16391        }
16392        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16393        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16394            self.expiration.as_ref().map(|field| field as _)
16395        }
16396        ///Sets `expiration` with the provided value.
16397        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16398            &mut self,
16399            field: T,
16400        ) {
16401            self.expiration = Some(field.into().into());
16402        }
16403        ///Sets `expiration` with the provided value.
16404        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16405            mut self,
16406            field: T,
16407        ) -> Self {
16408            self.set_expiration(field.into());
16409            self
16410        }
16411    }
16412    impl super::TransactionEffects {
16413        pub const fn const_default() -> Self {
16414            Self {
16415                bcs: None,
16416                digest: None,
16417                version: None,
16418                status: None,
16419                epoch: None,
16420                gas_used: None,
16421                transaction_digest: None,
16422                gas_object: None,
16423                events_digest: None,
16424                dependencies: Vec::new(),
16425                lamport_version: None,
16426                changed_objects: Vec::new(),
16427                unchanged_consensus_objects: Vec::new(),
16428                auxiliary_data_digest: None,
16429                unchanged_loaded_runtime_objects: Vec::new(),
16430            }
16431        }
16432        #[doc(hidden)]
16433        pub fn default_instance() -> &'static Self {
16434            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16435            &DEFAULT
16436        }
16437        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16438        pub fn bcs(&self) -> &super::Bcs {
16439            self.bcs
16440                .as_ref()
16441                .map(|field| field as _)
16442                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16443        }
16444        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16445        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16446            self.bcs.as_mut().map(|field| field as _)
16447        }
16448        ///Returns a mutable reference to `bcs`.
16449        ///If the field is unset, it is first initialized with the default value.
16450        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16451            self.bcs.get_or_insert_default()
16452        }
16453        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16454        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16455            self.bcs.as_ref().map(|field| field as _)
16456        }
16457        ///Sets `bcs` with the provided value.
16458        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16459            self.bcs = Some(field.into().into());
16460        }
16461        ///Sets `bcs` with the provided value.
16462        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16463            self.set_bcs(field.into());
16464            self
16465        }
16466        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16467        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16468            self.digest.as_mut().map(|field| field as _)
16469        }
16470        ///Returns a mutable reference to `digest`.
16471        ///If the field is unset, it is first initialized with the default value.
16472        pub fn digest_mut(&mut self) -> &mut String {
16473            self.digest.get_or_insert_default()
16474        }
16475        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16476        pub fn digest_opt(&self) -> Option<&str> {
16477            self.digest.as_ref().map(|field| field as _)
16478        }
16479        ///Sets `digest` with the provided value.
16480        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16481            self.digest = Some(field.into().into());
16482        }
16483        ///Sets `digest` with the provided value.
16484        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16485            self.set_digest(field.into());
16486            self
16487        }
16488        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16489        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16490            self.version.as_mut().map(|field| field as _)
16491        }
16492        ///Returns a mutable reference to `version`.
16493        ///If the field is unset, it is first initialized with the default value.
16494        pub fn version_mut(&mut self) -> &mut i32 {
16495            self.version.get_or_insert_default()
16496        }
16497        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16498        pub fn version_opt(&self) -> Option<i32> {
16499            self.version.as_ref().map(|field| *field)
16500        }
16501        ///Sets `version` with the provided value.
16502        pub fn set_version(&mut self, field: i32) {
16503            self.version = Some(field);
16504        }
16505        ///Sets `version` with the provided value.
16506        pub fn with_version(mut self, field: i32) -> Self {
16507            self.set_version(field);
16508            self
16509        }
16510        ///Returns the value of `status`, or the default value if `status` is unset.
16511        pub fn status(&self) -> &super::ExecutionStatus {
16512            self.status
16513                .as_ref()
16514                .map(|field| field as _)
16515                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16516        }
16517        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16518        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16519            self.status.as_mut().map(|field| field as _)
16520        }
16521        ///Returns a mutable reference to `status`.
16522        ///If the field is unset, it is first initialized with the default value.
16523        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16524            self.status.get_or_insert_default()
16525        }
16526        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
16527        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16528            self.status.as_ref().map(|field| field as _)
16529        }
16530        ///Sets `status` with the provided value.
16531        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16532            self.status = Some(field.into().into());
16533        }
16534        ///Sets `status` with the provided value.
16535        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16536            self.set_status(field.into());
16537            self
16538        }
16539        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16540        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16541            self.epoch.as_mut().map(|field| field as _)
16542        }
16543        ///Returns a mutable reference to `epoch`.
16544        ///If the field is unset, it is first initialized with the default value.
16545        pub fn epoch_mut(&mut self) -> &mut u64 {
16546            self.epoch.get_or_insert_default()
16547        }
16548        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16549        pub fn epoch_opt(&self) -> Option<u64> {
16550            self.epoch.as_ref().map(|field| *field)
16551        }
16552        ///Sets `epoch` with the provided value.
16553        pub fn set_epoch(&mut self, field: u64) {
16554            self.epoch = Some(field);
16555        }
16556        ///Sets `epoch` with the provided value.
16557        pub fn with_epoch(mut self, field: u64) -> Self {
16558            self.set_epoch(field);
16559            self
16560        }
16561        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
16562        pub fn gas_used(&self) -> &super::GasCostSummary {
16563            self.gas_used
16564                .as_ref()
16565                .map(|field| field as _)
16566                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16567        }
16568        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16569        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16570            self.gas_used.as_mut().map(|field| field as _)
16571        }
16572        ///Returns a mutable reference to `gas_used`.
16573        ///If the field is unset, it is first initialized with the default value.
16574        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16575            self.gas_used.get_or_insert_default()
16576        }
16577        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
16578        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16579            self.gas_used.as_ref().map(|field| field as _)
16580        }
16581        ///Sets `gas_used` with the provided value.
16582        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16583            self.gas_used = Some(field.into().into());
16584        }
16585        ///Sets `gas_used` with the provided value.
16586        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16587            mut self,
16588            field: T,
16589        ) -> Self {
16590            self.set_gas_used(field.into());
16591            self
16592        }
16593        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16594        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16595            self.transaction_digest.as_mut().map(|field| field as _)
16596        }
16597        ///Returns a mutable reference to `transaction_digest`.
16598        ///If the field is unset, it is first initialized with the default value.
16599        pub fn transaction_digest_mut(&mut self) -> &mut String {
16600            self.transaction_digest.get_or_insert_default()
16601        }
16602        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16603        pub fn transaction_digest_opt(&self) -> Option<&str> {
16604            self.transaction_digest.as_ref().map(|field| field as _)
16605        }
16606        ///Sets `transaction_digest` with the provided value.
16607        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16608            self.transaction_digest = Some(field.into().into());
16609        }
16610        ///Sets `transaction_digest` with the provided value.
16611        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16612            self.set_transaction_digest(field.into());
16613            self
16614        }
16615        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
16616        pub fn gas_object(&self) -> &super::ChangedObject {
16617            self.gas_object
16618                .as_ref()
16619                .map(|field| field as _)
16620                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16621        }
16622        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16623        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16624            self.gas_object.as_mut().map(|field| field as _)
16625        }
16626        ///Returns a mutable reference to `gas_object`.
16627        ///If the field is unset, it is first initialized with the default value.
16628        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16629            self.gas_object.get_or_insert_default()
16630        }
16631        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
16632        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16633            self.gas_object.as_ref().map(|field| field as _)
16634        }
16635        ///Sets `gas_object` with the provided value.
16636        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16637            self.gas_object = Some(field.into().into());
16638        }
16639        ///Sets `gas_object` with the provided value.
16640        pub fn with_gas_object<T: Into<super::ChangedObject>>(
16641            mut self,
16642            field: T,
16643        ) -> Self {
16644            self.set_gas_object(field.into());
16645            self
16646        }
16647        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16648        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16649            self.events_digest.as_mut().map(|field| field as _)
16650        }
16651        ///Returns a mutable reference to `events_digest`.
16652        ///If the field is unset, it is first initialized with the default value.
16653        pub fn events_digest_mut(&mut self) -> &mut String {
16654            self.events_digest.get_or_insert_default()
16655        }
16656        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16657        pub fn events_digest_opt(&self) -> Option<&str> {
16658            self.events_digest.as_ref().map(|field| field as _)
16659        }
16660        ///Sets `events_digest` with the provided value.
16661        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16662            self.events_digest = Some(field.into().into());
16663        }
16664        ///Sets `events_digest` with the provided value.
16665        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16666            self.set_events_digest(field.into());
16667            self
16668        }
16669        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
16670        pub fn dependencies(&self) -> &[String] {
16671            &self.dependencies
16672        }
16673        ///Returns a mutable reference to `dependencies`.
16674        ///If the field is unset, it is first initialized with the default value.
16675        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16676            &mut self.dependencies
16677        }
16678        ///Sets `dependencies` with the provided value.
16679        pub fn set_dependencies(&mut self, field: Vec<String>) {
16680            self.dependencies = field;
16681        }
16682        ///Sets `dependencies` with the provided value.
16683        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16684            self.set_dependencies(field);
16685            self
16686        }
16687        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16688        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16689            self.lamport_version.as_mut().map(|field| field as _)
16690        }
16691        ///Returns a mutable reference to `lamport_version`.
16692        ///If the field is unset, it is first initialized with the default value.
16693        pub fn lamport_version_mut(&mut self) -> &mut u64 {
16694            self.lamport_version.get_or_insert_default()
16695        }
16696        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16697        pub fn lamport_version_opt(&self) -> Option<u64> {
16698            self.lamport_version.as_ref().map(|field| *field)
16699        }
16700        ///Sets `lamport_version` with the provided value.
16701        pub fn set_lamport_version(&mut self, field: u64) {
16702            self.lamport_version = Some(field);
16703        }
16704        ///Sets `lamport_version` with the provided value.
16705        pub fn with_lamport_version(mut self, field: u64) -> Self {
16706            self.set_lamport_version(field);
16707            self
16708        }
16709        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
16710        pub fn changed_objects(&self) -> &[super::ChangedObject] {
16711            &self.changed_objects
16712        }
16713        ///Returns a mutable reference to `changed_objects`.
16714        ///If the field is unset, it is first initialized with the default value.
16715        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16716            &mut self.changed_objects
16717        }
16718        ///Sets `changed_objects` with the provided value.
16719        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16720            self.changed_objects = field;
16721        }
16722        ///Sets `changed_objects` with the provided value.
16723        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16724            self.set_changed_objects(field);
16725            self
16726        }
16727        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
16728        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16729            &self.unchanged_consensus_objects
16730        }
16731        ///Returns a mutable reference to `unchanged_consensus_objects`.
16732        ///If the field is unset, it is first initialized with the default value.
16733        pub fn unchanged_consensus_objects_mut(
16734            &mut self,
16735        ) -> &mut Vec<super::UnchangedConsensusObject> {
16736            &mut self.unchanged_consensus_objects
16737        }
16738        ///Sets `unchanged_consensus_objects` with the provided value.
16739        pub fn set_unchanged_consensus_objects(
16740            &mut self,
16741            field: Vec<super::UnchangedConsensusObject>,
16742        ) {
16743            self.unchanged_consensus_objects = field;
16744        }
16745        ///Sets `unchanged_consensus_objects` with the provided value.
16746        pub fn with_unchanged_consensus_objects(
16747            mut self,
16748            field: Vec<super::UnchangedConsensusObject>,
16749        ) -> Self {
16750            self.set_unchanged_consensus_objects(field);
16751            self
16752        }
16753        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16754        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16755            self.auxiliary_data_digest.as_mut().map(|field| field as _)
16756        }
16757        ///Returns a mutable reference to `auxiliary_data_digest`.
16758        ///If the field is unset, it is first initialized with the default value.
16759        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16760            self.auxiliary_data_digest.get_or_insert_default()
16761        }
16762        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16763        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16764            self.auxiliary_data_digest.as_ref().map(|field| field as _)
16765        }
16766        ///Sets `auxiliary_data_digest` with the provided value.
16767        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16768            self.auxiliary_data_digest = Some(field.into().into());
16769        }
16770        ///Sets `auxiliary_data_digest` with the provided value.
16771        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16772            self.set_auxiliary_data_digest(field.into());
16773            self
16774        }
16775        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
16776        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16777            &self.unchanged_loaded_runtime_objects
16778        }
16779        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
16780        ///If the field is unset, it is first initialized with the default value.
16781        pub fn unchanged_loaded_runtime_objects_mut(
16782            &mut self,
16783        ) -> &mut Vec<super::ObjectReference> {
16784            &mut self.unchanged_loaded_runtime_objects
16785        }
16786        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16787        pub fn set_unchanged_loaded_runtime_objects(
16788            &mut self,
16789            field: Vec<super::ObjectReference>,
16790        ) {
16791            self.unchanged_loaded_runtime_objects = field;
16792        }
16793        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
16794        pub fn with_unchanged_loaded_runtime_objects(
16795            mut self,
16796            field: Vec<super::ObjectReference>,
16797        ) -> Self {
16798            self.set_unchanged_loaded_runtime_objects(field);
16799            self
16800        }
16801    }
16802    impl super::TransactionEvents {
16803        pub const fn const_default() -> Self {
16804            Self {
16805                bcs: None,
16806                digest: None,
16807                events: Vec::new(),
16808            }
16809        }
16810        #[doc(hidden)]
16811        pub fn default_instance() -> &'static Self {
16812            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16813            &DEFAULT
16814        }
16815        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
16816        pub fn bcs(&self) -> &super::Bcs {
16817            self.bcs
16818                .as_ref()
16819                .map(|field| field as _)
16820                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16821        }
16822        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16823        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16824            self.bcs.as_mut().map(|field| field as _)
16825        }
16826        ///Returns a mutable reference to `bcs`.
16827        ///If the field is unset, it is first initialized with the default value.
16828        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16829            self.bcs.get_or_insert_default()
16830        }
16831        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
16832        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16833            self.bcs.as_ref().map(|field| field as _)
16834        }
16835        ///Sets `bcs` with the provided value.
16836        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16837            self.bcs = Some(field.into().into());
16838        }
16839        ///Sets `bcs` with the provided value.
16840        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16841            self.set_bcs(field.into());
16842            self
16843        }
16844        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16845        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16846            self.digest.as_mut().map(|field| field as _)
16847        }
16848        ///Returns a mutable reference to `digest`.
16849        ///If the field is unset, it is first initialized with the default value.
16850        pub fn digest_mut(&mut self) -> &mut String {
16851            self.digest.get_or_insert_default()
16852        }
16853        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
16854        pub fn digest_opt(&self) -> Option<&str> {
16855            self.digest.as_ref().map(|field| field as _)
16856        }
16857        ///Sets `digest` with the provided value.
16858        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16859            self.digest = Some(field.into().into());
16860        }
16861        ///Sets `digest` with the provided value.
16862        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16863            self.set_digest(field.into());
16864            self
16865        }
16866        ///Returns the value of `events`, or the default value if `events` is unset.
16867        pub fn events(&self) -> &[super::Event] {
16868            &self.events
16869        }
16870        ///Returns a mutable reference to `events`.
16871        ///If the field is unset, it is first initialized with the default value.
16872        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16873            &mut self.events
16874        }
16875        ///Sets `events` with the provided value.
16876        pub fn set_events(&mut self, field: Vec<super::Event>) {
16877            self.events = field;
16878        }
16879        ///Sets `events` with the provided value.
16880        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16881            self.set_events(field);
16882            self
16883        }
16884    }
16885    impl super::TransactionExpiration {
16886        pub const fn const_default() -> Self {
16887            Self {
16888                kind: None,
16889                epoch: None,
16890                min_epoch: None,
16891                min_timestamp: None,
16892                max_timestamp: None,
16893                chain: None,
16894                nonce: None,
16895                allowed_proposers: None,
16896            }
16897        }
16898        #[doc(hidden)]
16899        pub fn default_instance() -> &'static Self {
16900            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16901            &DEFAULT
16902        }
16903        ///Sets `kind` with the provided value.
16904        pub fn with_kind<
16905            T: Into<super::transaction_expiration::TransactionExpirationKind>,
16906        >(mut self, field: T) -> Self {
16907            self.set_kind(field.into());
16908            self
16909        }
16910        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16911        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16912            self.epoch.as_mut().map(|field| field as _)
16913        }
16914        ///Returns a mutable reference to `epoch`.
16915        ///If the field is unset, it is first initialized with the default value.
16916        pub fn epoch_mut(&mut self) -> &mut u64 {
16917            self.epoch.get_or_insert_default()
16918        }
16919        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16920        pub fn epoch_opt(&self) -> Option<u64> {
16921            self.epoch.as_ref().map(|field| *field)
16922        }
16923        ///Sets `epoch` with the provided value.
16924        pub fn set_epoch(&mut self, field: u64) {
16925            self.epoch = Some(field);
16926        }
16927        ///Sets `epoch` with the provided value.
16928        pub fn with_epoch(mut self, field: u64) -> Self {
16929            self.set_epoch(field);
16930            self
16931        }
16932        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16933        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16934            self.min_epoch.as_mut().map(|field| field as _)
16935        }
16936        ///Returns a mutable reference to `min_epoch`.
16937        ///If the field is unset, it is first initialized with the default value.
16938        pub fn min_epoch_mut(&mut self) -> &mut u64 {
16939            self.min_epoch.get_or_insert_default()
16940        }
16941        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16942        pub fn min_epoch_opt(&self) -> Option<u64> {
16943            self.min_epoch.as_ref().map(|field| *field)
16944        }
16945        ///Sets `min_epoch` with the provided value.
16946        pub fn set_min_epoch(&mut self, field: u64) {
16947            self.min_epoch = Some(field);
16948        }
16949        ///Sets `min_epoch` with the provided value.
16950        pub fn with_min_epoch(mut self, field: u64) -> Self {
16951            self.set_min_epoch(field);
16952            self
16953        }
16954        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16955        pub fn min_timestamp_opt_mut(
16956            &mut self,
16957        ) -> Option<&mut ::prost_types::Timestamp> {
16958            self.min_timestamp.as_mut().map(|field| field as _)
16959        }
16960        ///Returns a mutable reference to `min_timestamp`.
16961        ///If the field is unset, it is first initialized with the default value.
16962        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16963            self.min_timestamp.get_or_insert_default()
16964        }
16965        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16966        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16967            self.min_timestamp.as_ref().map(|field| field as _)
16968        }
16969        ///Sets `min_timestamp` with the provided value.
16970        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16971            &mut self,
16972            field: T,
16973        ) {
16974            self.min_timestamp = Some(field.into().into());
16975        }
16976        ///Sets `min_timestamp` with the provided value.
16977        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16978            mut self,
16979            field: T,
16980        ) -> Self {
16981            self.set_min_timestamp(field.into());
16982            self
16983        }
16984        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16985        pub fn max_timestamp_opt_mut(
16986            &mut self,
16987        ) -> Option<&mut ::prost_types::Timestamp> {
16988            self.max_timestamp.as_mut().map(|field| field as _)
16989        }
16990        ///Returns a mutable reference to `max_timestamp`.
16991        ///If the field is unset, it is first initialized with the default value.
16992        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16993            self.max_timestamp.get_or_insert_default()
16994        }
16995        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
16996        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16997            self.max_timestamp.as_ref().map(|field| field as _)
16998        }
16999        ///Sets `max_timestamp` with the provided value.
17000        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
17001            &mut self,
17002            field: T,
17003        ) {
17004            self.max_timestamp = Some(field.into().into());
17005        }
17006        ///Sets `max_timestamp` with the provided value.
17007        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
17008            mut self,
17009            field: T,
17010        ) -> Self {
17011            self.set_max_timestamp(field.into());
17012            self
17013        }
17014        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17015        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
17016            self.chain.as_mut().map(|field| field as _)
17017        }
17018        ///Returns a mutable reference to `chain`.
17019        ///If the field is unset, it is first initialized with the default value.
17020        pub fn chain_mut(&mut self) -> &mut String {
17021            self.chain.get_or_insert_default()
17022        }
17023        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
17024        pub fn chain_opt(&self) -> Option<&str> {
17025            self.chain.as_ref().map(|field| field as _)
17026        }
17027        ///Sets `chain` with the provided value.
17028        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
17029            self.chain = Some(field.into().into());
17030        }
17031        ///Sets `chain` with the provided value.
17032        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
17033            self.set_chain(field.into());
17034            self
17035        }
17036        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17037        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
17038            self.nonce.as_mut().map(|field| field as _)
17039        }
17040        ///Returns a mutable reference to `nonce`.
17041        ///If the field is unset, it is first initialized with the default value.
17042        pub fn nonce_mut(&mut self) -> &mut u32 {
17043            self.nonce.get_or_insert_default()
17044        }
17045        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
17046        pub fn nonce_opt(&self) -> Option<u32> {
17047            self.nonce.as_ref().map(|field| *field)
17048        }
17049        ///Sets `nonce` with the provided value.
17050        pub fn set_nonce(&mut self, field: u32) {
17051            self.nonce = Some(field);
17052        }
17053        ///Sets `nonce` with the provided value.
17054        pub fn with_nonce(mut self, field: u32) -> Self {
17055            self.set_nonce(field);
17056            self
17057        }
17058        ///Returns the value of `allowed_proposers`, or the default value if `allowed_proposers` is unset.
17059        pub fn allowed_proposers(&self) -> &super::AllowedProposers {
17060            self.allowed_proposers
17061                .as_ref()
17062                .map(|field| field as _)
17063                .unwrap_or_else(|| super::AllowedProposers::default_instance() as _)
17064        }
17065        ///If `allowed_proposers` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17066        pub fn allowed_proposers_opt_mut(
17067            &mut self,
17068        ) -> Option<&mut super::AllowedProposers> {
17069            self.allowed_proposers.as_mut().map(|field| field as _)
17070        }
17071        ///Returns a mutable reference to `allowed_proposers`.
17072        ///If the field is unset, it is first initialized with the default value.
17073        pub fn allowed_proposers_mut(&mut self) -> &mut super::AllowedProposers {
17074            self.allowed_proposers.get_or_insert_default()
17075        }
17076        ///If `allowed_proposers` is set, returns [`Some`] with the value; otherwise returns [`None`].
17077        pub fn allowed_proposers_opt(&self) -> Option<&super::AllowedProposers> {
17078            self.allowed_proposers.as_ref().map(|field| field as _)
17079        }
17080        ///Sets `allowed_proposers` with the provided value.
17081        pub fn set_allowed_proposers<T: Into<super::AllowedProposers>>(
17082            &mut self,
17083            field: T,
17084        ) {
17085            self.allowed_proposers = Some(field.into().into());
17086        }
17087        ///Sets `allowed_proposers` with the provided value.
17088        pub fn with_allowed_proposers<T: Into<super::AllowedProposers>>(
17089            mut self,
17090            field: T,
17091        ) -> Self {
17092            self.set_allowed_proposers(field.into());
17093            self
17094        }
17095    }
17096    impl super::TransactionFilter {
17097        pub const fn const_default() -> Self {
17098            Self { terms: Vec::new() }
17099        }
17100        #[doc(hidden)]
17101        pub fn default_instance() -> &'static Self {
17102            static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
17103            &DEFAULT
17104        }
17105        ///Returns the value of `terms`, or the default value if `terms` is unset.
17106        pub fn terms(&self) -> &[super::TransactionTerm] {
17107            &self.terms
17108        }
17109        ///Returns a mutable reference to `terms`.
17110        ///If the field is unset, it is first initialized with the default value.
17111        pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
17112            &mut self.terms
17113        }
17114        ///Sets `terms` with the provided value.
17115        pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
17116            self.terms = field;
17117        }
17118        ///Sets `terms` with the provided value.
17119        pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
17120            self.set_terms(field);
17121            self
17122        }
17123    }
17124    impl super::TransactionKind {
17125        pub const fn const_default() -> Self {
17126            Self { kind: None, data: None }
17127        }
17128        #[doc(hidden)]
17129        pub fn default_instance() -> &'static Self {
17130            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
17131            &DEFAULT
17132        }
17133        ///Sets `kind` with the provided value.
17134        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
17135            mut self,
17136            field: T,
17137        ) -> Self {
17138            self.set_kind(field.into());
17139            self
17140        }
17141        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
17142        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
17143            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17144                .data
17145            {
17146                field as _
17147            } else {
17148                super::ProgrammableTransaction::default_instance() as _
17149            }
17150        }
17151        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
17152        pub fn programmable_transaction_opt(
17153            &self,
17154        ) -> Option<&super::ProgrammableTransaction> {
17155            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17156                .data
17157            {
17158                Some(field as _)
17159            } else {
17160                None
17161            }
17162        }
17163        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17164        pub fn programmable_transaction_opt_mut(
17165            &mut self,
17166        ) -> Option<&mut super::ProgrammableTransaction> {
17167            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
17168                .data
17169            {
17170                Some(field as _)
17171            } else {
17172                None
17173            }
17174        }
17175        ///Returns a mutable reference to `programmable_transaction`.
17176        ///If the field is unset, it is first initialized with the default value.
17177        ///If any other oneof field in the same oneof is set, it will be cleared.
17178        pub fn programmable_transaction_mut(
17179            &mut self,
17180        ) -> &mut super::ProgrammableTransaction {
17181            if self.programmable_transaction_opt_mut().is_none() {
17182                self.data = Some(
17183                    super::transaction_kind::Data::ProgrammableTransaction(
17184                        super::ProgrammableTransaction::default(),
17185                    ),
17186                );
17187            }
17188            self.programmable_transaction_opt_mut().unwrap()
17189        }
17190        ///Sets `programmable_transaction` with the provided value.
17191        ///If any other oneof field in the same oneof is set, it will be cleared.
17192        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17193            &mut self,
17194            field: T,
17195        ) {
17196            self.data = Some(
17197                super::transaction_kind::Data::ProgrammableTransaction(
17198                    field.into().into(),
17199                ),
17200            );
17201        }
17202        ///Sets `programmable_transaction` with the provided value.
17203        ///If any other oneof field in the same oneof is set, it will be cleared.
17204        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17205            mut self,
17206            field: T,
17207        ) -> Self {
17208            self.set_programmable_transaction(field.into());
17209            self
17210        }
17211        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
17212        pub fn change_epoch(&self) -> &super::ChangeEpoch {
17213            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17214                field as _
17215            } else {
17216                super::ChangeEpoch::default_instance() as _
17217            }
17218        }
17219        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17220        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
17221            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17222                Some(field as _)
17223            } else {
17224                None
17225            }
17226        }
17227        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17228        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
17229            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
17230                .data
17231            {
17232                Some(field as _)
17233            } else {
17234                None
17235            }
17236        }
17237        ///Returns a mutable reference to `change_epoch`.
17238        ///If the field is unset, it is first initialized with the default value.
17239        ///If any other oneof field in the same oneof is set, it will be cleared.
17240        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
17241            if self.change_epoch_opt_mut().is_none() {
17242                self.data = Some(
17243                    super::transaction_kind::Data::ChangeEpoch(
17244                        super::ChangeEpoch::default(),
17245                    ),
17246                );
17247            }
17248            self.change_epoch_opt_mut().unwrap()
17249        }
17250        ///Sets `change_epoch` with the provided value.
17251        ///If any other oneof field in the same oneof is set, it will be cleared.
17252        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17253            self.data = Some(
17254                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17255            );
17256        }
17257        ///Sets `change_epoch` with the provided value.
17258        ///If any other oneof field in the same oneof is set, it will be cleared.
17259        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17260            mut self,
17261            field: T,
17262        ) -> Self {
17263            self.set_change_epoch(field.into());
17264            self
17265        }
17266        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
17267        pub fn genesis(&self) -> &super::GenesisTransaction {
17268            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17269                field as _
17270            } else {
17271                super::GenesisTransaction::default_instance() as _
17272            }
17273        }
17274        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
17275        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17276            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17277                Some(field as _)
17278            } else {
17279                None
17280            }
17281        }
17282        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17283        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17284            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17285                Some(field as _)
17286            } else {
17287                None
17288            }
17289        }
17290        ///Returns a mutable reference to `genesis`.
17291        ///If the field is unset, it is first initialized with the default value.
17292        ///If any other oneof field in the same oneof is set, it will be cleared.
17293        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17294            if self.genesis_opt_mut().is_none() {
17295                self.data = Some(
17296                    super::transaction_kind::Data::Genesis(
17297                        super::GenesisTransaction::default(),
17298                    ),
17299                );
17300            }
17301            self.genesis_opt_mut().unwrap()
17302        }
17303        ///Sets `genesis` with the provided value.
17304        ///If any other oneof field in the same oneof is set, it will be cleared.
17305        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17306            self.data = Some(
17307                super::transaction_kind::Data::Genesis(field.into().into()),
17308            );
17309        }
17310        ///Sets `genesis` with the provided value.
17311        ///If any other oneof field in the same oneof is set, it will be cleared.
17312        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17313            mut self,
17314            field: T,
17315        ) -> Self {
17316            self.set_genesis(field.into());
17317            self
17318        }
17319        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
17320        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17321            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17322                .data
17323            {
17324                field as _
17325            } else {
17326                super::ConsensusCommitPrologue::default_instance() as _
17327            }
17328        }
17329        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
17330        pub fn consensus_commit_prologue_opt(
17331            &self,
17332        ) -> Option<&super::ConsensusCommitPrologue> {
17333            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17334                .data
17335            {
17336                Some(field as _)
17337            } else {
17338                None
17339            }
17340        }
17341        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17342        pub fn consensus_commit_prologue_opt_mut(
17343            &mut self,
17344        ) -> Option<&mut super::ConsensusCommitPrologue> {
17345            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17346                .data
17347            {
17348                Some(field as _)
17349            } else {
17350                None
17351            }
17352        }
17353        ///Returns a mutable reference to `consensus_commit_prologue`.
17354        ///If the field is unset, it is first initialized with the default value.
17355        ///If any other oneof field in the same oneof is set, it will be cleared.
17356        pub fn consensus_commit_prologue_mut(
17357            &mut self,
17358        ) -> &mut super::ConsensusCommitPrologue {
17359            if self.consensus_commit_prologue_opt_mut().is_none() {
17360                self.data = Some(
17361                    super::transaction_kind::Data::ConsensusCommitPrologue(
17362                        super::ConsensusCommitPrologue::default(),
17363                    ),
17364                );
17365            }
17366            self.consensus_commit_prologue_opt_mut().unwrap()
17367        }
17368        ///Sets `consensus_commit_prologue` with the provided value.
17369        ///If any other oneof field in the same oneof is set, it will be cleared.
17370        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17371            &mut self,
17372            field: T,
17373        ) {
17374            self.data = Some(
17375                super::transaction_kind::Data::ConsensusCommitPrologue(
17376                    field.into().into(),
17377                ),
17378            );
17379        }
17380        ///Sets `consensus_commit_prologue` with the provided value.
17381        ///If any other oneof field in the same oneof is set, it will be cleared.
17382        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17383            mut self,
17384            field: T,
17385        ) -> Self {
17386            self.set_consensus_commit_prologue(field.into());
17387            self
17388        }
17389        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
17390        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17391            if let Some(
17392                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17393            ) = &self.data
17394            {
17395                field as _
17396            } else {
17397                super::AuthenticatorStateUpdate::default_instance() as _
17398            }
17399        }
17400        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17401        pub fn authenticator_state_update_opt(
17402            &self,
17403        ) -> Option<&super::AuthenticatorStateUpdate> {
17404            if let Some(
17405                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17406            ) = &self.data
17407            {
17408                Some(field as _)
17409            } else {
17410                None
17411            }
17412        }
17413        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17414        pub fn authenticator_state_update_opt_mut(
17415            &mut self,
17416        ) -> Option<&mut super::AuthenticatorStateUpdate> {
17417            if let Some(
17418                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17419            ) = &mut self.data
17420            {
17421                Some(field as _)
17422            } else {
17423                None
17424            }
17425        }
17426        ///Returns a mutable reference to `authenticator_state_update`.
17427        ///If the field is unset, it is first initialized with the default value.
17428        ///If any other oneof field in the same oneof is set, it will be cleared.
17429        pub fn authenticator_state_update_mut(
17430            &mut self,
17431        ) -> &mut super::AuthenticatorStateUpdate {
17432            if self.authenticator_state_update_opt_mut().is_none() {
17433                self.data = Some(
17434                    super::transaction_kind::Data::AuthenticatorStateUpdate(
17435                        super::AuthenticatorStateUpdate::default(),
17436                    ),
17437                );
17438            }
17439            self.authenticator_state_update_opt_mut().unwrap()
17440        }
17441        ///Sets `authenticator_state_update` with the provided value.
17442        ///If any other oneof field in the same oneof is set, it will be cleared.
17443        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17444            &mut self,
17445            field: T,
17446        ) {
17447            self.data = Some(
17448                super::transaction_kind::Data::AuthenticatorStateUpdate(
17449                    field.into().into(),
17450                ),
17451            );
17452        }
17453        ///Sets `authenticator_state_update` with the provided value.
17454        ///If any other oneof field in the same oneof is set, it will be cleared.
17455        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17456            mut self,
17457            field: T,
17458        ) -> Self {
17459            self.set_authenticator_state_update(field.into());
17460            self
17461        }
17462        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
17463        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17464            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17465                field as _
17466            } else {
17467                super::EndOfEpochTransaction::default_instance() as _
17468            }
17469        }
17470        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17471        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17472            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17473                Some(field as _)
17474            } else {
17475                None
17476            }
17477        }
17478        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17479        pub fn end_of_epoch_opt_mut(
17480            &mut self,
17481        ) -> Option<&mut super::EndOfEpochTransaction> {
17482            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17483                .data
17484            {
17485                Some(field as _)
17486            } else {
17487                None
17488            }
17489        }
17490        ///Returns a mutable reference to `end_of_epoch`.
17491        ///If the field is unset, it is first initialized with the default value.
17492        ///If any other oneof field in the same oneof is set, it will be cleared.
17493        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17494            if self.end_of_epoch_opt_mut().is_none() {
17495                self.data = Some(
17496                    super::transaction_kind::Data::EndOfEpoch(
17497                        super::EndOfEpochTransaction::default(),
17498                    ),
17499                );
17500            }
17501            self.end_of_epoch_opt_mut().unwrap()
17502        }
17503        ///Sets `end_of_epoch` with the provided value.
17504        ///If any other oneof field in the same oneof is set, it will be cleared.
17505        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17506            &mut self,
17507            field: T,
17508        ) {
17509            self.data = Some(
17510                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17511            );
17512        }
17513        ///Sets `end_of_epoch` with the provided value.
17514        ///If any other oneof field in the same oneof is set, it will be cleared.
17515        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17516            mut self,
17517            field: T,
17518        ) -> Self {
17519            self.set_end_of_epoch(field.into());
17520            self
17521        }
17522        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
17523        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17524            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17525                .data
17526            {
17527                field as _
17528            } else {
17529                super::RandomnessStateUpdate::default_instance() as _
17530            }
17531        }
17532        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
17533        pub fn randomness_state_update_opt(
17534            &self,
17535        ) -> Option<&super::RandomnessStateUpdate> {
17536            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17537                .data
17538            {
17539                Some(field as _)
17540            } else {
17541                None
17542            }
17543        }
17544        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17545        pub fn randomness_state_update_opt_mut(
17546            &mut self,
17547        ) -> Option<&mut super::RandomnessStateUpdate> {
17548            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17549                .data
17550            {
17551                Some(field as _)
17552            } else {
17553                None
17554            }
17555        }
17556        ///Returns a mutable reference to `randomness_state_update`.
17557        ///If the field is unset, it is first initialized with the default value.
17558        ///If any other oneof field in the same oneof is set, it will be cleared.
17559        pub fn randomness_state_update_mut(
17560            &mut self,
17561        ) -> &mut super::RandomnessStateUpdate {
17562            if self.randomness_state_update_opt_mut().is_none() {
17563                self.data = Some(
17564                    super::transaction_kind::Data::RandomnessStateUpdate(
17565                        super::RandomnessStateUpdate::default(),
17566                    ),
17567                );
17568            }
17569            self.randomness_state_update_opt_mut().unwrap()
17570        }
17571        ///Sets `randomness_state_update` with the provided value.
17572        ///If any other oneof field in the same oneof is set, it will be cleared.
17573        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17574            &mut self,
17575            field: T,
17576        ) {
17577            self.data = Some(
17578                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17579            );
17580        }
17581        ///Sets `randomness_state_update` with the provided value.
17582        ///If any other oneof field in the same oneof is set, it will be cleared.
17583        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17584            mut self,
17585            field: T,
17586        ) -> Self {
17587            self.set_randomness_state_update(field.into());
17588            self
17589        }
17590    }
17591    impl super::TransactionLiteral {
17592        pub const fn const_default() -> Self {
17593            Self {
17594                negated: false,
17595                predicate: None,
17596            }
17597        }
17598        #[doc(hidden)]
17599        pub fn default_instance() -> &'static Self {
17600            static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17601            &DEFAULT
17602        }
17603        ///Returns a mutable reference to `negated`.
17604        ///If the field is unset, it is first initialized with the default value.
17605        pub fn negated_mut(&mut self) -> &mut bool {
17606            &mut self.negated
17607        }
17608        ///Sets `negated` with the provided value.
17609        pub fn set_negated(&mut self, field: bool) {
17610            self.negated = field;
17611        }
17612        ///Sets `negated` with the provided value.
17613        pub fn with_negated(mut self, field: bool) -> Self {
17614            self.set_negated(field);
17615            self
17616        }
17617        ///Returns the value of `sender`, or the default value if `sender` is unset.
17618        pub fn sender(&self) -> &super::SenderFilter {
17619            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17620                .predicate
17621            {
17622                field as _
17623            } else {
17624                super::SenderFilter::default_instance() as _
17625            }
17626        }
17627        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
17628        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17629            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17630                .predicate
17631            {
17632                Some(field as _)
17633            } else {
17634                None
17635            }
17636        }
17637        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17638        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17639            if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17640                .predicate
17641            {
17642                Some(field as _)
17643            } else {
17644                None
17645            }
17646        }
17647        ///Returns a mutable reference to `sender`.
17648        ///If the field is unset, it is first initialized with the default value.
17649        ///If any other oneof field in the same oneof is set, it will be cleared.
17650        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17651            if self.sender_opt_mut().is_none() {
17652                self.predicate = Some(
17653                    super::transaction_literal::Predicate::Sender(
17654                        super::SenderFilter::default(),
17655                    ),
17656                );
17657            }
17658            self.sender_opt_mut().unwrap()
17659        }
17660        ///Sets `sender` with the provided value.
17661        ///If any other oneof field in the same oneof is set, it will be cleared.
17662        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17663            self.predicate = Some(
17664                super::transaction_literal::Predicate::Sender(field.into().into()),
17665            );
17666        }
17667        ///Sets `sender` with the provided value.
17668        ///If any other oneof field in the same oneof is set, it will be cleared.
17669        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17670            self.set_sender(field.into());
17671            self
17672        }
17673        ///Returns the value of `affected_address`, or the default value if `affected_address` is unset.
17674        pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17675            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17676                .predicate
17677            {
17678                field as _
17679            } else {
17680                super::AffectedAddressFilter::default_instance() as _
17681            }
17682        }
17683        ///If `affected_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17684        pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17685            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17686                .predicate
17687            {
17688                Some(field as _)
17689            } else {
17690                None
17691            }
17692        }
17693        ///If `affected_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17694        pub fn affected_address_opt_mut(
17695            &mut self,
17696        ) -> Option<&mut super::AffectedAddressFilter> {
17697            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17698                .predicate
17699            {
17700                Some(field as _)
17701            } else {
17702                None
17703            }
17704        }
17705        ///Returns a mutable reference to `affected_address`.
17706        ///If the field is unset, it is first initialized with the default value.
17707        ///If any other oneof field in the same oneof is set, it will be cleared.
17708        pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17709            if self.affected_address_opt_mut().is_none() {
17710                self.predicate = Some(
17711                    super::transaction_literal::Predicate::AffectedAddress(
17712                        super::AffectedAddressFilter::default(),
17713                    ),
17714                );
17715            }
17716            self.affected_address_opt_mut().unwrap()
17717        }
17718        ///Sets `affected_address` with the provided value.
17719        ///If any other oneof field in the same oneof is set, it will be cleared.
17720        pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17721            &mut self,
17722            field: T,
17723        ) {
17724            self.predicate = Some(
17725                super::transaction_literal::Predicate::AffectedAddress(
17726                    field.into().into(),
17727                ),
17728            );
17729        }
17730        ///Sets `affected_address` with the provided value.
17731        ///If any other oneof field in the same oneof is set, it will be cleared.
17732        pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17733            mut self,
17734            field: T,
17735        ) -> Self {
17736            self.set_affected_address(field.into());
17737            self
17738        }
17739        ///Returns the value of `affected_object`, or the default value if `affected_object` is unset.
17740        pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17741            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17742                .predicate
17743            {
17744                field as _
17745            } else {
17746                super::AffectedObjectFilter::default_instance() as _
17747            }
17748        }
17749        ///If `affected_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
17750        pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17751            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17752                .predicate
17753            {
17754                Some(field as _)
17755            } else {
17756                None
17757            }
17758        }
17759        ///If `affected_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17760        pub fn affected_object_opt_mut(
17761            &mut self,
17762        ) -> Option<&mut super::AffectedObjectFilter> {
17763            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17764                .predicate
17765            {
17766                Some(field as _)
17767            } else {
17768                None
17769            }
17770        }
17771        ///Returns a mutable reference to `affected_object`.
17772        ///If the field is unset, it is first initialized with the default value.
17773        ///If any other oneof field in the same oneof is set, it will be cleared.
17774        pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17775            if self.affected_object_opt_mut().is_none() {
17776                self.predicate = Some(
17777                    super::transaction_literal::Predicate::AffectedObject(
17778                        super::AffectedObjectFilter::default(),
17779                    ),
17780                );
17781            }
17782            self.affected_object_opt_mut().unwrap()
17783        }
17784        ///Sets `affected_object` with the provided value.
17785        ///If any other oneof field in the same oneof is set, it will be cleared.
17786        pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17787            &mut self,
17788            field: T,
17789        ) {
17790            self.predicate = Some(
17791                super::transaction_literal::Predicate::AffectedObject(
17792                    field.into().into(),
17793                ),
17794            );
17795        }
17796        ///Sets `affected_object` with the provided value.
17797        ///If any other oneof field in the same oneof is set, it will be cleared.
17798        pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17799            mut self,
17800            field: T,
17801        ) -> Self {
17802            self.set_affected_object(field.into());
17803            self
17804        }
17805        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
17806        pub fn move_call(&self) -> &super::MoveCallFilter {
17807            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17808                .predicate
17809            {
17810                field as _
17811            } else {
17812                super::MoveCallFilter::default_instance() as _
17813            }
17814        }
17815        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
17816        pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17817            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17818                .predicate
17819            {
17820                Some(field as _)
17821            } else {
17822                None
17823            }
17824        }
17825        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17826        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17827            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17828                .predicate
17829            {
17830                Some(field as _)
17831            } else {
17832                None
17833            }
17834        }
17835        ///Returns a mutable reference to `move_call`.
17836        ///If the field is unset, it is first initialized with the default value.
17837        ///If any other oneof field in the same oneof is set, it will be cleared.
17838        pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17839            if self.move_call_opt_mut().is_none() {
17840                self.predicate = Some(
17841                    super::transaction_literal::Predicate::MoveCall(
17842                        super::MoveCallFilter::default(),
17843                    ),
17844                );
17845            }
17846            self.move_call_opt_mut().unwrap()
17847        }
17848        ///Sets `move_call` with the provided value.
17849        ///If any other oneof field in the same oneof is set, it will be cleared.
17850        pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17851            self.predicate = Some(
17852                super::transaction_literal::Predicate::MoveCall(field.into().into()),
17853            );
17854        }
17855        ///Sets `move_call` with the provided value.
17856        ///If any other oneof field in the same oneof is set, it will be cleared.
17857        pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17858            mut self,
17859            field: T,
17860        ) -> Self {
17861            self.set_move_call(field.into());
17862            self
17863        }
17864        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
17865        pub fn emit_module(&self) -> &super::EmitModuleFilter {
17866            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17867                .predicate
17868            {
17869                field as _
17870            } else {
17871                super::EmitModuleFilter::default_instance() as _
17872            }
17873        }
17874        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
17875        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17876            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17877                .predicate
17878            {
17879                Some(field as _)
17880            } else {
17881                None
17882            }
17883        }
17884        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17885        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17886            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17887                .predicate
17888            {
17889                Some(field as _)
17890            } else {
17891                None
17892            }
17893        }
17894        ///Returns a mutable reference to `emit_module`.
17895        ///If the field is unset, it is first initialized with the default value.
17896        ///If any other oneof field in the same oneof is set, it will be cleared.
17897        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17898            if self.emit_module_opt_mut().is_none() {
17899                self.predicate = Some(
17900                    super::transaction_literal::Predicate::EmitModule(
17901                        super::EmitModuleFilter::default(),
17902                    ),
17903                );
17904            }
17905            self.emit_module_opt_mut().unwrap()
17906        }
17907        ///Sets `emit_module` with the provided value.
17908        ///If any other oneof field in the same oneof is set, it will be cleared.
17909        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17910            self.predicate = Some(
17911                super::transaction_literal::Predicate::EmitModule(field.into().into()),
17912            );
17913        }
17914        ///Sets `emit_module` with the provided value.
17915        ///If any other oneof field in the same oneof is set, it will be cleared.
17916        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17917            mut self,
17918            field: T,
17919        ) -> Self {
17920            self.set_emit_module(field.into());
17921            self
17922        }
17923        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
17924        pub fn event_type(&self) -> &super::EventTypeFilter {
17925            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17926                .predicate
17927            {
17928                field as _
17929            } else {
17930                super::EventTypeFilter::default_instance() as _
17931            }
17932        }
17933        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
17934        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17935            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17936                .predicate
17937            {
17938                Some(field as _)
17939            } else {
17940                None
17941            }
17942        }
17943        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17944        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17945            if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17946                .predicate
17947            {
17948                Some(field as _)
17949            } else {
17950                None
17951            }
17952        }
17953        ///Returns a mutable reference to `event_type`.
17954        ///If the field is unset, it is first initialized with the default value.
17955        ///If any other oneof field in the same oneof is set, it will be cleared.
17956        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17957            if self.event_type_opt_mut().is_none() {
17958                self.predicate = Some(
17959                    super::transaction_literal::Predicate::EventType(
17960                        super::EventTypeFilter::default(),
17961                    ),
17962                );
17963            }
17964            self.event_type_opt_mut().unwrap()
17965        }
17966        ///Sets `event_type` with the provided value.
17967        ///If any other oneof field in the same oneof is set, it will be cleared.
17968        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17969            self.predicate = Some(
17970                super::transaction_literal::Predicate::EventType(field.into().into()),
17971            );
17972        }
17973        ///Sets `event_type` with the provided value.
17974        ///If any other oneof field in the same oneof is set, it will be cleared.
17975        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17976            mut self,
17977            field: T,
17978        ) -> Self {
17979            self.set_event_type(field.into());
17980            self
17981        }
17982        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
17983        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17984            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17985                .predicate
17986            {
17987                field as _
17988            } else {
17989                super::EventStreamHeadFilter::default_instance() as _
17990            }
17991        }
17992        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
17993        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17994            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17995                .predicate
17996            {
17997                Some(field as _)
17998            } else {
17999                None
18000            }
18001        }
18002        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18003        pub fn event_stream_head_opt_mut(
18004            &mut self,
18005        ) -> Option<&mut super::EventStreamHeadFilter> {
18006            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
18007                .predicate
18008            {
18009                Some(field as _)
18010            } else {
18011                None
18012            }
18013        }
18014        ///Returns a mutable reference to `event_stream_head`.
18015        ///If the field is unset, it is first initialized with the default value.
18016        ///If any other oneof field in the same oneof is set, it will be cleared.
18017        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
18018            if self.event_stream_head_opt_mut().is_none() {
18019                self.predicate = Some(
18020                    super::transaction_literal::Predicate::EventStreamHead(
18021                        super::EventStreamHeadFilter::default(),
18022                    ),
18023                );
18024            }
18025            self.event_stream_head_opt_mut().unwrap()
18026        }
18027        ///Sets `event_stream_head` with the provided value.
18028        ///If any other oneof field in the same oneof is set, it will be cleared.
18029        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
18030            &mut self,
18031            field: T,
18032        ) {
18033            self.predicate = Some(
18034                super::transaction_literal::Predicate::EventStreamHead(
18035                    field.into().into(),
18036                ),
18037            );
18038        }
18039        ///Sets `event_stream_head` with the provided value.
18040        ///If any other oneof field in the same oneof is set, it will be cleared.
18041        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
18042            mut self,
18043            field: T,
18044        ) -> Self {
18045            self.set_event_stream_head(field.into());
18046            self
18047        }
18048        ///Returns the value of `package_write`, or the default value if `package_write` is unset.
18049        pub fn package_write(&self) -> &super::PackageWriteFilter {
18050            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
18051                .predicate
18052            {
18053                field as _
18054            } else {
18055                super::PackageWriteFilter::default_instance() as _
18056            }
18057        }
18058        ///If `package_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
18059        pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
18060            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
18061                .predicate
18062            {
18063                Some(field as _)
18064            } else {
18065                None
18066            }
18067        }
18068        ///If `package_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18069        pub fn package_write_opt_mut(
18070            &mut self,
18071        ) -> Option<&mut super::PackageWriteFilter> {
18072            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
18073                .predicate
18074            {
18075                Some(field as _)
18076            } else {
18077                None
18078            }
18079        }
18080        ///Returns a mutable reference to `package_write`.
18081        ///If the field is unset, it is first initialized with the default value.
18082        ///If any other oneof field in the same oneof is set, it will be cleared.
18083        pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
18084            if self.package_write_opt_mut().is_none() {
18085                self.predicate = Some(
18086                    super::transaction_literal::Predicate::PackageWrite(
18087                        super::PackageWriteFilter::default(),
18088                    ),
18089                );
18090            }
18091            self.package_write_opt_mut().unwrap()
18092        }
18093        ///Sets `package_write` with the provided value.
18094        ///If any other oneof field in the same oneof is set, it will be cleared.
18095        pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
18096            &mut self,
18097            field: T,
18098        ) {
18099            self.predicate = Some(
18100                super::transaction_literal::Predicate::PackageWrite(field.into().into()),
18101            );
18102        }
18103        ///Sets `package_write` with the provided value.
18104        ///If any other oneof field in the same oneof is set, it will be cleared.
18105        pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
18106            mut self,
18107            field: T,
18108        ) -> Self {
18109            self.set_package_write(field.into());
18110            self
18111        }
18112    }
18113    impl super::TransactionTerm {
18114        pub const fn const_default() -> Self {
18115            Self { literals: Vec::new() }
18116        }
18117        #[doc(hidden)]
18118        pub fn default_instance() -> &'static Self {
18119            static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
18120            &DEFAULT
18121        }
18122        ///Returns the value of `literals`, or the default value if `literals` is unset.
18123        pub fn literals(&self) -> &[super::TransactionLiteral] {
18124            &self.literals
18125        }
18126        ///Returns a mutable reference to `literals`.
18127        ///If the field is unset, it is first initialized with the default value.
18128        pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
18129            &mut self.literals
18130        }
18131        ///Sets `literals` with the provided value.
18132        pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
18133            self.literals = field;
18134        }
18135        ///Sets `literals` with the provided value.
18136        pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
18137            self.set_literals(field);
18138            self
18139        }
18140    }
18141    impl super::TransferObjects {
18142        pub const fn const_default() -> Self {
18143            Self {
18144                objects: Vec::new(),
18145                address: None,
18146            }
18147        }
18148        #[doc(hidden)]
18149        pub fn default_instance() -> &'static Self {
18150            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
18151            &DEFAULT
18152        }
18153        ///Returns the value of `objects`, or the default value if `objects` is unset.
18154        pub fn objects(&self) -> &[super::Argument] {
18155            &self.objects
18156        }
18157        ///Returns a mutable reference to `objects`.
18158        ///If the field is unset, it is first initialized with the default value.
18159        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
18160            &mut self.objects
18161        }
18162        ///Sets `objects` with the provided value.
18163        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
18164            self.objects = field;
18165        }
18166        ///Sets `objects` with the provided value.
18167        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
18168            self.set_objects(field);
18169            self
18170        }
18171        ///Returns the value of `address`, or the default value if `address` is unset.
18172        pub fn address(&self) -> &super::Argument {
18173            self.address
18174                .as_ref()
18175                .map(|field| field as _)
18176                .unwrap_or_else(|| super::Argument::default_instance() as _)
18177        }
18178        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18179        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
18180            self.address.as_mut().map(|field| field as _)
18181        }
18182        ///Returns a mutable reference to `address`.
18183        ///If the field is unset, it is first initialized with the default value.
18184        pub fn address_mut(&mut self) -> &mut super::Argument {
18185            self.address.get_or_insert_default()
18186        }
18187        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18188        pub fn address_opt(&self) -> Option<&super::Argument> {
18189            self.address.as_ref().map(|field| field as _)
18190        }
18191        ///Sets `address` with the provided value.
18192        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
18193            self.address = Some(field.into().into());
18194        }
18195        ///Sets `address` with the provided value.
18196        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
18197            self.set_address(field.into());
18198            self
18199        }
18200    }
18201    impl super::TypeArgumentError {
18202        pub const fn const_default() -> Self {
18203            Self {
18204                type_argument: None,
18205                kind: None,
18206            }
18207        }
18208        #[doc(hidden)]
18209        pub fn default_instance() -> &'static Self {
18210            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
18211            &DEFAULT
18212        }
18213        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18214        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
18215            self.type_argument.as_mut().map(|field| field as _)
18216        }
18217        ///Returns a mutable reference to `type_argument`.
18218        ///If the field is unset, it is first initialized with the default value.
18219        pub fn type_argument_mut(&mut self) -> &mut u32 {
18220            self.type_argument.get_or_insert_default()
18221        }
18222        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
18223        pub fn type_argument_opt(&self) -> Option<u32> {
18224            self.type_argument.as_ref().map(|field| *field)
18225        }
18226        ///Sets `type_argument` with the provided value.
18227        pub fn set_type_argument(&mut self, field: u32) {
18228            self.type_argument = Some(field);
18229        }
18230        ///Sets `type_argument` with the provided value.
18231        pub fn with_type_argument(mut self, field: u32) -> Self {
18232            self.set_type_argument(field);
18233            self
18234        }
18235        ///Sets `kind` with the provided value.
18236        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
18237            mut self,
18238            field: T,
18239        ) -> Self {
18240            self.set_kind(field.into());
18241            self
18242        }
18243    }
18244    impl super::TypeOrigin {
18245        pub const fn const_default() -> Self {
18246            Self {
18247                module_name: None,
18248                datatype_name: None,
18249                package_id: None,
18250            }
18251        }
18252        #[doc(hidden)]
18253        pub fn default_instance() -> &'static Self {
18254            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18255            &DEFAULT
18256        }
18257        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18258        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18259            self.module_name.as_mut().map(|field| field as _)
18260        }
18261        ///Returns a mutable reference to `module_name`.
18262        ///If the field is unset, it is first initialized with the default value.
18263        pub fn module_name_mut(&mut self) -> &mut String {
18264            self.module_name.get_or_insert_default()
18265        }
18266        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18267        pub fn module_name_opt(&self) -> Option<&str> {
18268            self.module_name.as_ref().map(|field| field as _)
18269        }
18270        ///Sets `module_name` with the provided value.
18271        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18272            self.module_name = Some(field.into().into());
18273        }
18274        ///Sets `module_name` with the provided value.
18275        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18276            self.set_module_name(field.into());
18277            self
18278        }
18279        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18280        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18281            self.datatype_name.as_mut().map(|field| field as _)
18282        }
18283        ///Returns a mutable reference to `datatype_name`.
18284        ///If the field is unset, it is first initialized with the default value.
18285        pub fn datatype_name_mut(&mut self) -> &mut String {
18286            self.datatype_name.get_or_insert_default()
18287        }
18288        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18289        pub fn datatype_name_opt(&self) -> Option<&str> {
18290            self.datatype_name.as_ref().map(|field| field as _)
18291        }
18292        ///Sets `datatype_name` with the provided value.
18293        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18294            self.datatype_name = Some(field.into().into());
18295        }
18296        ///Sets `datatype_name` with the provided value.
18297        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18298            self.set_datatype_name(field.into());
18299            self
18300        }
18301        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18302        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18303            self.package_id.as_mut().map(|field| field as _)
18304        }
18305        ///Returns a mutable reference to `package_id`.
18306        ///If the field is unset, it is first initialized with the default value.
18307        pub fn package_id_mut(&mut self) -> &mut String {
18308            self.package_id.get_or_insert_default()
18309        }
18310        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18311        pub fn package_id_opt(&self) -> Option<&str> {
18312            self.package_id.as_ref().map(|field| field as _)
18313        }
18314        ///Sets `package_id` with the provided value.
18315        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18316            self.package_id = Some(field.into().into());
18317        }
18318        ///Sets `package_id` with the provided value.
18319        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18320            self.set_package_id(field.into());
18321            self
18322        }
18323    }
18324    impl super::TypeParameter {
18325        pub const fn const_default() -> Self {
18326            Self {
18327                constraints: Vec::new(),
18328                is_phantom: None,
18329            }
18330        }
18331        #[doc(hidden)]
18332        pub fn default_instance() -> &'static Self {
18333            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18334            &DEFAULT
18335        }
18336        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18337        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18338            self.is_phantom.as_mut().map(|field| field as _)
18339        }
18340        ///Returns a mutable reference to `is_phantom`.
18341        ///If the field is unset, it is first initialized with the default value.
18342        pub fn is_phantom_mut(&mut self) -> &mut bool {
18343            self.is_phantom.get_or_insert_default()
18344        }
18345        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
18346        pub fn is_phantom_opt(&self) -> Option<bool> {
18347            self.is_phantom.as_ref().map(|field| *field)
18348        }
18349        ///Sets `is_phantom` with the provided value.
18350        pub fn set_is_phantom(&mut self, field: bool) {
18351            self.is_phantom = Some(field);
18352        }
18353        ///Sets `is_phantom` with the provided value.
18354        pub fn with_is_phantom(mut self, field: bool) -> Self {
18355            self.set_is_phantom(field);
18356            self
18357        }
18358    }
18359    impl super::UnchangedConsensusObject {
18360        pub const fn const_default() -> Self {
18361            Self {
18362                kind: None,
18363                object_id: None,
18364                version: None,
18365                digest: None,
18366                object_type: None,
18367            }
18368        }
18369        #[doc(hidden)]
18370        pub fn default_instance() -> &'static Self {
18371            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18372            &DEFAULT
18373        }
18374        ///Sets `kind` with the provided value.
18375        pub fn with_kind<
18376            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18377        >(mut self, field: T) -> Self {
18378            self.set_kind(field.into());
18379            self
18380        }
18381        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18382        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18383            self.object_id.as_mut().map(|field| field as _)
18384        }
18385        ///Returns a mutable reference to `object_id`.
18386        ///If the field is unset, it is first initialized with the default value.
18387        pub fn object_id_mut(&mut self) -> &mut String {
18388            self.object_id.get_or_insert_default()
18389        }
18390        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
18391        pub fn object_id_opt(&self) -> Option<&str> {
18392            self.object_id.as_ref().map(|field| field as _)
18393        }
18394        ///Sets `object_id` with the provided value.
18395        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18396            self.object_id = Some(field.into().into());
18397        }
18398        ///Sets `object_id` with the provided value.
18399        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18400            self.set_object_id(field.into());
18401            self
18402        }
18403        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18404        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18405            self.version.as_mut().map(|field| field as _)
18406        }
18407        ///Returns a mutable reference to `version`.
18408        ///If the field is unset, it is first initialized with the default value.
18409        pub fn version_mut(&mut self) -> &mut u64 {
18410            self.version.get_or_insert_default()
18411        }
18412        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
18413        pub fn version_opt(&self) -> Option<u64> {
18414            self.version.as_ref().map(|field| *field)
18415        }
18416        ///Sets `version` with the provided value.
18417        pub fn set_version(&mut self, field: u64) {
18418            self.version = Some(field);
18419        }
18420        ///Sets `version` with the provided value.
18421        pub fn with_version(mut self, field: u64) -> Self {
18422            self.set_version(field);
18423            self
18424        }
18425        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18426        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18427            self.digest.as_mut().map(|field| field as _)
18428        }
18429        ///Returns a mutable reference to `digest`.
18430        ///If the field is unset, it is first initialized with the default value.
18431        pub fn digest_mut(&mut self) -> &mut String {
18432            self.digest.get_or_insert_default()
18433        }
18434        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18435        pub fn digest_opt(&self) -> Option<&str> {
18436            self.digest.as_ref().map(|field| field as _)
18437        }
18438        ///Sets `digest` with the provided value.
18439        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18440            self.digest = Some(field.into().into());
18441        }
18442        ///Sets `digest` with the provided value.
18443        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18444            self.set_digest(field.into());
18445            self
18446        }
18447        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18448        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18449            self.object_type.as_mut().map(|field| field as _)
18450        }
18451        ///Returns a mutable reference to `object_type`.
18452        ///If the field is unset, it is first initialized with the default value.
18453        pub fn object_type_mut(&mut self) -> &mut String {
18454            self.object_type.get_or_insert_default()
18455        }
18456        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
18457        pub fn object_type_opt(&self) -> Option<&str> {
18458            self.object_type.as_ref().map(|field| field as _)
18459        }
18460        ///Sets `object_type` with the provided value.
18461        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18462            self.object_type = Some(field.into().into());
18463        }
18464        ///Sets `object_type` with the provided value.
18465        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18466            self.set_object_type(field.into());
18467            self
18468        }
18469    }
18470    impl super::Upgrade {
18471        pub const fn const_default() -> Self {
18472            Self {
18473                modules: Vec::new(),
18474                dependencies: Vec::new(),
18475                package: None,
18476                ticket: None,
18477            }
18478        }
18479        #[doc(hidden)]
18480        pub fn default_instance() -> &'static Self {
18481            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18482            &DEFAULT
18483        }
18484        ///Returns the value of `modules`, or the default value if `modules` is unset.
18485        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18486            &self.modules
18487        }
18488        ///Returns a mutable reference to `modules`.
18489        ///If the field is unset, it is first initialized with the default value.
18490        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18491            &mut self.modules
18492        }
18493        ///Sets `modules` with the provided value.
18494        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18495            self.modules = field;
18496        }
18497        ///Sets `modules` with the provided value.
18498        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18499            self.set_modules(field);
18500            self
18501        }
18502        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
18503        pub fn dependencies(&self) -> &[String] {
18504            &self.dependencies
18505        }
18506        ///Returns a mutable reference to `dependencies`.
18507        ///If the field is unset, it is first initialized with the default value.
18508        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18509            &mut self.dependencies
18510        }
18511        ///Sets `dependencies` with the provided value.
18512        pub fn set_dependencies(&mut self, field: Vec<String>) {
18513            self.dependencies = field;
18514        }
18515        ///Sets `dependencies` with the provided value.
18516        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18517            self.set_dependencies(field);
18518            self
18519        }
18520        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18521        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18522            self.package.as_mut().map(|field| field as _)
18523        }
18524        ///Returns a mutable reference to `package`.
18525        ///If the field is unset, it is first initialized with the default value.
18526        pub fn package_mut(&mut self) -> &mut String {
18527            self.package.get_or_insert_default()
18528        }
18529        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
18530        pub fn package_opt(&self) -> Option<&str> {
18531            self.package.as_ref().map(|field| field as _)
18532        }
18533        ///Sets `package` with the provided value.
18534        pub fn set_package<T: Into<String>>(&mut self, field: T) {
18535            self.package = Some(field.into().into());
18536        }
18537        ///Sets `package` with the provided value.
18538        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18539            self.set_package(field.into());
18540            self
18541        }
18542        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
18543        pub fn ticket(&self) -> &super::Argument {
18544            self.ticket
18545                .as_ref()
18546                .map(|field| field as _)
18547                .unwrap_or_else(|| super::Argument::default_instance() as _)
18548        }
18549        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18550        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18551            self.ticket.as_mut().map(|field| field as _)
18552        }
18553        ///Returns a mutable reference to `ticket`.
18554        ///If the field is unset, it is first initialized with the default value.
18555        pub fn ticket_mut(&mut self) -> &mut super::Argument {
18556            self.ticket.get_or_insert_default()
18557        }
18558        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
18559        pub fn ticket_opt(&self) -> Option<&super::Argument> {
18560            self.ticket.as_ref().map(|field| field as _)
18561        }
18562        ///Sets `ticket` with the provided value.
18563        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18564            self.ticket = Some(field.into().into());
18565        }
18566        ///Sets `ticket` with the provided value.
18567        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18568            self.set_ticket(field.into());
18569            self
18570        }
18571    }
18572    impl super::UserSignature {
18573        pub const fn const_default() -> Self {
18574            Self {
18575                bcs: None,
18576                scheme: None,
18577                signature: None,
18578            }
18579        }
18580        #[doc(hidden)]
18581        pub fn default_instance() -> &'static Self {
18582            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18583            &DEFAULT
18584        }
18585        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
18586        pub fn bcs(&self) -> &super::Bcs {
18587            self.bcs
18588                .as_ref()
18589                .map(|field| field as _)
18590                .unwrap_or_else(|| super::Bcs::default_instance() as _)
18591        }
18592        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18593        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18594            self.bcs.as_mut().map(|field| field as _)
18595        }
18596        ///Returns a mutable reference to `bcs`.
18597        ///If the field is unset, it is first initialized with the default value.
18598        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18599            self.bcs.get_or_insert_default()
18600        }
18601        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
18602        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18603            self.bcs.as_ref().map(|field| field as _)
18604        }
18605        ///Sets `bcs` with the provided value.
18606        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18607            self.bcs = Some(field.into().into());
18608        }
18609        ///Sets `bcs` with the provided value.
18610        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18611            self.set_bcs(field.into());
18612            self
18613        }
18614        ///Sets `scheme` with the provided value.
18615        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18616            self.set_scheme(field.into());
18617            self
18618        }
18619        ///Returns the value of `simple`, or the default value if `simple` is unset.
18620        pub fn simple(&self) -> &super::SimpleSignature {
18621            if let Some(super::user_signature::Signature::Simple(field)) = &self
18622                .signature
18623            {
18624                field as _
18625            } else {
18626                super::SimpleSignature::default_instance() as _
18627            }
18628        }
18629        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
18630        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18631            if let Some(super::user_signature::Signature::Simple(field)) = &self
18632                .signature
18633            {
18634                Some(field as _)
18635            } else {
18636                None
18637            }
18638        }
18639        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18640        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18641            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18642                .signature
18643            {
18644                Some(field as _)
18645            } else {
18646                None
18647            }
18648        }
18649        ///Returns a mutable reference to `simple`.
18650        ///If the field is unset, it is first initialized with the default value.
18651        ///If any other oneof field in the same oneof is set, it will be cleared.
18652        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18653            if self.simple_opt_mut().is_none() {
18654                self.signature = Some(
18655                    super::user_signature::Signature::Simple(
18656                        super::SimpleSignature::default(),
18657                    ),
18658                );
18659            }
18660            self.simple_opt_mut().unwrap()
18661        }
18662        ///Sets `simple` with the provided value.
18663        ///If any other oneof field in the same oneof is set, it will be cleared.
18664        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18665            self.signature = Some(
18666                super::user_signature::Signature::Simple(field.into().into()),
18667            );
18668        }
18669        ///Sets `simple` with the provided value.
18670        ///If any other oneof field in the same oneof is set, it will be cleared.
18671        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18672            self.set_simple(field.into());
18673            self
18674        }
18675        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
18676        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18677            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18678                .signature
18679            {
18680                field as _
18681            } else {
18682                super::MultisigAggregatedSignature::default_instance() as _
18683            }
18684        }
18685        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
18686        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18687            if let Some(super::user_signature::Signature::Multisig(field)) = &self
18688                .signature
18689            {
18690                Some(field as _)
18691            } else {
18692                None
18693            }
18694        }
18695        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18696        pub fn multisig_opt_mut(
18697            &mut self,
18698        ) -> Option<&mut super::MultisigAggregatedSignature> {
18699            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18700                .signature
18701            {
18702                Some(field as _)
18703            } else {
18704                None
18705            }
18706        }
18707        ///Returns a mutable reference to `multisig`.
18708        ///If the field is unset, it is first initialized with the default value.
18709        ///If any other oneof field in the same oneof is set, it will be cleared.
18710        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18711            if self.multisig_opt_mut().is_none() {
18712                self.signature = Some(
18713                    super::user_signature::Signature::Multisig(
18714                        super::MultisigAggregatedSignature::default(),
18715                    ),
18716                );
18717            }
18718            self.multisig_opt_mut().unwrap()
18719        }
18720        ///Sets `multisig` with the provided value.
18721        ///If any other oneof field in the same oneof is set, it will be cleared.
18722        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18723            &mut self,
18724            field: T,
18725        ) {
18726            self.signature = Some(
18727                super::user_signature::Signature::Multisig(field.into().into()),
18728            );
18729        }
18730        ///Sets `multisig` with the provided value.
18731        ///If any other oneof field in the same oneof is set, it will be cleared.
18732        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18733            mut self,
18734            field: T,
18735        ) -> Self {
18736            self.set_multisig(field.into());
18737            self
18738        }
18739        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
18740        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18741            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18742                .signature
18743            {
18744                field as _
18745            } else {
18746                super::ZkLoginAuthenticator::default_instance() as _
18747            }
18748        }
18749        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
18750        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18751            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18752                .signature
18753            {
18754                Some(field as _)
18755            } else {
18756                None
18757            }
18758        }
18759        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18760        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18761            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18762                .signature
18763            {
18764                Some(field as _)
18765            } else {
18766                None
18767            }
18768        }
18769        ///Returns a mutable reference to `zklogin`.
18770        ///If the field is unset, it is first initialized with the default value.
18771        ///If any other oneof field in the same oneof is set, it will be cleared.
18772        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18773            if self.zklogin_opt_mut().is_none() {
18774                self.signature = Some(
18775                    super::user_signature::Signature::Zklogin(
18776                        super::ZkLoginAuthenticator::default(),
18777                    ),
18778                );
18779            }
18780            self.zklogin_opt_mut().unwrap()
18781        }
18782        ///Sets `zklogin` with the provided value.
18783        ///If any other oneof field in the same oneof is set, it will be cleared.
18784        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18785            self.signature = Some(
18786                super::user_signature::Signature::Zklogin(field.into().into()),
18787            );
18788        }
18789        ///Sets `zklogin` with the provided value.
18790        ///If any other oneof field in the same oneof is set, it will be cleared.
18791        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18792            mut self,
18793            field: T,
18794        ) -> Self {
18795            self.set_zklogin(field.into());
18796            self
18797        }
18798        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
18799        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18800            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18801                .signature
18802            {
18803                field as _
18804            } else {
18805                super::PasskeyAuthenticator::default_instance() as _
18806            }
18807        }
18808        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
18809        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18810            if let Some(super::user_signature::Signature::Passkey(field)) = &self
18811                .signature
18812            {
18813                Some(field as _)
18814            } else {
18815                None
18816            }
18817        }
18818        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18819        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18820            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18821                .signature
18822            {
18823                Some(field as _)
18824            } else {
18825                None
18826            }
18827        }
18828        ///Returns a mutable reference to `passkey`.
18829        ///If the field is unset, it is first initialized with the default value.
18830        ///If any other oneof field in the same oneof is set, it will be cleared.
18831        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18832            if self.passkey_opt_mut().is_none() {
18833                self.signature = Some(
18834                    super::user_signature::Signature::Passkey(
18835                        super::PasskeyAuthenticator::default(),
18836                    ),
18837                );
18838            }
18839            self.passkey_opt_mut().unwrap()
18840        }
18841        ///Sets `passkey` with the provided value.
18842        ///If any other oneof field in the same oneof is set, it will be cleared.
18843        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18844            self.signature = Some(
18845                super::user_signature::Signature::Passkey(field.into().into()),
18846            );
18847        }
18848        ///Sets `passkey` with the provided value.
18849        ///If any other oneof field in the same oneof is set, it will be cleared.
18850        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18851            mut self,
18852            field: T,
18853        ) -> Self {
18854            self.set_passkey(field.into());
18855            self
18856        }
18857    }
18858    impl super::Validator {
18859        pub const fn const_default() -> Self {
18860            Self {
18861                name: None,
18862                address: None,
18863                description: None,
18864                image_url: None,
18865                project_url: None,
18866                protocol_public_key: None,
18867                proof_of_possession: None,
18868                network_public_key: None,
18869                worker_public_key: None,
18870                network_address: None,
18871                p2p_address: None,
18872                primary_address: None,
18873                worker_address: None,
18874                next_epoch_protocol_public_key: None,
18875                next_epoch_proof_of_possession: None,
18876                next_epoch_network_public_key: None,
18877                next_epoch_worker_public_key: None,
18878                next_epoch_network_address: None,
18879                next_epoch_p2p_address: None,
18880                next_epoch_primary_address: None,
18881                next_epoch_worker_address: None,
18882                metadata_extra_fields: None,
18883                voting_power: None,
18884                operation_cap_id: None,
18885                gas_price: None,
18886                staking_pool: None,
18887                commission_rate: None,
18888                next_epoch_stake: None,
18889                next_epoch_gas_price: None,
18890                next_epoch_commission_rate: None,
18891                extra_fields: None,
18892            }
18893        }
18894        #[doc(hidden)]
18895        pub fn default_instance() -> &'static Self {
18896            static DEFAULT: super::Validator = super::Validator::const_default();
18897            &DEFAULT
18898        }
18899        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18900        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18901            self.name.as_mut().map(|field| field as _)
18902        }
18903        ///Returns a mutable reference to `name`.
18904        ///If the field is unset, it is first initialized with the default value.
18905        pub fn name_mut(&mut self) -> &mut String {
18906            self.name.get_or_insert_default()
18907        }
18908        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
18909        pub fn name_opt(&self) -> Option<&str> {
18910            self.name.as_ref().map(|field| field as _)
18911        }
18912        ///Sets `name` with the provided value.
18913        pub fn set_name<T: Into<String>>(&mut self, field: T) {
18914            self.name = Some(field.into().into());
18915        }
18916        ///Sets `name` with the provided value.
18917        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18918            self.set_name(field.into());
18919            self
18920        }
18921        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18922        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18923            self.address.as_mut().map(|field| field as _)
18924        }
18925        ///Returns a mutable reference to `address`.
18926        ///If the field is unset, it is first initialized with the default value.
18927        pub fn address_mut(&mut self) -> &mut String {
18928            self.address.get_or_insert_default()
18929        }
18930        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
18931        pub fn address_opt(&self) -> Option<&str> {
18932            self.address.as_ref().map(|field| field as _)
18933        }
18934        ///Sets `address` with the provided value.
18935        pub fn set_address<T: Into<String>>(&mut self, field: T) {
18936            self.address = Some(field.into().into());
18937        }
18938        ///Sets `address` with the provided value.
18939        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18940            self.set_address(field.into());
18941            self
18942        }
18943        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18944        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18945            self.description.as_mut().map(|field| field as _)
18946        }
18947        ///Returns a mutable reference to `description`.
18948        ///If the field is unset, it is first initialized with the default value.
18949        pub fn description_mut(&mut self) -> &mut String {
18950            self.description.get_or_insert_default()
18951        }
18952        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
18953        pub fn description_opt(&self) -> Option<&str> {
18954            self.description.as_ref().map(|field| field as _)
18955        }
18956        ///Sets `description` with the provided value.
18957        pub fn set_description<T: Into<String>>(&mut self, field: T) {
18958            self.description = Some(field.into().into());
18959        }
18960        ///Sets `description` with the provided value.
18961        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18962            self.set_description(field.into());
18963            self
18964        }
18965        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18966        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18967            self.image_url.as_mut().map(|field| field as _)
18968        }
18969        ///Returns a mutable reference to `image_url`.
18970        ///If the field is unset, it is first initialized with the default value.
18971        pub fn image_url_mut(&mut self) -> &mut String {
18972            self.image_url.get_or_insert_default()
18973        }
18974        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18975        pub fn image_url_opt(&self) -> Option<&str> {
18976            self.image_url.as_ref().map(|field| field as _)
18977        }
18978        ///Sets `image_url` with the provided value.
18979        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18980            self.image_url = Some(field.into().into());
18981        }
18982        ///Sets `image_url` with the provided value.
18983        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18984            self.set_image_url(field.into());
18985            self
18986        }
18987        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18988        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18989            self.project_url.as_mut().map(|field| field as _)
18990        }
18991        ///Returns a mutable reference to `project_url`.
18992        ///If the field is unset, it is first initialized with the default value.
18993        pub fn project_url_mut(&mut self) -> &mut String {
18994            self.project_url.get_or_insert_default()
18995        }
18996        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
18997        pub fn project_url_opt(&self) -> Option<&str> {
18998            self.project_url.as_ref().map(|field| field as _)
18999        }
19000        ///Sets `project_url` with the provided value.
19001        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
19002            self.project_url = Some(field.into().into());
19003        }
19004        ///Sets `project_url` with the provided value.
19005        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
19006            self.set_project_url(field.into());
19007            self
19008        }
19009        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19010        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
19011            self.protocol_public_key.as_ref().map(|field| field as _)
19012        }
19013        ///Sets `protocol_public_key` with the provided value.
19014        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19015            &mut self,
19016            field: T,
19017        ) {
19018            self.protocol_public_key = Some(field.into().into());
19019        }
19020        ///Sets `protocol_public_key` with the provided value.
19021        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19022            mut self,
19023            field: T,
19024        ) -> Self {
19025            self.set_protocol_public_key(field.into());
19026            self
19027        }
19028        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
19029        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
19030            self.proof_of_possession.as_ref().map(|field| field as _)
19031        }
19032        ///Sets `proof_of_possession` with the provided value.
19033        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19034            &mut self,
19035            field: T,
19036        ) {
19037            self.proof_of_possession = Some(field.into().into());
19038        }
19039        ///Sets `proof_of_possession` with the provided value.
19040        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19041            mut self,
19042            field: T,
19043        ) -> Self {
19044            self.set_proof_of_possession(field.into());
19045            self
19046        }
19047        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19048        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
19049            self.network_public_key.as_ref().map(|field| field as _)
19050        }
19051        ///Sets `network_public_key` with the provided value.
19052        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
19053            &mut self,
19054            field: T,
19055        ) {
19056            self.network_public_key = Some(field.into().into());
19057        }
19058        ///Sets `network_public_key` with the provided value.
19059        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
19060            mut self,
19061            field: T,
19062        ) -> Self {
19063            self.set_network_public_key(field.into());
19064            self
19065        }
19066        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19067        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
19068            self.worker_public_key.as_ref().map(|field| field as _)
19069        }
19070        ///Sets `worker_public_key` with the provided value.
19071        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19072            &mut self,
19073            field: T,
19074        ) {
19075            self.worker_public_key = Some(field.into().into());
19076        }
19077        ///Sets `worker_public_key` with the provided value.
19078        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19079            mut self,
19080            field: T,
19081        ) -> Self {
19082            self.set_worker_public_key(field.into());
19083            self
19084        }
19085        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19086        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
19087            self.network_address.as_mut().map(|field| field as _)
19088        }
19089        ///Returns a mutable reference to `network_address`.
19090        ///If the field is unset, it is first initialized with the default value.
19091        pub fn network_address_mut(&mut self) -> &mut String {
19092            self.network_address.get_or_insert_default()
19093        }
19094        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19095        pub fn network_address_opt(&self) -> Option<&str> {
19096            self.network_address.as_ref().map(|field| field as _)
19097        }
19098        ///Sets `network_address` with the provided value.
19099        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
19100            self.network_address = Some(field.into().into());
19101        }
19102        ///Sets `network_address` with the provided value.
19103        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
19104            self.set_network_address(field.into());
19105            self
19106        }
19107        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19108        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19109            self.p2p_address.as_mut().map(|field| field as _)
19110        }
19111        ///Returns a mutable reference to `p2p_address`.
19112        ///If the field is unset, it is first initialized with the default value.
19113        pub fn p2p_address_mut(&mut self) -> &mut String {
19114            self.p2p_address.get_or_insert_default()
19115        }
19116        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19117        pub fn p2p_address_opt(&self) -> Option<&str> {
19118            self.p2p_address.as_ref().map(|field| field as _)
19119        }
19120        ///Sets `p2p_address` with the provided value.
19121        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
19122            self.p2p_address = Some(field.into().into());
19123        }
19124        ///Sets `p2p_address` with the provided value.
19125        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19126            self.set_p2p_address(field.into());
19127            self
19128        }
19129        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19130        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
19131            self.primary_address.as_mut().map(|field| field as _)
19132        }
19133        ///Returns a mutable reference to `primary_address`.
19134        ///If the field is unset, it is first initialized with the default value.
19135        pub fn primary_address_mut(&mut self) -> &mut String {
19136            self.primary_address.get_or_insert_default()
19137        }
19138        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19139        pub fn primary_address_opt(&self) -> Option<&str> {
19140            self.primary_address.as_ref().map(|field| field as _)
19141        }
19142        ///Sets `primary_address` with the provided value.
19143        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
19144            self.primary_address = Some(field.into().into());
19145        }
19146        ///Sets `primary_address` with the provided value.
19147        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
19148            self.set_primary_address(field.into());
19149            self
19150        }
19151        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19152        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
19153            self.worker_address.as_mut().map(|field| field as _)
19154        }
19155        ///Returns a mutable reference to `worker_address`.
19156        ///If the field is unset, it is first initialized with the default value.
19157        pub fn worker_address_mut(&mut self) -> &mut String {
19158            self.worker_address.get_or_insert_default()
19159        }
19160        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19161        pub fn worker_address_opt(&self) -> Option<&str> {
19162            self.worker_address.as_ref().map(|field| field as _)
19163        }
19164        ///Sets `worker_address` with the provided value.
19165        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
19166            self.worker_address = Some(field.into().into());
19167        }
19168        ///Sets `worker_address` with the provided value.
19169        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
19170            self.set_worker_address(field.into());
19171            self
19172        }
19173        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19174        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
19175            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
19176        }
19177        ///Sets `next_epoch_protocol_public_key` with the provided value.
19178        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19179            &mut self,
19180            field: T,
19181        ) {
19182            self.next_epoch_protocol_public_key = Some(field.into().into());
19183        }
19184        ///Sets `next_epoch_protocol_public_key` with the provided value.
19185        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19186            mut self,
19187            field: T,
19188        ) -> Self {
19189            self.set_next_epoch_protocol_public_key(field.into());
19190            self
19191        }
19192        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
19193        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
19194            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
19195        }
19196        ///Sets `next_epoch_proof_of_possession` with the provided value.
19197        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19198            &mut self,
19199            field: T,
19200        ) {
19201            self.next_epoch_proof_of_possession = Some(field.into().into());
19202        }
19203        ///Sets `next_epoch_proof_of_possession` with the provided value.
19204        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19205            mut self,
19206            field: T,
19207        ) -> Self {
19208            self.set_next_epoch_proof_of_possession(field.into());
19209            self
19210        }
19211        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19212        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
19213            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
19214        }
19215        ///Sets `next_epoch_network_public_key` with the provided value.
19216        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19217            &mut self,
19218            field: T,
19219        ) {
19220            self.next_epoch_network_public_key = Some(field.into().into());
19221        }
19222        ///Sets `next_epoch_network_public_key` with the provided value.
19223        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19224            mut self,
19225            field: T,
19226        ) -> Self {
19227            self.set_next_epoch_network_public_key(field.into());
19228            self
19229        }
19230        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19231        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
19232            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
19233        }
19234        ///Sets `next_epoch_worker_public_key` with the provided value.
19235        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19236            &mut self,
19237            field: T,
19238        ) {
19239            self.next_epoch_worker_public_key = Some(field.into().into());
19240        }
19241        ///Sets `next_epoch_worker_public_key` with the provided value.
19242        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19243            mut self,
19244            field: T,
19245        ) -> Self {
19246            self.set_next_epoch_worker_public_key(field.into());
19247            self
19248        }
19249        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19250        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19251            self.next_epoch_network_address.as_mut().map(|field| field as _)
19252        }
19253        ///Returns a mutable reference to `next_epoch_network_address`.
19254        ///If the field is unset, it is first initialized with the default value.
19255        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19256            self.next_epoch_network_address.get_or_insert_default()
19257        }
19258        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19259        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19260            self.next_epoch_network_address.as_ref().map(|field| field as _)
19261        }
19262        ///Sets `next_epoch_network_address` with the provided value.
19263        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19264            self.next_epoch_network_address = Some(field.into().into());
19265        }
19266        ///Sets `next_epoch_network_address` with the provided value.
19267        pub fn with_next_epoch_network_address<T: Into<String>>(
19268            mut self,
19269            field: T,
19270        ) -> Self {
19271            self.set_next_epoch_network_address(field.into());
19272            self
19273        }
19274        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19275        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19276            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19277        }
19278        ///Returns a mutable reference to `next_epoch_p2p_address`.
19279        ///If the field is unset, it is first initialized with the default value.
19280        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19281            self.next_epoch_p2p_address.get_or_insert_default()
19282        }
19283        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19284        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19285            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19286        }
19287        ///Sets `next_epoch_p2p_address` with the provided value.
19288        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19289            self.next_epoch_p2p_address = Some(field.into().into());
19290        }
19291        ///Sets `next_epoch_p2p_address` with the provided value.
19292        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19293            self.set_next_epoch_p2p_address(field.into());
19294            self
19295        }
19296        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19297        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19298            self.next_epoch_primary_address.as_mut().map(|field| field as _)
19299        }
19300        ///Returns a mutable reference to `next_epoch_primary_address`.
19301        ///If the field is unset, it is first initialized with the default value.
19302        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19303            self.next_epoch_primary_address.get_or_insert_default()
19304        }
19305        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19306        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19307            self.next_epoch_primary_address.as_ref().map(|field| field as _)
19308        }
19309        ///Sets `next_epoch_primary_address` with the provided value.
19310        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19311            self.next_epoch_primary_address = Some(field.into().into());
19312        }
19313        ///Sets `next_epoch_primary_address` with the provided value.
19314        pub fn with_next_epoch_primary_address<T: Into<String>>(
19315            mut self,
19316            field: T,
19317        ) -> Self {
19318            self.set_next_epoch_primary_address(field.into());
19319            self
19320        }
19321        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19322        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19323            self.next_epoch_worker_address.as_mut().map(|field| field as _)
19324        }
19325        ///Returns a mutable reference to `next_epoch_worker_address`.
19326        ///If the field is unset, it is first initialized with the default value.
19327        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19328            self.next_epoch_worker_address.get_or_insert_default()
19329        }
19330        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19331        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19332            self.next_epoch_worker_address.as_ref().map(|field| field as _)
19333        }
19334        ///Sets `next_epoch_worker_address` with the provided value.
19335        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19336            self.next_epoch_worker_address = Some(field.into().into());
19337        }
19338        ///Sets `next_epoch_worker_address` with the provided value.
19339        pub fn with_next_epoch_worker_address<T: Into<String>>(
19340            mut self,
19341            field: T,
19342        ) -> Self {
19343            self.set_next_epoch_worker_address(field.into());
19344            self
19345        }
19346        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
19347        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19348            self.metadata_extra_fields
19349                .as_ref()
19350                .map(|field| field as _)
19351                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19352        }
19353        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19354        pub fn metadata_extra_fields_opt_mut(
19355            &mut self,
19356        ) -> Option<&mut super::MoveTable> {
19357            self.metadata_extra_fields.as_mut().map(|field| field as _)
19358        }
19359        ///Returns a mutable reference to `metadata_extra_fields`.
19360        ///If the field is unset, it is first initialized with the default value.
19361        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19362            self.metadata_extra_fields.get_or_insert_default()
19363        }
19364        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19365        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19366            self.metadata_extra_fields.as_ref().map(|field| field as _)
19367        }
19368        ///Sets `metadata_extra_fields` with the provided value.
19369        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19370            &mut self,
19371            field: T,
19372        ) {
19373            self.metadata_extra_fields = Some(field.into().into());
19374        }
19375        ///Sets `metadata_extra_fields` with the provided value.
19376        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19377            mut self,
19378            field: T,
19379        ) -> Self {
19380            self.set_metadata_extra_fields(field.into());
19381            self
19382        }
19383        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19384        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19385            self.voting_power.as_mut().map(|field| field as _)
19386        }
19387        ///Returns a mutable reference to `voting_power`.
19388        ///If the field is unset, it is first initialized with the default value.
19389        pub fn voting_power_mut(&mut self) -> &mut u64 {
19390            self.voting_power.get_or_insert_default()
19391        }
19392        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
19393        pub fn voting_power_opt(&self) -> Option<u64> {
19394            self.voting_power.as_ref().map(|field| *field)
19395        }
19396        ///Sets `voting_power` with the provided value.
19397        pub fn set_voting_power(&mut self, field: u64) {
19398            self.voting_power = Some(field);
19399        }
19400        ///Sets `voting_power` with the provided value.
19401        pub fn with_voting_power(mut self, field: u64) -> Self {
19402            self.set_voting_power(field);
19403            self
19404        }
19405        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19406        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19407            self.operation_cap_id.as_mut().map(|field| field as _)
19408        }
19409        ///Returns a mutable reference to `operation_cap_id`.
19410        ///If the field is unset, it is first initialized with the default value.
19411        pub fn operation_cap_id_mut(&mut self) -> &mut String {
19412            self.operation_cap_id.get_or_insert_default()
19413        }
19414        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
19415        pub fn operation_cap_id_opt(&self) -> Option<&str> {
19416            self.operation_cap_id.as_ref().map(|field| field as _)
19417        }
19418        ///Sets `operation_cap_id` with the provided value.
19419        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19420            self.operation_cap_id = Some(field.into().into());
19421        }
19422        ///Sets `operation_cap_id` with the provided value.
19423        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19424            self.set_operation_cap_id(field.into());
19425            self
19426        }
19427        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19428        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19429            self.gas_price.as_mut().map(|field| field as _)
19430        }
19431        ///Returns a mutable reference to `gas_price`.
19432        ///If the field is unset, it is first initialized with the default value.
19433        pub fn gas_price_mut(&mut self) -> &mut u64 {
19434            self.gas_price.get_or_insert_default()
19435        }
19436        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19437        pub fn gas_price_opt(&self) -> Option<u64> {
19438            self.gas_price.as_ref().map(|field| *field)
19439        }
19440        ///Sets `gas_price` with the provided value.
19441        pub fn set_gas_price(&mut self, field: u64) {
19442            self.gas_price = Some(field);
19443        }
19444        ///Sets `gas_price` with the provided value.
19445        pub fn with_gas_price(mut self, field: u64) -> Self {
19446            self.set_gas_price(field);
19447            self
19448        }
19449        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
19450        pub fn staking_pool(&self) -> &super::StakingPool {
19451            self.staking_pool
19452                .as_ref()
19453                .map(|field| field as _)
19454                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19455        }
19456        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19457        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19458            self.staking_pool.as_mut().map(|field| field as _)
19459        }
19460        ///Returns a mutable reference to `staking_pool`.
19461        ///If the field is unset, it is first initialized with the default value.
19462        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19463            self.staking_pool.get_or_insert_default()
19464        }
19465        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
19466        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19467            self.staking_pool.as_ref().map(|field| field as _)
19468        }
19469        ///Sets `staking_pool` with the provided value.
19470        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19471            self.staking_pool = Some(field.into().into());
19472        }
19473        ///Sets `staking_pool` with the provided value.
19474        pub fn with_staking_pool<T: Into<super::StakingPool>>(
19475            mut self,
19476            field: T,
19477        ) -> Self {
19478            self.set_staking_pool(field.into());
19479            self
19480        }
19481        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19482        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19483            self.commission_rate.as_mut().map(|field| field as _)
19484        }
19485        ///Returns a mutable reference to `commission_rate`.
19486        ///If the field is unset, it is first initialized with the default value.
19487        pub fn commission_rate_mut(&mut self) -> &mut u64 {
19488            self.commission_rate.get_or_insert_default()
19489        }
19490        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19491        pub fn commission_rate_opt(&self) -> Option<u64> {
19492            self.commission_rate.as_ref().map(|field| *field)
19493        }
19494        ///Sets `commission_rate` with the provided value.
19495        pub fn set_commission_rate(&mut self, field: u64) {
19496            self.commission_rate = Some(field);
19497        }
19498        ///Sets `commission_rate` with the provided value.
19499        pub fn with_commission_rate(mut self, field: u64) -> Self {
19500            self.set_commission_rate(field);
19501            self
19502        }
19503        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19504        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19505            self.next_epoch_stake.as_mut().map(|field| field as _)
19506        }
19507        ///Returns a mutable reference to `next_epoch_stake`.
19508        ///If the field is unset, it is first initialized with the default value.
19509        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19510            self.next_epoch_stake.get_or_insert_default()
19511        }
19512        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19513        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19514            self.next_epoch_stake.as_ref().map(|field| *field)
19515        }
19516        ///Sets `next_epoch_stake` with the provided value.
19517        pub fn set_next_epoch_stake(&mut self, field: u64) {
19518            self.next_epoch_stake = Some(field);
19519        }
19520        ///Sets `next_epoch_stake` with the provided value.
19521        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19522            self.set_next_epoch_stake(field);
19523            self
19524        }
19525        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19526        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19527            self.next_epoch_gas_price.as_mut().map(|field| field as _)
19528        }
19529        ///Returns a mutable reference to `next_epoch_gas_price`.
19530        ///If the field is unset, it is first initialized with the default value.
19531        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19532            self.next_epoch_gas_price.get_or_insert_default()
19533        }
19534        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
19535        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19536            self.next_epoch_gas_price.as_ref().map(|field| *field)
19537        }
19538        ///Sets `next_epoch_gas_price` with the provided value.
19539        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19540            self.next_epoch_gas_price = Some(field);
19541        }
19542        ///Sets `next_epoch_gas_price` with the provided value.
19543        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19544            self.set_next_epoch_gas_price(field);
19545            self
19546        }
19547        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19548        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19549            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19550        }
19551        ///Returns a mutable reference to `next_epoch_commission_rate`.
19552        ///If the field is unset, it is first initialized with the default value.
19553        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19554            self.next_epoch_commission_rate.get_or_insert_default()
19555        }
19556        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
19557        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19558            self.next_epoch_commission_rate.as_ref().map(|field| *field)
19559        }
19560        ///Sets `next_epoch_commission_rate` with the provided value.
19561        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19562            self.next_epoch_commission_rate = Some(field);
19563        }
19564        ///Sets `next_epoch_commission_rate` with the provided value.
19565        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19566            self.set_next_epoch_commission_rate(field);
19567            self
19568        }
19569        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
19570        pub fn extra_fields(&self) -> &super::MoveTable {
19571            self.extra_fields
19572                .as_ref()
19573                .map(|field| field as _)
19574                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19575        }
19576        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19577        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19578            self.extra_fields.as_mut().map(|field| field as _)
19579        }
19580        ///Returns a mutable reference to `extra_fields`.
19581        ///If the field is unset, it is first initialized with the default value.
19582        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19583            self.extra_fields.get_or_insert_default()
19584        }
19585        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
19586        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19587            self.extra_fields.as_ref().map(|field| field as _)
19588        }
19589        ///Sets `extra_fields` with the provided value.
19590        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19591            self.extra_fields = Some(field.into().into());
19592        }
19593        ///Sets `extra_fields` with the provided value.
19594        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19595            self.set_extra_fields(field.into());
19596            self
19597        }
19598    }
19599    impl super::ValidatorAggregatedSignature {
19600        pub const fn const_default() -> Self {
19601            Self {
19602                epoch: None,
19603                signature: None,
19604                bitmap: None,
19605            }
19606        }
19607        #[doc(hidden)]
19608        pub fn default_instance() -> &'static Self {
19609            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19610            &DEFAULT
19611        }
19612        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19613        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19614            self.epoch.as_mut().map(|field| field as _)
19615        }
19616        ///Returns a mutable reference to `epoch`.
19617        ///If the field is unset, it is first initialized with the default value.
19618        pub fn epoch_mut(&mut self) -> &mut u64 {
19619            self.epoch.get_or_insert_default()
19620        }
19621        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19622        pub fn epoch_opt(&self) -> Option<u64> {
19623            self.epoch.as_ref().map(|field| *field)
19624        }
19625        ///Sets `epoch` with the provided value.
19626        pub fn set_epoch(&mut self, field: u64) {
19627            self.epoch = Some(field);
19628        }
19629        ///Sets `epoch` with the provided value.
19630        pub fn with_epoch(mut self, field: u64) -> Self {
19631            self.set_epoch(field);
19632            self
19633        }
19634        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
19635        pub fn signature_opt(&self) -> Option<&[u8]> {
19636            self.signature.as_ref().map(|field| field as _)
19637        }
19638        ///Sets `signature` with the provided value.
19639        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19640            self.signature = Some(field.into().into());
19641        }
19642        ///Sets `signature` with the provided value.
19643        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19644            mut self,
19645            field: T,
19646        ) -> Self {
19647            self.set_signature(field.into());
19648            self
19649        }
19650        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
19651        pub fn bitmap_opt(&self) -> Option<&[u8]> {
19652            self.bitmap.as_ref().map(|field| field as _)
19653        }
19654        ///Sets `bitmap` with the provided value.
19655        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19656            self.bitmap = Some(field.into().into());
19657        }
19658        ///Sets `bitmap` with the provided value.
19659        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19660            self.set_bitmap(field.into());
19661            self
19662        }
19663    }
19664    impl super::ValidatorCommittee {
19665        pub const fn const_default() -> Self {
19666            Self {
19667                epoch: None,
19668                members: Vec::new(),
19669            }
19670        }
19671        #[doc(hidden)]
19672        pub fn default_instance() -> &'static Self {
19673            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19674            &DEFAULT
19675        }
19676        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19677        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19678            self.epoch.as_mut().map(|field| field as _)
19679        }
19680        ///Returns a mutable reference to `epoch`.
19681        ///If the field is unset, it is first initialized with the default value.
19682        pub fn epoch_mut(&mut self) -> &mut u64 {
19683            self.epoch.get_or_insert_default()
19684        }
19685        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
19686        pub fn epoch_opt(&self) -> Option<u64> {
19687            self.epoch.as_ref().map(|field| *field)
19688        }
19689        ///Sets `epoch` with the provided value.
19690        pub fn set_epoch(&mut self, field: u64) {
19691            self.epoch = Some(field);
19692        }
19693        ///Sets `epoch` with the provided value.
19694        pub fn with_epoch(mut self, field: u64) -> Self {
19695            self.set_epoch(field);
19696            self
19697        }
19698        ///Returns the value of `members`, or the default value if `members` is unset.
19699        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19700            &self.members
19701        }
19702        ///Returns a mutable reference to `members`.
19703        ///If the field is unset, it is first initialized with the default value.
19704        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19705            &mut self.members
19706        }
19707        ///Sets `members` with the provided value.
19708        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19709            self.members = field;
19710        }
19711        ///Sets `members` with the provided value.
19712        pub fn with_members(
19713            mut self,
19714            field: Vec<super::ValidatorCommitteeMember>,
19715        ) -> Self {
19716            self.set_members(field);
19717            self
19718        }
19719    }
19720    impl super::ValidatorCommitteeMember {
19721        pub const fn const_default() -> Self {
19722            Self {
19723                public_key: None,
19724                weight: None,
19725            }
19726        }
19727        #[doc(hidden)]
19728        pub fn default_instance() -> &'static Self {
19729            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19730            &DEFAULT
19731        }
19732        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
19733        pub fn public_key_opt(&self) -> Option<&[u8]> {
19734            self.public_key.as_ref().map(|field| field as _)
19735        }
19736        ///Sets `public_key` with the provided value.
19737        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19738            self.public_key = Some(field.into().into());
19739        }
19740        ///Sets `public_key` with the provided value.
19741        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19742            mut self,
19743            field: T,
19744        ) -> Self {
19745            self.set_public_key(field.into());
19746            self
19747        }
19748        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19749        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19750            self.weight.as_mut().map(|field| field as _)
19751        }
19752        ///Returns a mutable reference to `weight`.
19753        ///If the field is unset, it is first initialized with the default value.
19754        pub fn weight_mut(&mut self) -> &mut u64 {
19755            self.weight.get_or_insert_default()
19756        }
19757        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
19758        pub fn weight_opt(&self) -> Option<u64> {
19759            self.weight.as_ref().map(|field| *field)
19760        }
19761        ///Sets `weight` with the provided value.
19762        pub fn set_weight(&mut self, field: u64) {
19763            self.weight = Some(field);
19764        }
19765        ///Sets `weight` with the provided value.
19766        pub fn with_weight(mut self, field: u64) -> Self {
19767            self.set_weight(field);
19768            self
19769        }
19770    }
19771    impl super::ValidatorExecutionTimeObservation {
19772        pub const fn const_default() -> Self {
19773            Self {
19774                validator: None,
19775                duration: None,
19776            }
19777        }
19778        #[doc(hidden)]
19779        pub fn default_instance() -> &'static Self {
19780            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19781            &DEFAULT
19782        }
19783        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
19784        pub fn validator_opt(&self) -> Option<&[u8]> {
19785            self.validator.as_ref().map(|field| field as _)
19786        }
19787        ///Sets `validator` with the provided value.
19788        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19789            self.validator = Some(field.into().into());
19790        }
19791        ///Sets `validator` with the provided value.
19792        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19793            mut self,
19794            field: T,
19795        ) -> Self {
19796            self.set_validator(field.into());
19797            self
19798        }
19799        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19800        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19801            self.duration.as_mut().map(|field| field as _)
19802        }
19803        ///Returns a mutable reference to `duration`.
19804        ///If the field is unset, it is first initialized with the default value.
19805        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19806            self.duration.get_or_insert_default()
19807        }
19808        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
19809        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19810            self.duration.as_ref().map(|field| field as _)
19811        }
19812        ///Sets `duration` with the provided value.
19813        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19814            self.duration = Some(field.into().into());
19815        }
19816        ///Sets `duration` with the provided value.
19817        pub fn with_duration<T: Into<::prost_types::Duration>>(
19818            mut self,
19819            field: T,
19820        ) -> Self {
19821            self.set_duration(field.into());
19822            self
19823        }
19824    }
19825    impl super::ValidatorReportRecord {
19826        pub const fn const_default() -> Self {
19827            Self {
19828                reported: None,
19829                reporters: Vec::new(),
19830            }
19831        }
19832        #[doc(hidden)]
19833        pub fn default_instance() -> &'static Self {
19834            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19835            &DEFAULT
19836        }
19837        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19838        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19839            self.reported.as_mut().map(|field| field as _)
19840        }
19841        ///Returns a mutable reference to `reported`.
19842        ///If the field is unset, it is first initialized with the default value.
19843        pub fn reported_mut(&mut self) -> &mut String {
19844            self.reported.get_or_insert_default()
19845        }
19846        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
19847        pub fn reported_opt(&self) -> Option<&str> {
19848            self.reported.as_ref().map(|field| field as _)
19849        }
19850        ///Sets `reported` with the provided value.
19851        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19852            self.reported = Some(field.into().into());
19853        }
19854        ///Sets `reported` with the provided value.
19855        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19856            self.set_reported(field.into());
19857            self
19858        }
19859        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
19860        pub fn reporters(&self) -> &[String] {
19861            &self.reporters
19862        }
19863        ///Returns a mutable reference to `reporters`.
19864        ///If the field is unset, it is first initialized with the default value.
19865        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19866            &mut self.reporters
19867        }
19868        ///Sets `reporters` with the provided value.
19869        pub fn set_reporters(&mut self, field: Vec<String>) {
19870            self.reporters = field;
19871        }
19872        ///Sets `reporters` with the provided value.
19873        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19874            self.set_reporters(field);
19875            self
19876        }
19877    }
19878    impl super::ValidatorSet {
19879        pub const fn const_default() -> Self {
19880            Self {
19881                total_stake: None,
19882                active_validators: Vec::new(),
19883                pending_active_validators: None,
19884                pending_removals: Vec::new(),
19885                staking_pool_mappings: None,
19886                inactive_validators: None,
19887                validator_candidates: None,
19888                at_risk_validators: std::collections::BTreeMap::new(),
19889                extra_fields: None,
19890            }
19891        }
19892        #[doc(hidden)]
19893        pub fn default_instance() -> &'static Self {
19894            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19895            &DEFAULT
19896        }
19897        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19898        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19899            self.total_stake.as_mut().map(|field| field as _)
19900        }
19901        ///Returns a mutable reference to `total_stake`.
19902        ///If the field is unset, it is first initialized with the default value.
19903        pub fn total_stake_mut(&mut self) -> &mut u64 {
19904            self.total_stake.get_or_insert_default()
19905        }
19906        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
19907        pub fn total_stake_opt(&self) -> Option<u64> {
19908            self.total_stake.as_ref().map(|field| *field)
19909        }
19910        ///Sets `total_stake` with the provided value.
19911        pub fn set_total_stake(&mut self, field: u64) {
19912            self.total_stake = Some(field);
19913        }
19914        ///Sets `total_stake` with the provided value.
19915        pub fn with_total_stake(mut self, field: u64) -> Self {
19916            self.set_total_stake(field);
19917            self
19918        }
19919        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
19920        pub fn active_validators(&self) -> &[super::Validator] {
19921            &self.active_validators
19922        }
19923        ///Returns a mutable reference to `active_validators`.
19924        ///If the field is unset, it is first initialized with the default value.
19925        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19926            &mut self.active_validators
19927        }
19928        ///Sets `active_validators` with the provided value.
19929        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19930            self.active_validators = field;
19931        }
19932        ///Sets `active_validators` with the provided value.
19933        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19934            self.set_active_validators(field);
19935            self
19936        }
19937        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
19938        pub fn pending_active_validators(&self) -> &super::MoveTable {
19939            self.pending_active_validators
19940                .as_ref()
19941                .map(|field| field as _)
19942                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19943        }
19944        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19945        pub fn pending_active_validators_opt_mut(
19946            &mut self,
19947        ) -> Option<&mut super::MoveTable> {
19948            self.pending_active_validators.as_mut().map(|field| field as _)
19949        }
19950        ///Returns a mutable reference to `pending_active_validators`.
19951        ///If the field is unset, it is first initialized with the default value.
19952        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19953            self.pending_active_validators.get_or_insert_default()
19954        }
19955        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
19956        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19957            self.pending_active_validators.as_ref().map(|field| field as _)
19958        }
19959        ///Sets `pending_active_validators` with the provided value.
19960        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19961            &mut self,
19962            field: T,
19963        ) {
19964            self.pending_active_validators = Some(field.into().into());
19965        }
19966        ///Sets `pending_active_validators` with the provided value.
19967        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19968            mut self,
19969            field: T,
19970        ) -> Self {
19971            self.set_pending_active_validators(field.into());
19972            self
19973        }
19974        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
19975        pub fn pending_removals(&self) -> &[u64] {
19976            &self.pending_removals
19977        }
19978        ///Returns a mutable reference to `pending_removals`.
19979        ///If the field is unset, it is first initialized with the default value.
19980        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19981            &mut self.pending_removals
19982        }
19983        ///Sets `pending_removals` with the provided value.
19984        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19985            self.pending_removals = field;
19986        }
19987        ///Sets `pending_removals` with the provided value.
19988        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19989            self.set_pending_removals(field);
19990            self
19991        }
19992        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
19993        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19994            self.staking_pool_mappings
19995                .as_ref()
19996                .map(|field| field as _)
19997                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19998        }
19999        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20000        pub fn staking_pool_mappings_opt_mut(
20001            &mut self,
20002        ) -> Option<&mut super::MoveTable> {
20003            self.staking_pool_mappings.as_mut().map(|field| field as _)
20004        }
20005        ///Returns a mutable reference to `staking_pool_mappings`.
20006        ///If the field is unset, it is first initialized with the default value.
20007        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
20008            self.staking_pool_mappings.get_or_insert_default()
20009        }
20010        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
20011        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
20012            self.staking_pool_mappings.as_ref().map(|field| field as _)
20013        }
20014        ///Sets `staking_pool_mappings` with the provided value.
20015        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
20016            &mut self,
20017            field: T,
20018        ) {
20019            self.staking_pool_mappings = Some(field.into().into());
20020        }
20021        ///Sets `staking_pool_mappings` with the provided value.
20022        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
20023            mut self,
20024            field: T,
20025        ) -> Self {
20026            self.set_staking_pool_mappings(field.into());
20027            self
20028        }
20029        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
20030        pub fn inactive_validators(&self) -> &super::MoveTable {
20031            self.inactive_validators
20032                .as_ref()
20033                .map(|field| field as _)
20034                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20035        }
20036        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20037        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20038            self.inactive_validators.as_mut().map(|field| field as _)
20039        }
20040        ///Returns a mutable reference to `inactive_validators`.
20041        ///If the field is unset, it is first initialized with the default value.
20042        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
20043            self.inactive_validators.get_or_insert_default()
20044        }
20045        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
20046        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
20047            self.inactive_validators.as_ref().map(|field| field as _)
20048        }
20049        ///Sets `inactive_validators` with the provided value.
20050        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
20051            self.inactive_validators = Some(field.into().into());
20052        }
20053        ///Sets `inactive_validators` with the provided value.
20054        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
20055            mut self,
20056            field: T,
20057        ) -> Self {
20058            self.set_inactive_validators(field.into());
20059            self
20060        }
20061        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
20062        pub fn validator_candidates(&self) -> &super::MoveTable {
20063            self.validator_candidates
20064                .as_ref()
20065                .map(|field| field as _)
20066                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20067        }
20068        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20069        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20070            self.validator_candidates.as_mut().map(|field| field as _)
20071        }
20072        ///Returns a mutable reference to `validator_candidates`.
20073        ///If the field is unset, it is first initialized with the default value.
20074        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
20075            self.validator_candidates.get_or_insert_default()
20076        }
20077        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
20078        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
20079            self.validator_candidates.as_ref().map(|field| field as _)
20080        }
20081        ///Sets `validator_candidates` with the provided value.
20082        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
20083            self.validator_candidates = Some(field.into().into());
20084        }
20085        ///Sets `validator_candidates` with the provided value.
20086        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
20087            mut self,
20088            field: T,
20089        ) -> Self {
20090            self.set_validator_candidates(field.into());
20091            self
20092        }
20093        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
20094        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
20095            &self.at_risk_validators
20096        }
20097        ///Returns a mutable reference to `at_risk_validators`.
20098        ///If the field is unset, it is first initialized with the default value.
20099        pub fn at_risk_validators_mut(
20100            &mut self,
20101        ) -> &mut ::std::collections::BTreeMap<String, u64> {
20102            &mut self.at_risk_validators
20103        }
20104        ///Sets `at_risk_validators` with the provided value.
20105        pub fn set_at_risk_validators(
20106            &mut self,
20107            field: ::std::collections::BTreeMap<String, u64>,
20108        ) {
20109            self.at_risk_validators = field;
20110        }
20111        ///Sets `at_risk_validators` with the provided value.
20112        pub fn with_at_risk_validators(
20113            mut self,
20114            field: ::std::collections::BTreeMap<String, u64>,
20115        ) -> Self {
20116            self.set_at_risk_validators(field);
20117            self
20118        }
20119        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
20120        pub fn extra_fields(&self) -> &super::MoveTable {
20121            self.extra_fields
20122                .as_ref()
20123                .map(|field| field as _)
20124                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20125        }
20126        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20127        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20128            self.extra_fields.as_mut().map(|field| field as _)
20129        }
20130        ///Returns a mutable reference to `extra_fields`.
20131        ///If the field is unset, it is first initialized with the default value.
20132        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
20133            self.extra_fields.get_or_insert_default()
20134        }
20135        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
20136        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
20137            self.extra_fields.as_ref().map(|field| field as _)
20138        }
20139        ///Sets `extra_fields` with the provided value.
20140        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
20141            self.extra_fields = Some(field.into().into());
20142        }
20143        ///Sets `extra_fields` with the provided value.
20144        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
20145            self.set_extra_fields(field.into());
20146            self
20147        }
20148    }
20149    impl super::VariantDescriptor {
20150        pub const fn const_default() -> Self {
20151            Self {
20152                name: None,
20153                position: None,
20154                fields: Vec::new(),
20155            }
20156        }
20157        #[doc(hidden)]
20158        pub fn default_instance() -> &'static Self {
20159            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
20160            &DEFAULT
20161        }
20162        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20163        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
20164            self.name.as_mut().map(|field| field as _)
20165        }
20166        ///Returns a mutable reference to `name`.
20167        ///If the field is unset, it is first initialized with the default value.
20168        pub fn name_mut(&mut self) -> &mut String {
20169            self.name.get_or_insert_default()
20170        }
20171        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
20172        pub fn name_opt(&self) -> Option<&str> {
20173            self.name.as_ref().map(|field| field as _)
20174        }
20175        ///Sets `name` with the provided value.
20176        pub fn set_name<T: Into<String>>(&mut self, field: T) {
20177            self.name = Some(field.into().into());
20178        }
20179        ///Sets `name` with the provided value.
20180        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
20181            self.set_name(field.into());
20182            self
20183        }
20184        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20185        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
20186            self.position.as_mut().map(|field| field as _)
20187        }
20188        ///Returns a mutable reference to `position`.
20189        ///If the field is unset, it is first initialized with the default value.
20190        pub fn position_mut(&mut self) -> &mut u32 {
20191            self.position.get_or_insert_default()
20192        }
20193        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
20194        pub fn position_opt(&self) -> Option<u32> {
20195            self.position.as_ref().map(|field| *field)
20196        }
20197        ///Sets `position` with the provided value.
20198        pub fn set_position(&mut self, field: u32) {
20199            self.position = Some(field);
20200        }
20201        ///Sets `position` with the provided value.
20202        pub fn with_position(mut self, field: u32) -> Self {
20203            self.set_position(field);
20204            self
20205        }
20206        ///Returns the value of `fields`, or the default value if `fields` is unset.
20207        pub fn fields(&self) -> &[super::FieldDescriptor] {
20208            &self.fields
20209        }
20210        ///Returns a mutable reference to `fields`.
20211        ///If the field is unset, it is first initialized with the default value.
20212        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
20213            &mut self.fields
20214        }
20215        ///Sets `fields` with the provided value.
20216        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
20217            self.fields = field;
20218        }
20219        ///Sets `fields` with the provided value.
20220        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
20221            self.set_fields(field);
20222            self
20223        }
20224    }
20225    impl super::VerifySignatureRequest {
20226        pub const fn const_default() -> Self {
20227            Self {
20228                message: None,
20229                signature: None,
20230                address: None,
20231                jwks: Vec::new(),
20232            }
20233        }
20234        #[doc(hidden)]
20235        pub fn default_instance() -> &'static Self {
20236            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
20237            &DEFAULT
20238        }
20239        ///Returns the value of `message`, or the default value if `message` is unset.
20240        pub fn message(&self) -> &super::Bcs {
20241            self.message
20242                .as_ref()
20243                .map(|field| field as _)
20244                .unwrap_or_else(|| super::Bcs::default_instance() as _)
20245        }
20246        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20247        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20248            self.message.as_mut().map(|field| field as _)
20249        }
20250        ///Returns a mutable reference to `message`.
20251        ///If the field is unset, it is first initialized with the default value.
20252        pub fn message_mut(&mut self) -> &mut super::Bcs {
20253            self.message.get_or_insert_default()
20254        }
20255        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
20256        pub fn message_opt(&self) -> Option<&super::Bcs> {
20257            self.message.as_ref().map(|field| field as _)
20258        }
20259        ///Sets `message` with the provided value.
20260        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20261            self.message = Some(field.into().into());
20262        }
20263        ///Sets `message` with the provided value.
20264        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20265            self.set_message(field.into());
20266            self
20267        }
20268        ///Returns the value of `signature`, or the default value if `signature` is unset.
20269        pub fn signature(&self) -> &super::UserSignature {
20270            self.signature
20271                .as_ref()
20272                .map(|field| field as _)
20273                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20274        }
20275        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20276        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20277            self.signature.as_mut().map(|field| field as _)
20278        }
20279        ///Returns a mutable reference to `signature`.
20280        ///If the field is unset, it is first initialized with the default value.
20281        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20282            self.signature.get_or_insert_default()
20283        }
20284        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20285        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20286            self.signature.as_ref().map(|field| field as _)
20287        }
20288        ///Sets `signature` with the provided value.
20289        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20290            self.signature = Some(field.into().into());
20291        }
20292        ///Sets `signature` with the provided value.
20293        pub fn with_signature<T: Into<super::UserSignature>>(
20294            mut self,
20295            field: T,
20296        ) -> Self {
20297            self.set_signature(field.into());
20298            self
20299        }
20300        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20301        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20302            self.address.as_mut().map(|field| field as _)
20303        }
20304        ///Returns a mutable reference to `address`.
20305        ///If the field is unset, it is first initialized with the default value.
20306        pub fn address_mut(&mut self) -> &mut String {
20307            self.address.get_or_insert_default()
20308        }
20309        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20310        pub fn address_opt(&self) -> Option<&str> {
20311            self.address.as_ref().map(|field| field as _)
20312        }
20313        ///Sets `address` with the provided value.
20314        pub fn set_address<T: Into<String>>(&mut self, field: T) {
20315            self.address = Some(field.into().into());
20316        }
20317        ///Sets `address` with the provided value.
20318        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20319            self.set_address(field.into());
20320            self
20321        }
20322        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
20323        pub fn jwks(&self) -> &[super::ActiveJwk] {
20324            &self.jwks
20325        }
20326        ///Returns a mutable reference to `jwks`.
20327        ///If the field is unset, it is first initialized with the default value.
20328        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20329            &mut self.jwks
20330        }
20331        ///Sets `jwks` with the provided value.
20332        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20333            self.jwks = field;
20334        }
20335        ///Sets `jwks` with the provided value.
20336        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20337            self.set_jwks(field);
20338            self
20339        }
20340    }
20341    impl super::VerifySignatureResponse {
20342        pub const fn const_default() -> Self {
20343            Self {
20344                is_valid: None,
20345                reason: None,
20346            }
20347        }
20348        #[doc(hidden)]
20349        pub fn default_instance() -> &'static Self {
20350            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20351            &DEFAULT
20352        }
20353        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20354        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20355            self.is_valid.as_mut().map(|field| field as _)
20356        }
20357        ///Returns a mutable reference to `is_valid`.
20358        ///If the field is unset, it is first initialized with the default value.
20359        pub fn is_valid_mut(&mut self) -> &mut bool {
20360            self.is_valid.get_or_insert_default()
20361        }
20362        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
20363        pub fn is_valid_opt(&self) -> Option<bool> {
20364            self.is_valid.as_ref().map(|field| *field)
20365        }
20366        ///Sets `is_valid` with the provided value.
20367        pub fn set_is_valid(&mut self, field: bool) {
20368            self.is_valid = Some(field);
20369        }
20370        ///Sets `is_valid` with the provided value.
20371        pub fn with_is_valid(mut self, field: bool) -> Self {
20372            self.set_is_valid(field);
20373            self
20374        }
20375        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20376        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20377            self.reason.as_mut().map(|field| field as _)
20378        }
20379        ///Returns a mutable reference to `reason`.
20380        ///If the field is unset, it is first initialized with the default value.
20381        pub fn reason_mut(&mut self) -> &mut String {
20382            self.reason.get_or_insert_default()
20383        }
20384        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
20385        pub fn reason_opt(&self) -> Option<&str> {
20386            self.reason.as_ref().map(|field| field as _)
20387        }
20388        ///Sets `reason` with the provided value.
20389        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20390            self.reason = Some(field.into().into());
20391        }
20392        ///Sets `reason` with the provided value.
20393        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20394            self.set_reason(field.into());
20395            self
20396        }
20397    }
20398    impl super::VersionAssignment {
20399        pub const fn const_default() -> Self {
20400            Self {
20401                object_id: None,
20402                start_version: None,
20403                version: None,
20404            }
20405        }
20406        #[doc(hidden)]
20407        pub fn default_instance() -> &'static Self {
20408            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20409            &DEFAULT
20410        }
20411        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20412        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20413            self.object_id.as_mut().map(|field| field as _)
20414        }
20415        ///Returns a mutable reference to `object_id`.
20416        ///If the field is unset, it is first initialized with the default value.
20417        pub fn object_id_mut(&mut self) -> &mut String {
20418            self.object_id.get_or_insert_default()
20419        }
20420        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20421        pub fn object_id_opt(&self) -> Option<&str> {
20422            self.object_id.as_ref().map(|field| field as _)
20423        }
20424        ///Sets `object_id` with the provided value.
20425        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20426            self.object_id = Some(field.into().into());
20427        }
20428        ///Sets `object_id` with the provided value.
20429        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20430            self.set_object_id(field.into());
20431            self
20432        }
20433        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20434        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20435            self.start_version.as_mut().map(|field| field as _)
20436        }
20437        ///Returns a mutable reference to `start_version`.
20438        ///If the field is unset, it is first initialized with the default value.
20439        pub fn start_version_mut(&mut self) -> &mut u64 {
20440            self.start_version.get_or_insert_default()
20441        }
20442        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20443        pub fn start_version_opt(&self) -> Option<u64> {
20444            self.start_version.as_ref().map(|field| *field)
20445        }
20446        ///Sets `start_version` with the provided value.
20447        pub fn set_start_version(&mut self, field: u64) {
20448            self.start_version = Some(field);
20449        }
20450        ///Sets `start_version` with the provided value.
20451        pub fn with_start_version(mut self, field: u64) -> Self {
20452            self.set_start_version(field);
20453            self
20454        }
20455        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20456        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20457            self.version.as_mut().map(|field| field as _)
20458        }
20459        ///Returns a mutable reference to `version`.
20460        ///If the field is unset, it is first initialized with the default value.
20461        pub fn version_mut(&mut self) -> &mut u64 {
20462            self.version.get_or_insert_default()
20463        }
20464        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
20465        pub fn version_opt(&self) -> Option<u64> {
20466            self.version.as_ref().map(|field| *field)
20467        }
20468        ///Sets `version` with the provided value.
20469        pub fn set_version(&mut self, field: u64) {
20470            self.version = Some(field);
20471        }
20472        ///Sets `version` with the provided value.
20473        pub fn with_version(mut self, field: u64) -> Self {
20474            self.set_version(field);
20475            self
20476        }
20477    }
20478    impl super::Watermark {
20479        pub const fn const_default() -> Self {
20480            Self {
20481                cursor: None,
20482                checkpoint: None,
20483            }
20484        }
20485        #[doc(hidden)]
20486        pub fn default_instance() -> &'static Self {
20487            static DEFAULT: super::Watermark = super::Watermark::const_default();
20488            &DEFAULT
20489        }
20490        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
20491        pub fn cursor_opt(&self) -> Option<&[u8]> {
20492            self.cursor.as_ref().map(|field| field as _)
20493        }
20494        ///Sets `cursor` with the provided value.
20495        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20496            self.cursor = Some(field.into().into());
20497        }
20498        ///Sets `cursor` with the provided value.
20499        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20500            self.set_cursor(field.into());
20501            self
20502        }
20503        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20504        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20505            self.checkpoint.as_mut().map(|field| field as _)
20506        }
20507        ///Returns a mutable reference to `checkpoint`.
20508        ///If the field is unset, it is first initialized with the default value.
20509        pub fn checkpoint_mut(&mut self) -> &mut u64 {
20510            self.checkpoint.get_or_insert_default()
20511        }
20512        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
20513        pub fn checkpoint_opt(&self) -> Option<u64> {
20514            self.checkpoint.as_ref().map(|field| *field)
20515        }
20516        ///Sets `checkpoint` with the provided value.
20517        pub fn set_checkpoint(&mut self, field: u64) {
20518            self.checkpoint = Some(field);
20519        }
20520        ///Sets `checkpoint` with the provided value.
20521        pub fn with_checkpoint(mut self, field: u64) -> Self {
20522            self.set_checkpoint(field);
20523            self
20524        }
20525    }
20526    impl super::ZkLoginAuthenticator {
20527        pub const fn const_default() -> Self {
20528            Self {
20529                inputs: None,
20530                max_epoch: None,
20531                signature: None,
20532                public_identifier: None,
20533                jwk_id: None,
20534            }
20535        }
20536        #[doc(hidden)]
20537        pub fn default_instance() -> &'static Self {
20538            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20539            &DEFAULT
20540        }
20541        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
20542        pub fn inputs(&self) -> &super::ZkLoginInputs {
20543            self.inputs
20544                .as_ref()
20545                .map(|field| field as _)
20546                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20547        }
20548        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20549        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20550            self.inputs.as_mut().map(|field| field as _)
20551        }
20552        ///Returns a mutable reference to `inputs`.
20553        ///If the field is unset, it is first initialized with the default value.
20554        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20555            self.inputs.get_or_insert_default()
20556        }
20557        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
20558        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20559            self.inputs.as_ref().map(|field| field as _)
20560        }
20561        ///Sets `inputs` with the provided value.
20562        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20563            self.inputs = Some(field.into().into());
20564        }
20565        ///Sets `inputs` with the provided value.
20566        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20567            self.set_inputs(field.into());
20568            self
20569        }
20570        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20571        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20572            self.max_epoch.as_mut().map(|field| field as _)
20573        }
20574        ///Returns a mutable reference to `max_epoch`.
20575        ///If the field is unset, it is first initialized with the default value.
20576        pub fn max_epoch_mut(&mut self) -> &mut u64 {
20577            self.max_epoch.get_or_insert_default()
20578        }
20579        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
20580        pub fn max_epoch_opt(&self) -> Option<u64> {
20581            self.max_epoch.as_ref().map(|field| *field)
20582        }
20583        ///Sets `max_epoch` with the provided value.
20584        pub fn set_max_epoch(&mut self, field: u64) {
20585            self.max_epoch = Some(field);
20586        }
20587        ///Sets `max_epoch` with the provided value.
20588        pub fn with_max_epoch(mut self, field: u64) -> Self {
20589            self.set_max_epoch(field);
20590            self
20591        }
20592        ///Returns the value of `signature`, or the default value if `signature` is unset.
20593        pub fn signature(&self) -> &super::SimpleSignature {
20594            self.signature
20595                .as_ref()
20596                .map(|field| field as _)
20597                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20598        }
20599        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20600        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20601            self.signature.as_mut().map(|field| field as _)
20602        }
20603        ///Returns a mutable reference to `signature`.
20604        ///If the field is unset, it is first initialized with the default value.
20605        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20606            self.signature.get_or_insert_default()
20607        }
20608        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
20609        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20610            self.signature.as_ref().map(|field| field as _)
20611        }
20612        ///Sets `signature` with the provided value.
20613        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20614            self.signature = Some(field.into().into());
20615        }
20616        ///Sets `signature` with the provided value.
20617        pub fn with_signature<T: Into<super::SimpleSignature>>(
20618            mut self,
20619            field: T,
20620        ) -> Self {
20621            self.set_signature(field.into());
20622            self
20623        }
20624        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
20625        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20626            self.public_identifier
20627                .as_ref()
20628                .map(|field| field as _)
20629                .unwrap_or_else(|| {
20630                    super::ZkLoginPublicIdentifier::default_instance() as _
20631                })
20632        }
20633        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20634        pub fn public_identifier_opt_mut(
20635            &mut self,
20636        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20637            self.public_identifier.as_mut().map(|field| field as _)
20638        }
20639        ///Returns a mutable reference to `public_identifier`.
20640        ///If the field is unset, it is first initialized with the default value.
20641        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20642            self.public_identifier.get_or_insert_default()
20643        }
20644        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
20645        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20646            self.public_identifier.as_ref().map(|field| field as _)
20647        }
20648        ///Sets `public_identifier` with the provided value.
20649        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20650            &mut self,
20651            field: T,
20652        ) {
20653            self.public_identifier = Some(field.into().into());
20654        }
20655        ///Sets `public_identifier` with the provided value.
20656        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20657            mut self,
20658            field: T,
20659        ) -> Self {
20660            self.set_public_identifier(field.into());
20661            self
20662        }
20663        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
20664        pub fn jwk_id(&self) -> &super::JwkId {
20665            self.jwk_id
20666                .as_ref()
20667                .map(|field| field as _)
20668                .unwrap_or_else(|| super::JwkId::default_instance() as _)
20669        }
20670        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20671        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20672            self.jwk_id.as_mut().map(|field| field as _)
20673        }
20674        ///Returns a mutable reference to `jwk_id`.
20675        ///If the field is unset, it is first initialized with the default value.
20676        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20677            self.jwk_id.get_or_insert_default()
20678        }
20679        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20680        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20681            self.jwk_id.as_ref().map(|field| field as _)
20682        }
20683        ///Sets `jwk_id` with the provided value.
20684        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20685            self.jwk_id = Some(field.into().into());
20686        }
20687        ///Sets `jwk_id` with the provided value.
20688        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20689            self.set_jwk_id(field.into());
20690            self
20691        }
20692    }
20693    impl super::ZkLoginClaim {
20694        pub const fn const_default() -> Self {
20695            Self {
20696                value: None,
20697                index_mod_4: None,
20698            }
20699        }
20700        #[doc(hidden)]
20701        pub fn default_instance() -> &'static Self {
20702            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20703            &DEFAULT
20704        }
20705        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20706        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20707            self.value.as_mut().map(|field| field as _)
20708        }
20709        ///Returns a mutable reference to `value`.
20710        ///If the field is unset, it is first initialized with the default value.
20711        pub fn value_mut(&mut self) -> &mut String {
20712            self.value.get_or_insert_default()
20713        }
20714        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
20715        pub fn value_opt(&self) -> Option<&str> {
20716            self.value.as_ref().map(|field| field as _)
20717        }
20718        ///Sets `value` with the provided value.
20719        pub fn set_value<T: Into<String>>(&mut self, field: T) {
20720            self.value = Some(field.into().into());
20721        }
20722        ///Sets `value` with the provided value.
20723        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20724            self.set_value(field.into());
20725            self
20726        }
20727        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20728        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20729            self.index_mod_4.as_mut().map(|field| field as _)
20730        }
20731        ///Returns a mutable reference to `index_mod_4`.
20732        ///If the field is unset, it is first initialized with the default value.
20733        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20734            self.index_mod_4.get_or_insert_default()
20735        }
20736        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
20737        pub fn index_mod_4_opt(&self) -> Option<u32> {
20738            self.index_mod_4.as_ref().map(|field| *field)
20739        }
20740        ///Sets `index_mod_4` with the provided value.
20741        pub fn set_index_mod_4(&mut self, field: u32) {
20742            self.index_mod_4 = Some(field);
20743        }
20744        ///Sets `index_mod_4` with the provided value.
20745        pub fn with_index_mod_4(mut self, field: u32) -> Self {
20746            self.set_index_mod_4(field);
20747            self
20748        }
20749    }
20750    impl super::ZkLoginInputs {
20751        pub const fn const_default() -> Self {
20752            Self {
20753                proof_points: None,
20754                iss_base64_details: None,
20755                header_base64: None,
20756                address_seed: None,
20757            }
20758        }
20759        #[doc(hidden)]
20760        pub fn default_instance() -> &'static Self {
20761            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20762            &DEFAULT
20763        }
20764        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
20765        pub fn proof_points(&self) -> &super::ZkLoginProof {
20766            self.proof_points
20767                .as_ref()
20768                .map(|field| field as _)
20769                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20770        }
20771        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20772        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20773            self.proof_points.as_mut().map(|field| field as _)
20774        }
20775        ///Returns a mutable reference to `proof_points`.
20776        ///If the field is unset, it is first initialized with the default value.
20777        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20778            self.proof_points.get_or_insert_default()
20779        }
20780        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
20781        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20782            self.proof_points.as_ref().map(|field| field as _)
20783        }
20784        ///Sets `proof_points` with the provided value.
20785        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20786            self.proof_points = Some(field.into().into());
20787        }
20788        ///Sets `proof_points` with the provided value.
20789        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20790            mut self,
20791            field: T,
20792        ) -> Self {
20793            self.set_proof_points(field.into());
20794            self
20795        }
20796        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
20797        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20798            self.iss_base64_details
20799                .as_ref()
20800                .map(|field| field as _)
20801                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20802        }
20803        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20804        pub fn iss_base64_details_opt_mut(
20805            &mut self,
20806        ) -> Option<&mut super::ZkLoginClaim> {
20807            self.iss_base64_details.as_mut().map(|field| field as _)
20808        }
20809        ///Returns a mutable reference to `iss_base64_details`.
20810        ///If the field is unset, it is first initialized with the default value.
20811        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20812            self.iss_base64_details.get_or_insert_default()
20813        }
20814        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
20815        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20816            self.iss_base64_details.as_ref().map(|field| field as _)
20817        }
20818        ///Sets `iss_base64_details` with the provided value.
20819        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20820            &mut self,
20821            field: T,
20822        ) {
20823            self.iss_base64_details = Some(field.into().into());
20824        }
20825        ///Sets `iss_base64_details` with the provided value.
20826        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20827            mut self,
20828            field: T,
20829        ) -> Self {
20830            self.set_iss_base64_details(field.into());
20831            self
20832        }
20833        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20834        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20835            self.header_base64.as_mut().map(|field| field as _)
20836        }
20837        ///Returns a mutable reference to `header_base64`.
20838        ///If the field is unset, it is first initialized with the default value.
20839        pub fn header_base64_mut(&mut self) -> &mut String {
20840            self.header_base64.get_or_insert_default()
20841        }
20842        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
20843        pub fn header_base64_opt(&self) -> Option<&str> {
20844            self.header_base64.as_ref().map(|field| field as _)
20845        }
20846        ///Sets `header_base64` with the provided value.
20847        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20848            self.header_base64 = Some(field.into().into());
20849        }
20850        ///Sets `header_base64` with the provided value.
20851        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20852            self.set_header_base64(field.into());
20853            self
20854        }
20855        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20856        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20857            self.address_seed.as_mut().map(|field| field as _)
20858        }
20859        ///Returns a mutable reference to `address_seed`.
20860        ///If the field is unset, it is first initialized with the default value.
20861        pub fn address_seed_mut(&mut self) -> &mut String {
20862            self.address_seed.get_or_insert_default()
20863        }
20864        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
20865        pub fn address_seed_opt(&self) -> Option<&str> {
20866            self.address_seed.as_ref().map(|field| field as _)
20867        }
20868        ///Sets `address_seed` with the provided value.
20869        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20870            self.address_seed = Some(field.into().into());
20871        }
20872        ///Sets `address_seed` with the provided value.
20873        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20874            self.set_address_seed(field.into());
20875            self
20876        }
20877    }
20878    impl super::ZkLoginProof {
20879        pub const fn const_default() -> Self {
20880            Self { a: None, b: None, c: None }
20881        }
20882        #[doc(hidden)]
20883        pub fn default_instance() -> &'static Self {
20884            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20885            &DEFAULT
20886        }
20887        ///Returns the value of `a`, or the default value if `a` is unset.
20888        pub fn a(&self) -> &super::CircomG1 {
20889            self.a
20890                .as_ref()
20891                .map(|field| field as _)
20892                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20893        }
20894        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20895        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20896            self.a.as_mut().map(|field| field as _)
20897        }
20898        ///Returns a mutable reference to `a`.
20899        ///If the field is unset, it is first initialized with the default value.
20900        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20901            self.a.get_or_insert_default()
20902        }
20903        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
20904        pub fn a_opt(&self) -> Option<&super::CircomG1> {
20905            self.a.as_ref().map(|field| field as _)
20906        }
20907        ///Sets `a` with the provided value.
20908        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20909            self.a = Some(field.into().into());
20910        }
20911        ///Sets `a` with the provided value.
20912        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20913            self.set_a(field.into());
20914            self
20915        }
20916        ///Returns the value of `b`, or the default value if `b` is unset.
20917        pub fn b(&self) -> &super::CircomG2 {
20918            self.b
20919                .as_ref()
20920                .map(|field| field as _)
20921                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20922        }
20923        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20924        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20925            self.b.as_mut().map(|field| field as _)
20926        }
20927        ///Returns a mutable reference to `b`.
20928        ///If the field is unset, it is first initialized with the default value.
20929        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20930            self.b.get_or_insert_default()
20931        }
20932        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
20933        pub fn b_opt(&self) -> Option<&super::CircomG2> {
20934            self.b.as_ref().map(|field| field as _)
20935        }
20936        ///Sets `b` with the provided value.
20937        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20938            self.b = Some(field.into().into());
20939        }
20940        ///Sets `b` with the provided value.
20941        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20942            self.set_b(field.into());
20943            self
20944        }
20945        ///Returns the value of `c`, or the default value if `c` is unset.
20946        pub fn c(&self) -> &super::CircomG1 {
20947            self.c
20948                .as_ref()
20949                .map(|field| field as _)
20950                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20951        }
20952        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20953        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20954            self.c.as_mut().map(|field| field as _)
20955        }
20956        ///Returns a mutable reference to `c`.
20957        ///If the field is unset, it is first initialized with the default value.
20958        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20959            self.c.get_or_insert_default()
20960        }
20961        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
20962        pub fn c_opt(&self) -> Option<&super::CircomG1> {
20963            self.c.as_ref().map(|field| field as _)
20964        }
20965        ///Sets `c` with the provided value.
20966        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20967            self.c = Some(field.into().into());
20968        }
20969        ///Sets `c` with the provided value.
20970        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20971            self.set_c(field.into());
20972            self
20973        }
20974    }
20975    impl super::ZkLoginPublicIdentifier {
20976        pub const fn const_default() -> Self {
20977            Self {
20978                iss: None,
20979                address_seed: None,
20980            }
20981        }
20982        #[doc(hidden)]
20983        pub fn default_instance() -> &'static Self {
20984            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20985            &DEFAULT
20986        }
20987        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20988        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20989            self.iss.as_mut().map(|field| field as _)
20990        }
20991        ///Returns a mutable reference to `iss`.
20992        ///If the field is unset, it is first initialized with the default value.
20993        pub fn iss_mut(&mut self) -> &mut String {
20994            self.iss.get_or_insert_default()
20995        }
20996        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
20997        pub fn iss_opt(&self) -> Option<&str> {
20998            self.iss.as_ref().map(|field| field as _)
20999        }
21000        ///Sets `iss` with the provided value.
21001        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
21002            self.iss = Some(field.into().into());
21003        }
21004        ///Sets `iss` with the provided value.
21005        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
21006            self.set_iss(field.into());
21007            self
21008        }
21009        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21010        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
21011            self.address_seed.as_mut().map(|field| field as _)
21012        }
21013        ///Returns a mutable reference to `address_seed`.
21014        ///If the field is unset, it is first initialized with the default value.
21015        pub fn address_seed_mut(&mut self) -> &mut String {
21016            self.address_seed.get_or_insert_default()
21017        }
21018        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
21019        pub fn address_seed_opt(&self) -> Option<&str> {
21020            self.address_seed.as_ref().map(|field| field as _)
21021        }
21022        ///Sets `address_seed` with the provided value.
21023        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
21024            self.address_seed = Some(field.into().into());
21025        }
21026        ///Sets `address_seed` with the provided value.
21027        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
21028            self.set_address_seed(field.into());
21029            self
21030        }
21031    }
21032}