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                transaction_start_inclusive: None,
5022                transaction_end_exclusive: None,
5023                ended_in_safe_mode: None,
5024                system_epoch_info: None,
5025                epoch_commitments: Vec::new(),
5026            }
5027        }
5028        #[doc(hidden)]
5029        pub fn default_instance() -> &'static Self {
5030            static DEFAULT: super::Epoch = super::Epoch::const_default();
5031            &DEFAULT
5032        }
5033        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5034        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
5035            self.epoch.as_mut().map(|field| field as _)
5036        }
5037        ///Returns a mutable reference to `epoch`.
5038        ///If the field is unset, it is first initialized with the default value.
5039        pub fn epoch_mut(&mut self) -> &mut u64 {
5040            self.epoch.get_or_insert_default()
5041        }
5042        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
5043        pub fn epoch_opt(&self) -> Option<u64> {
5044            self.epoch.as_ref().map(|field| *field)
5045        }
5046        ///Sets `epoch` with the provided value.
5047        pub fn set_epoch(&mut self, field: u64) {
5048            self.epoch = Some(field);
5049        }
5050        ///Sets `epoch` with the provided value.
5051        pub fn with_epoch(mut self, field: u64) -> Self {
5052            self.set_epoch(field);
5053            self
5054        }
5055        ///Returns the value of `committee`, or the default value if `committee` is unset.
5056        pub fn committee(&self) -> &super::ValidatorCommittee {
5057            self.committee
5058                .as_ref()
5059                .map(|field| field as _)
5060                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5061        }
5062        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5063        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5064            self.committee.as_mut().map(|field| field as _)
5065        }
5066        ///Returns a mutable reference to `committee`.
5067        ///If the field is unset, it is first initialized with the default value.
5068        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5069            self.committee.get_or_insert_default()
5070        }
5071        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
5072        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5073            self.committee.as_ref().map(|field| field as _)
5074        }
5075        ///Sets `committee` with the provided value.
5076        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5077            self.committee = Some(field.into().into());
5078        }
5079        ///Sets `committee` with the provided value.
5080        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5081            mut self,
5082            field: T,
5083        ) -> Self {
5084            self.set_committee(field.into());
5085            self
5086        }
5087        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
5088        pub fn system_state(&self) -> &super::SystemState {
5089            self.system_state
5090                .as_ref()
5091                .map(|field| field as _)
5092                .unwrap_or_else(|| super::SystemState::default_instance() as _)
5093        }
5094        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5095        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5096            self.system_state.as_mut().map(|field| field as _)
5097        }
5098        ///Returns a mutable reference to `system_state`.
5099        ///If the field is unset, it is first initialized with the default value.
5100        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5101            self.system_state.get_or_insert_default()
5102        }
5103        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
5104        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5105            self.system_state.as_ref().map(|field| field as _)
5106        }
5107        ///Sets `system_state` with the provided value.
5108        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5109            self.system_state = Some(field.into().into());
5110        }
5111        ///Sets `system_state` with the provided value.
5112        pub fn with_system_state<T: Into<super::SystemState>>(
5113            mut self,
5114            field: T,
5115        ) -> Self {
5116            self.set_system_state(field.into());
5117            self
5118        }
5119        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5120        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5121            self.first_checkpoint.as_mut().map(|field| field as _)
5122        }
5123        ///Returns a mutable reference to `first_checkpoint`.
5124        ///If the field is unset, it is first initialized with the default value.
5125        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5126            self.first_checkpoint.get_or_insert_default()
5127        }
5128        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5129        pub fn first_checkpoint_opt(&self) -> Option<u64> {
5130            self.first_checkpoint.as_ref().map(|field| *field)
5131        }
5132        ///Sets `first_checkpoint` with the provided value.
5133        pub fn set_first_checkpoint(&mut self, field: u64) {
5134            self.first_checkpoint = Some(field);
5135        }
5136        ///Sets `first_checkpoint` with the provided value.
5137        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5138            self.set_first_checkpoint(field);
5139            self
5140        }
5141        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5142        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5143            self.last_checkpoint.as_mut().map(|field| field as _)
5144        }
5145        ///Returns a mutable reference to `last_checkpoint`.
5146        ///If the field is unset, it is first initialized with the default value.
5147        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5148            self.last_checkpoint.get_or_insert_default()
5149        }
5150        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5151        pub fn last_checkpoint_opt(&self) -> Option<u64> {
5152            self.last_checkpoint.as_ref().map(|field| *field)
5153        }
5154        ///Sets `last_checkpoint` with the provided value.
5155        pub fn set_last_checkpoint(&mut self, field: u64) {
5156            self.last_checkpoint = Some(field);
5157        }
5158        ///Sets `last_checkpoint` with the provided value.
5159        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5160            self.set_last_checkpoint(field);
5161            self
5162        }
5163        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5164        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5165            self.start.as_mut().map(|field| field as _)
5166        }
5167        ///Returns a mutable reference to `start`.
5168        ///If the field is unset, it is first initialized with the default value.
5169        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5170            self.start.get_or_insert_default()
5171        }
5172        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
5173        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5174            self.start.as_ref().map(|field| field as _)
5175        }
5176        ///Sets `start` with the provided value.
5177        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5178            self.start = Some(field.into().into());
5179        }
5180        ///Sets `start` with the provided value.
5181        pub fn with_start<T: Into<::prost_types::Timestamp>>(
5182            mut self,
5183            field: T,
5184        ) -> Self {
5185            self.set_start(field.into());
5186            self
5187        }
5188        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5189        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5190            self.end.as_mut().map(|field| field as _)
5191        }
5192        ///Returns a mutable reference to `end`.
5193        ///If the field is unset, it is first initialized with the default value.
5194        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5195            self.end.get_or_insert_default()
5196        }
5197        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
5198        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5199            self.end.as_ref().map(|field| field as _)
5200        }
5201        ///Sets `end` with the provided value.
5202        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5203            self.end = Some(field.into().into());
5204        }
5205        ///Sets `end` with the provided value.
5206        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5207            self.set_end(field.into());
5208            self
5209        }
5210        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5211        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5212            self.reference_gas_price.as_mut().map(|field| field as _)
5213        }
5214        ///Returns a mutable reference to `reference_gas_price`.
5215        ///If the field is unset, it is first initialized with the default value.
5216        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5217            self.reference_gas_price.get_or_insert_default()
5218        }
5219        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
5220        pub fn reference_gas_price_opt(&self) -> Option<u64> {
5221            self.reference_gas_price.as_ref().map(|field| *field)
5222        }
5223        ///Sets `reference_gas_price` with the provided value.
5224        pub fn set_reference_gas_price(&mut self, field: u64) {
5225            self.reference_gas_price = Some(field);
5226        }
5227        ///Sets `reference_gas_price` with the provided value.
5228        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5229            self.set_reference_gas_price(field);
5230            self
5231        }
5232        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
5233        pub fn protocol_config(&self) -> &super::ProtocolConfig {
5234            self.protocol_config
5235                .as_ref()
5236                .map(|field| field as _)
5237                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5238        }
5239        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5240        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5241            self.protocol_config.as_mut().map(|field| field as _)
5242        }
5243        ///Returns a mutable reference to `protocol_config`.
5244        ///If the field is unset, it is first initialized with the default value.
5245        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5246            self.protocol_config.get_or_insert_default()
5247        }
5248        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
5249        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5250            self.protocol_config.as_ref().map(|field| field as _)
5251        }
5252        ///Sets `protocol_config` with the provided value.
5253        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5254            self.protocol_config = Some(field.into().into());
5255        }
5256        ///Sets `protocol_config` with the provided value.
5257        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5258            mut self,
5259            field: T,
5260        ) -> Self {
5261            self.set_protocol_config(field.into());
5262            self
5263        }
5264        ///If `transaction_start_inclusive` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5265        pub fn transaction_start_inclusive_opt_mut(&mut self) -> Option<&mut u64> {
5266            self.transaction_start_inclusive.as_mut().map(|field| field as _)
5267        }
5268        ///Returns a mutable reference to `transaction_start_inclusive`.
5269        ///If the field is unset, it is first initialized with the default value.
5270        pub fn transaction_start_inclusive_mut(&mut self) -> &mut u64 {
5271            self.transaction_start_inclusive.get_or_insert_default()
5272        }
5273        ///If `transaction_start_inclusive` is set, returns [`Some`] with the value; otherwise returns [`None`].
5274        pub fn transaction_start_inclusive_opt(&self) -> Option<u64> {
5275            self.transaction_start_inclusive.as_ref().map(|field| *field)
5276        }
5277        ///Sets `transaction_start_inclusive` with the provided value.
5278        pub fn set_transaction_start_inclusive(&mut self, field: u64) {
5279            self.transaction_start_inclusive = Some(field);
5280        }
5281        ///Sets `transaction_start_inclusive` with the provided value.
5282        pub fn with_transaction_start_inclusive(mut self, field: u64) -> Self {
5283            self.set_transaction_start_inclusive(field);
5284            self
5285        }
5286        ///If `transaction_end_exclusive` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5287        pub fn transaction_end_exclusive_opt_mut(&mut self) -> Option<&mut u64> {
5288            self.transaction_end_exclusive.as_mut().map(|field| field as _)
5289        }
5290        ///Returns a mutable reference to `transaction_end_exclusive`.
5291        ///If the field is unset, it is first initialized with the default value.
5292        pub fn transaction_end_exclusive_mut(&mut self) -> &mut u64 {
5293            self.transaction_end_exclusive.get_or_insert_default()
5294        }
5295        ///If `transaction_end_exclusive` is set, returns [`Some`] with the value; otherwise returns [`None`].
5296        pub fn transaction_end_exclusive_opt(&self) -> Option<u64> {
5297            self.transaction_end_exclusive.as_ref().map(|field| *field)
5298        }
5299        ///Sets `transaction_end_exclusive` with the provided value.
5300        pub fn set_transaction_end_exclusive(&mut self, field: u64) {
5301            self.transaction_end_exclusive = Some(field);
5302        }
5303        ///Sets `transaction_end_exclusive` with the provided value.
5304        pub fn with_transaction_end_exclusive(mut self, field: u64) -> Self {
5305            self.set_transaction_end_exclusive(field);
5306            self
5307        }
5308        ///If `ended_in_safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5309        pub fn ended_in_safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
5310            self.ended_in_safe_mode.as_mut().map(|field| field as _)
5311        }
5312        ///Returns a mutable reference to `ended_in_safe_mode`.
5313        ///If the field is unset, it is first initialized with the default value.
5314        pub fn ended_in_safe_mode_mut(&mut self) -> &mut bool {
5315            self.ended_in_safe_mode.get_or_insert_default()
5316        }
5317        ///If `ended_in_safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
5318        pub fn ended_in_safe_mode_opt(&self) -> Option<bool> {
5319            self.ended_in_safe_mode.as_ref().map(|field| *field)
5320        }
5321        ///Sets `ended_in_safe_mode` with the provided value.
5322        pub fn set_ended_in_safe_mode(&mut self, field: bool) {
5323            self.ended_in_safe_mode = Some(field);
5324        }
5325        ///Sets `ended_in_safe_mode` with the provided value.
5326        pub fn with_ended_in_safe_mode(mut self, field: bool) -> Self {
5327            self.set_ended_in_safe_mode(field);
5328            self
5329        }
5330        ///Returns the value of `system_epoch_info`, or the default value if `system_epoch_info` is unset.
5331        pub fn system_epoch_info(&self) -> &super::SystemEpochInfo {
5332            self.system_epoch_info
5333                .as_ref()
5334                .map(|field| field as _)
5335                .unwrap_or_else(|| super::SystemEpochInfo::default_instance() as _)
5336        }
5337        ///If `system_epoch_info` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5338        pub fn system_epoch_info_opt_mut(
5339            &mut self,
5340        ) -> Option<&mut super::SystemEpochInfo> {
5341            self.system_epoch_info.as_mut().map(|field| field as _)
5342        }
5343        ///Returns a mutable reference to `system_epoch_info`.
5344        ///If the field is unset, it is first initialized with the default value.
5345        pub fn system_epoch_info_mut(&mut self) -> &mut super::SystemEpochInfo {
5346            self.system_epoch_info.get_or_insert_default()
5347        }
5348        ///If `system_epoch_info` is set, returns [`Some`] with the value; otherwise returns [`None`].
5349        pub fn system_epoch_info_opt(&self) -> Option<&super::SystemEpochInfo> {
5350            self.system_epoch_info.as_ref().map(|field| field as _)
5351        }
5352        ///Sets `system_epoch_info` with the provided value.
5353        pub fn set_system_epoch_info<T: Into<super::SystemEpochInfo>>(
5354            &mut self,
5355            field: T,
5356        ) {
5357            self.system_epoch_info = Some(field.into().into());
5358        }
5359        ///Sets `system_epoch_info` with the provided value.
5360        pub fn with_system_epoch_info<T: Into<super::SystemEpochInfo>>(
5361            mut self,
5362            field: T,
5363        ) -> Self {
5364            self.set_system_epoch_info(field.into());
5365            self
5366        }
5367        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
5368        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
5369            &self.epoch_commitments
5370        }
5371        ///Returns a mutable reference to `epoch_commitments`.
5372        ///If the field is unset, it is first initialized with the default value.
5373        pub fn epoch_commitments_mut(
5374            &mut self,
5375        ) -> &mut Vec<super::CheckpointCommitment> {
5376            &mut self.epoch_commitments
5377        }
5378        ///Sets `epoch_commitments` with the provided value.
5379        pub fn set_epoch_commitments(
5380            &mut self,
5381            field: Vec<super::CheckpointCommitment>,
5382        ) {
5383            self.epoch_commitments = field;
5384        }
5385        ///Sets `epoch_commitments` with the provided value.
5386        pub fn with_epoch_commitments(
5387            mut self,
5388            field: Vec<super::CheckpointCommitment>,
5389        ) -> Self {
5390            self.set_epoch_commitments(field);
5391            self
5392        }
5393    }
5394    impl super::Event {
5395        pub const fn const_default() -> Self {
5396            Self {
5397                package_id: None,
5398                module: None,
5399                sender: None,
5400                event_type: None,
5401                contents: None,
5402                json: None,
5403                checkpoint: None,
5404                transaction_digest: None,
5405                transaction_index: None,
5406                event_index: None,
5407            }
5408        }
5409        #[doc(hidden)]
5410        pub fn default_instance() -> &'static Self {
5411            static DEFAULT: super::Event = super::Event::const_default();
5412            &DEFAULT
5413        }
5414        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5415        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5416            self.package_id.as_mut().map(|field| field as _)
5417        }
5418        ///Returns a mutable reference to `package_id`.
5419        ///If the field is unset, it is first initialized with the default value.
5420        pub fn package_id_mut(&mut self) -> &mut String {
5421            self.package_id.get_or_insert_default()
5422        }
5423        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5424        pub fn package_id_opt(&self) -> Option<&str> {
5425            self.package_id.as_ref().map(|field| field as _)
5426        }
5427        ///Sets `package_id` with the provided value.
5428        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5429            self.package_id = Some(field.into().into());
5430        }
5431        ///Sets `package_id` with the provided value.
5432        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5433            self.set_package_id(field.into());
5434            self
5435        }
5436        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5437        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5438            self.module.as_mut().map(|field| field as _)
5439        }
5440        ///Returns a mutable reference to `module`.
5441        ///If the field is unset, it is first initialized with the default value.
5442        pub fn module_mut(&mut self) -> &mut String {
5443            self.module.get_or_insert_default()
5444        }
5445        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5446        pub fn module_opt(&self) -> Option<&str> {
5447            self.module.as_ref().map(|field| field as _)
5448        }
5449        ///Sets `module` with the provided value.
5450        pub fn set_module<T: Into<String>>(&mut self, field: T) {
5451            self.module = Some(field.into().into());
5452        }
5453        ///Sets `module` with the provided value.
5454        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5455            self.set_module(field.into());
5456            self
5457        }
5458        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5459        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5460            self.sender.as_mut().map(|field| field as _)
5461        }
5462        ///Returns a mutable reference to `sender`.
5463        ///If the field is unset, it is first initialized with the default value.
5464        pub fn sender_mut(&mut self) -> &mut String {
5465            self.sender.get_or_insert_default()
5466        }
5467        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5468        pub fn sender_opt(&self) -> Option<&str> {
5469            self.sender.as_ref().map(|field| field as _)
5470        }
5471        ///Sets `sender` with the provided value.
5472        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5473            self.sender = Some(field.into().into());
5474        }
5475        ///Sets `sender` with the provided value.
5476        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5477            self.set_sender(field.into());
5478            self
5479        }
5480        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5481        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5482            self.event_type.as_mut().map(|field| field as _)
5483        }
5484        ///Returns a mutable reference to `event_type`.
5485        ///If the field is unset, it is first initialized with the default value.
5486        pub fn event_type_mut(&mut self) -> &mut String {
5487            self.event_type.get_or_insert_default()
5488        }
5489        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5490        pub fn event_type_opt(&self) -> Option<&str> {
5491            self.event_type.as_ref().map(|field| field as _)
5492        }
5493        ///Sets `event_type` with the provided value.
5494        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5495            self.event_type = Some(field.into().into());
5496        }
5497        ///Sets `event_type` with the provided value.
5498        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5499            self.set_event_type(field.into());
5500            self
5501        }
5502        ///Returns the value of `contents`, or the default value if `contents` is unset.
5503        pub fn contents(&self) -> &super::Bcs {
5504            self.contents
5505                .as_ref()
5506                .map(|field| field as _)
5507                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5508        }
5509        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5510        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5511            self.contents.as_mut().map(|field| field as _)
5512        }
5513        ///Returns a mutable reference to `contents`.
5514        ///If the field is unset, it is first initialized with the default value.
5515        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5516            self.contents.get_or_insert_default()
5517        }
5518        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5519        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5520            self.contents.as_ref().map(|field| field as _)
5521        }
5522        ///Sets `contents` with the provided value.
5523        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5524            self.contents = Some(field.into().into());
5525        }
5526        ///Sets `contents` with the provided value.
5527        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5528            self.set_contents(field.into());
5529            self
5530        }
5531        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5532        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5533            self.json.as_mut().map(|field| field as _)
5534        }
5535        ///Returns a mutable reference to `json`.
5536        ///If the field is unset, it is first initialized with the default value.
5537        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5538            self.json.get_or_insert_default()
5539        }
5540        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5541        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5542            self.json.as_ref().map(|field| field as _)
5543        }
5544        ///Sets `json` with the provided value.
5545        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5546            self.json = Some(field.into().into());
5547        }
5548        ///Sets `json` with the provided value.
5549        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5550            self.set_json(field.into());
5551            self
5552        }
5553        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5554        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5555            self.checkpoint.as_mut().map(|field| field as _)
5556        }
5557        ///Returns a mutable reference to `checkpoint`.
5558        ///If the field is unset, it is first initialized with the default value.
5559        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5560            self.checkpoint.get_or_insert_default()
5561        }
5562        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5563        pub fn checkpoint_opt(&self) -> Option<u64> {
5564            self.checkpoint.as_ref().map(|field| *field)
5565        }
5566        ///Sets `checkpoint` with the provided value.
5567        pub fn set_checkpoint(&mut self, field: u64) {
5568            self.checkpoint = Some(field);
5569        }
5570        ///Sets `checkpoint` with the provided value.
5571        pub fn with_checkpoint(mut self, field: u64) -> Self {
5572            self.set_checkpoint(field);
5573            self
5574        }
5575        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5576        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5577            self.transaction_digest.as_mut().map(|field| field as _)
5578        }
5579        ///Returns a mutable reference to `transaction_digest`.
5580        ///If the field is unset, it is first initialized with the default value.
5581        pub fn transaction_digest_mut(&mut self) -> &mut String {
5582            self.transaction_digest.get_or_insert_default()
5583        }
5584        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5585        pub fn transaction_digest_opt(&self) -> Option<&str> {
5586            self.transaction_digest.as_ref().map(|field| field as _)
5587        }
5588        ///Sets `transaction_digest` with the provided value.
5589        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5590            self.transaction_digest = Some(field.into().into());
5591        }
5592        ///Sets `transaction_digest` with the provided value.
5593        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5594            self.set_transaction_digest(field.into());
5595            self
5596        }
5597        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5598        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5599            self.transaction_index.as_mut().map(|field| field as _)
5600        }
5601        ///Returns a mutable reference to `transaction_index`.
5602        ///If the field is unset, it is first initialized with the default value.
5603        pub fn transaction_index_mut(&mut self) -> &mut u64 {
5604            self.transaction_index.get_or_insert_default()
5605        }
5606        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5607        pub fn transaction_index_opt(&self) -> Option<u64> {
5608            self.transaction_index.as_ref().map(|field| *field)
5609        }
5610        ///Sets `transaction_index` with the provided value.
5611        pub fn set_transaction_index(&mut self, field: u64) {
5612            self.transaction_index = Some(field);
5613        }
5614        ///Sets `transaction_index` with the provided value.
5615        pub fn with_transaction_index(mut self, field: u64) -> Self {
5616            self.set_transaction_index(field);
5617            self
5618        }
5619        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5620        pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5621            self.event_index.as_mut().map(|field| field as _)
5622        }
5623        ///Returns a mutable reference to `event_index`.
5624        ///If the field is unset, it is first initialized with the default value.
5625        pub fn event_index_mut(&mut self) -> &mut u32 {
5626            self.event_index.get_or_insert_default()
5627        }
5628        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5629        pub fn event_index_opt(&self) -> Option<u32> {
5630            self.event_index.as_ref().map(|field| *field)
5631        }
5632        ///Sets `event_index` with the provided value.
5633        pub fn set_event_index(&mut self, field: u32) {
5634            self.event_index = Some(field);
5635        }
5636        ///Sets `event_index` with the provided value.
5637        pub fn with_event_index(mut self, field: u32) -> Self {
5638            self.set_event_index(field);
5639            self
5640        }
5641    }
5642    impl super::EventDigestEntry {
5643        pub const fn const_default() -> Self {
5644            Self {
5645                event_index: None,
5646                digest: None,
5647            }
5648        }
5649        #[doc(hidden)]
5650        pub fn default_instance() -> &'static Self {
5651            static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5652            &DEFAULT
5653        }
5654        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5655        pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5656            self.event_index.as_mut().map(|field| field as _)
5657        }
5658        ///Returns a mutable reference to `event_index`.
5659        ///If the field is unset, it is first initialized with the default value.
5660        pub fn event_index_mut(&mut self) -> &mut u64 {
5661            self.event_index.get_or_insert_default()
5662        }
5663        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
5664        pub fn event_index_opt(&self) -> Option<u64> {
5665            self.event_index.as_ref().map(|field| *field)
5666        }
5667        ///Sets `event_index` with the provided value.
5668        pub fn set_event_index(&mut self, field: u64) {
5669            self.event_index = Some(field);
5670        }
5671        ///Sets `event_index` with the provided value.
5672        pub fn with_event_index(mut self, field: u64) -> Self {
5673            self.set_event_index(field);
5674            self
5675        }
5676        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5677        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5678            self.digest.as_mut().map(|field| field as _)
5679        }
5680        ///Returns a mutable reference to `digest`.
5681        ///If the field is unset, it is first initialized with the default value.
5682        pub fn digest_mut(&mut self) -> &mut String {
5683            self.digest.get_or_insert_default()
5684        }
5685        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5686        pub fn digest_opt(&self) -> Option<&str> {
5687            self.digest.as_ref().map(|field| field as _)
5688        }
5689        ///Sets `digest` with the provided value.
5690        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5691            self.digest = Some(field.into().into());
5692        }
5693        ///Sets `digest` with the provided value.
5694        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5695            self.set_digest(field.into());
5696            self
5697        }
5698    }
5699    impl super::EventFilter {
5700        pub const fn const_default() -> Self {
5701            Self { terms: Vec::new() }
5702        }
5703        #[doc(hidden)]
5704        pub fn default_instance() -> &'static Self {
5705            static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5706            &DEFAULT
5707        }
5708        ///Returns the value of `terms`, or the default value if `terms` is unset.
5709        pub fn terms(&self) -> &[super::EventTerm] {
5710            &self.terms
5711        }
5712        ///Returns a mutable reference to `terms`.
5713        ///If the field is unset, it is first initialized with the default value.
5714        pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5715            &mut self.terms
5716        }
5717        ///Sets `terms` with the provided value.
5718        pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5719            self.terms = field;
5720        }
5721        ///Sets `terms` with the provided value.
5722        pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5723            self.set_terms(field);
5724            self
5725        }
5726    }
5727    impl super::EventLiteral {
5728        pub const fn const_default() -> Self {
5729            Self {
5730                negated: false,
5731                predicate: None,
5732            }
5733        }
5734        #[doc(hidden)]
5735        pub fn default_instance() -> &'static Self {
5736            static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5737            &DEFAULT
5738        }
5739        ///Returns a mutable reference to `negated`.
5740        ///If the field is unset, it is first initialized with the default value.
5741        pub fn negated_mut(&mut self) -> &mut bool {
5742            &mut self.negated
5743        }
5744        ///Sets `negated` with the provided value.
5745        pub fn set_negated(&mut self, field: bool) {
5746            self.negated = field;
5747        }
5748        ///Sets `negated` with the provided value.
5749        pub fn with_negated(mut self, field: bool) -> Self {
5750            self.set_negated(field);
5751            self
5752        }
5753        ///Returns the value of `sender`, or the default value if `sender` is unset.
5754        pub fn sender(&self) -> &super::SenderFilter {
5755            if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5756            {
5757                field as _
5758            } else {
5759                super::SenderFilter::default_instance() as _
5760            }
5761        }
5762        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
5763        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5764            if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5765            {
5766                Some(field as _)
5767            } else {
5768                None
5769            }
5770        }
5771        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5772        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5773            if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5774                .predicate
5775            {
5776                Some(field as _)
5777            } else {
5778                None
5779            }
5780        }
5781        ///Returns a mutable reference to `sender`.
5782        ///If the field is unset, it is first initialized with the default value.
5783        ///If any other oneof field in the same oneof is set, it will be cleared.
5784        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5785            if self.sender_opt_mut().is_none() {
5786                self.predicate = Some(
5787                    super::event_literal::Predicate::Sender(
5788                        super::SenderFilter::default(),
5789                    ),
5790                );
5791            }
5792            self.sender_opt_mut().unwrap()
5793        }
5794        ///Sets `sender` with the provided value.
5795        ///If any other oneof field in the same oneof is set, it will be cleared.
5796        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5797            self.predicate = Some(
5798                super::event_literal::Predicate::Sender(field.into().into()),
5799            );
5800        }
5801        ///Sets `sender` with the provided value.
5802        ///If any other oneof field in the same oneof is set, it will be cleared.
5803        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5804            self.set_sender(field.into());
5805            self
5806        }
5807        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
5808        pub fn emit_module(&self) -> &super::EmitModuleFilter {
5809            if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5810                .predicate
5811            {
5812                field as _
5813            } else {
5814                super::EmitModuleFilter::default_instance() as _
5815            }
5816        }
5817        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
5818        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5819            if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5820                .predicate
5821            {
5822                Some(field as _)
5823            } else {
5824                None
5825            }
5826        }
5827        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5828        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5829            if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5830                .predicate
5831            {
5832                Some(field as _)
5833            } else {
5834                None
5835            }
5836        }
5837        ///Returns a mutable reference to `emit_module`.
5838        ///If the field is unset, it is first initialized with the default value.
5839        ///If any other oneof field in the same oneof is set, it will be cleared.
5840        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5841            if self.emit_module_opt_mut().is_none() {
5842                self.predicate = Some(
5843                    super::event_literal::Predicate::EmitModule(
5844                        super::EmitModuleFilter::default(),
5845                    ),
5846                );
5847            }
5848            self.emit_module_opt_mut().unwrap()
5849        }
5850        ///Sets `emit_module` with the provided value.
5851        ///If any other oneof field in the same oneof is set, it will be cleared.
5852        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5853            self.predicate = Some(
5854                super::event_literal::Predicate::EmitModule(field.into().into()),
5855            );
5856        }
5857        ///Sets `emit_module` with the provided value.
5858        ///If any other oneof field in the same oneof is set, it will be cleared.
5859        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5860            mut self,
5861            field: T,
5862        ) -> Self {
5863            self.set_emit_module(field.into());
5864            self
5865        }
5866        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
5867        pub fn event_type(&self) -> &super::EventTypeFilter {
5868            if let Some(super::event_literal::Predicate::EventType(field)) = &self
5869                .predicate
5870            {
5871                field as _
5872            } else {
5873                super::EventTypeFilter::default_instance() as _
5874            }
5875        }
5876        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
5877        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5878            if let Some(super::event_literal::Predicate::EventType(field)) = &self
5879                .predicate
5880            {
5881                Some(field as _)
5882            } else {
5883                None
5884            }
5885        }
5886        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5887        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5888            if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5889                .predicate
5890            {
5891                Some(field as _)
5892            } else {
5893                None
5894            }
5895        }
5896        ///Returns a mutable reference to `event_type`.
5897        ///If the field is unset, it is first initialized with the default value.
5898        ///If any other oneof field in the same oneof is set, it will be cleared.
5899        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5900            if self.event_type_opt_mut().is_none() {
5901                self.predicate = Some(
5902                    super::event_literal::Predicate::EventType(
5903                        super::EventTypeFilter::default(),
5904                    ),
5905                );
5906            }
5907            self.event_type_opt_mut().unwrap()
5908        }
5909        ///Sets `event_type` with the provided value.
5910        ///If any other oneof field in the same oneof is set, it will be cleared.
5911        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5912            self.predicate = Some(
5913                super::event_literal::Predicate::EventType(field.into().into()),
5914            );
5915        }
5916        ///Sets `event_type` with the provided value.
5917        ///If any other oneof field in the same oneof is set, it will be cleared.
5918        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5919            mut self,
5920            field: T,
5921        ) -> Self {
5922            self.set_event_type(field.into());
5923            self
5924        }
5925        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
5926        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5927            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5928                .predicate
5929            {
5930                field as _
5931            } else {
5932                super::EventStreamHeadFilter::default_instance() as _
5933            }
5934        }
5935        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
5936        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5937            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5938                .predicate
5939            {
5940                Some(field as _)
5941            } else {
5942                None
5943            }
5944        }
5945        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5946        pub fn event_stream_head_opt_mut(
5947            &mut self,
5948        ) -> Option<&mut super::EventStreamHeadFilter> {
5949            if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5950                .predicate
5951            {
5952                Some(field as _)
5953            } else {
5954                None
5955            }
5956        }
5957        ///Returns a mutable reference to `event_stream_head`.
5958        ///If the field is unset, it is first initialized with the default value.
5959        ///If any other oneof field in the same oneof is set, it will be cleared.
5960        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5961            if self.event_stream_head_opt_mut().is_none() {
5962                self.predicate = Some(
5963                    super::event_literal::Predicate::EventStreamHead(
5964                        super::EventStreamHeadFilter::default(),
5965                    ),
5966                );
5967            }
5968            self.event_stream_head_opt_mut().unwrap()
5969        }
5970        ///Sets `event_stream_head` with the provided value.
5971        ///If any other oneof field in the same oneof is set, it will be cleared.
5972        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5973            &mut self,
5974            field: T,
5975        ) {
5976            self.predicate = Some(
5977                super::event_literal::Predicate::EventStreamHead(field.into().into()),
5978            );
5979        }
5980        ///Sets `event_stream_head` with the provided value.
5981        ///If any other oneof field in the same oneof is set, it will be cleared.
5982        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5983            mut self,
5984            field: T,
5985        ) -> Self {
5986            self.set_event_stream_head(field.into());
5987            self
5988        }
5989    }
5990    impl super::EventStreamHeadFilter {
5991        pub const fn const_default() -> Self {
5992            Self { stream_id: None }
5993        }
5994        #[doc(hidden)]
5995        pub fn default_instance() -> &'static Self {
5996            static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5997            &DEFAULT
5998        }
5999        ///If `stream_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6000        pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
6001            self.stream_id.as_mut().map(|field| field as _)
6002        }
6003        ///Returns a mutable reference to `stream_id`.
6004        ///If the field is unset, it is first initialized with the default value.
6005        pub fn stream_id_mut(&mut self) -> &mut String {
6006            self.stream_id.get_or_insert_default()
6007        }
6008        ///If `stream_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6009        pub fn stream_id_opt(&self) -> Option<&str> {
6010            self.stream_id.as_ref().map(|field| field as _)
6011        }
6012        ///Sets `stream_id` with the provided value.
6013        pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
6014            self.stream_id = Some(field.into().into());
6015        }
6016        ///Sets `stream_id` with the provided value.
6017        pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
6018            self.set_stream_id(field.into());
6019            self
6020        }
6021    }
6022    impl super::EventTerm {
6023        pub const fn const_default() -> Self {
6024            Self { literals: Vec::new() }
6025        }
6026        #[doc(hidden)]
6027        pub fn default_instance() -> &'static Self {
6028            static DEFAULT: super::EventTerm = super::EventTerm::const_default();
6029            &DEFAULT
6030        }
6031        ///Returns the value of `literals`, or the default value if `literals` is unset.
6032        pub fn literals(&self) -> &[super::EventLiteral] {
6033            &self.literals
6034        }
6035        ///Returns a mutable reference to `literals`.
6036        ///If the field is unset, it is first initialized with the default value.
6037        pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
6038            &mut self.literals
6039        }
6040        ///Sets `literals` with the provided value.
6041        pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
6042            self.literals = field;
6043        }
6044        ///Sets `literals` with the provided value.
6045        pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
6046            self.set_literals(field);
6047            self
6048        }
6049    }
6050    impl super::EventTypeFilter {
6051        pub const fn const_default() -> Self {
6052            Self { event_type: None }
6053        }
6054        #[doc(hidden)]
6055        pub fn default_instance() -> &'static Self {
6056            static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
6057            &DEFAULT
6058        }
6059        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6060        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
6061            self.event_type.as_mut().map(|field| field as _)
6062        }
6063        ///Returns a mutable reference to `event_type`.
6064        ///If the field is unset, it is first initialized with the default value.
6065        pub fn event_type_mut(&mut self) -> &mut String {
6066            self.event_type.get_or_insert_default()
6067        }
6068        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6069        pub fn event_type_opt(&self) -> Option<&str> {
6070            self.event_type.as_ref().map(|field| field as _)
6071        }
6072        ///Sets `event_type` with the provided value.
6073        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
6074            self.event_type = Some(field.into().into());
6075        }
6076        ///Sets `event_type` with the provided value.
6077        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
6078            self.set_event_type(field.into());
6079            self
6080        }
6081    }
6082    impl super::ExecuteTransactionRequest {
6083        pub const fn const_default() -> Self {
6084            Self {
6085                transaction: None,
6086                signatures: Vec::new(),
6087                read_mask: None,
6088            }
6089        }
6090        #[doc(hidden)]
6091        pub fn default_instance() -> &'static Self {
6092            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
6093            &DEFAULT
6094        }
6095        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
6096        pub fn transaction(&self) -> &super::Transaction {
6097            self.transaction
6098                .as_ref()
6099                .map(|field| field as _)
6100                .unwrap_or_else(|| super::Transaction::default_instance() as _)
6101        }
6102        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6103        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6104            self.transaction.as_mut().map(|field| field as _)
6105        }
6106        ///Returns a mutable reference to `transaction`.
6107        ///If the field is unset, it is first initialized with the default value.
6108        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6109            self.transaction.get_or_insert_default()
6110        }
6111        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6112        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6113            self.transaction.as_ref().map(|field| field as _)
6114        }
6115        ///Sets `transaction` with the provided value.
6116        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6117            self.transaction = Some(field.into().into());
6118        }
6119        ///Sets `transaction` with the provided value.
6120        pub fn with_transaction<T: Into<super::Transaction>>(
6121            mut self,
6122            field: T,
6123        ) -> Self {
6124            self.set_transaction(field.into());
6125            self
6126        }
6127        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
6128        pub fn signatures(&self) -> &[super::UserSignature] {
6129            &self.signatures
6130        }
6131        ///Returns a mutable reference to `signatures`.
6132        ///If the field is unset, it is first initialized with the default value.
6133        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6134            &mut self.signatures
6135        }
6136        ///Sets `signatures` with the provided value.
6137        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6138            self.signatures = field;
6139        }
6140        ///Sets `signatures` with the provided value.
6141        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6142            self.set_signatures(field);
6143            self
6144        }
6145        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6146        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6147            self.read_mask.as_mut().map(|field| field as _)
6148        }
6149        ///Returns a mutable reference to `read_mask`.
6150        ///If the field is unset, it is first initialized with the default value.
6151        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6152            self.read_mask.get_or_insert_default()
6153        }
6154        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6155        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6156            self.read_mask.as_ref().map(|field| field as _)
6157        }
6158        ///Sets `read_mask` with the provided value.
6159        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6160            self.read_mask = Some(field.into().into());
6161        }
6162        ///Sets `read_mask` with the provided value.
6163        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6164            mut self,
6165            field: T,
6166        ) -> Self {
6167            self.set_read_mask(field.into());
6168            self
6169        }
6170    }
6171    impl super::ExecuteTransactionResponse {
6172        pub const fn const_default() -> Self {
6173            Self { transaction: None }
6174        }
6175        #[doc(hidden)]
6176        pub fn default_instance() -> &'static Self {
6177            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
6178            &DEFAULT
6179        }
6180        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
6181        pub fn transaction(&self) -> &super::ExecutedTransaction {
6182            self.transaction
6183                .as_ref()
6184                .map(|field| field as _)
6185                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
6186        }
6187        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6188        pub fn transaction_opt_mut(
6189            &mut self,
6190        ) -> Option<&mut super::ExecutedTransaction> {
6191            self.transaction.as_mut().map(|field| field as _)
6192        }
6193        ///Returns a mutable reference to `transaction`.
6194        ///If the field is unset, it is first initialized with the default value.
6195        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6196            self.transaction.get_or_insert_default()
6197        }
6198        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6199        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6200            self.transaction.as_ref().map(|field| field as _)
6201        }
6202        ///Sets `transaction` with the provided value.
6203        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6204            &mut self,
6205            field: T,
6206        ) {
6207            self.transaction = Some(field.into().into());
6208        }
6209        ///Sets `transaction` with the provided value.
6210        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6211            mut self,
6212            field: T,
6213        ) -> Self {
6214            self.set_transaction(field.into());
6215            self
6216        }
6217    }
6218    impl super::ExecutedTransaction {
6219        pub const fn const_default() -> Self {
6220            Self {
6221                digest: None,
6222                transaction: None,
6223                signatures: Vec::new(),
6224                effects: None,
6225                events: None,
6226                checkpoint: None,
6227                timestamp: None,
6228                balance_changes: Vec::new(),
6229                objects: None,
6230                transaction_index: None,
6231            }
6232        }
6233        #[doc(hidden)]
6234        pub fn default_instance() -> &'static Self {
6235            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6236            &DEFAULT
6237        }
6238        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6239        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6240            self.digest.as_mut().map(|field| field as _)
6241        }
6242        ///Returns a mutable reference to `digest`.
6243        ///If the field is unset, it is first initialized with the default value.
6244        pub fn digest_mut(&mut self) -> &mut String {
6245            self.digest.get_or_insert_default()
6246        }
6247        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6248        pub fn digest_opt(&self) -> Option<&str> {
6249            self.digest.as_ref().map(|field| field as _)
6250        }
6251        ///Sets `digest` with the provided value.
6252        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6253            self.digest = Some(field.into().into());
6254        }
6255        ///Sets `digest` with the provided value.
6256        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6257            self.set_digest(field.into());
6258            self
6259        }
6260        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
6261        pub fn transaction(&self) -> &super::Transaction {
6262            self.transaction
6263                .as_ref()
6264                .map(|field| field as _)
6265                .unwrap_or_else(|| super::Transaction::default_instance() as _)
6266        }
6267        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6268        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6269            self.transaction.as_mut().map(|field| field as _)
6270        }
6271        ///Returns a mutable reference to `transaction`.
6272        ///If the field is unset, it is first initialized with the default value.
6273        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6274            self.transaction.get_or_insert_default()
6275        }
6276        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
6277        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6278            self.transaction.as_ref().map(|field| field as _)
6279        }
6280        ///Sets `transaction` with the provided value.
6281        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6282            self.transaction = Some(field.into().into());
6283        }
6284        ///Sets `transaction` with the provided value.
6285        pub fn with_transaction<T: Into<super::Transaction>>(
6286            mut self,
6287            field: T,
6288        ) -> Self {
6289            self.set_transaction(field.into());
6290            self
6291        }
6292        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
6293        pub fn signatures(&self) -> &[super::UserSignature] {
6294            &self.signatures
6295        }
6296        ///Returns a mutable reference to `signatures`.
6297        ///If the field is unset, it is first initialized with the default value.
6298        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6299            &mut self.signatures
6300        }
6301        ///Sets `signatures` with the provided value.
6302        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6303            self.signatures = field;
6304        }
6305        ///Sets `signatures` with the provided value.
6306        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6307            self.set_signatures(field);
6308            self
6309        }
6310        ///Returns the value of `effects`, or the default value if `effects` is unset.
6311        pub fn effects(&self) -> &super::TransactionEffects {
6312            self.effects
6313                .as_ref()
6314                .map(|field| field as _)
6315                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6316        }
6317        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6318        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6319            self.effects.as_mut().map(|field| field as _)
6320        }
6321        ///Returns a mutable reference to `effects`.
6322        ///If the field is unset, it is first initialized with the default value.
6323        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6324            self.effects.get_or_insert_default()
6325        }
6326        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6327        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6328            self.effects.as_ref().map(|field| field as _)
6329        }
6330        ///Sets `effects` with the provided value.
6331        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6332            self.effects = Some(field.into().into());
6333        }
6334        ///Sets `effects` with the provided value.
6335        pub fn with_effects<T: Into<super::TransactionEffects>>(
6336            mut self,
6337            field: T,
6338        ) -> Self {
6339            self.set_effects(field.into());
6340            self
6341        }
6342        ///Returns the value of `events`, or the default value if `events` is unset.
6343        pub fn events(&self) -> &super::TransactionEvents {
6344            self.events
6345                .as_ref()
6346                .map(|field| field as _)
6347                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6348        }
6349        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6350        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6351            self.events.as_mut().map(|field| field as _)
6352        }
6353        ///Returns a mutable reference to `events`.
6354        ///If the field is unset, it is first initialized with the default value.
6355        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6356            self.events.get_or_insert_default()
6357        }
6358        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
6359        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6360            self.events.as_ref().map(|field| field as _)
6361        }
6362        ///Sets `events` with the provided value.
6363        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6364            self.events = Some(field.into().into());
6365        }
6366        ///Sets `events` with the provided value.
6367        pub fn with_events<T: Into<super::TransactionEvents>>(
6368            mut self,
6369            field: T,
6370        ) -> Self {
6371            self.set_events(field.into());
6372            self
6373        }
6374        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6375        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6376            self.checkpoint.as_mut().map(|field| field as _)
6377        }
6378        ///Returns a mutable reference to `checkpoint`.
6379        ///If the field is unset, it is first initialized with the default value.
6380        pub fn checkpoint_mut(&mut self) -> &mut u64 {
6381            self.checkpoint.get_or_insert_default()
6382        }
6383        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
6384        pub fn checkpoint_opt(&self) -> Option<u64> {
6385            self.checkpoint.as_ref().map(|field| *field)
6386        }
6387        ///Sets `checkpoint` with the provided value.
6388        pub fn set_checkpoint(&mut self, field: u64) {
6389            self.checkpoint = Some(field);
6390        }
6391        ///Sets `checkpoint` with the provided value.
6392        pub fn with_checkpoint(mut self, field: u64) -> Self {
6393            self.set_checkpoint(field);
6394            self
6395        }
6396        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6397        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6398            self.timestamp.as_mut().map(|field| field as _)
6399        }
6400        ///Returns a mutable reference to `timestamp`.
6401        ///If the field is unset, it is first initialized with the default value.
6402        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6403            self.timestamp.get_or_insert_default()
6404        }
6405        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
6406        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6407            self.timestamp.as_ref().map(|field| field as _)
6408        }
6409        ///Sets `timestamp` with the provided value.
6410        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6411            self.timestamp = Some(field.into().into());
6412        }
6413        ///Sets `timestamp` with the provided value.
6414        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6415            mut self,
6416            field: T,
6417        ) -> Self {
6418            self.set_timestamp(field.into());
6419            self
6420        }
6421        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
6422        pub fn balance_changes(&self) -> &[super::BalanceChange] {
6423            &self.balance_changes
6424        }
6425        ///Returns a mutable reference to `balance_changes`.
6426        ///If the field is unset, it is first initialized with the default value.
6427        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6428            &mut self.balance_changes
6429        }
6430        ///Sets `balance_changes` with the provided value.
6431        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6432            self.balance_changes = field;
6433        }
6434        ///Sets `balance_changes` with the provided value.
6435        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6436            self.set_balance_changes(field);
6437            self
6438        }
6439        ///Returns the value of `objects`, or the default value if `objects` is unset.
6440        pub fn objects(&self) -> &super::ObjectSet {
6441            self.objects
6442                .as_ref()
6443                .map(|field| field as _)
6444                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6445        }
6446        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6447        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6448            self.objects.as_mut().map(|field| field as _)
6449        }
6450        ///Returns a mutable reference to `objects`.
6451        ///If the field is unset, it is first initialized with the default value.
6452        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6453            self.objects.get_or_insert_default()
6454        }
6455        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6456        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6457            self.objects.as_ref().map(|field| field as _)
6458        }
6459        ///Sets `objects` with the provided value.
6460        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6461            self.objects = Some(field.into().into());
6462        }
6463        ///Sets `objects` with the provided value.
6464        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6465            self.set_objects(field.into());
6466            self
6467        }
6468        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6469        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6470            self.transaction_index.as_mut().map(|field| field as _)
6471        }
6472        ///Returns a mutable reference to `transaction_index`.
6473        ///If the field is unset, it is first initialized with the default value.
6474        pub fn transaction_index_mut(&mut self) -> &mut u64 {
6475            self.transaction_index.get_or_insert_default()
6476        }
6477        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
6478        pub fn transaction_index_opt(&self) -> Option<u64> {
6479            self.transaction_index.as_ref().map(|field| *field)
6480        }
6481        ///Sets `transaction_index` with the provided value.
6482        pub fn set_transaction_index(&mut self, field: u64) {
6483            self.transaction_index = Some(field);
6484        }
6485        ///Sets `transaction_index` with the provided value.
6486        pub fn with_transaction_index(mut self, field: u64) -> Self {
6487            self.set_transaction_index(field);
6488            self
6489        }
6490    }
6491    impl super::ExecutionError {
6492        pub const fn const_default() -> Self {
6493            Self {
6494                description: None,
6495                command: None,
6496                kind: None,
6497                error_details: None,
6498            }
6499        }
6500        #[doc(hidden)]
6501        pub fn default_instance() -> &'static Self {
6502            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6503            &DEFAULT
6504        }
6505        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6506        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6507            self.description.as_mut().map(|field| field as _)
6508        }
6509        ///Returns a mutable reference to `description`.
6510        ///If the field is unset, it is first initialized with the default value.
6511        pub fn description_mut(&mut self) -> &mut String {
6512            self.description.get_or_insert_default()
6513        }
6514        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
6515        pub fn description_opt(&self) -> Option<&str> {
6516            self.description.as_ref().map(|field| field as _)
6517        }
6518        ///Sets `description` with the provided value.
6519        pub fn set_description<T: Into<String>>(&mut self, field: T) {
6520            self.description = Some(field.into().into());
6521        }
6522        ///Sets `description` with the provided value.
6523        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6524            self.set_description(field.into());
6525            self
6526        }
6527        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6528        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6529            self.command.as_mut().map(|field| field as _)
6530        }
6531        ///Returns a mutable reference to `command`.
6532        ///If the field is unset, it is first initialized with the default value.
6533        pub fn command_mut(&mut self) -> &mut u64 {
6534            self.command.get_or_insert_default()
6535        }
6536        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
6537        pub fn command_opt(&self) -> Option<u64> {
6538            self.command.as_ref().map(|field| *field)
6539        }
6540        ///Sets `command` with the provided value.
6541        pub fn set_command(&mut self, field: u64) {
6542            self.command = Some(field);
6543        }
6544        ///Sets `command` with the provided value.
6545        pub fn with_command(mut self, field: u64) -> Self {
6546            self.set_command(field);
6547            self
6548        }
6549        ///Sets `kind` with the provided value.
6550        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6551            mut self,
6552            field: T,
6553        ) -> Self {
6554            self.set_kind(field.into());
6555            self
6556        }
6557        ///Returns the value of `abort`, or the default value if `abort` is unset.
6558        pub fn abort(&self) -> &super::MoveAbort {
6559            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6560                .error_details
6561            {
6562                field as _
6563            } else {
6564                super::MoveAbort::default_instance() as _
6565            }
6566        }
6567        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
6568        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6569            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6570                .error_details
6571            {
6572                Some(field as _)
6573            } else {
6574                None
6575            }
6576        }
6577        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6578        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6579            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6580                .error_details
6581            {
6582                Some(field as _)
6583            } else {
6584                None
6585            }
6586        }
6587        ///Returns a mutable reference to `abort`.
6588        ///If the field is unset, it is first initialized with the default value.
6589        ///If any other oneof field in the same oneof is set, it will be cleared.
6590        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6591            if self.abort_opt_mut().is_none() {
6592                self.error_details = Some(
6593                    super::execution_error::ErrorDetails::Abort(
6594                        super::MoveAbort::default(),
6595                    ),
6596                );
6597            }
6598            self.abort_opt_mut().unwrap()
6599        }
6600        ///Sets `abort` with the provided value.
6601        ///If any other oneof field in the same oneof is set, it will be cleared.
6602        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6603            self.error_details = Some(
6604                super::execution_error::ErrorDetails::Abort(field.into().into()),
6605            );
6606        }
6607        ///Sets `abort` with the provided value.
6608        ///If any other oneof field in the same oneof is set, it will be cleared.
6609        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6610            self.set_abort(field.into());
6611            self
6612        }
6613        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
6614        pub fn size_error(&self) -> &super::SizeError {
6615            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6616                .error_details
6617            {
6618                field as _
6619            } else {
6620                super::SizeError::default_instance() as _
6621            }
6622        }
6623        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6624        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6625            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6626                .error_details
6627            {
6628                Some(field as _)
6629            } else {
6630                None
6631            }
6632        }
6633        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6634        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6635            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6636                .error_details
6637            {
6638                Some(field as _)
6639            } else {
6640                None
6641            }
6642        }
6643        ///Returns a mutable reference to `size_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 size_error_mut(&mut self) -> &mut super::SizeError {
6647            if self.size_error_opt_mut().is_none() {
6648                self.error_details = Some(
6649                    super::execution_error::ErrorDetails::SizeError(
6650                        super::SizeError::default(),
6651                    ),
6652                );
6653            }
6654            self.size_error_opt_mut().unwrap()
6655        }
6656        ///Sets `size_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_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6659            self.error_details = Some(
6660                super::execution_error::ErrorDetails::SizeError(field.into().into()),
6661            );
6662        }
6663        ///Sets `size_error` with the provided value.
6664        ///If any other oneof field in the same oneof is set, it will be cleared.
6665        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6666            self.set_size_error(field.into());
6667            self
6668        }
6669        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
6670        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6671            if let Some(
6672                super::execution_error::ErrorDetails::CommandArgumentError(field),
6673            ) = &self.error_details
6674            {
6675                field as _
6676            } else {
6677                super::CommandArgumentError::default_instance() as _
6678            }
6679        }
6680        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6681        pub fn command_argument_error_opt(
6682            &self,
6683        ) -> Option<&super::CommandArgumentError> {
6684            if let Some(
6685                super::execution_error::ErrorDetails::CommandArgumentError(field),
6686            ) = &self.error_details
6687            {
6688                Some(field as _)
6689            } else {
6690                None
6691            }
6692        }
6693        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6694        pub fn command_argument_error_opt_mut(
6695            &mut self,
6696        ) -> Option<&mut super::CommandArgumentError> {
6697            if let Some(
6698                super::execution_error::ErrorDetails::CommandArgumentError(field),
6699            ) = &mut self.error_details
6700            {
6701                Some(field as _)
6702            } else {
6703                None
6704            }
6705        }
6706        ///Returns a mutable reference to `command_argument_error`.
6707        ///If the field is unset, it is first initialized with the default value.
6708        ///If any other oneof field in the same oneof is set, it will be cleared.
6709        pub fn command_argument_error_mut(
6710            &mut self,
6711        ) -> &mut super::CommandArgumentError {
6712            if self.command_argument_error_opt_mut().is_none() {
6713                self.error_details = Some(
6714                    super::execution_error::ErrorDetails::CommandArgumentError(
6715                        super::CommandArgumentError::default(),
6716                    ),
6717                );
6718            }
6719            self.command_argument_error_opt_mut().unwrap()
6720        }
6721        ///Sets `command_argument_error` with the provided value.
6722        ///If any other oneof field in the same oneof is set, it will be cleared.
6723        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6724            &mut self,
6725            field: T,
6726        ) {
6727            self.error_details = Some(
6728                super::execution_error::ErrorDetails::CommandArgumentError(
6729                    field.into().into(),
6730                ),
6731            );
6732        }
6733        ///Sets `command_argument_error` with the provided value.
6734        ///If any other oneof field in the same oneof is set, it will be cleared.
6735        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6736            mut self,
6737            field: T,
6738        ) -> Self {
6739            self.set_command_argument_error(field.into());
6740            self
6741        }
6742        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
6743        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6744            if let Some(
6745                super::execution_error::ErrorDetails::TypeArgumentError(field),
6746            ) = &self.error_details
6747            {
6748                field as _
6749            } else {
6750                super::TypeArgumentError::default_instance() as _
6751            }
6752        }
6753        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6754        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6755            if let Some(
6756                super::execution_error::ErrorDetails::TypeArgumentError(field),
6757            ) = &self.error_details
6758            {
6759                Some(field as _)
6760            } else {
6761                None
6762            }
6763        }
6764        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6765        pub fn type_argument_error_opt_mut(
6766            &mut self,
6767        ) -> Option<&mut super::TypeArgumentError> {
6768            if let Some(
6769                super::execution_error::ErrorDetails::TypeArgumentError(field),
6770            ) = &mut self.error_details
6771            {
6772                Some(field as _)
6773            } else {
6774                None
6775            }
6776        }
6777        ///Returns a mutable reference to `type_argument_error`.
6778        ///If the field is unset, it is first initialized with the default value.
6779        ///If any other oneof field in the same oneof is set, it will be cleared.
6780        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6781            if self.type_argument_error_opt_mut().is_none() {
6782                self.error_details = Some(
6783                    super::execution_error::ErrorDetails::TypeArgumentError(
6784                        super::TypeArgumentError::default(),
6785                    ),
6786                );
6787            }
6788            self.type_argument_error_opt_mut().unwrap()
6789        }
6790        ///Sets `type_argument_error` with the provided value.
6791        ///If any other oneof field in the same oneof is set, it will be cleared.
6792        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6793            &mut self,
6794            field: T,
6795        ) {
6796            self.error_details = Some(
6797                super::execution_error::ErrorDetails::TypeArgumentError(
6798                    field.into().into(),
6799                ),
6800            );
6801        }
6802        ///Sets `type_argument_error` with the provided value.
6803        ///If any other oneof field in the same oneof is set, it will be cleared.
6804        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6805            mut self,
6806            field: T,
6807        ) -> Self {
6808            self.set_type_argument_error(field.into());
6809            self
6810        }
6811        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
6812        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6813            if let Some(
6814                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6815            ) = &self.error_details
6816            {
6817                field as _
6818            } else {
6819                super::PackageUpgradeError::default_instance() as _
6820            }
6821        }
6822        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6823        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6824            if let Some(
6825                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6826            ) = &self.error_details
6827            {
6828                Some(field as _)
6829            } else {
6830                None
6831            }
6832        }
6833        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6834        pub fn package_upgrade_error_opt_mut(
6835            &mut self,
6836        ) -> Option<&mut super::PackageUpgradeError> {
6837            if let Some(
6838                super::execution_error::ErrorDetails::PackageUpgradeError(field),
6839            ) = &mut self.error_details
6840            {
6841                Some(field as _)
6842            } else {
6843                None
6844            }
6845        }
6846        ///Returns a mutable reference to `package_upgrade_error`.
6847        ///If the field is unset, it is first initialized with the default value.
6848        ///If any other oneof field in the same oneof is set, it will be cleared.
6849        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6850            if self.package_upgrade_error_opt_mut().is_none() {
6851                self.error_details = Some(
6852                    super::execution_error::ErrorDetails::PackageUpgradeError(
6853                        super::PackageUpgradeError::default(),
6854                    ),
6855                );
6856            }
6857            self.package_upgrade_error_opt_mut().unwrap()
6858        }
6859        ///Sets `package_upgrade_error` with the provided value.
6860        ///If any other oneof field in the same oneof is set, it will be cleared.
6861        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6862            &mut self,
6863            field: T,
6864        ) {
6865            self.error_details = Some(
6866                super::execution_error::ErrorDetails::PackageUpgradeError(
6867                    field.into().into(),
6868                ),
6869            );
6870        }
6871        ///Sets `package_upgrade_error` with the provided value.
6872        ///If any other oneof field in the same oneof is set, it will be cleared.
6873        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6874            mut self,
6875            field: T,
6876        ) -> Self {
6877            self.set_package_upgrade_error(field.into());
6878            self
6879        }
6880        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
6881        pub fn index_error(&self) -> &super::IndexError {
6882            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6883                .error_details
6884            {
6885                field as _
6886            } else {
6887                super::IndexError::default_instance() as _
6888            }
6889        }
6890        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6891        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6892            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6893                .error_details
6894            {
6895                Some(field as _)
6896            } else {
6897                None
6898            }
6899        }
6900        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6901        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6902            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6903                .error_details
6904            {
6905                Some(field as _)
6906            } else {
6907                None
6908            }
6909        }
6910        ///Returns a mutable reference to `index_error`.
6911        ///If the field is unset, it is first initialized with the default value.
6912        ///If any other oneof field in the same oneof is set, it will be cleared.
6913        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6914            if self.index_error_opt_mut().is_none() {
6915                self.error_details = Some(
6916                    super::execution_error::ErrorDetails::IndexError(
6917                        super::IndexError::default(),
6918                    ),
6919                );
6920            }
6921            self.index_error_opt_mut().unwrap()
6922        }
6923        ///Sets `index_error` with the provided value.
6924        ///If any other oneof field in the same oneof is set, it will be cleared.
6925        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6926            self.error_details = Some(
6927                super::execution_error::ErrorDetails::IndexError(field.into().into()),
6928            );
6929        }
6930        ///Sets `index_error` with the provided value.
6931        ///If any other oneof field in the same oneof is set, it will be cleared.
6932        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6933            self.set_index_error(field.into());
6934            self
6935        }
6936        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
6937        pub fn object_id(&self) -> &str {
6938            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6939                .error_details
6940            {
6941                field as _
6942            } else {
6943                ""
6944            }
6945        }
6946        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
6947        pub fn object_id_opt(&self) -> Option<&str> {
6948            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6949                .error_details
6950            {
6951                Some(field as _)
6952            } else {
6953                None
6954            }
6955        }
6956        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6957        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6958            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6959                .error_details
6960            {
6961                Some(field as _)
6962            } else {
6963                None
6964            }
6965        }
6966        ///Returns a mutable reference to `object_id`.
6967        ///If the field is unset, it is first initialized with the default value.
6968        ///If any other oneof field in the same oneof is set, it will be cleared.
6969        pub fn object_id_mut(&mut self) -> &mut String {
6970            if self.object_id_opt_mut().is_none() {
6971                self.error_details = Some(
6972                    super::execution_error::ErrorDetails::ObjectId(String::default()),
6973                );
6974            }
6975            self.object_id_opt_mut().unwrap()
6976        }
6977        ///Sets `object_id` with the provided value.
6978        ///If any other oneof field in the same oneof is set, it will be cleared.
6979        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6980            self.error_details = Some(
6981                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6982            );
6983        }
6984        ///Sets `object_id` with the provided value.
6985        ///If any other oneof field in the same oneof is set, it will be cleared.
6986        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6987            self.set_object_id(field.into());
6988            self
6989        }
6990        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
6991        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6992            if let Some(
6993                super::execution_error::ErrorDetails::CoinDenyListError(field),
6994            ) = &self.error_details
6995            {
6996                field as _
6997            } else {
6998                super::CoinDenyListError::default_instance() as _
6999            }
7000        }
7001        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7002        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
7003            if let Some(
7004                super::execution_error::ErrorDetails::CoinDenyListError(field),
7005            ) = &self.error_details
7006            {
7007                Some(field as _)
7008            } else {
7009                None
7010            }
7011        }
7012        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7013        pub fn coin_deny_list_error_opt_mut(
7014            &mut self,
7015        ) -> Option<&mut super::CoinDenyListError> {
7016            if let Some(
7017                super::execution_error::ErrorDetails::CoinDenyListError(field),
7018            ) = &mut self.error_details
7019            {
7020                Some(field as _)
7021            } else {
7022                None
7023            }
7024        }
7025        ///Returns a mutable reference to `coin_deny_list_error`.
7026        ///If the field is unset, it is first initialized with the default value.
7027        ///If any other oneof field in the same oneof is set, it will be cleared.
7028        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
7029            if self.coin_deny_list_error_opt_mut().is_none() {
7030                self.error_details = Some(
7031                    super::execution_error::ErrorDetails::CoinDenyListError(
7032                        super::CoinDenyListError::default(),
7033                    ),
7034                );
7035            }
7036            self.coin_deny_list_error_opt_mut().unwrap()
7037        }
7038        ///Sets `coin_deny_list_error` with the provided value.
7039        ///If any other oneof field in the same oneof is set, it will be cleared.
7040        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
7041            &mut self,
7042            field: T,
7043        ) {
7044            self.error_details = Some(
7045                super::execution_error::ErrorDetails::CoinDenyListError(
7046                    field.into().into(),
7047                ),
7048            );
7049        }
7050        ///Sets `coin_deny_list_error` with the provided value.
7051        ///If any other oneof field in the same oneof is set, it will be cleared.
7052        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
7053            mut self,
7054            field: T,
7055        ) -> Self {
7056            self.set_coin_deny_list_error(field.into());
7057            self
7058        }
7059        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
7060        pub fn congested_objects(&self) -> &super::CongestedObjects {
7061            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
7062                .error_details
7063            {
7064                field as _
7065            } else {
7066                super::CongestedObjects::default_instance() as _
7067            }
7068        }
7069        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
7070        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
7071            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
7072                .error_details
7073            {
7074                Some(field as _)
7075            } else {
7076                None
7077            }
7078        }
7079        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7080        pub fn congested_objects_opt_mut(
7081            &mut self,
7082        ) -> Option<&mut super::CongestedObjects> {
7083            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
7084                .error_details
7085            {
7086                Some(field as _)
7087            } else {
7088                None
7089            }
7090        }
7091        ///Returns a mutable reference to `congested_objects`.
7092        ///If the field is unset, it is first initialized with the default value.
7093        ///If any other oneof field in the same oneof is set, it will be cleared.
7094        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
7095            if self.congested_objects_opt_mut().is_none() {
7096                self.error_details = Some(
7097                    super::execution_error::ErrorDetails::CongestedObjects(
7098                        super::CongestedObjects::default(),
7099                    ),
7100                );
7101            }
7102            self.congested_objects_opt_mut().unwrap()
7103        }
7104        ///Sets `congested_objects` with the provided value.
7105        ///If any other oneof field in the same oneof is set, it will be cleared.
7106        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
7107            &mut self,
7108            field: T,
7109        ) {
7110            self.error_details = Some(
7111                super::execution_error::ErrorDetails::CongestedObjects(
7112                    field.into().into(),
7113                ),
7114            );
7115        }
7116        ///Sets `congested_objects` with the provided value.
7117        ///If any other oneof field in the same oneof is set, it will be cleared.
7118        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
7119            mut self,
7120            field: T,
7121        ) -> Self {
7122            self.set_congested_objects(field.into());
7123            self
7124        }
7125    }
7126    impl super::ExecutionStatus {
7127        pub const fn const_default() -> Self {
7128            Self { success: None, error: None }
7129        }
7130        #[doc(hidden)]
7131        pub fn default_instance() -> &'static Self {
7132            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
7133            &DEFAULT
7134        }
7135        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7136        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
7137            self.success.as_mut().map(|field| field as _)
7138        }
7139        ///Returns a mutable reference to `success`.
7140        ///If the field is unset, it is first initialized with the default value.
7141        pub fn success_mut(&mut self) -> &mut bool {
7142            self.success.get_or_insert_default()
7143        }
7144        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
7145        pub fn success_opt(&self) -> Option<bool> {
7146            self.success.as_ref().map(|field| *field)
7147        }
7148        ///Sets `success` with the provided value.
7149        pub fn set_success(&mut self, field: bool) {
7150            self.success = Some(field);
7151        }
7152        ///Sets `success` with the provided value.
7153        pub fn with_success(mut self, field: bool) -> Self {
7154            self.set_success(field);
7155            self
7156        }
7157        ///Returns the value of `error`, or the default value if `error` is unset.
7158        pub fn error(&self) -> &super::ExecutionError {
7159            self.error
7160                .as_ref()
7161                .map(|field| field as _)
7162                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
7163        }
7164        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7165        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
7166            self.error.as_mut().map(|field| field as _)
7167        }
7168        ///Returns a mutable reference to `error`.
7169        ///If the field is unset, it is first initialized with the default value.
7170        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
7171            self.error.get_or_insert_default()
7172        }
7173        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7174        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
7175            self.error.as_ref().map(|field| field as _)
7176        }
7177        ///Sets `error` with the provided value.
7178        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
7179            self.error = Some(field.into().into());
7180        }
7181        ///Sets `error` with the provided value.
7182        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
7183            self.set_error(field.into());
7184            self
7185        }
7186    }
7187    impl super::ExecutionTimeObservation {
7188        pub const fn const_default() -> Self {
7189            Self {
7190                kind: None,
7191                move_entry_point: None,
7192                validator_observations: Vec::new(),
7193            }
7194        }
7195        #[doc(hidden)]
7196        pub fn default_instance() -> &'static Self {
7197            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7198            &DEFAULT
7199        }
7200        ///Sets `kind` with the provided value.
7201        pub fn with_kind<
7202            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7203        >(mut self, field: T) -> Self {
7204            self.set_kind(field.into());
7205            self
7206        }
7207        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
7208        pub fn move_entry_point(&self) -> &super::MoveCall {
7209            self.move_entry_point
7210                .as_ref()
7211                .map(|field| field as _)
7212                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7213        }
7214        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7215        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7216            self.move_entry_point.as_mut().map(|field| field as _)
7217        }
7218        ///Returns a mutable reference to `move_entry_point`.
7219        ///If the field is unset, it is first initialized with the default value.
7220        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7221            self.move_entry_point.get_or_insert_default()
7222        }
7223        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
7224        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7225            self.move_entry_point.as_ref().map(|field| field as _)
7226        }
7227        ///Sets `move_entry_point` with the provided value.
7228        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7229            self.move_entry_point = Some(field.into().into());
7230        }
7231        ///Sets `move_entry_point` with the provided value.
7232        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7233            mut self,
7234            field: T,
7235        ) -> Self {
7236            self.set_move_entry_point(field.into());
7237            self
7238        }
7239        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
7240        pub fn validator_observations(
7241            &self,
7242        ) -> &[super::ValidatorExecutionTimeObservation] {
7243            &self.validator_observations
7244        }
7245        ///Returns a mutable reference to `validator_observations`.
7246        ///If the field is unset, it is first initialized with the default value.
7247        pub fn validator_observations_mut(
7248            &mut self,
7249        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7250            &mut self.validator_observations
7251        }
7252        ///Sets `validator_observations` with the provided value.
7253        pub fn set_validator_observations(
7254            &mut self,
7255            field: Vec<super::ValidatorExecutionTimeObservation>,
7256        ) {
7257            self.validator_observations = field;
7258        }
7259        ///Sets `validator_observations` with the provided value.
7260        pub fn with_validator_observations(
7261            mut self,
7262            field: Vec<super::ValidatorExecutionTimeObservation>,
7263        ) -> Self {
7264            self.set_validator_observations(field);
7265            self
7266        }
7267    }
7268    impl super::ExecutionTimeObservations {
7269        pub const fn const_default() -> Self {
7270            Self {
7271                version: None,
7272                observations: Vec::new(),
7273            }
7274        }
7275        #[doc(hidden)]
7276        pub fn default_instance() -> &'static Self {
7277            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7278            &DEFAULT
7279        }
7280        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7281        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7282            self.version.as_mut().map(|field| field as _)
7283        }
7284        ///Returns a mutable reference to `version`.
7285        ///If the field is unset, it is first initialized with the default value.
7286        pub fn version_mut(&mut self) -> &mut i32 {
7287            self.version.get_or_insert_default()
7288        }
7289        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7290        pub fn version_opt(&self) -> Option<i32> {
7291            self.version.as_ref().map(|field| *field)
7292        }
7293        ///Sets `version` with the provided value.
7294        pub fn set_version(&mut self, field: i32) {
7295            self.version = Some(field);
7296        }
7297        ///Sets `version` with the provided value.
7298        pub fn with_version(mut self, field: i32) -> Self {
7299            self.set_version(field);
7300            self
7301        }
7302        ///Returns the value of `observations`, or the default value if `observations` is unset.
7303        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7304            &self.observations
7305        }
7306        ///Returns a mutable reference to `observations`.
7307        ///If the field is unset, it is first initialized with the default value.
7308        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7309            &mut self.observations
7310        }
7311        ///Sets `observations` with the provided value.
7312        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7313            self.observations = field;
7314        }
7315        ///Sets `observations` with the provided value.
7316        pub fn with_observations(
7317            mut self,
7318            field: Vec<super::ExecutionTimeObservation>,
7319        ) -> Self {
7320            self.set_observations(field);
7321            self
7322        }
7323    }
7324    impl super::FieldDescriptor {
7325        pub const fn const_default() -> Self {
7326            Self {
7327                name: None,
7328                position: None,
7329                r#type: None,
7330            }
7331        }
7332        #[doc(hidden)]
7333        pub fn default_instance() -> &'static Self {
7334            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7335            &DEFAULT
7336        }
7337        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7338        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7339            self.name.as_mut().map(|field| field as _)
7340        }
7341        ///Returns a mutable reference to `name`.
7342        ///If the field is unset, it is first initialized with the default value.
7343        pub fn name_mut(&mut self) -> &mut String {
7344            self.name.get_or_insert_default()
7345        }
7346        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7347        pub fn name_opt(&self) -> Option<&str> {
7348            self.name.as_ref().map(|field| field as _)
7349        }
7350        ///Sets `name` with the provided value.
7351        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7352            self.name = Some(field.into().into());
7353        }
7354        ///Sets `name` with the provided value.
7355        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7356            self.set_name(field.into());
7357            self
7358        }
7359        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7360        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7361            self.position.as_mut().map(|field| field as _)
7362        }
7363        ///Returns a mutable reference to `position`.
7364        ///If the field is unset, it is first initialized with the default value.
7365        pub fn position_mut(&mut self) -> &mut u32 {
7366            self.position.get_or_insert_default()
7367        }
7368        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
7369        pub fn position_opt(&self) -> Option<u32> {
7370            self.position.as_ref().map(|field| *field)
7371        }
7372        ///Sets `position` with the provided value.
7373        pub fn set_position(&mut self, field: u32) {
7374            self.position = Some(field);
7375        }
7376        ///Sets `position` with the provided value.
7377        pub fn with_position(mut self, field: u32) -> Self {
7378            self.set_position(field);
7379            self
7380        }
7381        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
7382        pub fn r#type(&self) -> &super::OpenSignatureBody {
7383            self.r#type
7384                .as_ref()
7385                .map(|field| field as _)
7386                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7387        }
7388        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7389        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7390            self.r#type.as_mut().map(|field| field as _)
7391        }
7392        ///Returns a mutable reference to `r#type`.
7393        ///If the field is unset, it is first initialized with the default value.
7394        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7395            self.r#type.get_or_insert_default()
7396        }
7397        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7398        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7399            self.r#type.as_ref().map(|field| field as _)
7400        }
7401        ///Sets `r#type` with the provided value.
7402        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7403            self.r#type = Some(field.into().into());
7404        }
7405        ///Sets `r#type` with the provided value.
7406        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7407            self.set_type(field.into());
7408            self
7409        }
7410    }
7411    impl super::FunctionDescriptor {
7412        pub const fn const_default() -> Self {
7413            Self {
7414                name: None,
7415                visibility: None,
7416                is_entry: None,
7417                type_parameters: Vec::new(),
7418                parameters: Vec::new(),
7419                returns: Vec::new(),
7420            }
7421        }
7422        #[doc(hidden)]
7423        pub fn default_instance() -> &'static Self {
7424            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7425            &DEFAULT
7426        }
7427        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7428        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7429            self.name.as_mut().map(|field| field as _)
7430        }
7431        ///Returns a mutable reference to `name`.
7432        ///If the field is unset, it is first initialized with the default value.
7433        pub fn name_mut(&mut self) -> &mut String {
7434            self.name.get_or_insert_default()
7435        }
7436        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7437        pub fn name_opt(&self) -> Option<&str> {
7438            self.name.as_ref().map(|field| field as _)
7439        }
7440        ///Sets `name` with the provided value.
7441        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7442            self.name = Some(field.into().into());
7443        }
7444        ///Sets `name` with the provided value.
7445        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7446            self.set_name(field.into());
7447            self
7448        }
7449        ///Sets `visibility` with the provided value.
7450        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7451            mut self,
7452            field: T,
7453        ) -> Self {
7454            self.set_visibility(field.into());
7455            self
7456        }
7457        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7458        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7459            self.is_entry.as_mut().map(|field| field as _)
7460        }
7461        ///Returns a mutable reference to `is_entry`.
7462        ///If the field is unset, it is first initialized with the default value.
7463        pub fn is_entry_mut(&mut self) -> &mut bool {
7464            self.is_entry.get_or_insert_default()
7465        }
7466        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
7467        pub fn is_entry_opt(&self) -> Option<bool> {
7468            self.is_entry.as_ref().map(|field| *field)
7469        }
7470        ///Sets `is_entry` with the provided value.
7471        pub fn set_is_entry(&mut self, field: bool) {
7472            self.is_entry = Some(field);
7473        }
7474        ///Sets `is_entry` with the provided value.
7475        pub fn with_is_entry(mut self, field: bool) -> Self {
7476            self.set_is_entry(field);
7477            self
7478        }
7479        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
7480        pub fn type_parameters(&self) -> &[super::TypeParameter] {
7481            &self.type_parameters
7482        }
7483        ///Returns a mutable reference to `type_parameters`.
7484        ///If the field is unset, it is first initialized with the default value.
7485        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7486            &mut self.type_parameters
7487        }
7488        ///Sets `type_parameters` with the provided value.
7489        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7490            self.type_parameters = field;
7491        }
7492        ///Sets `type_parameters` with the provided value.
7493        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7494            self.set_type_parameters(field);
7495            self
7496        }
7497        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
7498        pub fn parameters(&self) -> &[super::OpenSignature] {
7499            &self.parameters
7500        }
7501        ///Returns a mutable reference to `parameters`.
7502        ///If the field is unset, it is first initialized with the default value.
7503        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7504            &mut self.parameters
7505        }
7506        ///Sets `parameters` with the provided value.
7507        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7508            self.parameters = field;
7509        }
7510        ///Sets `parameters` with the provided value.
7511        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7512            self.set_parameters(field);
7513            self
7514        }
7515        ///Returns the value of `returns`, or the default value if `returns` is unset.
7516        pub fn returns(&self) -> &[super::OpenSignature] {
7517            &self.returns
7518        }
7519        ///Returns a mutable reference to `returns`.
7520        ///If the field is unset, it is first initialized with the default value.
7521        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7522            &mut self.returns
7523        }
7524        ///Sets `returns` with the provided value.
7525        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7526            self.returns = field;
7527        }
7528        ///Sets `returns` with the provided value.
7529        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7530            self.set_returns(field);
7531            self
7532        }
7533    }
7534    impl super::FundsWithdrawal {
7535        pub const fn const_default() -> Self {
7536            Self {
7537                amount: None,
7538                coin_type: None,
7539                source: None,
7540                funder: None,
7541                allowance: None,
7542                seized_from: None,
7543                seize_auth: None,
7544            }
7545        }
7546        #[doc(hidden)]
7547        pub fn default_instance() -> &'static Self {
7548            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7549            &DEFAULT
7550        }
7551        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7552        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7553            self.amount.as_mut().map(|field| field as _)
7554        }
7555        ///Returns a mutable reference to `amount`.
7556        ///If the field is unset, it is first initialized with the default value.
7557        pub fn amount_mut(&mut self) -> &mut u64 {
7558            self.amount.get_or_insert_default()
7559        }
7560        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
7561        pub fn amount_opt(&self) -> Option<u64> {
7562            self.amount.as_ref().map(|field| *field)
7563        }
7564        ///Sets `amount` with the provided value.
7565        pub fn set_amount(&mut self, field: u64) {
7566            self.amount = Some(field);
7567        }
7568        ///Sets `amount` with the provided value.
7569        pub fn with_amount(mut self, field: u64) -> Self {
7570            self.set_amount(field);
7571            self
7572        }
7573        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7574        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7575            self.coin_type.as_mut().map(|field| field as _)
7576        }
7577        ///Returns a mutable reference to `coin_type`.
7578        ///If the field is unset, it is first initialized with the default value.
7579        pub fn coin_type_mut(&mut self) -> &mut String {
7580            self.coin_type.get_or_insert_default()
7581        }
7582        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7583        pub fn coin_type_opt(&self) -> Option<&str> {
7584            self.coin_type.as_ref().map(|field| field as _)
7585        }
7586        ///Sets `coin_type` with the provided value.
7587        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7588            self.coin_type = Some(field.into().into());
7589        }
7590        ///Sets `coin_type` with the provided value.
7591        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7592            self.set_coin_type(field.into());
7593            self
7594        }
7595        ///Sets `source` with the provided value.
7596        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7597            mut self,
7598            field: T,
7599        ) -> Self {
7600            self.set_source(field.into());
7601            self
7602        }
7603        ///If `funder` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7604        pub fn funder_opt_mut(&mut self) -> Option<&mut String> {
7605            self.funder.as_mut().map(|field| field as _)
7606        }
7607        ///Returns a mutable reference to `funder`.
7608        ///If the field is unset, it is first initialized with the default value.
7609        pub fn funder_mut(&mut self) -> &mut String {
7610            self.funder.get_or_insert_default()
7611        }
7612        ///If `funder` is set, returns [`Some`] with the value; otherwise returns [`None`].
7613        pub fn funder_opt(&self) -> Option<&str> {
7614            self.funder.as_ref().map(|field| field as _)
7615        }
7616        ///Sets `funder` with the provided value.
7617        pub fn set_funder<T: Into<String>>(&mut self, field: T) {
7618            self.funder = Some(field.into().into());
7619        }
7620        ///Sets `funder` with the provided value.
7621        pub fn with_funder<T: Into<String>>(mut self, field: T) -> Self {
7622            self.set_funder(field.into());
7623            self
7624        }
7625        ///If `allowance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7626        pub fn allowance_opt_mut(&mut self) -> Option<&mut String> {
7627            self.allowance.as_mut().map(|field| field as _)
7628        }
7629        ///Returns a mutable reference to `allowance`.
7630        ///If the field is unset, it is first initialized with the default value.
7631        pub fn allowance_mut(&mut self) -> &mut String {
7632            self.allowance.get_or_insert_default()
7633        }
7634        ///If `allowance` is set, returns [`Some`] with the value; otherwise returns [`None`].
7635        pub fn allowance_opt(&self) -> Option<&str> {
7636            self.allowance.as_ref().map(|field| field as _)
7637        }
7638        ///Sets `allowance` with the provided value.
7639        pub fn set_allowance<T: Into<String>>(&mut self, field: T) {
7640            self.allowance = Some(field.into().into());
7641        }
7642        ///Sets `allowance` with the provided value.
7643        pub fn with_allowance<T: Into<String>>(mut self, field: T) -> Self {
7644            self.set_allowance(field.into());
7645            self
7646        }
7647        ///If `seized_from` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7648        pub fn seized_from_opt_mut(&mut self) -> Option<&mut String> {
7649            self.seized_from.as_mut().map(|field| field as _)
7650        }
7651        ///Returns a mutable reference to `seized_from`.
7652        ///If the field is unset, it is first initialized with the default value.
7653        pub fn seized_from_mut(&mut self) -> &mut String {
7654            self.seized_from.get_or_insert_default()
7655        }
7656        ///If `seized_from` is set, returns [`Some`] with the value; otherwise returns [`None`].
7657        pub fn seized_from_opt(&self) -> Option<&str> {
7658            self.seized_from.as_ref().map(|field| field as _)
7659        }
7660        ///Sets `seized_from` with the provided value.
7661        pub fn set_seized_from<T: Into<String>>(&mut self, field: T) {
7662            self.seized_from = Some(field.into().into());
7663        }
7664        ///Sets `seized_from` with the provided value.
7665        pub fn with_seized_from<T: Into<String>>(mut self, field: T) -> Self {
7666            self.set_seized_from(field.into());
7667            self
7668        }
7669        ///If `seize_auth` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7670        pub fn seize_auth_opt_mut(&mut self) -> Option<&mut String> {
7671            self.seize_auth.as_mut().map(|field| field as _)
7672        }
7673        ///Returns a mutable reference to `seize_auth`.
7674        ///If the field is unset, it is first initialized with the default value.
7675        pub fn seize_auth_mut(&mut self) -> &mut String {
7676            self.seize_auth.get_or_insert_default()
7677        }
7678        ///If `seize_auth` is set, returns [`Some`] with the value; otherwise returns [`None`].
7679        pub fn seize_auth_opt(&self) -> Option<&str> {
7680            self.seize_auth.as_ref().map(|field| field as _)
7681        }
7682        ///Sets `seize_auth` with the provided value.
7683        pub fn set_seize_auth<T: Into<String>>(&mut self, field: T) {
7684            self.seize_auth = Some(field.into().into());
7685        }
7686        ///Sets `seize_auth` with the provided value.
7687        pub fn with_seize_auth<T: Into<String>>(mut self, field: T) -> Self {
7688            self.set_seize_auth(field.into());
7689            self
7690        }
7691    }
7692    impl super::GasCostSummary {
7693        pub const fn const_default() -> Self {
7694            Self {
7695                computation_cost: None,
7696                storage_cost: None,
7697                storage_rebate: None,
7698                non_refundable_storage_fee: None,
7699            }
7700        }
7701        #[doc(hidden)]
7702        pub fn default_instance() -> &'static Self {
7703            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7704            &DEFAULT
7705        }
7706        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7707        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7708            self.computation_cost.as_mut().map(|field| field as _)
7709        }
7710        ///Returns a mutable reference to `computation_cost`.
7711        ///If the field is unset, it is first initialized with the default value.
7712        pub fn computation_cost_mut(&mut self) -> &mut u64 {
7713            self.computation_cost.get_or_insert_default()
7714        }
7715        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7716        pub fn computation_cost_opt(&self) -> Option<u64> {
7717            self.computation_cost.as_ref().map(|field| *field)
7718        }
7719        ///Sets `computation_cost` with the provided value.
7720        pub fn set_computation_cost(&mut self, field: u64) {
7721            self.computation_cost = Some(field);
7722        }
7723        ///Sets `computation_cost` with the provided value.
7724        pub fn with_computation_cost(mut self, field: u64) -> Self {
7725            self.set_computation_cost(field);
7726            self
7727        }
7728        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7729        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7730            self.storage_cost.as_mut().map(|field| field as _)
7731        }
7732        ///Returns a mutable reference to `storage_cost`.
7733        ///If the field is unset, it is first initialized with the default value.
7734        pub fn storage_cost_mut(&mut self) -> &mut u64 {
7735            self.storage_cost.get_or_insert_default()
7736        }
7737        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
7738        pub fn storage_cost_opt(&self) -> Option<u64> {
7739            self.storage_cost.as_ref().map(|field| *field)
7740        }
7741        ///Sets `storage_cost` with the provided value.
7742        pub fn set_storage_cost(&mut self, field: u64) {
7743            self.storage_cost = Some(field);
7744        }
7745        ///Sets `storage_cost` with the provided value.
7746        pub fn with_storage_cost(mut self, field: u64) -> Self {
7747            self.set_storage_cost(field);
7748            self
7749        }
7750        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7751        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7752            self.storage_rebate.as_mut().map(|field| field as _)
7753        }
7754        ///Returns a mutable reference to `storage_rebate`.
7755        ///If the field is unset, it is first initialized with the default value.
7756        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7757            self.storage_rebate.get_or_insert_default()
7758        }
7759        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
7760        pub fn storage_rebate_opt(&self) -> Option<u64> {
7761            self.storage_rebate.as_ref().map(|field| *field)
7762        }
7763        ///Sets `storage_rebate` with the provided value.
7764        pub fn set_storage_rebate(&mut self, field: u64) {
7765            self.storage_rebate = Some(field);
7766        }
7767        ///Sets `storage_rebate` with the provided value.
7768        pub fn with_storage_rebate(mut self, field: u64) -> Self {
7769            self.set_storage_rebate(field);
7770            self
7771        }
7772        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7773        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7774            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7775        }
7776        ///Returns a mutable reference to `non_refundable_storage_fee`.
7777        ///If the field is unset, it is first initialized with the default value.
7778        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7779            self.non_refundable_storage_fee.get_or_insert_default()
7780        }
7781        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
7782        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7783            self.non_refundable_storage_fee.as_ref().map(|field| *field)
7784        }
7785        ///Sets `non_refundable_storage_fee` with the provided value.
7786        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7787            self.non_refundable_storage_fee = Some(field);
7788        }
7789        ///Sets `non_refundable_storage_fee` with the provided value.
7790        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7791            self.set_non_refundable_storage_fee(field);
7792            self
7793        }
7794    }
7795    impl super::GasPayment {
7796        pub const fn const_default() -> Self {
7797            Self {
7798                objects: Vec::new(),
7799                owner: None,
7800                price: None,
7801                budget: None,
7802            }
7803        }
7804        #[doc(hidden)]
7805        pub fn default_instance() -> &'static Self {
7806            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7807            &DEFAULT
7808        }
7809        ///Returns the value of `objects`, or the default value if `objects` is unset.
7810        pub fn objects(&self) -> &[super::ObjectReference] {
7811            &self.objects
7812        }
7813        ///Returns a mutable reference to `objects`.
7814        ///If the field is unset, it is first initialized with the default value.
7815        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7816            &mut self.objects
7817        }
7818        ///Sets `objects` with the provided value.
7819        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7820            self.objects = field;
7821        }
7822        ///Sets `objects` with the provided value.
7823        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7824            self.set_objects(field);
7825            self
7826        }
7827        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7828        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7829            self.owner.as_mut().map(|field| field as _)
7830        }
7831        ///Returns a mutable reference to `owner`.
7832        ///If the field is unset, it is first initialized with the default value.
7833        pub fn owner_mut(&mut self) -> &mut String {
7834            self.owner.get_or_insert_default()
7835        }
7836        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7837        pub fn owner_opt(&self) -> Option<&str> {
7838            self.owner.as_ref().map(|field| field as _)
7839        }
7840        ///Sets `owner` with the provided value.
7841        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7842            self.owner = Some(field.into().into());
7843        }
7844        ///Sets `owner` with the provided value.
7845        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7846            self.set_owner(field.into());
7847            self
7848        }
7849        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7850        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7851            self.price.as_mut().map(|field| field as _)
7852        }
7853        ///Returns a mutable reference to `price`.
7854        ///If the field is unset, it is first initialized with the default value.
7855        pub fn price_mut(&mut self) -> &mut u64 {
7856            self.price.get_or_insert_default()
7857        }
7858        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
7859        pub fn price_opt(&self) -> Option<u64> {
7860            self.price.as_ref().map(|field| *field)
7861        }
7862        ///Sets `price` with the provided value.
7863        pub fn set_price(&mut self, field: u64) {
7864            self.price = Some(field);
7865        }
7866        ///Sets `price` with the provided value.
7867        pub fn with_price(mut self, field: u64) -> Self {
7868            self.set_price(field);
7869            self
7870        }
7871        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7872        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7873            self.budget.as_mut().map(|field| field as _)
7874        }
7875        ///Returns a mutable reference to `budget`.
7876        ///If the field is unset, it is first initialized with the default value.
7877        pub fn budget_mut(&mut self) -> &mut u64 {
7878            self.budget.get_or_insert_default()
7879        }
7880        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
7881        pub fn budget_opt(&self) -> Option<u64> {
7882            self.budget.as_ref().map(|field| *field)
7883        }
7884        ///Sets `budget` with the provided value.
7885        pub fn set_budget(&mut self, field: u64) {
7886            self.budget = Some(field);
7887        }
7888        ///Sets `budget` with the provided value.
7889        pub fn with_budget(mut self, field: u64) -> Self {
7890            self.set_budget(field);
7891            self
7892        }
7893    }
7894    impl super::GenesisTransaction {
7895        pub const fn const_default() -> Self {
7896            Self { objects: Vec::new() }
7897        }
7898        #[doc(hidden)]
7899        pub fn default_instance() -> &'static Self {
7900            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7901            &DEFAULT
7902        }
7903        ///Returns the value of `objects`, or the default value if `objects` is unset.
7904        pub fn objects(&self) -> &[super::Object] {
7905            &self.objects
7906        }
7907        ///Returns a mutable reference to `objects`.
7908        ///If the field is unset, it is first initialized with the default value.
7909        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7910            &mut self.objects
7911        }
7912        ///Sets `objects` with the provided value.
7913        pub fn set_objects(&mut self, field: Vec<super::Object>) {
7914            self.objects = field;
7915        }
7916        ///Sets `objects` with the provided value.
7917        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7918            self.set_objects(field);
7919            self
7920        }
7921    }
7922    impl super::GetBalanceRequest {
7923        pub const fn const_default() -> Self {
7924            Self {
7925                owner: None,
7926                coin_type: None,
7927            }
7928        }
7929        #[doc(hidden)]
7930        pub fn default_instance() -> &'static Self {
7931            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7932            &DEFAULT
7933        }
7934        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7935        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7936            self.owner.as_mut().map(|field| field as _)
7937        }
7938        ///Returns a mutable reference to `owner`.
7939        ///If the field is unset, it is first initialized with the default value.
7940        pub fn owner_mut(&mut self) -> &mut String {
7941            self.owner.get_or_insert_default()
7942        }
7943        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
7944        pub fn owner_opt(&self) -> Option<&str> {
7945            self.owner.as_ref().map(|field| field as _)
7946        }
7947        ///Sets `owner` with the provided value.
7948        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7949            self.owner = Some(field.into().into());
7950        }
7951        ///Sets `owner` with the provided value.
7952        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7953            self.set_owner(field.into());
7954            self
7955        }
7956        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7957        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7958            self.coin_type.as_mut().map(|field| field as _)
7959        }
7960        ///Returns a mutable reference to `coin_type`.
7961        ///If the field is unset, it is first initialized with the default value.
7962        pub fn coin_type_mut(&mut self) -> &mut String {
7963            self.coin_type.get_or_insert_default()
7964        }
7965        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7966        pub fn coin_type_opt(&self) -> Option<&str> {
7967            self.coin_type.as_ref().map(|field| field as _)
7968        }
7969        ///Sets `coin_type` with the provided value.
7970        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7971            self.coin_type = Some(field.into().into());
7972        }
7973        ///Sets `coin_type` with the provided value.
7974        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7975            self.set_coin_type(field.into());
7976            self
7977        }
7978    }
7979    impl super::GetBalanceResponse {
7980        pub const fn const_default() -> Self {
7981            Self { balance: None }
7982        }
7983        #[doc(hidden)]
7984        pub fn default_instance() -> &'static Self {
7985            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7986            &DEFAULT
7987        }
7988        ///Returns the value of `balance`, or the default value if `balance` is unset.
7989        pub fn balance(&self) -> &super::Balance {
7990            self.balance
7991                .as_ref()
7992                .map(|field| field as _)
7993                .unwrap_or_else(|| super::Balance::default_instance() as _)
7994        }
7995        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7996        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7997            self.balance.as_mut().map(|field| field as _)
7998        }
7999        ///Returns a mutable reference to `balance`.
8000        ///If the field is unset, it is first initialized with the default value.
8001        pub fn balance_mut(&mut self) -> &mut super::Balance {
8002            self.balance.get_or_insert_default()
8003        }
8004        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
8005        pub fn balance_opt(&self) -> Option<&super::Balance> {
8006            self.balance.as_ref().map(|field| field as _)
8007        }
8008        ///Sets `balance` with the provided value.
8009        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
8010            self.balance = Some(field.into().into());
8011        }
8012        ///Sets `balance` with the provided value.
8013        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
8014            self.set_balance(field.into());
8015            self
8016        }
8017    }
8018    impl super::GetCheckpointRequest {
8019        pub const fn const_default() -> Self {
8020            Self {
8021                read_mask: None,
8022                checkpoint_id: None,
8023            }
8024        }
8025        #[doc(hidden)]
8026        pub fn default_instance() -> &'static Self {
8027            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
8028            &DEFAULT
8029        }
8030        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8031        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8032            self.read_mask.as_mut().map(|field| field as _)
8033        }
8034        ///Returns a mutable reference to `read_mask`.
8035        ///If the field is unset, it is first initialized with the default value.
8036        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8037            self.read_mask.get_or_insert_default()
8038        }
8039        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8040        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8041            self.read_mask.as_ref().map(|field| field as _)
8042        }
8043        ///Sets `read_mask` with the provided value.
8044        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8045            self.read_mask = Some(field.into().into());
8046        }
8047        ///Sets `read_mask` with the provided value.
8048        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8049            mut self,
8050            field: T,
8051        ) -> Self {
8052            self.set_read_mask(field.into());
8053            self
8054        }
8055        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
8056        pub fn sequence_number(&self) -> u64 {
8057            if let Some(
8058                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8059            ) = &self.checkpoint_id
8060            {
8061                *field
8062            } else {
8063                0u64
8064            }
8065        }
8066        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
8067        pub fn sequence_number_opt(&self) -> Option<u64> {
8068            if let Some(
8069                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8070            ) = &self.checkpoint_id
8071            {
8072                Some(*field)
8073            } else {
8074                None
8075            }
8076        }
8077        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8078        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
8079            if let Some(
8080                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8081            ) = &mut self.checkpoint_id
8082            {
8083                Some(field as _)
8084            } else {
8085                None
8086            }
8087        }
8088        ///Returns a mutable reference to `sequence_number`.
8089        ///If the field is unset, it is first initialized with the default value.
8090        ///If any other oneof field in the same oneof is set, it will be cleared.
8091        pub fn sequence_number_mut(&mut self) -> &mut u64 {
8092            if self.sequence_number_opt_mut().is_none() {
8093                self.checkpoint_id = Some(
8094                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
8095                        u64::default(),
8096                    ),
8097                );
8098            }
8099            self.sequence_number_opt_mut().unwrap()
8100        }
8101        ///Sets `sequence_number` with the provided value.
8102        ///If any other oneof field in the same oneof is set, it will be cleared.
8103        pub fn set_sequence_number(&mut self, field: u64) {
8104            self.checkpoint_id = Some(
8105                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8106            );
8107        }
8108        ///Sets `sequence_number` with the provided value.
8109        ///If any other oneof field in the same oneof is set, it will be cleared.
8110        pub fn with_sequence_number(mut self, field: u64) -> Self {
8111            self.set_sequence_number(field);
8112            self
8113        }
8114        ///Returns the value of `digest`, or the default value if `digest` is unset.
8115        pub fn digest(&self) -> &str {
8116            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
8117                .checkpoint_id
8118            {
8119                field as _
8120            } else {
8121                ""
8122            }
8123        }
8124        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8125        pub fn digest_opt(&self) -> Option<&str> {
8126            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
8127                .checkpoint_id
8128            {
8129                Some(field as _)
8130            } else {
8131                None
8132            }
8133        }
8134        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8135        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8136            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
8137                .checkpoint_id
8138            {
8139                Some(field as _)
8140            } else {
8141                None
8142            }
8143        }
8144        ///Returns a mutable reference to `digest`.
8145        ///If the field is unset, it is first initialized with the default value.
8146        ///If any other oneof field in the same oneof is set, it will be cleared.
8147        pub fn digest_mut(&mut self) -> &mut String {
8148            if self.digest_opt_mut().is_none() {
8149                self.checkpoint_id = Some(
8150                    super::get_checkpoint_request::CheckpointId::Digest(
8151                        String::default(),
8152                    ),
8153                );
8154            }
8155            self.digest_opt_mut().unwrap()
8156        }
8157        ///Sets `digest` with the provided value.
8158        ///If any other oneof field in the same oneof is set, it will be cleared.
8159        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8160            self.checkpoint_id = Some(
8161                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
8162            );
8163        }
8164        ///Sets `digest` with the provided value.
8165        ///If any other oneof field in the same oneof is set, it will be cleared.
8166        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8167            self.set_digest(field.into());
8168            self
8169        }
8170    }
8171    impl super::GetCheckpointResponse {
8172        pub const fn const_default() -> Self {
8173            Self { checkpoint: None }
8174        }
8175        #[doc(hidden)]
8176        pub fn default_instance() -> &'static Self {
8177            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
8178            &DEFAULT
8179        }
8180        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
8181        pub fn checkpoint(&self) -> &super::Checkpoint {
8182            self.checkpoint
8183                .as_ref()
8184                .map(|field| field as _)
8185                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
8186        }
8187        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8188        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
8189            self.checkpoint.as_mut().map(|field| field as _)
8190        }
8191        ///Returns a mutable reference to `checkpoint`.
8192        ///If the field is unset, it is first initialized with the default value.
8193        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
8194            self.checkpoint.get_or_insert_default()
8195        }
8196        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8197        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
8198            self.checkpoint.as_ref().map(|field| field as _)
8199        }
8200        ///Sets `checkpoint` with the provided value.
8201        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
8202            self.checkpoint = Some(field.into().into());
8203        }
8204        ///Sets `checkpoint` with the provided value.
8205        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
8206            self.set_checkpoint(field.into());
8207            self
8208        }
8209    }
8210    impl super::GetCoinInfoRequest {
8211        pub const fn const_default() -> Self {
8212            Self { coin_type: None }
8213        }
8214        #[doc(hidden)]
8215        pub fn default_instance() -> &'static Self {
8216            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
8217            &DEFAULT
8218        }
8219        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8220        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8221            self.coin_type.as_mut().map(|field| field as _)
8222        }
8223        ///Returns a mutable reference to `coin_type`.
8224        ///If the field is unset, it is first initialized with the default value.
8225        pub fn coin_type_mut(&mut self) -> &mut String {
8226            self.coin_type.get_or_insert_default()
8227        }
8228        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8229        pub fn coin_type_opt(&self) -> Option<&str> {
8230            self.coin_type.as_ref().map(|field| field as _)
8231        }
8232        ///Sets `coin_type` with the provided value.
8233        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8234            self.coin_type = Some(field.into().into());
8235        }
8236        ///Sets `coin_type` with the provided value.
8237        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8238            self.set_coin_type(field.into());
8239            self
8240        }
8241    }
8242    impl super::GetCoinInfoResponse {
8243        pub const fn const_default() -> Self {
8244            Self {
8245                coin_type: None,
8246                metadata: None,
8247                treasury: None,
8248                regulated_metadata: None,
8249            }
8250        }
8251        #[doc(hidden)]
8252        pub fn default_instance() -> &'static Self {
8253            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
8254            &DEFAULT
8255        }
8256        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8257        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8258            self.coin_type.as_mut().map(|field| field as _)
8259        }
8260        ///Returns a mutable reference to `coin_type`.
8261        ///If the field is unset, it is first initialized with the default value.
8262        pub fn coin_type_mut(&mut self) -> &mut String {
8263            self.coin_type.get_or_insert_default()
8264        }
8265        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8266        pub fn coin_type_opt(&self) -> Option<&str> {
8267            self.coin_type.as_ref().map(|field| field as _)
8268        }
8269        ///Sets `coin_type` with the provided value.
8270        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8271            self.coin_type = Some(field.into().into());
8272        }
8273        ///Sets `coin_type` with the provided value.
8274        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8275            self.set_coin_type(field.into());
8276            self
8277        }
8278        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
8279        pub fn metadata(&self) -> &super::CoinMetadata {
8280            self.metadata
8281                .as_ref()
8282                .map(|field| field as _)
8283                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8284        }
8285        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8286        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8287            self.metadata.as_mut().map(|field| field as _)
8288        }
8289        ///Returns a mutable reference to `metadata`.
8290        ///If the field is unset, it is first initialized with the default value.
8291        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8292            self.metadata.get_or_insert_default()
8293        }
8294        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8295        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8296            self.metadata.as_ref().map(|field| field as _)
8297        }
8298        ///Sets `metadata` with the provided value.
8299        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8300            self.metadata = Some(field.into().into());
8301        }
8302        ///Sets `metadata` with the provided value.
8303        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8304            self.set_metadata(field.into());
8305            self
8306        }
8307        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
8308        pub fn treasury(&self) -> &super::CoinTreasury {
8309            self.treasury
8310                .as_ref()
8311                .map(|field| field as _)
8312                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8313        }
8314        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8315        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8316            self.treasury.as_mut().map(|field| field as _)
8317        }
8318        ///Returns a mutable reference to `treasury`.
8319        ///If the field is unset, it is first initialized with the default value.
8320        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8321            self.treasury.get_or_insert_default()
8322        }
8323        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
8324        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8325            self.treasury.as_ref().map(|field| field as _)
8326        }
8327        ///Sets `treasury` with the provided value.
8328        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8329            self.treasury = Some(field.into().into());
8330        }
8331        ///Sets `treasury` with the provided value.
8332        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8333            self.set_treasury(field.into());
8334            self
8335        }
8336        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
8337        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8338            self.regulated_metadata
8339                .as_ref()
8340                .map(|field| field as _)
8341                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8342        }
8343        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8344        pub fn regulated_metadata_opt_mut(
8345            &mut self,
8346        ) -> Option<&mut super::RegulatedCoinMetadata> {
8347            self.regulated_metadata.as_mut().map(|field| field as _)
8348        }
8349        ///Returns a mutable reference to `regulated_metadata`.
8350        ///If the field is unset, it is first initialized with the default value.
8351        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8352            self.regulated_metadata.get_or_insert_default()
8353        }
8354        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
8355        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8356            self.regulated_metadata.as_ref().map(|field| field as _)
8357        }
8358        ///Sets `regulated_metadata` with the provided value.
8359        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8360            &mut self,
8361            field: T,
8362        ) {
8363            self.regulated_metadata = Some(field.into().into());
8364        }
8365        ///Sets `regulated_metadata` with the provided value.
8366        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8367            mut self,
8368            field: T,
8369        ) -> Self {
8370            self.set_regulated_metadata(field.into());
8371            self
8372        }
8373    }
8374    impl super::GetDatatypeRequest {
8375        pub const fn const_default() -> Self {
8376            Self {
8377                package_id: None,
8378                module_name: None,
8379                name: None,
8380            }
8381        }
8382        #[doc(hidden)]
8383        pub fn default_instance() -> &'static Self {
8384            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8385            &DEFAULT
8386        }
8387        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8388        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8389            self.package_id.as_mut().map(|field| field as _)
8390        }
8391        ///Returns a mutable reference to `package_id`.
8392        ///If the field is unset, it is first initialized with the default value.
8393        pub fn package_id_mut(&mut self) -> &mut String {
8394            self.package_id.get_or_insert_default()
8395        }
8396        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8397        pub fn package_id_opt(&self) -> Option<&str> {
8398            self.package_id.as_ref().map(|field| field as _)
8399        }
8400        ///Sets `package_id` with the provided value.
8401        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8402            self.package_id = Some(field.into().into());
8403        }
8404        ///Sets `package_id` with the provided value.
8405        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8406            self.set_package_id(field.into());
8407            self
8408        }
8409        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8410        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8411            self.module_name.as_mut().map(|field| field as _)
8412        }
8413        ///Returns a mutable reference to `module_name`.
8414        ///If the field is unset, it is first initialized with the default value.
8415        pub fn module_name_mut(&mut self) -> &mut String {
8416            self.module_name.get_or_insert_default()
8417        }
8418        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8419        pub fn module_name_opt(&self) -> Option<&str> {
8420            self.module_name.as_ref().map(|field| field as _)
8421        }
8422        ///Sets `module_name` with the provided value.
8423        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8424            self.module_name = Some(field.into().into());
8425        }
8426        ///Sets `module_name` with the provided value.
8427        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8428            self.set_module_name(field.into());
8429            self
8430        }
8431        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8432        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8433            self.name.as_mut().map(|field| field as _)
8434        }
8435        ///Returns a mutable reference to `name`.
8436        ///If the field is unset, it is first initialized with the default value.
8437        pub fn name_mut(&mut self) -> &mut String {
8438            self.name.get_or_insert_default()
8439        }
8440        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8441        pub fn name_opt(&self) -> Option<&str> {
8442            self.name.as_ref().map(|field| field as _)
8443        }
8444        ///Sets `name` with the provided value.
8445        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8446            self.name = Some(field.into().into());
8447        }
8448        ///Sets `name` with the provided value.
8449        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8450            self.set_name(field.into());
8451            self
8452        }
8453    }
8454    impl super::GetDatatypeResponse {
8455        pub const fn const_default() -> Self {
8456            Self { datatype: None }
8457        }
8458        #[doc(hidden)]
8459        pub fn default_instance() -> &'static Self {
8460            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8461            &DEFAULT
8462        }
8463        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
8464        pub fn datatype(&self) -> &super::DatatypeDescriptor {
8465            self.datatype
8466                .as_ref()
8467                .map(|field| field as _)
8468                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8469        }
8470        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8471        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8472            self.datatype.as_mut().map(|field| field as _)
8473        }
8474        ///Returns a mutable reference to `datatype`.
8475        ///If the field is unset, it is first initialized with the default value.
8476        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8477            self.datatype.get_or_insert_default()
8478        }
8479        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
8480        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8481            self.datatype.as_ref().map(|field| field as _)
8482        }
8483        ///Sets `datatype` with the provided value.
8484        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8485            self.datatype = Some(field.into().into());
8486        }
8487        ///Sets `datatype` with the provided value.
8488        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8489            mut self,
8490            field: T,
8491        ) -> Self {
8492            self.set_datatype(field.into());
8493            self
8494        }
8495    }
8496    impl super::GetEpochRequest {
8497        pub const fn const_default() -> Self {
8498            Self {
8499                epoch: None,
8500                read_mask: None,
8501            }
8502        }
8503        #[doc(hidden)]
8504        pub fn default_instance() -> &'static Self {
8505            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8506            &DEFAULT
8507        }
8508        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8509        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8510            self.epoch.as_mut().map(|field| field as _)
8511        }
8512        ///Returns a mutable reference to `epoch`.
8513        ///If the field is unset, it is first initialized with the default value.
8514        pub fn epoch_mut(&mut self) -> &mut u64 {
8515            self.epoch.get_or_insert_default()
8516        }
8517        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8518        pub fn epoch_opt(&self) -> Option<u64> {
8519            self.epoch.as_ref().map(|field| *field)
8520        }
8521        ///Sets `epoch` with the provided value.
8522        pub fn set_epoch(&mut self, field: u64) {
8523            self.epoch = Some(field);
8524        }
8525        ///Sets `epoch` with the provided value.
8526        pub fn with_epoch(mut self, field: u64) -> Self {
8527            self.set_epoch(field);
8528            self
8529        }
8530        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8531        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8532            self.read_mask.as_mut().map(|field| field as _)
8533        }
8534        ///Returns a mutable reference to `read_mask`.
8535        ///If the field is unset, it is first initialized with the default value.
8536        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8537            self.read_mask.get_or_insert_default()
8538        }
8539        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8540        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8541            self.read_mask.as_ref().map(|field| field as _)
8542        }
8543        ///Sets `read_mask` with the provided value.
8544        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8545            self.read_mask = Some(field.into().into());
8546        }
8547        ///Sets `read_mask` with the provided value.
8548        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8549            mut self,
8550            field: T,
8551        ) -> Self {
8552            self.set_read_mask(field.into());
8553            self
8554        }
8555    }
8556    impl super::GetEpochResponse {
8557        pub const fn const_default() -> Self {
8558            Self { epoch: None }
8559        }
8560        #[doc(hidden)]
8561        pub fn default_instance() -> &'static Self {
8562            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8563            &DEFAULT
8564        }
8565        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
8566        pub fn epoch(&self) -> &super::Epoch {
8567            self.epoch
8568                .as_ref()
8569                .map(|field| field as _)
8570                .unwrap_or_else(|| super::Epoch::default_instance() as _)
8571        }
8572        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8573        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8574            self.epoch.as_mut().map(|field| field as _)
8575        }
8576        ///Returns a mutable reference to `epoch`.
8577        ///If the field is unset, it is first initialized with the default value.
8578        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8579            self.epoch.get_or_insert_default()
8580        }
8581        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
8582        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8583            self.epoch.as_ref().map(|field| field as _)
8584        }
8585        ///Sets `epoch` with the provided value.
8586        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8587            self.epoch = Some(field.into().into());
8588        }
8589        ///Sets `epoch` with the provided value.
8590        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8591            self.set_epoch(field.into());
8592            self
8593        }
8594    }
8595    impl super::GetFunctionRequest {
8596        pub const fn const_default() -> Self {
8597            Self {
8598                package_id: None,
8599                module_name: None,
8600                name: None,
8601            }
8602        }
8603        #[doc(hidden)]
8604        pub fn default_instance() -> &'static Self {
8605            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8606            &DEFAULT
8607        }
8608        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8609        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8610            self.package_id.as_mut().map(|field| field as _)
8611        }
8612        ///Returns a mutable reference to `package_id`.
8613        ///If the field is unset, it is first initialized with the default value.
8614        pub fn package_id_mut(&mut self) -> &mut String {
8615            self.package_id.get_or_insert_default()
8616        }
8617        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8618        pub fn package_id_opt(&self) -> Option<&str> {
8619            self.package_id.as_ref().map(|field| field as _)
8620        }
8621        ///Sets `package_id` with the provided value.
8622        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8623            self.package_id = Some(field.into().into());
8624        }
8625        ///Sets `package_id` with the provided value.
8626        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8627            self.set_package_id(field.into());
8628            self
8629        }
8630        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8631        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8632            self.module_name.as_mut().map(|field| field as _)
8633        }
8634        ///Returns a mutable reference to `module_name`.
8635        ///If the field is unset, it is first initialized with the default value.
8636        pub fn module_name_mut(&mut self) -> &mut String {
8637            self.module_name.get_or_insert_default()
8638        }
8639        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8640        pub fn module_name_opt(&self) -> Option<&str> {
8641            self.module_name.as_ref().map(|field| field as _)
8642        }
8643        ///Sets `module_name` with the provided value.
8644        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8645            self.module_name = Some(field.into().into());
8646        }
8647        ///Sets `module_name` with the provided value.
8648        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8649            self.set_module_name(field.into());
8650            self
8651        }
8652        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8653        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8654            self.name.as_mut().map(|field| field as _)
8655        }
8656        ///Returns a mutable reference to `name`.
8657        ///If the field is unset, it is first initialized with the default value.
8658        pub fn name_mut(&mut self) -> &mut String {
8659            self.name.get_or_insert_default()
8660        }
8661        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
8662        pub fn name_opt(&self) -> Option<&str> {
8663            self.name.as_ref().map(|field| field as _)
8664        }
8665        ///Sets `name` with the provided value.
8666        pub fn set_name<T: Into<String>>(&mut self, field: T) {
8667            self.name = Some(field.into().into());
8668        }
8669        ///Sets `name` with the provided value.
8670        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8671            self.set_name(field.into());
8672            self
8673        }
8674    }
8675    impl super::GetFunctionResponse {
8676        pub const fn const_default() -> Self {
8677            Self { function: None }
8678        }
8679        #[doc(hidden)]
8680        pub fn default_instance() -> &'static Self {
8681            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8682            &DEFAULT
8683        }
8684        ///Returns the value of `function`, or the default value if `function` is unset.
8685        pub fn function(&self) -> &super::FunctionDescriptor {
8686            self.function
8687                .as_ref()
8688                .map(|field| field as _)
8689                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8690        }
8691        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8692        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8693            self.function.as_mut().map(|field| field as _)
8694        }
8695        ///Returns a mutable reference to `function`.
8696        ///If the field is unset, it is first initialized with the default value.
8697        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8698            self.function.get_or_insert_default()
8699        }
8700        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
8701        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8702            self.function.as_ref().map(|field| field as _)
8703        }
8704        ///Sets `function` with the provided value.
8705        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8706            self.function = Some(field.into().into());
8707        }
8708        ///Sets `function` with the provided value.
8709        pub fn with_function<T: Into<super::FunctionDescriptor>>(
8710            mut self,
8711            field: T,
8712        ) -> Self {
8713            self.set_function(field.into());
8714            self
8715        }
8716    }
8717    impl super::GetObjectRequest {
8718        pub const fn const_default() -> Self {
8719            Self {
8720                object_id: None,
8721                version: None,
8722                read_mask: None,
8723                at_checkpoint: None,
8724                max_version: None,
8725            }
8726        }
8727        #[doc(hidden)]
8728        pub fn default_instance() -> &'static Self {
8729            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8730            &DEFAULT
8731        }
8732        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8733        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8734            self.object_id.as_mut().map(|field| field as _)
8735        }
8736        ///Returns a mutable reference to `object_id`.
8737        ///If the field is unset, it is first initialized with the default value.
8738        pub fn object_id_mut(&mut self) -> &mut String {
8739            self.object_id.get_or_insert_default()
8740        }
8741        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8742        pub fn object_id_opt(&self) -> Option<&str> {
8743            self.object_id.as_ref().map(|field| field as _)
8744        }
8745        ///Sets `object_id` with the provided value.
8746        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8747            self.object_id = Some(field.into().into());
8748        }
8749        ///Sets `object_id` with the provided value.
8750        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8751            self.set_object_id(field.into());
8752            self
8753        }
8754        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8755        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8756            self.version.as_mut().map(|field| field as _)
8757        }
8758        ///Returns a mutable reference to `version`.
8759        ///If the field is unset, it is first initialized with the default value.
8760        pub fn version_mut(&mut self) -> &mut u64 {
8761            self.version.get_or_insert_default()
8762        }
8763        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8764        pub fn version_opt(&self) -> Option<u64> {
8765            self.version.as_ref().map(|field| *field)
8766        }
8767        ///Sets `version` with the provided value.
8768        pub fn set_version(&mut self, field: u64) {
8769            self.version = Some(field);
8770        }
8771        ///Sets `version` with the provided value.
8772        pub fn with_version(mut self, field: u64) -> Self {
8773            self.set_version(field);
8774            self
8775        }
8776        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8777        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8778            self.read_mask.as_mut().map(|field| field as _)
8779        }
8780        ///Returns a mutable reference to `read_mask`.
8781        ///If the field is unset, it is first initialized with the default value.
8782        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8783            self.read_mask.get_or_insert_default()
8784        }
8785        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8786        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8787            self.read_mask.as_ref().map(|field| field as _)
8788        }
8789        ///Sets `read_mask` with the provided value.
8790        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8791            self.read_mask = Some(field.into().into());
8792        }
8793        ///Sets `read_mask` with the provided value.
8794        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8795            mut self,
8796            field: T,
8797        ) -> Self {
8798            self.set_read_mask(field.into());
8799            self
8800        }
8801        ///If `at_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8802        pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8803            self.at_checkpoint.as_mut().map(|field| field as _)
8804        }
8805        ///Returns a mutable reference to `at_checkpoint`.
8806        ///If the field is unset, it is first initialized with the default value.
8807        pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
8808            self.at_checkpoint.get_or_insert_default()
8809        }
8810        ///If `at_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8811        pub fn at_checkpoint_opt(&self) -> Option<u64> {
8812            self.at_checkpoint.as_ref().map(|field| *field)
8813        }
8814        ///Sets `at_checkpoint` with the provided value.
8815        pub fn set_at_checkpoint(&mut self, field: u64) {
8816            self.at_checkpoint = Some(field);
8817        }
8818        ///Sets `at_checkpoint` with the provided value.
8819        pub fn with_at_checkpoint(mut self, field: u64) -> Self {
8820            self.set_at_checkpoint(field);
8821            self
8822        }
8823        ///If `max_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8824        pub fn max_version_opt_mut(&mut self) -> Option<&mut u64> {
8825            self.max_version.as_mut().map(|field| field as _)
8826        }
8827        ///Returns a mutable reference to `max_version`.
8828        ///If the field is unset, it is first initialized with the default value.
8829        pub fn max_version_mut(&mut self) -> &mut u64 {
8830            self.max_version.get_or_insert_default()
8831        }
8832        ///If `max_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8833        pub fn max_version_opt(&self) -> Option<u64> {
8834            self.max_version.as_ref().map(|field| *field)
8835        }
8836        ///Sets `max_version` with the provided value.
8837        pub fn set_max_version(&mut self, field: u64) {
8838            self.max_version = Some(field);
8839        }
8840        ///Sets `max_version` with the provided value.
8841        pub fn with_max_version(mut self, field: u64) -> Self {
8842            self.set_max_version(field);
8843            self
8844        }
8845    }
8846    impl super::GetObjectResponse {
8847        pub const fn const_default() -> Self {
8848            Self { object: None }
8849        }
8850        #[doc(hidden)]
8851        pub fn default_instance() -> &'static Self {
8852            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8853            &DEFAULT
8854        }
8855        ///Returns the value of `object`, or the default value if `object` is unset.
8856        pub fn object(&self) -> &super::Object {
8857            self.object
8858                .as_ref()
8859                .map(|field| field as _)
8860                .unwrap_or_else(|| super::Object::default_instance() as _)
8861        }
8862        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8863        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8864            self.object.as_mut().map(|field| field as _)
8865        }
8866        ///Returns a mutable reference to `object`.
8867        ///If the field is unset, it is first initialized with the default value.
8868        pub fn object_mut(&mut self) -> &mut super::Object {
8869            self.object.get_or_insert_default()
8870        }
8871        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8872        pub fn object_opt(&self) -> Option<&super::Object> {
8873            self.object.as_ref().map(|field| field as _)
8874        }
8875        ///Sets `object` with the provided value.
8876        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8877            self.object = Some(field.into().into());
8878        }
8879        ///Sets `object` with the provided value.
8880        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8881            self.set_object(field.into());
8882            self
8883        }
8884    }
8885    impl super::GetObjectResult {
8886        pub const fn const_default() -> Self {
8887            Self { result: None }
8888        }
8889        #[doc(hidden)]
8890        pub fn default_instance() -> &'static Self {
8891            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8892            &DEFAULT
8893        }
8894        ///Returns the value of `object`, or the default value if `object` is unset.
8895        pub fn object(&self) -> &super::Object {
8896            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8897                field as _
8898            } else {
8899                super::Object::default_instance() as _
8900            }
8901        }
8902        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
8903        pub fn object_opt(&self) -> Option<&super::Object> {
8904            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8905                Some(field as _)
8906            } else {
8907                None
8908            }
8909        }
8910        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8911        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8912            if let Some(super::get_object_result::Result::Object(field)) = &mut self
8913                .result
8914            {
8915                Some(field as _)
8916            } else {
8917                None
8918            }
8919        }
8920        ///Returns a mutable reference to `object`.
8921        ///If the field is unset, it is first initialized with the default value.
8922        ///If any other oneof field in the same oneof is set, it will be cleared.
8923        pub fn object_mut(&mut self) -> &mut super::Object {
8924            if self.object_opt_mut().is_none() {
8925                self.result = Some(
8926                    super::get_object_result::Result::Object(super::Object::default()),
8927                );
8928            }
8929            self.object_opt_mut().unwrap()
8930        }
8931        ///Sets `object` with the provided value.
8932        ///If any other oneof field in the same oneof is set, it will be cleared.
8933        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8934            self.result = Some(
8935                super::get_object_result::Result::Object(field.into().into()),
8936            );
8937        }
8938        ///Sets `object` with the provided value.
8939        ///If any other oneof field in the same oneof is set, it will be cleared.
8940        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8941            self.set_object(field.into());
8942            self
8943        }
8944        ///Returns the value of `error`, or the default value if `error` is unset.
8945        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8946            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8947                field as _
8948            } else {
8949                super::super::super::super::google::rpc::Status::default_instance() as _
8950            }
8951        }
8952        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8953        pub fn error_opt(
8954            &self,
8955        ) -> Option<&super::super::super::super::google::rpc::Status> {
8956            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8957                Some(field as _)
8958            } else {
8959                None
8960            }
8961        }
8962        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8963        pub fn error_opt_mut(
8964            &mut self,
8965        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8966            if let Some(super::get_object_result::Result::Error(field)) = &mut self
8967                .result
8968            {
8969                Some(field as _)
8970            } else {
8971                None
8972            }
8973        }
8974        ///Returns a mutable reference to `error`.
8975        ///If the field is unset, it is first initialized with the default value.
8976        ///If any other oneof field in the same oneof is set, it will be cleared.
8977        pub fn error_mut(
8978            &mut self,
8979        ) -> &mut super::super::super::super::google::rpc::Status {
8980            if self.error_opt_mut().is_none() {
8981                self.result = Some(
8982                    super::get_object_result::Result::Error(
8983                        super::super::super::super::google::rpc::Status::default(),
8984                    ),
8985                );
8986            }
8987            self.error_opt_mut().unwrap()
8988        }
8989        ///Sets `error` with the provided value.
8990        ///If any other oneof field in the same oneof is set, it will be cleared.
8991        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8992            &mut self,
8993            field: T,
8994        ) {
8995            self.result = Some(
8996                super::get_object_result::Result::Error(field.into().into()),
8997            );
8998        }
8999        ///Sets `error` with the provided value.
9000        ///If any other oneof field in the same oneof is set, it will be cleared.
9001        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9002            mut self,
9003            field: T,
9004        ) -> Self {
9005            self.set_error(field.into());
9006            self
9007        }
9008    }
9009    impl super::GetPackageRequest {
9010        pub const fn const_default() -> Self {
9011            Self {
9012                package_id: None,
9013                selector: None,
9014            }
9015        }
9016        #[doc(hidden)]
9017        pub fn default_instance() -> &'static Self {
9018            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
9019            &DEFAULT
9020        }
9021        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9022        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9023            self.package_id.as_mut().map(|field| field as _)
9024        }
9025        ///Returns a mutable reference to `package_id`.
9026        ///If the field is unset, it is first initialized with the default value.
9027        pub fn package_id_mut(&mut self) -> &mut String {
9028            self.package_id.get_or_insert_default()
9029        }
9030        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9031        pub fn package_id_opt(&self) -> Option<&str> {
9032            self.package_id.as_ref().map(|field| field as _)
9033        }
9034        ///Sets `package_id` with the provided value.
9035        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9036            self.package_id = Some(field.into().into());
9037        }
9038        ///Sets `package_id` with the provided value.
9039        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9040            self.set_package_id(field.into());
9041            self
9042        }
9043        ///Returns the value of `version`, or the default value if `version` is unset.
9044        pub fn version(&self) -> u64 {
9045            if let Some(super::get_package_request::Selector::Version(field)) = &self
9046                .selector
9047            {
9048                *field
9049            } else {
9050                0u64
9051            }
9052        }
9053        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9054        pub fn version_opt(&self) -> Option<u64> {
9055            if let Some(super::get_package_request::Selector::Version(field)) = &self
9056                .selector
9057            {
9058                Some(*field)
9059            } else {
9060                None
9061            }
9062        }
9063        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9064        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9065            if let Some(super::get_package_request::Selector::Version(field)) = &mut self
9066                .selector
9067            {
9068                Some(field as _)
9069            } else {
9070                None
9071            }
9072        }
9073        ///Returns a mutable reference to `version`.
9074        ///If the field is unset, it is first initialized with the default value.
9075        ///If any other oneof field in the same oneof is set, it will be cleared.
9076        pub fn version_mut(&mut self) -> &mut u64 {
9077            if self.version_opt_mut().is_none() {
9078                self.selector = Some(
9079                    super::get_package_request::Selector::Version(u64::default()),
9080                );
9081            }
9082            self.version_opt_mut().unwrap()
9083        }
9084        ///Sets `version` with the provided value.
9085        ///If any other oneof field in the same oneof is set, it will be cleared.
9086        pub fn set_version(&mut self, field: u64) {
9087            self.selector = Some(super::get_package_request::Selector::Version(field));
9088        }
9089        ///Sets `version` with the provided value.
9090        ///If any other oneof field in the same oneof is set, it will be cleared.
9091        pub fn with_version(mut self, field: u64) -> Self {
9092            self.set_version(field);
9093            self
9094        }
9095        ///Returns the value of `at_checkpoint`, or the default value if `at_checkpoint` is unset.
9096        pub fn at_checkpoint(&self) -> u64 {
9097            if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
9098                .selector
9099            {
9100                *field
9101            } else {
9102                0u64
9103            }
9104        }
9105        ///If `at_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9106        pub fn at_checkpoint_opt(&self) -> Option<u64> {
9107            if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
9108                .selector
9109            {
9110                Some(*field)
9111            } else {
9112                None
9113            }
9114        }
9115        ///If `at_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9116        pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9117            if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &mut self
9118                .selector
9119            {
9120                Some(field as _)
9121            } else {
9122                None
9123            }
9124        }
9125        ///Returns a mutable reference to `at_checkpoint`.
9126        ///If the field is unset, it is first initialized with the default value.
9127        ///If any other oneof field in the same oneof is set, it will be cleared.
9128        pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
9129            if self.at_checkpoint_opt_mut().is_none() {
9130                self.selector = Some(
9131                    super::get_package_request::Selector::AtCheckpoint(u64::default()),
9132                );
9133            }
9134            self.at_checkpoint_opt_mut().unwrap()
9135        }
9136        ///Sets `at_checkpoint` with the provided value.
9137        ///If any other oneof field in the same oneof is set, it will be cleared.
9138        pub fn set_at_checkpoint(&mut self, field: u64) {
9139            self.selector = Some(
9140                super::get_package_request::Selector::AtCheckpoint(field),
9141            );
9142        }
9143        ///Sets `at_checkpoint` with the provided value.
9144        ///If any other oneof field in the same oneof is set, it will be cleared.
9145        pub fn with_at_checkpoint(mut self, field: u64) -> Self {
9146            self.set_at_checkpoint(field);
9147            self
9148        }
9149    }
9150    impl super::GetPackageResponse {
9151        pub const fn const_default() -> Self {
9152            Self { package: None }
9153        }
9154        #[doc(hidden)]
9155        pub fn default_instance() -> &'static Self {
9156            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
9157            &DEFAULT
9158        }
9159        ///Returns the value of `package`, or the default value if `package` is unset.
9160        pub fn package(&self) -> &super::Package {
9161            self.package
9162                .as_ref()
9163                .map(|field| field as _)
9164                .unwrap_or_else(|| super::Package::default_instance() as _)
9165        }
9166        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9167        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
9168            self.package.as_mut().map(|field| field as _)
9169        }
9170        ///Returns a mutable reference to `package`.
9171        ///If the field is unset, it is first initialized with the default value.
9172        pub fn package_mut(&mut self) -> &mut super::Package {
9173            self.package.get_or_insert_default()
9174        }
9175        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9176        pub fn package_opt(&self) -> Option<&super::Package> {
9177            self.package.as_ref().map(|field| field as _)
9178        }
9179        ///Sets `package` with the provided value.
9180        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
9181            self.package = Some(field.into().into());
9182        }
9183        ///Sets `package` with the provided value.
9184        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
9185            self.set_package(field.into());
9186            self
9187        }
9188    }
9189    impl super::GetProtocolConfigRequest {
9190        pub const fn const_default() -> Self {
9191            Self {
9192                version: None,
9193                read_mask: None,
9194            }
9195        }
9196        #[doc(hidden)]
9197        pub fn default_instance() -> &'static Self {
9198            static DEFAULT: super::GetProtocolConfigRequest = super::GetProtocolConfigRequest::const_default();
9199            &DEFAULT
9200        }
9201        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9202        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9203            self.version.as_mut().map(|field| field as _)
9204        }
9205        ///Returns a mutable reference to `version`.
9206        ///If the field is unset, it is first initialized with the default value.
9207        pub fn version_mut(&mut self) -> &mut u64 {
9208            self.version.get_or_insert_default()
9209        }
9210        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9211        pub fn version_opt(&self) -> Option<u64> {
9212            self.version.as_ref().map(|field| *field)
9213        }
9214        ///Sets `version` with the provided value.
9215        pub fn set_version(&mut self, field: u64) {
9216            self.version = Some(field);
9217        }
9218        ///Sets `version` with the provided value.
9219        pub fn with_version(mut self, field: u64) -> Self {
9220            self.set_version(field);
9221            self
9222        }
9223        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9224        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9225            self.read_mask.as_mut().map(|field| field as _)
9226        }
9227        ///Returns a mutable reference to `read_mask`.
9228        ///If the field is unset, it is first initialized with the default value.
9229        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9230            self.read_mask.get_or_insert_default()
9231        }
9232        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9233        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9234            self.read_mask.as_ref().map(|field| field as _)
9235        }
9236        ///Sets `read_mask` with the provided value.
9237        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9238            self.read_mask = Some(field.into().into());
9239        }
9240        ///Sets `read_mask` with the provided value.
9241        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9242            mut self,
9243            field: T,
9244        ) -> Self {
9245            self.set_read_mask(field.into());
9246            self
9247        }
9248    }
9249    impl super::GetProtocolConfigResponse {
9250        pub const fn const_default() -> Self {
9251            Self { protocol_config: None }
9252        }
9253        #[doc(hidden)]
9254        pub fn default_instance() -> &'static Self {
9255            static DEFAULT: super::GetProtocolConfigResponse = super::GetProtocolConfigResponse::const_default();
9256            &DEFAULT
9257        }
9258        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
9259        pub fn protocol_config(&self) -> &super::ProtocolConfig {
9260            self.protocol_config
9261                .as_ref()
9262                .map(|field| field as _)
9263                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
9264        }
9265        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9266        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
9267            self.protocol_config.as_mut().map(|field| field as _)
9268        }
9269        ///Returns a mutable reference to `protocol_config`.
9270        ///If the field is unset, it is first initialized with the default value.
9271        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
9272            self.protocol_config.get_or_insert_default()
9273        }
9274        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
9275        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
9276            self.protocol_config.as_ref().map(|field| field as _)
9277        }
9278        ///Sets `protocol_config` with the provided value.
9279        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
9280            self.protocol_config = Some(field.into().into());
9281        }
9282        ///Sets `protocol_config` with the provided value.
9283        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
9284            mut self,
9285            field: T,
9286        ) -> Self {
9287            self.set_protocol_config(field.into());
9288            self
9289        }
9290    }
9291    impl super::GetServiceInfoRequest {
9292        pub const fn const_default() -> Self {
9293            Self {}
9294        }
9295        #[doc(hidden)]
9296        pub fn default_instance() -> &'static Self {
9297            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
9298            &DEFAULT
9299        }
9300    }
9301    impl super::GetServiceInfoResponse {
9302        pub const fn const_default() -> Self {
9303            Self {
9304                chain_id: None,
9305                chain: None,
9306                epoch: None,
9307                checkpoint_height: None,
9308                timestamp: None,
9309                lowest_available_checkpoint: None,
9310                lowest_available_checkpoint_objects: None,
9311                server: None,
9312            }
9313        }
9314        #[doc(hidden)]
9315        pub fn default_instance() -> &'static Self {
9316            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
9317            &DEFAULT
9318        }
9319        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9320        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
9321            self.chain_id.as_mut().map(|field| field as _)
9322        }
9323        ///Returns a mutable reference to `chain_id`.
9324        ///If the field is unset, it is first initialized with the default value.
9325        pub fn chain_id_mut(&mut self) -> &mut String {
9326            self.chain_id.get_or_insert_default()
9327        }
9328        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9329        pub fn chain_id_opt(&self) -> Option<&str> {
9330            self.chain_id.as_ref().map(|field| field as _)
9331        }
9332        ///Sets `chain_id` with the provided value.
9333        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
9334            self.chain_id = Some(field.into().into());
9335        }
9336        ///Sets `chain_id` with the provided value.
9337        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
9338            self.set_chain_id(field.into());
9339            self
9340        }
9341        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9342        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
9343            self.chain.as_mut().map(|field| field as _)
9344        }
9345        ///Returns a mutable reference to `chain`.
9346        ///If the field is unset, it is first initialized with the default value.
9347        pub fn chain_mut(&mut self) -> &mut String {
9348            self.chain.get_or_insert_default()
9349        }
9350        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
9351        pub fn chain_opt(&self) -> Option<&str> {
9352            self.chain.as_ref().map(|field| field as _)
9353        }
9354        ///Sets `chain` with the provided value.
9355        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
9356            self.chain = Some(field.into().into());
9357        }
9358        ///Sets `chain` with the provided value.
9359        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
9360            self.set_chain(field.into());
9361            self
9362        }
9363        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9364        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
9365            self.epoch.as_mut().map(|field| field as _)
9366        }
9367        ///Returns a mutable reference to `epoch`.
9368        ///If the field is unset, it is first initialized with the default value.
9369        pub fn epoch_mut(&mut self) -> &mut u64 {
9370            self.epoch.get_or_insert_default()
9371        }
9372        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
9373        pub fn epoch_opt(&self) -> Option<u64> {
9374            self.epoch.as_ref().map(|field| *field)
9375        }
9376        ///Sets `epoch` with the provided value.
9377        pub fn set_epoch(&mut self, field: u64) {
9378            self.epoch = Some(field);
9379        }
9380        ///Sets `epoch` with the provided value.
9381        pub fn with_epoch(mut self, field: u64) -> Self {
9382            self.set_epoch(field);
9383            self
9384        }
9385        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9386        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
9387            self.checkpoint_height.as_mut().map(|field| field as _)
9388        }
9389        ///Returns a mutable reference to `checkpoint_height`.
9390        ///If the field is unset, it is first initialized with the default value.
9391        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
9392            self.checkpoint_height.get_or_insert_default()
9393        }
9394        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
9395        pub fn checkpoint_height_opt(&self) -> Option<u64> {
9396            self.checkpoint_height.as_ref().map(|field| *field)
9397        }
9398        ///Sets `checkpoint_height` with the provided value.
9399        pub fn set_checkpoint_height(&mut self, field: u64) {
9400            self.checkpoint_height = Some(field);
9401        }
9402        ///Sets `checkpoint_height` with the provided value.
9403        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
9404            self.set_checkpoint_height(field);
9405            self
9406        }
9407        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9408        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
9409            self.timestamp.as_mut().map(|field| field as _)
9410        }
9411        ///Returns a mutable reference to `timestamp`.
9412        ///If the field is unset, it is first initialized with the default value.
9413        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
9414            self.timestamp.get_or_insert_default()
9415        }
9416        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
9417        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
9418            self.timestamp.as_ref().map(|field| field as _)
9419        }
9420        ///Sets `timestamp` with the provided value.
9421        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
9422            self.timestamp = Some(field.into().into());
9423        }
9424        ///Sets `timestamp` with the provided value.
9425        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
9426            mut self,
9427            field: T,
9428        ) -> Self {
9429            self.set_timestamp(field.into());
9430            self
9431        }
9432        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9433        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9434            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
9435        }
9436        ///Returns a mutable reference to `lowest_available_checkpoint`.
9437        ///If the field is unset, it is first initialized with the default value.
9438        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
9439            self.lowest_available_checkpoint.get_or_insert_default()
9440        }
9441        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
9442        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
9443            self.lowest_available_checkpoint.as_ref().map(|field| *field)
9444        }
9445        ///Sets `lowest_available_checkpoint` with the provided value.
9446        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
9447            self.lowest_available_checkpoint = Some(field);
9448        }
9449        ///Sets `lowest_available_checkpoint` with the provided value.
9450        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
9451            self.set_lowest_available_checkpoint(field);
9452            self
9453        }
9454        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9455        pub fn lowest_available_checkpoint_objects_opt_mut(
9456            &mut self,
9457        ) -> Option<&mut u64> {
9458            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
9459        }
9460        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
9461        ///If the field is unset, it is first initialized with the default value.
9462        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
9463            self.lowest_available_checkpoint_objects.get_or_insert_default()
9464        }
9465        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
9466        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
9467            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
9468        }
9469        ///Sets `lowest_available_checkpoint_objects` with the provided value.
9470        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
9471            self.lowest_available_checkpoint_objects = Some(field);
9472        }
9473        ///Sets `lowest_available_checkpoint_objects` with the provided value.
9474        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
9475            self.set_lowest_available_checkpoint_objects(field);
9476            self
9477        }
9478        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9479        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
9480            self.server.as_mut().map(|field| field as _)
9481        }
9482        ///Returns a mutable reference to `server`.
9483        ///If the field is unset, it is first initialized with the default value.
9484        pub fn server_mut(&mut self) -> &mut String {
9485            self.server.get_or_insert_default()
9486        }
9487        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
9488        pub fn server_opt(&self) -> Option<&str> {
9489            self.server.as_ref().map(|field| field as _)
9490        }
9491        ///Sets `server` with the provided value.
9492        pub fn set_server<T: Into<String>>(&mut self, field: T) {
9493            self.server = Some(field.into().into());
9494        }
9495        ///Sets `server` with the provided value.
9496        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9497            self.set_server(field.into());
9498            self
9499        }
9500    }
9501    impl super::GetTransactionRequest {
9502        pub const fn const_default() -> Self {
9503            Self {
9504                digest: None,
9505                read_mask: None,
9506            }
9507        }
9508        #[doc(hidden)]
9509        pub fn default_instance() -> &'static Self {
9510            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9511            &DEFAULT
9512        }
9513        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9514        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9515            self.digest.as_mut().map(|field| field as _)
9516        }
9517        ///Returns a mutable reference to `digest`.
9518        ///If the field is unset, it is first initialized with the default value.
9519        pub fn digest_mut(&mut self) -> &mut String {
9520            self.digest.get_or_insert_default()
9521        }
9522        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9523        pub fn digest_opt(&self) -> Option<&str> {
9524            self.digest.as_ref().map(|field| field as _)
9525        }
9526        ///Sets `digest` with the provided value.
9527        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9528            self.digest = Some(field.into().into());
9529        }
9530        ///Sets `digest` with the provided value.
9531        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9532            self.set_digest(field.into());
9533            self
9534        }
9535        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9536        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9537            self.read_mask.as_mut().map(|field| field as _)
9538        }
9539        ///Returns a mutable reference to `read_mask`.
9540        ///If the field is unset, it is first initialized with the default value.
9541        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9542            self.read_mask.get_or_insert_default()
9543        }
9544        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9545        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9546            self.read_mask.as_ref().map(|field| field as _)
9547        }
9548        ///Sets `read_mask` with the provided value.
9549        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9550            self.read_mask = Some(field.into().into());
9551        }
9552        ///Sets `read_mask` with the provided value.
9553        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9554            mut self,
9555            field: T,
9556        ) -> Self {
9557            self.set_read_mask(field.into());
9558            self
9559        }
9560    }
9561    impl super::GetTransactionResponse {
9562        pub const fn const_default() -> Self {
9563            Self { transaction: None }
9564        }
9565        #[doc(hidden)]
9566        pub fn default_instance() -> &'static Self {
9567            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9568            &DEFAULT
9569        }
9570        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9571        pub fn transaction(&self) -> &super::ExecutedTransaction {
9572            self.transaction
9573                .as_ref()
9574                .map(|field| field as _)
9575                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9576        }
9577        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9578        pub fn transaction_opt_mut(
9579            &mut self,
9580        ) -> Option<&mut super::ExecutedTransaction> {
9581            self.transaction.as_mut().map(|field| field as _)
9582        }
9583        ///Returns a mutable reference to `transaction`.
9584        ///If the field is unset, it is first initialized with the default value.
9585        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9586            self.transaction.get_or_insert_default()
9587        }
9588        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9589        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9590            self.transaction.as_ref().map(|field| field as _)
9591        }
9592        ///Sets `transaction` with the provided value.
9593        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9594            &mut self,
9595            field: T,
9596        ) {
9597            self.transaction = Some(field.into().into());
9598        }
9599        ///Sets `transaction` with the provided value.
9600        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9601            mut self,
9602            field: T,
9603        ) -> Self {
9604            self.set_transaction(field.into());
9605            self
9606        }
9607    }
9608    impl super::GetTransactionResult {
9609        pub const fn const_default() -> Self {
9610            Self { result: None }
9611        }
9612        #[doc(hidden)]
9613        pub fn default_instance() -> &'static Self {
9614            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9615            &DEFAULT
9616        }
9617        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
9618        pub fn transaction(&self) -> &super::ExecutedTransaction {
9619            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9620                .result
9621            {
9622                field as _
9623            } else {
9624                super::ExecutedTransaction::default_instance() as _
9625            }
9626        }
9627        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9628        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9629            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9630                .result
9631            {
9632                Some(field as _)
9633            } else {
9634                None
9635            }
9636        }
9637        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9638        pub fn transaction_opt_mut(
9639            &mut self,
9640        ) -> Option<&mut super::ExecutedTransaction> {
9641            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9642                .result
9643            {
9644                Some(field as _)
9645            } else {
9646                None
9647            }
9648        }
9649        ///Returns a mutable reference to `transaction`.
9650        ///If the field is unset, it is first initialized with the default value.
9651        ///If any other oneof field in the same oneof is set, it will be cleared.
9652        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9653            if self.transaction_opt_mut().is_none() {
9654                self.result = Some(
9655                    super::get_transaction_result::Result::Transaction(
9656                        super::ExecutedTransaction::default(),
9657                    ),
9658                );
9659            }
9660            self.transaction_opt_mut().unwrap()
9661        }
9662        ///Sets `transaction` with the provided value.
9663        ///If any other oneof field in the same oneof is set, it will be cleared.
9664        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9665            &mut self,
9666            field: T,
9667        ) {
9668            self.result = Some(
9669                super::get_transaction_result::Result::Transaction(field.into().into()),
9670            );
9671        }
9672        ///Sets `transaction` with the provided value.
9673        ///If any other oneof field in the same oneof is set, it will be cleared.
9674        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9675            mut self,
9676            field: T,
9677        ) -> Self {
9678            self.set_transaction(field.into());
9679            self
9680        }
9681        ///Returns the value of `error`, or the default value if `error` is unset.
9682        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9683            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9684                .result
9685            {
9686                field as _
9687            } else {
9688                super::super::super::super::google::rpc::Status::default_instance() as _
9689            }
9690        }
9691        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9692        pub fn error_opt(
9693            &self,
9694        ) -> Option<&super::super::super::super::google::rpc::Status> {
9695            if let Some(super::get_transaction_result::Result::Error(field)) = &self
9696                .result
9697            {
9698                Some(field as _)
9699            } else {
9700                None
9701            }
9702        }
9703        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9704        pub fn error_opt_mut(
9705            &mut self,
9706        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9707            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9708                .result
9709            {
9710                Some(field as _)
9711            } else {
9712                None
9713            }
9714        }
9715        ///Returns a mutable reference to `error`.
9716        ///If the field is unset, it is first initialized with the default value.
9717        ///If any other oneof field in the same oneof is set, it will be cleared.
9718        pub fn error_mut(
9719            &mut self,
9720        ) -> &mut super::super::super::super::google::rpc::Status {
9721            if self.error_opt_mut().is_none() {
9722                self.result = Some(
9723                    super::get_transaction_result::Result::Error(
9724                        super::super::super::super::google::rpc::Status::default(),
9725                    ),
9726                );
9727            }
9728            self.error_opt_mut().unwrap()
9729        }
9730        ///Sets `error` with the provided value.
9731        ///If any other oneof field in the same oneof is set, it will be cleared.
9732        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9733            &mut self,
9734            field: T,
9735        ) {
9736            self.result = Some(
9737                super::get_transaction_result::Result::Error(field.into().into()),
9738            );
9739        }
9740        ///Sets `error` with the provided value.
9741        ///If any other oneof field in the same oneof is set, it will be cleared.
9742        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9743            mut self,
9744            field: T,
9745        ) -> Self {
9746            self.set_error(field.into());
9747            self
9748        }
9749    }
9750    impl super::IndexError {
9751        pub const fn const_default() -> Self {
9752            Self {
9753                index: None,
9754                subresult: None,
9755            }
9756        }
9757        #[doc(hidden)]
9758        pub fn default_instance() -> &'static Self {
9759            static DEFAULT: super::IndexError = super::IndexError::const_default();
9760            &DEFAULT
9761        }
9762        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9763        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9764            self.index.as_mut().map(|field| field as _)
9765        }
9766        ///Returns a mutable reference to `index`.
9767        ///If the field is unset, it is first initialized with the default value.
9768        pub fn index_mut(&mut self) -> &mut u32 {
9769            self.index.get_or_insert_default()
9770        }
9771        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
9772        pub fn index_opt(&self) -> Option<u32> {
9773            self.index.as_ref().map(|field| *field)
9774        }
9775        ///Sets `index` with the provided value.
9776        pub fn set_index(&mut self, field: u32) {
9777            self.index = Some(field);
9778        }
9779        ///Sets `index` with the provided value.
9780        pub fn with_index(mut self, field: u32) -> Self {
9781            self.set_index(field);
9782            self
9783        }
9784        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9785        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9786            self.subresult.as_mut().map(|field| field as _)
9787        }
9788        ///Returns a mutable reference to `subresult`.
9789        ///If the field is unset, it is first initialized with the default value.
9790        pub fn subresult_mut(&mut self) -> &mut u32 {
9791            self.subresult.get_or_insert_default()
9792        }
9793        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
9794        pub fn subresult_opt(&self) -> Option<u32> {
9795            self.subresult.as_ref().map(|field| *field)
9796        }
9797        ///Sets `subresult` with the provided value.
9798        pub fn set_subresult(&mut self, field: u32) {
9799            self.subresult = Some(field);
9800        }
9801        ///Sets `subresult` with the provided value.
9802        pub fn with_subresult(mut self, field: u32) -> Self {
9803            self.set_subresult(field);
9804            self
9805        }
9806    }
9807    impl super::Input {
9808        pub const fn const_default() -> Self {
9809            Self {
9810                kind: None,
9811                pure: None,
9812                object_id: None,
9813                version: None,
9814                digest: None,
9815                mutable: None,
9816                mutability: None,
9817                funds_withdrawal: None,
9818                literal: None,
9819            }
9820        }
9821        #[doc(hidden)]
9822        pub fn default_instance() -> &'static Self {
9823            static DEFAULT: super::Input = super::Input::const_default();
9824            &DEFAULT
9825        }
9826        ///Sets `kind` with the provided value.
9827        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9828            self.set_kind(field.into());
9829            self
9830        }
9831        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
9832        pub fn pure_opt(&self) -> Option<&[u8]> {
9833            self.pure.as_ref().map(|field| field as _)
9834        }
9835        ///Sets `pure` with the provided value.
9836        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9837            self.pure = Some(field.into().into());
9838        }
9839        ///Sets `pure` with the provided value.
9840        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9841            self.set_pure(field.into());
9842            self
9843        }
9844        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9845        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9846            self.object_id.as_mut().map(|field| field as _)
9847        }
9848        ///Returns a mutable reference to `object_id`.
9849        ///If the field is unset, it is first initialized with the default value.
9850        pub fn object_id_mut(&mut self) -> &mut String {
9851            self.object_id.get_or_insert_default()
9852        }
9853        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9854        pub fn object_id_opt(&self) -> Option<&str> {
9855            self.object_id.as_ref().map(|field| field as _)
9856        }
9857        ///Sets `object_id` with the provided value.
9858        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9859            self.object_id = Some(field.into().into());
9860        }
9861        ///Sets `object_id` with the provided value.
9862        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9863            self.set_object_id(field.into());
9864            self
9865        }
9866        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9867        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9868            self.version.as_mut().map(|field| field as _)
9869        }
9870        ///Returns a mutable reference to `version`.
9871        ///If the field is unset, it is first initialized with the default value.
9872        pub fn version_mut(&mut self) -> &mut u64 {
9873            self.version.get_or_insert_default()
9874        }
9875        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
9876        pub fn version_opt(&self) -> Option<u64> {
9877            self.version.as_ref().map(|field| *field)
9878        }
9879        ///Sets `version` with the provided value.
9880        pub fn set_version(&mut self, field: u64) {
9881            self.version = Some(field);
9882        }
9883        ///Sets `version` with the provided value.
9884        pub fn with_version(mut self, field: u64) -> Self {
9885            self.set_version(field);
9886            self
9887        }
9888        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9889        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9890            self.digest.as_mut().map(|field| field as _)
9891        }
9892        ///Returns a mutable reference to `digest`.
9893        ///If the field is unset, it is first initialized with the default value.
9894        pub fn digest_mut(&mut self) -> &mut String {
9895            self.digest.get_or_insert_default()
9896        }
9897        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
9898        pub fn digest_opt(&self) -> Option<&str> {
9899            self.digest.as_ref().map(|field| field as _)
9900        }
9901        ///Sets `digest` with the provided value.
9902        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9903            self.digest = Some(field.into().into());
9904        }
9905        ///Sets `digest` with the provided value.
9906        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9907            self.set_digest(field.into());
9908            self
9909        }
9910        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9911        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9912            self.mutable.as_mut().map(|field| field as _)
9913        }
9914        ///Returns a mutable reference to `mutable`.
9915        ///If the field is unset, it is first initialized with the default value.
9916        pub fn mutable_mut(&mut self) -> &mut bool {
9917            self.mutable.get_or_insert_default()
9918        }
9919        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
9920        pub fn mutable_opt(&self) -> Option<bool> {
9921            self.mutable.as_ref().map(|field| *field)
9922        }
9923        ///Sets `mutable` with the provided value.
9924        pub fn set_mutable(&mut self, field: bool) {
9925            self.mutable = Some(field);
9926        }
9927        ///Sets `mutable` with the provided value.
9928        pub fn with_mutable(mut self, field: bool) -> Self {
9929            self.set_mutable(field);
9930            self
9931        }
9932        ///Sets `mutability` with the provided value.
9933        pub fn with_mutability<T: Into<super::input::Mutability>>(
9934            mut self,
9935            field: T,
9936        ) -> Self {
9937            self.set_mutability(field.into());
9938            self
9939        }
9940        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
9941        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9942            self.funds_withdrawal
9943                .as_ref()
9944                .map(|field| field as _)
9945                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9946        }
9947        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9948        pub fn funds_withdrawal_opt_mut(
9949            &mut self,
9950        ) -> Option<&mut super::FundsWithdrawal> {
9951            self.funds_withdrawal.as_mut().map(|field| field as _)
9952        }
9953        ///Returns a mutable reference to `funds_withdrawal`.
9954        ///If the field is unset, it is first initialized with the default value.
9955        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9956            self.funds_withdrawal.get_or_insert_default()
9957        }
9958        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9959        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9960            self.funds_withdrawal.as_ref().map(|field| field as _)
9961        }
9962        ///Sets `funds_withdrawal` with the provided value.
9963        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9964            &mut self,
9965            field: T,
9966        ) {
9967            self.funds_withdrawal = Some(field.into().into());
9968        }
9969        ///Sets `funds_withdrawal` with the provided value.
9970        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9971            mut self,
9972            field: T,
9973        ) -> Self {
9974            self.set_funds_withdrawal(field.into());
9975            self
9976        }
9977        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9978        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9979            self.literal.as_mut().map(|field| field as _)
9980        }
9981        ///Returns a mutable reference to `literal`.
9982        ///If the field is unset, it is first initialized with the default value.
9983        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9984            self.literal.get_or_insert_default()
9985        }
9986        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
9987        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9988            self.literal.as_ref().map(|field| field as _)
9989        }
9990        ///Sets `literal` with the provided value.
9991        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9992            self.literal = Some(field.into().into());
9993        }
9994        ///Sets `literal` with the provided value.
9995        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9996            self.set_literal(field.into());
9997            self
9998        }
9999    }
10000    impl super::Jwk {
10001        pub const fn const_default() -> Self {
10002            Self {
10003                kty: None,
10004                e: None,
10005                n: None,
10006                alg: None,
10007            }
10008        }
10009        #[doc(hidden)]
10010        pub fn default_instance() -> &'static Self {
10011            static DEFAULT: super::Jwk = super::Jwk::const_default();
10012            &DEFAULT
10013        }
10014        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10015        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
10016            self.kty.as_mut().map(|field| field as _)
10017        }
10018        ///Returns a mutable reference to `kty`.
10019        ///If the field is unset, it is first initialized with the default value.
10020        pub fn kty_mut(&mut self) -> &mut String {
10021            self.kty.get_or_insert_default()
10022        }
10023        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
10024        pub fn kty_opt(&self) -> Option<&str> {
10025            self.kty.as_ref().map(|field| field as _)
10026        }
10027        ///Sets `kty` with the provided value.
10028        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
10029            self.kty = Some(field.into().into());
10030        }
10031        ///Sets `kty` with the provided value.
10032        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
10033            self.set_kty(field.into());
10034            self
10035        }
10036        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10037        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
10038            self.e.as_mut().map(|field| field as _)
10039        }
10040        ///Returns a mutable reference to `e`.
10041        ///If the field is unset, it is first initialized with the default value.
10042        pub fn e_mut(&mut self) -> &mut String {
10043            self.e.get_or_insert_default()
10044        }
10045        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
10046        pub fn e_opt(&self) -> Option<&str> {
10047            self.e.as_ref().map(|field| field as _)
10048        }
10049        ///Sets `e` with the provided value.
10050        pub fn set_e<T: Into<String>>(&mut self, field: T) {
10051            self.e = Some(field.into().into());
10052        }
10053        ///Sets `e` with the provided value.
10054        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
10055            self.set_e(field.into());
10056            self
10057        }
10058        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10059        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
10060            self.n.as_mut().map(|field| field as _)
10061        }
10062        ///Returns a mutable reference to `n`.
10063        ///If the field is unset, it is first initialized with the default value.
10064        pub fn n_mut(&mut self) -> &mut String {
10065            self.n.get_or_insert_default()
10066        }
10067        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
10068        pub fn n_opt(&self) -> Option<&str> {
10069            self.n.as_ref().map(|field| field as _)
10070        }
10071        ///Sets `n` with the provided value.
10072        pub fn set_n<T: Into<String>>(&mut self, field: T) {
10073            self.n = Some(field.into().into());
10074        }
10075        ///Sets `n` with the provided value.
10076        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
10077            self.set_n(field.into());
10078            self
10079        }
10080        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10081        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
10082            self.alg.as_mut().map(|field| field as _)
10083        }
10084        ///Returns a mutable reference to `alg`.
10085        ///If the field is unset, it is first initialized with the default value.
10086        pub fn alg_mut(&mut self) -> &mut String {
10087            self.alg.get_or_insert_default()
10088        }
10089        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
10090        pub fn alg_opt(&self) -> Option<&str> {
10091            self.alg.as_ref().map(|field| field as _)
10092        }
10093        ///Sets `alg` with the provided value.
10094        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
10095            self.alg = Some(field.into().into());
10096        }
10097        ///Sets `alg` with the provided value.
10098        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
10099            self.set_alg(field.into());
10100            self
10101        }
10102    }
10103    impl super::JwkId {
10104        pub const fn const_default() -> Self {
10105            Self { iss: None, kid: None }
10106        }
10107        #[doc(hidden)]
10108        pub fn default_instance() -> &'static Self {
10109            static DEFAULT: super::JwkId = super::JwkId::const_default();
10110            &DEFAULT
10111        }
10112        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10113        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
10114            self.iss.as_mut().map(|field| field as _)
10115        }
10116        ///Returns a mutable reference to `iss`.
10117        ///If the field is unset, it is first initialized with the default value.
10118        pub fn iss_mut(&mut self) -> &mut String {
10119            self.iss.get_or_insert_default()
10120        }
10121        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
10122        pub fn iss_opt(&self) -> Option<&str> {
10123            self.iss.as_ref().map(|field| field as _)
10124        }
10125        ///Sets `iss` with the provided value.
10126        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
10127            self.iss = Some(field.into().into());
10128        }
10129        ///Sets `iss` with the provided value.
10130        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
10131            self.set_iss(field.into());
10132            self
10133        }
10134        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10135        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
10136            self.kid.as_mut().map(|field| field as _)
10137        }
10138        ///Returns a mutable reference to `kid`.
10139        ///If the field is unset, it is first initialized with the default value.
10140        pub fn kid_mut(&mut self) -> &mut String {
10141            self.kid.get_or_insert_default()
10142        }
10143        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
10144        pub fn kid_opt(&self) -> Option<&str> {
10145            self.kid.as_ref().map(|field| field as _)
10146        }
10147        ///Sets `kid` with the provided value.
10148        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
10149            self.kid = Some(field.into().into());
10150        }
10151        ///Sets `kid` with the provided value.
10152        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
10153            self.set_kid(field.into());
10154            self
10155        }
10156    }
10157    impl super::LedgerPosition {
10158        pub const fn const_default() -> Self {
10159            Self {
10160                checkpoint: None,
10161                transaction_index: None,
10162                event_index: None,
10163            }
10164        }
10165        #[doc(hidden)]
10166        pub fn default_instance() -> &'static Self {
10167            static DEFAULT: super::LedgerPosition = super::LedgerPosition::const_default();
10168            &DEFAULT
10169        }
10170        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10171        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10172            self.checkpoint.as_mut().map(|field| field as _)
10173        }
10174        ///Returns a mutable reference to `checkpoint`.
10175        ///If the field is unset, it is first initialized with the default value.
10176        pub fn checkpoint_mut(&mut self) -> &mut u64 {
10177            self.checkpoint.get_or_insert_default()
10178        }
10179        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10180        pub fn checkpoint_opt(&self) -> Option<u64> {
10181            self.checkpoint.as_ref().map(|field| *field)
10182        }
10183        ///Sets `checkpoint` with the provided value.
10184        pub fn set_checkpoint(&mut self, field: u64) {
10185            self.checkpoint = Some(field);
10186        }
10187        ///Sets `checkpoint` with the provided value.
10188        pub fn with_checkpoint(mut self, field: u64) -> Self {
10189            self.set_checkpoint(field);
10190            self
10191        }
10192        ///If `transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10193        pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
10194            self.transaction_index.as_mut().map(|field| field as _)
10195        }
10196        ///Returns a mutable reference to `transaction_index`.
10197        ///If the field is unset, it is first initialized with the default value.
10198        pub fn transaction_index_mut(&mut self) -> &mut u64 {
10199            self.transaction_index.get_or_insert_default()
10200        }
10201        ///If `transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
10202        pub fn transaction_index_opt(&self) -> Option<u64> {
10203            self.transaction_index.as_ref().map(|field| *field)
10204        }
10205        ///Sets `transaction_index` with the provided value.
10206        pub fn set_transaction_index(&mut self, field: u64) {
10207            self.transaction_index = Some(field);
10208        }
10209        ///Sets `transaction_index` with the provided value.
10210        pub fn with_transaction_index(mut self, field: u64) -> Self {
10211            self.set_transaction_index(field);
10212            self
10213        }
10214        ///If `event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10215        pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
10216            self.event_index.as_mut().map(|field| field as _)
10217        }
10218        ///Returns a mutable reference to `event_index`.
10219        ///If the field is unset, it is first initialized with the default value.
10220        pub fn event_index_mut(&mut self) -> &mut u32 {
10221            self.event_index.get_or_insert_default()
10222        }
10223        ///If `event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
10224        pub fn event_index_opt(&self) -> Option<u32> {
10225            self.event_index.as_ref().map(|field| *field)
10226        }
10227        ///Sets `event_index` with the provided value.
10228        pub fn set_event_index(&mut self, field: u32) {
10229            self.event_index = Some(field);
10230        }
10231        ///Sets `event_index` with the provided value.
10232        pub fn with_event_index(mut self, field: u32) -> Self {
10233            self.set_event_index(field);
10234            self
10235        }
10236    }
10237    impl super::Linkage {
10238        pub const fn const_default() -> Self {
10239            Self {
10240                original_id: None,
10241                upgraded_id: None,
10242                upgraded_version: None,
10243            }
10244        }
10245        #[doc(hidden)]
10246        pub fn default_instance() -> &'static Self {
10247            static DEFAULT: super::Linkage = super::Linkage::const_default();
10248            &DEFAULT
10249        }
10250        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10251        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
10252            self.original_id.as_mut().map(|field| field as _)
10253        }
10254        ///Returns a mutable reference to `original_id`.
10255        ///If the field is unset, it is first initialized with the default value.
10256        pub fn original_id_mut(&mut self) -> &mut String {
10257            self.original_id.get_or_insert_default()
10258        }
10259        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10260        pub fn original_id_opt(&self) -> Option<&str> {
10261            self.original_id.as_ref().map(|field| field as _)
10262        }
10263        ///Sets `original_id` with the provided value.
10264        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
10265            self.original_id = Some(field.into().into());
10266        }
10267        ///Sets `original_id` with the provided value.
10268        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
10269            self.set_original_id(field.into());
10270            self
10271        }
10272        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10273        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
10274            self.upgraded_id.as_mut().map(|field| field as _)
10275        }
10276        ///Returns a mutable reference to `upgraded_id`.
10277        ///If the field is unset, it is first initialized with the default value.
10278        pub fn upgraded_id_mut(&mut self) -> &mut String {
10279            self.upgraded_id.get_or_insert_default()
10280        }
10281        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10282        pub fn upgraded_id_opt(&self) -> Option<&str> {
10283            self.upgraded_id.as_ref().map(|field| field as _)
10284        }
10285        ///Sets `upgraded_id` with the provided value.
10286        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
10287            self.upgraded_id = Some(field.into().into());
10288        }
10289        ///Sets `upgraded_id` with the provided value.
10290        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
10291            self.set_upgraded_id(field.into());
10292            self
10293        }
10294        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10295        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
10296            self.upgraded_version.as_mut().map(|field| field as _)
10297        }
10298        ///Returns a mutable reference to `upgraded_version`.
10299        ///If the field is unset, it is first initialized with the default value.
10300        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
10301            self.upgraded_version.get_or_insert_default()
10302        }
10303        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10304        pub fn upgraded_version_opt(&self) -> Option<u64> {
10305            self.upgraded_version.as_ref().map(|field| *field)
10306        }
10307        ///Sets `upgraded_version` with the provided value.
10308        pub fn set_upgraded_version(&mut self, field: u64) {
10309            self.upgraded_version = Some(field);
10310        }
10311        ///Sets `upgraded_version` with the provided value.
10312        pub fn with_upgraded_version(mut self, field: u64) -> Self {
10313            self.set_upgraded_version(field);
10314            self
10315        }
10316    }
10317    impl super::ListBalancesRequest {
10318        pub const fn const_default() -> Self {
10319            Self {
10320                owner: None,
10321                page_size: None,
10322                page_token: None,
10323            }
10324        }
10325        #[doc(hidden)]
10326        pub fn default_instance() -> &'static Self {
10327            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
10328            &DEFAULT
10329        }
10330        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10331        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10332            self.owner.as_mut().map(|field| field as _)
10333        }
10334        ///Returns a mutable reference to `owner`.
10335        ///If the field is unset, it is first initialized with the default value.
10336        pub fn owner_mut(&mut self) -> &mut String {
10337            self.owner.get_or_insert_default()
10338        }
10339        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10340        pub fn owner_opt(&self) -> Option<&str> {
10341            self.owner.as_ref().map(|field| field as _)
10342        }
10343        ///Sets `owner` with the provided value.
10344        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10345            self.owner = Some(field.into().into());
10346        }
10347        ///Sets `owner` with the provided value.
10348        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10349            self.set_owner(field.into());
10350            self
10351        }
10352        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10353        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10354            self.page_size.as_mut().map(|field| field as _)
10355        }
10356        ///Returns a mutable reference to `page_size`.
10357        ///If the field is unset, it is first initialized with the default value.
10358        pub fn page_size_mut(&mut self) -> &mut u32 {
10359            self.page_size.get_or_insert_default()
10360        }
10361        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10362        pub fn page_size_opt(&self) -> Option<u32> {
10363            self.page_size.as_ref().map(|field| *field)
10364        }
10365        ///Sets `page_size` with the provided value.
10366        pub fn set_page_size(&mut self, field: u32) {
10367            self.page_size = Some(field);
10368        }
10369        ///Sets `page_size` with the provided value.
10370        pub fn with_page_size(mut self, field: u32) -> Self {
10371            self.set_page_size(field);
10372            self
10373        }
10374        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10375        pub fn page_token_opt(&self) -> Option<&[u8]> {
10376            self.page_token.as_ref().map(|field| field as _)
10377        }
10378        ///Sets `page_token` with the provided value.
10379        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10380            self.page_token = Some(field.into().into());
10381        }
10382        ///Sets `page_token` with the provided value.
10383        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10384            mut self,
10385            field: T,
10386        ) -> Self {
10387            self.set_page_token(field.into());
10388            self
10389        }
10390    }
10391    impl super::ListBalancesResponse {
10392        pub const fn const_default() -> Self {
10393            Self {
10394                balances: Vec::new(),
10395                next_page_token: None,
10396            }
10397        }
10398        #[doc(hidden)]
10399        pub fn default_instance() -> &'static Self {
10400            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
10401            &DEFAULT
10402        }
10403        ///Returns the value of `balances`, or the default value if `balances` is unset.
10404        pub fn balances(&self) -> &[super::Balance] {
10405            &self.balances
10406        }
10407        ///Returns a mutable reference to `balances`.
10408        ///If the field is unset, it is first initialized with the default value.
10409        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
10410            &mut self.balances
10411        }
10412        ///Sets `balances` with the provided value.
10413        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
10414            self.balances = field;
10415        }
10416        ///Sets `balances` with the provided value.
10417        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
10418            self.set_balances(field);
10419            self
10420        }
10421        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10422        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10423            self.next_page_token.as_ref().map(|field| field as _)
10424        }
10425        ///Sets `next_page_token` with the provided value.
10426        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10427            self.next_page_token = Some(field.into().into());
10428        }
10429        ///Sets `next_page_token` with the provided value.
10430        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10431            mut self,
10432            field: T,
10433        ) -> Self {
10434            self.set_next_page_token(field.into());
10435            self
10436        }
10437    }
10438    impl super::ListCheckpointsRequest {
10439        pub const fn const_default() -> Self {
10440            Self {
10441                read_mask: None,
10442                start_checkpoint: None,
10443                end_checkpoint: None,
10444                filter: None,
10445                options: None,
10446            }
10447        }
10448        #[doc(hidden)]
10449        pub fn default_instance() -> &'static Self {
10450            static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
10451            &DEFAULT
10452        }
10453        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10454        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10455            self.read_mask.as_mut().map(|field| field as _)
10456        }
10457        ///Returns a mutable reference to `read_mask`.
10458        ///If the field is unset, it is first initialized with the default value.
10459        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10460            self.read_mask.get_or_insert_default()
10461        }
10462        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10463        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10464            self.read_mask.as_ref().map(|field| field as _)
10465        }
10466        ///Sets `read_mask` with the provided value.
10467        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10468            self.read_mask = Some(field.into().into());
10469        }
10470        ///Sets `read_mask` with the provided value.
10471        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10472            mut self,
10473            field: T,
10474        ) -> Self {
10475            self.set_read_mask(field.into());
10476            self
10477        }
10478        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10479        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10480            self.start_checkpoint.as_mut().map(|field| field as _)
10481        }
10482        ///Returns a mutable reference to `start_checkpoint`.
10483        ///If the field is unset, it is first initialized with the default value.
10484        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10485            self.start_checkpoint.get_or_insert_default()
10486        }
10487        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10488        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10489            self.start_checkpoint.as_ref().map(|field| *field)
10490        }
10491        ///Sets `start_checkpoint` with the provided value.
10492        pub fn set_start_checkpoint(&mut self, field: u64) {
10493            self.start_checkpoint = Some(field);
10494        }
10495        ///Sets `start_checkpoint` with the provided value.
10496        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10497            self.set_start_checkpoint(field);
10498            self
10499        }
10500        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10501        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10502            self.end_checkpoint.as_mut().map(|field| field as _)
10503        }
10504        ///Returns a mutable reference to `end_checkpoint`.
10505        ///If the field is unset, it is first initialized with the default value.
10506        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10507            self.end_checkpoint.get_or_insert_default()
10508        }
10509        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10510        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10511            self.end_checkpoint.as_ref().map(|field| *field)
10512        }
10513        ///Sets `end_checkpoint` with the provided value.
10514        pub fn set_end_checkpoint(&mut self, field: u64) {
10515            self.end_checkpoint = Some(field);
10516        }
10517        ///Sets `end_checkpoint` with the provided value.
10518        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10519            self.set_end_checkpoint(field);
10520            self
10521        }
10522        ///Returns the value of `filter`, or the default value if `filter` is unset.
10523        pub fn filter(&self) -> &super::TransactionFilter {
10524            self.filter
10525                .as_ref()
10526                .map(|field| field as _)
10527                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10528        }
10529        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10530        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10531            self.filter.as_mut().map(|field| field as _)
10532        }
10533        ///Returns a mutable reference to `filter`.
10534        ///If the field is unset, it is first initialized with the default value.
10535        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10536            self.filter.get_or_insert_default()
10537        }
10538        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10539        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10540            self.filter.as_ref().map(|field| field as _)
10541        }
10542        ///Sets `filter` with the provided value.
10543        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10544            self.filter = Some(field.into().into());
10545        }
10546        ///Sets `filter` with the provided value.
10547        pub fn with_filter<T: Into<super::TransactionFilter>>(
10548            mut self,
10549            field: T,
10550        ) -> Self {
10551            self.set_filter(field.into());
10552            self
10553        }
10554        ///Returns the value of `options`, or the default value if `options` is unset.
10555        pub fn options(&self) -> &super::QueryOptions {
10556            self.options
10557                .as_ref()
10558                .map(|field| field as _)
10559                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10560        }
10561        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10562        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10563            self.options.as_mut().map(|field| field as _)
10564        }
10565        ///Returns a mutable reference to `options`.
10566        ///If the field is unset, it is first initialized with the default value.
10567        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10568            self.options.get_or_insert_default()
10569        }
10570        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10571        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10572            self.options.as_ref().map(|field| field as _)
10573        }
10574        ///Sets `options` with the provided value.
10575        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10576            self.options = Some(field.into().into());
10577        }
10578        ///Sets `options` with the provided value.
10579        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10580            self.set_options(field.into());
10581            self
10582        }
10583    }
10584    impl super::ListCheckpointsResponse {
10585        pub const fn const_default() -> Self {
10586            Self {
10587                checkpoint: None,
10588                watermark: None,
10589                end: None,
10590            }
10591        }
10592        #[doc(hidden)]
10593        pub fn default_instance() -> &'static Self {
10594            static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10595            &DEFAULT
10596        }
10597        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
10598        pub fn checkpoint(&self) -> &super::Checkpoint {
10599            self.checkpoint
10600                .as_ref()
10601                .map(|field| field as _)
10602                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10603        }
10604        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10605        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10606            self.checkpoint.as_mut().map(|field| field as _)
10607        }
10608        ///Returns a mutable reference to `checkpoint`.
10609        ///If the field is unset, it is first initialized with the default value.
10610        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10611            self.checkpoint.get_or_insert_default()
10612        }
10613        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10614        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10615            self.checkpoint.as_ref().map(|field| field as _)
10616        }
10617        ///Sets `checkpoint` with the provided value.
10618        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10619            self.checkpoint = Some(field.into().into());
10620        }
10621        ///Sets `checkpoint` with the provided value.
10622        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10623            self.set_checkpoint(field.into());
10624            self
10625        }
10626        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
10627        pub fn watermark(&self) -> &super::Watermark {
10628            self.watermark
10629                .as_ref()
10630                .map(|field| field as _)
10631                .unwrap_or_else(|| super::Watermark::default_instance() as _)
10632        }
10633        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10634        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10635            self.watermark.as_mut().map(|field| field as _)
10636        }
10637        ///Returns a mutable reference to `watermark`.
10638        ///If the field is unset, it is first initialized with the default value.
10639        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10640            self.watermark.get_or_insert_default()
10641        }
10642        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
10643        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10644            self.watermark.as_ref().map(|field| field as _)
10645        }
10646        ///Sets `watermark` with the provided value.
10647        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10648            self.watermark = Some(field.into().into());
10649        }
10650        ///Sets `watermark` with the provided value.
10651        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10652            self.set_watermark(field.into());
10653            self
10654        }
10655        ///Returns the value of `end`, or the default value if `end` is unset.
10656        pub fn end(&self) -> &super::QueryEnd {
10657            self.end
10658                .as_ref()
10659                .map(|field| field as _)
10660                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10661        }
10662        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10663        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10664            self.end.as_mut().map(|field| field as _)
10665        }
10666        ///Returns a mutable reference to `end`.
10667        ///If the field is unset, it is first initialized with the default value.
10668        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10669            self.end.get_or_insert_default()
10670        }
10671        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
10672        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10673            self.end.as_ref().map(|field| field as _)
10674        }
10675        ///Sets `end` with the provided value.
10676        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10677            self.end = Some(field.into().into());
10678        }
10679        ///Sets `end` with the provided value.
10680        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10681            self.set_end(field.into());
10682            self
10683        }
10684    }
10685    impl super::ListDynamicFieldsRequest {
10686        pub const fn const_default() -> Self {
10687            Self {
10688                parent: None,
10689                page_size: None,
10690                page_token: None,
10691                read_mask: None,
10692            }
10693        }
10694        #[doc(hidden)]
10695        pub fn default_instance() -> &'static Self {
10696            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10697            &DEFAULT
10698        }
10699        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10700        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10701            self.parent.as_mut().map(|field| field as _)
10702        }
10703        ///Returns a mutable reference to `parent`.
10704        ///If the field is unset, it is first initialized with the default value.
10705        pub fn parent_mut(&mut self) -> &mut String {
10706            self.parent.get_or_insert_default()
10707        }
10708        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
10709        pub fn parent_opt(&self) -> Option<&str> {
10710            self.parent.as_ref().map(|field| field as _)
10711        }
10712        ///Sets `parent` with the provided value.
10713        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10714            self.parent = Some(field.into().into());
10715        }
10716        ///Sets `parent` with the provided value.
10717        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10718            self.set_parent(field.into());
10719            self
10720        }
10721        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10722        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10723            self.page_size.as_mut().map(|field| field as _)
10724        }
10725        ///Returns a mutable reference to `page_size`.
10726        ///If the field is unset, it is first initialized with the default value.
10727        pub fn page_size_mut(&mut self) -> &mut u32 {
10728            self.page_size.get_or_insert_default()
10729        }
10730        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10731        pub fn page_size_opt(&self) -> Option<u32> {
10732            self.page_size.as_ref().map(|field| *field)
10733        }
10734        ///Sets `page_size` with the provided value.
10735        pub fn set_page_size(&mut self, field: u32) {
10736            self.page_size = Some(field);
10737        }
10738        ///Sets `page_size` with the provided value.
10739        pub fn with_page_size(mut self, field: u32) -> Self {
10740            self.set_page_size(field);
10741            self
10742        }
10743        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10744        pub fn page_token_opt(&self) -> Option<&[u8]> {
10745            self.page_token.as_ref().map(|field| field as _)
10746        }
10747        ///Sets `page_token` with the provided value.
10748        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10749            self.page_token = Some(field.into().into());
10750        }
10751        ///Sets `page_token` with the provided value.
10752        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10753            mut self,
10754            field: T,
10755        ) -> Self {
10756            self.set_page_token(field.into());
10757            self
10758        }
10759        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10760        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10761            self.read_mask.as_mut().map(|field| field as _)
10762        }
10763        ///Returns a mutable reference to `read_mask`.
10764        ///If the field is unset, it is first initialized with the default value.
10765        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10766            self.read_mask.get_or_insert_default()
10767        }
10768        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10769        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10770            self.read_mask.as_ref().map(|field| field as _)
10771        }
10772        ///Sets `read_mask` with the provided value.
10773        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10774            self.read_mask = Some(field.into().into());
10775        }
10776        ///Sets `read_mask` with the provided value.
10777        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10778            mut self,
10779            field: T,
10780        ) -> Self {
10781            self.set_read_mask(field.into());
10782            self
10783        }
10784    }
10785    impl super::ListDynamicFieldsResponse {
10786        pub const fn const_default() -> Self {
10787            Self {
10788                dynamic_fields: Vec::new(),
10789                next_page_token: None,
10790            }
10791        }
10792        #[doc(hidden)]
10793        pub fn default_instance() -> &'static Self {
10794            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10795            &DEFAULT
10796        }
10797        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
10798        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10799            &self.dynamic_fields
10800        }
10801        ///Returns a mutable reference to `dynamic_fields`.
10802        ///If the field is unset, it is first initialized with the default value.
10803        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10804            &mut self.dynamic_fields
10805        }
10806        ///Sets `dynamic_fields` with the provided value.
10807        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10808            self.dynamic_fields = field;
10809        }
10810        ///Sets `dynamic_fields` with the provided value.
10811        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10812            self.set_dynamic_fields(field);
10813            self
10814        }
10815        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
10816        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10817            self.next_page_token.as_ref().map(|field| field as _)
10818        }
10819        ///Sets `next_page_token` with the provided value.
10820        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10821            self.next_page_token = Some(field.into().into());
10822        }
10823        ///Sets `next_page_token` with the provided value.
10824        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10825            mut self,
10826            field: T,
10827        ) -> Self {
10828            self.set_next_page_token(field.into());
10829            self
10830        }
10831    }
10832    impl super::ListEventsRequest {
10833        pub const fn const_default() -> Self {
10834            Self {
10835                read_mask: None,
10836                start_checkpoint: None,
10837                end_checkpoint: None,
10838                filter: None,
10839                options: None,
10840                start_transaction_index: None,
10841                start_event_index: None,
10842                end_transaction_index: None,
10843                end_event_index: None,
10844            }
10845        }
10846        #[doc(hidden)]
10847        pub fn default_instance() -> &'static Self {
10848            static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10849            &DEFAULT
10850        }
10851        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10852        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10853            self.read_mask.as_mut().map(|field| field as _)
10854        }
10855        ///Returns a mutable reference to `read_mask`.
10856        ///If the field is unset, it is first initialized with the default value.
10857        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10858            self.read_mask.get_or_insert_default()
10859        }
10860        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
10861        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10862            self.read_mask.as_ref().map(|field| field as _)
10863        }
10864        ///Sets `read_mask` with the provided value.
10865        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10866            self.read_mask = Some(field.into().into());
10867        }
10868        ///Sets `read_mask` with the provided value.
10869        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10870            mut self,
10871            field: T,
10872        ) -> Self {
10873            self.set_read_mask(field.into());
10874            self
10875        }
10876        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10877        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10878            self.start_checkpoint.as_mut().map(|field| field as _)
10879        }
10880        ///Returns a mutable reference to `start_checkpoint`.
10881        ///If the field is unset, it is first initialized with the default value.
10882        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10883            self.start_checkpoint.get_or_insert_default()
10884        }
10885        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10886        pub fn start_checkpoint_opt(&self) -> Option<u64> {
10887            self.start_checkpoint.as_ref().map(|field| *field)
10888        }
10889        ///Sets `start_checkpoint` with the provided value.
10890        pub fn set_start_checkpoint(&mut self, field: u64) {
10891            self.start_checkpoint = Some(field);
10892        }
10893        ///Sets `start_checkpoint` with the provided value.
10894        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10895            self.set_start_checkpoint(field);
10896            self
10897        }
10898        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10899        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10900            self.end_checkpoint.as_mut().map(|field| field as _)
10901        }
10902        ///Returns a mutable reference to `end_checkpoint`.
10903        ///If the field is unset, it is first initialized with the default value.
10904        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10905            self.end_checkpoint.get_or_insert_default()
10906        }
10907        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
10908        pub fn end_checkpoint_opt(&self) -> Option<u64> {
10909            self.end_checkpoint.as_ref().map(|field| *field)
10910        }
10911        ///Sets `end_checkpoint` with the provided value.
10912        pub fn set_end_checkpoint(&mut self, field: u64) {
10913            self.end_checkpoint = Some(field);
10914        }
10915        ///Sets `end_checkpoint` with the provided value.
10916        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10917            self.set_end_checkpoint(field);
10918            self
10919        }
10920        ///Returns the value of `filter`, or the default value if `filter` is unset.
10921        pub fn filter(&self) -> &super::EventFilter {
10922            self.filter
10923                .as_ref()
10924                .map(|field| field as _)
10925                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10926        }
10927        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10928        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10929            self.filter.as_mut().map(|field| field as _)
10930        }
10931        ///Returns a mutable reference to `filter`.
10932        ///If the field is unset, it is first initialized with the default value.
10933        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10934            self.filter.get_or_insert_default()
10935        }
10936        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10937        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10938            self.filter.as_ref().map(|field| field as _)
10939        }
10940        ///Sets `filter` with the provided value.
10941        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10942            self.filter = Some(field.into().into());
10943        }
10944        ///Sets `filter` with the provided value.
10945        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10946            self.set_filter(field.into());
10947            self
10948        }
10949        ///Returns the value of `options`, or the default value if `options` is unset.
10950        pub fn options(&self) -> &super::QueryOptions {
10951            self.options
10952                .as_ref()
10953                .map(|field| field as _)
10954                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10955        }
10956        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10957        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10958            self.options.as_mut().map(|field| field as _)
10959        }
10960        ///Returns a mutable reference to `options`.
10961        ///If the field is unset, it is first initialized with the default value.
10962        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10963            self.options.get_or_insert_default()
10964        }
10965        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
10966        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10967            self.options.as_ref().map(|field| field as _)
10968        }
10969        ///Sets `options` with the provided value.
10970        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10971            self.options = Some(field.into().into());
10972        }
10973        ///Sets `options` with the provided value.
10974        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10975            self.set_options(field.into());
10976            self
10977        }
10978        ///If `start_transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10979        pub fn start_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
10980            self.start_transaction_index.as_mut().map(|field| field as _)
10981        }
10982        ///Returns a mutable reference to `start_transaction_index`.
10983        ///If the field is unset, it is first initialized with the default value.
10984        pub fn start_transaction_index_mut(&mut self) -> &mut u64 {
10985            self.start_transaction_index.get_or_insert_default()
10986        }
10987        ///If `start_transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
10988        pub fn start_transaction_index_opt(&self) -> Option<u64> {
10989            self.start_transaction_index.as_ref().map(|field| *field)
10990        }
10991        ///Sets `start_transaction_index` with the provided value.
10992        pub fn set_start_transaction_index(&mut self, field: u64) {
10993            self.start_transaction_index = Some(field);
10994        }
10995        ///Sets `start_transaction_index` with the provided value.
10996        pub fn with_start_transaction_index(mut self, field: u64) -> Self {
10997            self.set_start_transaction_index(field);
10998            self
10999        }
11000        ///If `start_event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11001        pub fn start_event_index_opt_mut(&mut self) -> Option<&mut u32> {
11002            self.start_event_index.as_mut().map(|field| field as _)
11003        }
11004        ///Returns a mutable reference to `start_event_index`.
11005        ///If the field is unset, it is first initialized with the default value.
11006        pub fn start_event_index_mut(&mut self) -> &mut u32 {
11007            self.start_event_index.get_or_insert_default()
11008        }
11009        ///If `start_event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
11010        pub fn start_event_index_opt(&self) -> Option<u32> {
11011            self.start_event_index.as_ref().map(|field| *field)
11012        }
11013        ///Sets `start_event_index` with the provided value.
11014        pub fn set_start_event_index(&mut self, field: u32) {
11015            self.start_event_index = Some(field);
11016        }
11017        ///Sets `start_event_index` with the provided value.
11018        pub fn with_start_event_index(mut self, field: u32) -> Self {
11019            self.set_start_event_index(field);
11020            self
11021        }
11022        ///If `end_transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11023        pub fn end_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
11024            self.end_transaction_index.as_mut().map(|field| field as _)
11025        }
11026        ///Returns a mutable reference to `end_transaction_index`.
11027        ///If the field is unset, it is first initialized with the default value.
11028        pub fn end_transaction_index_mut(&mut self) -> &mut u64 {
11029            self.end_transaction_index.get_or_insert_default()
11030        }
11031        ///If `end_transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
11032        pub fn end_transaction_index_opt(&self) -> Option<u64> {
11033            self.end_transaction_index.as_ref().map(|field| *field)
11034        }
11035        ///Sets `end_transaction_index` with the provided value.
11036        pub fn set_end_transaction_index(&mut self, field: u64) {
11037            self.end_transaction_index = Some(field);
11038        }
11039        ///Sets `end_transaction_index` with the provided value.
11040        pub fn with_end_transaction_index(mut self, field: u64) -> Self {
11041            self.set_end_transaction_index(field);
11042            self
11043        }
11044        ///If `end_event_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11045        pub fn end_event_index_opt_mut(&mut self) -> Option<&mut u32> {
11046            self.end_event_index.as_mut().map(|field| field as _)
11047        }
11048        ///Returns a mutable reference to `end_event_index`.
11049        ///If the field is unset, it is first initialized with the default value.
11050        pub fn end_event_index_mut(&mut self) -> &mut u32 {
11051            self.end_event_index.get_or_insert_default()
11052        }
11053        ///If `end_event_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
11054        pub fn end_event_index_opt(&self) -> Option<u32> {
11055            self.end_event_index.as_ref().map(|field| *field)
11056        }
11057        ///Sets `end_event_index` with the provided value.
11058        pub fn set_end_event_index(&mut self, field: u32) {
11059            self.end_event_index = Some(field);
11060        }
11061        ///Sets `end_event_index` with the provided value.
11062        pub fn with_end_event_index(mut self, field: u32) -> Self {
11063            self.set_end_event_index(field);
11064            self
11065        }
11066    }
11067    impl super::ListEventsResponse {
11068        pub const fn const_default() -> Self {
11069            Self {
11070                event: None,
11071                watermark: None,
11072                end: None,
11073            }
11074        }
11075        #[doc(hidden)]
11076        pub fn default_instance() -> &'static Self {
11077            static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
11078            &DEFAULT
11079        }
11080        ///Returns the value of `event`, or the default value if `event` is unset.
11081        pub fn event(&self) -> &super::Event {
11082            self.event
11083                .as_ref()
11084                .map(|field| field as _)
11085                .unwrap_or_else(|| super::Event::default_instance() as _)
11086        }
11087        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11088        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
11089            self.event.as_mut().map(|field| field as _)
11090        }
11091        ///Returns a mutable reference to `event`.
11092        ///If the field is unset, it is first initialized with the default value.
11093        pub fn event_mut(&mut self) -> &mut super::Event {
11094            self.event.get_or_insert_default()
11095        }
11096        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
11097        pub fn event_opt(&self) -> Option<&super::Event> {
11098            self.event.as_ref().map(|field| field as _)
11099        }
11100        ///Sets `event` with the provided value.
11101        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
11102            self.event = Some(field.into().into());
11103        }
11104        ///Sets `event` with the provided value.
11105        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
11106            self.set_event(field.into());
11107            self
11108        }
11109        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
11110        pub fn watermark(&self) -> &super::Watermark {
11111            self.watermark
11112                .as_ref()
11113                .map(|field| field as _)
11114                .unwrap_or_else(|| super::Watermark::default_instance() as _)
11115        }
11116        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11117        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11118            self.watermark.as_mut().map(|field| field as _)
11119        }
11120        ///Returns a mutable reference to `watermark`.
11121        ///If the field is unset, it is first initialized with the default value.
11122        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11123            self.watermark.get_or_insert_default()
11124        }
11125        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
11126        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11127            self.watermark.as_ref().map(|field| field as _)
11128        }
11129        ///Sets `watermark` with the provided value.
11130        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11131            self.watermark = Some(field.into().into());
11132        }
11133        ///Sets `watermark` with the provided value.
11134        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11135            self.set_watermark(field.into());
11136            self
11137        }
11138        ///Returns the value of `end`, or the default value if `end` is unset.
11139        pub fn end(&self) -> &super::QueryEnd {
11140            self.end
11141                .as_ref()
11142                .map(|field| field as _)
11143                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11144        }
11145        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11146        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11147            self.end.as_mut().map(|field| field as _)
11148        }
11149        ///Returns a mutable reference to `end`.
11150        ///If the field is unset, it is first initialized with the default value.
11151        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11152            self.end.get_or_insert_default()
11153        }
11154        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
11155        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11156            self.end.as_ref().map(|field| field as _)
11157        }
11158        ///Sets `end` with the provided value.
11159        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11160            self.end = Some(field.into().into());
11161        }
11162        ///Sets `end` with the provided value.
11163        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11164            self.set_end(field.into());
11165            self
11166        }
11167    }
11168    impl super::ListObjectVersionsRequest {
11169        pub const fn const_default() -> Self {
11170            Self {
11171                object_id: None,
11172                read_mask: None,
11173                options: None,
11174                start_version: None,
11175                end_version: None,
11176                removal_read_mask: None,
11177                start_checkpoint: None,
11178                end_checkpoint: None,
11179            }
11180        }
11181        #[doc(hidden)]
11182        pub fn default_instance() -> &'static Self {
11183            static DEFAULT: super::ListObjectVersionsRequest = super::ListObjectVersionsRequest::const_default();
11184            &DEFAULT
11185        }
11186        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11187        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11188            self.object_id.as_mut().map(|field| field as _)
11189        }
11190        ///Returns a mutable reference to `object_id`.
11191        ///If the field is unset, it is first initialized with the default value.
11192        pub fn object_id_mut(&mut self) -> &mut String {
11193            self.object_id.get_or_insert_default()
11194        }
11195        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11196        pub fn object_id_opt(&self) -> Option<&str> {
11197            self.object_id.as_ref().map(|field| field as _)
11198        }
11199        ///Sets `object_id` with the provided value.
11200        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11201            self.object_id = Some(field.into().into());
11202        }
11203        ///Sets `object_id` with the provided value.
11204        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11205            self.set_object_id(field.into());
11206            self
11207        }
11208        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11209        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11210            self.read_mask.as_mut().map(|field| field as _)
11211        }
11212        ///Returns a mutable reference to `read_mask`.
11213        ///If the field is unset, it is first initialized with the default value.
11214        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11215            self.read_mask.get_or_insert_default()
11216        }
11217        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
11218        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11219            self.read_mask.as_ref().map(|field| field as _)
11220        }
11221        ///Sets `read_mask` with the provided value.
11222        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11223            self.read_mask = Some(field.into().into());
11224        }
11225        ///Sets `read_mask` with the provided value.
11226        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11227            mut self,
11228            field: T,
11229        ) -> Self {
11230            self.set_read_mask(field.into());
11231            self
11232        }
11233        ///Returns the value of `options`, or the default value if `options` is unset.
11234        pub fn options(&self) -> &super::QueryOptions {
11235            self.options
11236                .as_ref()
11237                .map(|field| field as _)
11238                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
11239        }
11240        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11241        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
11242            self.options.as_mut().map(|field| field as _)
11243        }
11244        ///Returns a mutable reference to `options`.
11245        ///If the field is unset, it is first initialized with the default value.
11246        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
11247            self.options.get_or_insert_default()
11248        }
11249        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
11250        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
11251            self.options.as_ref().map(|field| field as _)
11252        }
11253        ///Sets `options` with the provided value.
11254        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
11255            self.options = Some(field.into().into());
11256        }
11257        ///Sets `options` with the provided value.
11258        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
11259            self.set_options(field.into());
11260            self
11261        }
11262        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11263        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
11264            self.start_version.as_mut().map(|field| field as _)
11265        }
11266        ///Returns a mutable reference to `start_version`.
11267        ///If the field is unset, it is first initialized with the default value.
11268        pub fn start_version_mut(&mut self) -> &mut u64 {
11269            self.start_version.get_or_insert_default()
11270        }
11271        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11272        pub fn start_version_opt(&self) -> Option<u64> {
11273            self.start_version.as_ref().map(|field| *field)
11274        }
11275        ///Sets `start_version` with the provided value.
11276        pub fn set_start_version(&mut self, field: u64) {
11277            self.start_version = Some(field);
11278        }
11279        ///Sets `start_version` with the provided value.
11280        pub fn with_start_version(mut self, field: u64) -> Self {
11281            self.set_start_version(field);
11282            self
11283        }
11284        ///If `end_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11285        pub fn end_version_opt_mut(&mut self) -> Option<&mut u64> {
11286            self.end_version.as_mut().map(|field| field as _)
11287        }
11288        ///Returns a mutable reference to `end_version`.
11289        ///If the field is unset, it is first initialized with the default value.
11290        pub fn end_version_mut(&mut self) -> &mut u64 {
11291            self.end_version.get_or_insert_default()
11292        }
11293        ///If `end_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11294        pub fn end_version_opt(&self) -> Option<u64> {
11295            self.end_version.as_ref().map(|field| *field)
11296        }
11297        ///Sets `end_version` with the provided value.
11298        pub fn set_end_version(&mut self, field: u64) {
11299            self.end_version = Some(field);
11300        }
11301        ///Sets `end_version` with the provided value.
11302        pub fn with_end_version(mut self, field: u64) -> Self {
11303            self.set_end_version(field);
11304            self
11305        }
11306        ///If `removal_read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11307        pub fn removal_read_mask_opt_mut(
11308            &mut self,
11309        ) -> Option<&mut ::prost_types::FieldMask> {
11310            self.removal_read_mask.as_mut().map(|field| field as _)
11311        }
11312        ///Returns a mutable reference to `removal_read_mask`.
11313        ///If the field is unset, it is first initialized with the default value.
11314        pub fn removal_read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11315            self.removal_read_mask.get_or_insert_default()
11316        }
11317        ///If `removal_read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
11318        pub fn removal_read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11319            self.removal_read_mask.as_ref().map(|field| field as _)
11320        }
11321        ///Sets `removal_read_mask` with the provided value.
11322        pub fn set_removal_read_mask<T: Into<::prost_types::FieldMask>>(
11323            &mut self,
11324            field: T,
11325        ) {
11326            self.removal_read_mask = Some(field.into().into());
11327        }
11328        ///Sets `removal_read_mask` with the provided value.
11329        pub fn with_removal_read_mask<T: Into<::prost_types::FieldMask>>(
11330            mut self,
11331            field: T,
11332        ) -> Self {
11333            self.set_removal_read_mask(field.into());
11334            self
11335        }
11336        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11337        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11338            self.start_checkpoint.as_mut().map(|field| field as _)
11339        }
11340        ///Returns a mutable reference to `start_checkpoint`.
11341        ///If the field is unset, it is first initialized with the default value.
11342        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
11343            self.start_checkpoint.get_or_insert_default()
11344        }
11345        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
11346        pub fn start_checkpoint_opt(&self) -> Option<u64> {
11347            self.start_checkpoint.as_ref().map(|field| *field)
11348        }
11349        ///Sets `start_checkpoint` with the provided value.
11350        pub fn set_start_checkpoint(&mut self, field: u64) {
11351            self.start_checkpoint = Some(field);
11352        }
11353        ///Sets `start_checkpoint` with the provided value.
11354        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
11355            self.set_start_checkpoint(field);
11356            self
11357        }
11358        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11359        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11360            self.end_checkpoint.as_mut().map(|field| field as _)
11361        }
11362        ///Returns a mutable reference to `end_checkpoint`.
11363        ///If the field is unset, it is first initialized with the default value.
11364        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
11365            self.end_checkpoint.get_or_insert_default()
11366        }
11367        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
11368        pub fn end_checkpoint_opt(&self) -> Option<u64> {
11369            self.end_checkpoint.as_ref().map(|field| *field)
11370        }
11371        ///Sets `end_checkpoint` with the provided value.
11372        pub fn set_end_checkpoint(&mut self, field: u64) {
11373            self.end_checkpoint = Some(field);
11374        }
11375        ///Sets `end_checkpoint` with the provided value.
11376        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
11377            self.set_end_checkpoint(field);
11378            self
11379        }
11380    }
11381    impl super::ListObjectVersionsResponse {
11382        pub const fn const_default() -> Self {
11383            Self {
11384                cursor: None,
11385                end: None,
11386                item: None,
11387            }
11388        }
11389        #[doc(hidden)]
11390        pub fn default_instance() -> &'static Self {
11391            static DEFAULT: super::ListObjectVersionsResponse = super::ListObjectVersionsResponse::const_default();
11392            &DEFAULT
11393        }
11394        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
11395        pub fn cursor_opt(&self) -> Option<&[u8]> {
11396            self.cursor.as_ref().map(|field| field as _)
11397        }
11398        ///Sets `cursor` with the provided value.
11399        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11400            self.cursor = Some(field.into().into());
11401        }
11402        ///Sets `cursor` with the provided value.
11403        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
11404            self.set_cursor(field.into());
11405            self
11406        }
11407        ///Returns the value of `end`, or the default value if `end` is unset.
11408        pub fn end(&self) -> &super::QueryEnd {
11409            self.end
11410                .as_ref()
11411                .map(|field| field as _)
11412                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11413        }
11414        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11415        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11416            self.end.as_mut().map(|field| field as _)
11417        }
11418        ///Returns a mutable reference to `end`.
11419        ///If the field is unset, it is first initialized with the default value.
11420        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11421            self.end.get_or_insert_default()
11422        }
11423        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
11424        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11425            self.end.as_ref().map(|field| field as _)
11426        }
11427        ///Sets `end` with the provided value.
11428        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11429            self.end = Some(field.into().into());
11430        }
11431        ///Sets `end` with the provided value.
11432        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11433            self.set_end(field.into());
11434            self
11435        }
11436        ///Returns the value of `object`, or the default value if `object` is unset.
11437        pub fn object(&self) -> &super::Object {
11438            if let Some(super::list_object_versions_response::Item::Object(field)) = &self
11439                .item
11440            {
11441                field as _
11442            } else {
11443                super::Object::default_instance() as _
11444            }
11445        }
11446        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11447        pub fn object_opt(&self) -> Option<&super::Object> {
11448            if let Some(super::list_object_versions_response::Item::Object(field)) = &self
11449                .item
11450            {
11451                Some(field as _)
11452            } else {
11453                None
11454            }
11455        }
11456        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11457        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
11458            if let Some(super::list_object_versions_response::Item::Object(field)) = &mut self
11459                .item
11460            {
11461                Some(field as _)
11462            } else {
11463                None
11464            }
11465        }
11466        ///Returns a mutable reference to `object`.
11467        ///If the field is unset, it is first initialized with the default value.
11468        ///If any other oneof field in the same oneof is set, it will be cleared.
11469        pub fn object_mut(&mut self) -> &mut super::Object {
11470            if self.object_opt_mut().is_none() {
11471                self.item = Some(
11472                    super::list_object_versions_response::Item::Object(
11473                        super::Object::default(),
11474                    ),
11475                );
11476            }
11477            self.object_opt_mut().unwrap()
11478        }
11479        ///Sets `object` with the provided value.
11480        ///If any other oneof field in the same oneof is set, it will be cleared.
11481        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
11482            self.item = Some(
11483                super::list_object_versions_response::Item::Object(field.into().into()),
11484            );
11485        }
11486        ///Sets `object` with the provided value.
11487        ///If any other oneof field in the same oneof is set, it will be cleared.
11488        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
11489            self.set_object(field.into());
11490            self
11491        }
11492        ///Returns the value of `removal`, or the default value if `removal` is unset.
11493        pub fn removal(&self) -> &super::ObjectRemoval {
11494            if let Some(super::list_object_versions_response::Item::Removal(field)) = &self
11495                .item
11496            {
11497                field as _
11498            } else {
11499                super::ObjectRemoval::default_instance() as _
11500            }
11501        }
11502        ///If `removal` is set, returns [`Some`] with the value; otherwise returns [`None`].
11503        pub fn removal_opt(&self) -> Option<&super::ObjectRemoval> {
11504            if let Some(super::list_object_versions_response::Item::Removal(field)) = &self
11505                .item
11506            {
11507                Some(field as _)
11508            } else {
11509                None
11510            }
11511        }
11512        ///If `removal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11513        pub fn removal_opt_mut(&mut self) -> Option<&mut super::ObjectRemoval> {
11514            if let Some(super::list_object_versions_response::Item::Removal(field)) = &mut self
11515                .item
11516            {
11517                Some(field as _)
11518            } else {
11519                None
11520            }
11521        }
11522        ///Returns a mutable reference to `removal`.
11523        ///If the field is unset, it is first initialized with the default value.
11524        ///If any other oneof field in the same oneof is set, it will be cleared.
11525        pub fn removal_mut(&mut self) -> &mut super::ObjectRemoval {
11526            if self.removal_opt_mut().is_none() {
11527                self.item = Some(
11528                    super::list_object_versions_response::Item::Removal(
11529                        super::ObjectRemoval::default(),
11530                    ),
11531                );
11532            }
11533            self.removal_opt_mut().unwrap()
11534        }
11535        ///Sets `removal` with the provided value.
11536        ///If any other oneof field in the same oneof is set, it will be cleared.
11537        pub fn set_removal<T: Into<super::ObjectRemoval>>(&mut self, field: T) {
11538            self.item = Some(
11539                super::list_object_versions_response::Item::Removal(field.into().into()),
11540            );
11541        }
11542        ///Sets `removal` with the provided value.
11543        ///If any other oneof field in the same oneof is set, it will be cleared.
11544        pub fn with_removal<T: Into<super::ObjectRemoval>>(mut self, field: T) -> Self {
11545            self.set_removal(field.into());
11546            self
11547        }
11548    }
11549    impl super::ListOwnedObjectsRequest {
11550        pub const fn const_default() -> Self {
11551            Self {
11552                owner: None,
11553                page_size: None,
11554                page_token: None,
11555                read_mask: None,
11556                object_type: None,
11557            }
11558        }
11559        #[doc(hidden)]
11560        pub fn default_instance() -> &'static Self {
11561            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
11562            &DEFAULT
11563        }
11564        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11565        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
11566            self.owner.as_mut().map(|field| field as _)
11567        }
11568        ///Returns a mutable reference to `owner`.
11569        ///If the field is unset, it is first initialized with the default value.
11570        pub fn owner_mut(&mut self) -> &mut String {
11571            self.owner.get_or_insert_default()
11572        }
11573        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
11574        pub fn owner_opt(&self) -> Option<&str> {
11575            self.owner.as_ref().map(|field| field as _)
11576        }
11577        ///Sets `owner` with the provided value.
11578        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
11579            self.owner = Some(field.into().into());
11580        }
11581        ///Sets `owner` with the provided value.
11582        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
11583            self.set_owner(field.into());
11584            self
11585        }
11586        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11587        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
11588            self.page_size.as_mut().map(|field| field as _)
11589        }
11590        ///Returns a mutable reference to `page_size`.
11591        ///If the field is unset, it is first initialized with the default value.
11592        pub fn page_size_mut(&mut self) -> &mut u32 {
11593            self.page_size.get_or_insert_default()
11594        }
11595        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
11596        pub fn page_size_opt(&self) -> Option<u32> {
11597            self.page_size.as_ref().map(|field| *field)
11598        }
11599        ///Sets `page_size` with the provided value.
11600        pub fn set_page_size(&mut self, field: u32) {
11601            self.page_size = Some(field);
11602        }
11603        ///Sets `page_size` with the provided value.
11604        pub fn with_page_size(mut self, field: u32) -> Self {
11605            self.set_page_size(field);
11606            self
11607        }
11608        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
11609        pub fn page_token_opt(&self) -> Option<&[u8]> {
11610            self.page_token.as_ref().map(|field| field as _)
11611        }
11612        ///Sets `page_token` with the provided value.
11613        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11614            self.page_token = Some(field.into().into());
11615        }
11616        ///Sets `page_token` with the provided value.
11617        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
11618            mut self,
11619            field: T,
11620        ) -> Self {
11621            self.set_page_token(field.into());
11622            self
11623        }
11624        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11625        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11626            self.read_mask.as_mut().map(|field| field as _)
11627        }
11628        ///Returns a mutable reference to `read_mask`.
11629        ///If the field is unset, it is first initialized with the default value.
11630        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11631            self.read_mask.get_or_insert_default()
11632        }
11633        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
11634        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11635            self.read_mask.as_ref().map(|field| field as _)
11636        }
11637        ///Sets `read_mask` with the provided value.
11638        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11639            self.read_mask = Some(field.into().into());
11640        }
11641        ///Sets `read_mask` with the provided value.
11642        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11643            mut self,
11644            field: T,
11645        ) -> Self {
11646            self.set_read_mask(field.into());
11647            self
11648        }
11649        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11650        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
11651            self.object_type.as_mut().map(|field| field as _)
11652        }
11653        ///Returns a mutable reference to `object_type`.
11654        ///If the field is unset, it is first initialized with the default value.
11655        pub fn object_type_mut(&mut self) -> &mut String {
11656            self.object_type.get_or_insert_default()
11657        }
11658        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
11659        pub fn object_type_opt(&self) -> Option<&str> {
11660            self.object_type.as_ref().map(|field| field as _)
11661        }
11662        ///Sets `object_type` with the provided value.
11663        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
11664            self.object_type = Some(field.into().into());
11665        }
11666        ///Sets `object_type` with the provided value.
11667        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
11668            self.set_object_type(field.into());
11669            self
11670        }
11671    }
11672    impl super::ListOwnedObjectsResponse {
11673        pub const fn const_default() -> Self {
11674            Self {
11675                objects: Vec::new(),
11676                next_page_token: None,
11677            }
11678        }
11679        #[doc(hidden)]
11680        pub fn default_instance() -> &'static Self {
11681            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
11682            &DEFAULT
11683        }
11684        ///Returns the value of `objects`, or the default value if `objects` is unset.
11685        pub fn objects(&self) -> &[super::Object] {
11686            &self.objects
11687        }
11688        ///Returns a mutable reference to `objects`.
11689        ///If the field is unset, it is first initialized with the default value.
11690        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11691            &mut self.objects
11692        }
11693        ///Sets `objects` with the provided value.
11694        pub fn set_objects(&mut self, field: Vec<super::Object>) {
11695            self.objects = field;
11696        }
11697        ///Sets `objects` with the provided value.
11698        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11699            self.set_objects(field);
11700            self
11701        }
11702        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
11703        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
11704            self.next_page_token.as_ref().map(|field| field as _)
11705        }
11706        ///Sets `next_page_token` with the provided value.
11707        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11708            self.next_page_token = Some(field.into().into());
11709        }
11710        ///Sets `next_page_token` with the provided value.
11711        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
11712            mut self,
11713            field: T,
11714        ) -> Self {
11715            self.set_next_page_token(field.into());
11716            self
11717        }
11718    }
11719    impl super::ListPackageVersionsRequest {
11720        pub const fn const_default() -> Self {
11721            Self {
11722                package_id: None,
11723                page_size: None,
11724                page_token: None,
11725                options: None,
11726                start_version: None,
11727                end_version: None,
11728                start_checkpoint: None,
11729                end_checkpoint: None,
11730            }
11731        }
11732        #[doc(hidden)]
11733        pub fn default_instance() -> &'static Self {
11734            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
11735            &DEFAULT
11736        }
11737        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11738        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11739            self.package_id.as_mut().map(|field| field as _)
11740        }
11741        ///Returns a mutable reference to `package_id`.
11742        ///If the field is unset, it is first initialized with the default value.
11743        pub fn package_id_mut(&mut self) -> &mut String {
11744            self.package_id.get_or_insert_default()
11745        }
11746        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11747        pub fn package_id_opt(&self) -> Option<&str> {
11748            self.package_id.as_ref().map(|field| field as _)
11749        }
11750        ///Sets `package_id` with the provided value.
11751        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11752            self.package_id = Some(field.into().into());
11753        }
11754        ///Sets `package_id` with the provided value.
11755        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11756            self.set_package_id(field.into());
11757            self
11758        }
11759        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11760        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
11761            self.page_size.as_mut().map(|field| field as _)
11762        }
11763        ///Returns a mutable reference to `page_size`.
11764        ///If the field is unset, it is first initialized with the default value.
11765        pub fn page_size_mut(&mut self) -> &mut u32 {
11766            self.page_size.get_or_insert_default()
11767        }
11768        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
11769        pub fn page_size_opt(&self) -> Option<u32> {
11770            self.page_size.as_ref().map(|field| *field)
11771        }
11772        ///Sets `page_size` with the provided value.
11773        pub fn set_page_size(&mut self, field: u32) {
11774            self.page_size = Some(field);
11775        }
11776        ///Sets `page_size` with the provided value.
11777        pub fn with_page_size(mut self, field: u32) -> Self {
11778            self.set_page_size(field);
11779            self
11780        }
11781        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
11782        pub fn page_token_opt(&self) -> Option<&[u8]> {
11783            self.page_token.as_ref().map(|field| field as _)
11784        }
11785        ///Sets `page_token` with the provided value.
11786        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11787            self.page_token = Some(field.into().into());
11788        }
11789        ///Sets `page_token` with the provided value.
11790        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
11791            mut self,
11792            field: T,
11793        ) -> Self {
11794            self.set_page_token(field.into());
11795            self
11796        }
11797        ///Returns the value of `options`, or the default value if `options` is unset.
11798        pub fn options(&self) -> &super::QueryOptions {
11799            self.options
11800                .as_ref()
11801                .map(|field| field as _)
11802                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
11803        }
11804        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11805        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
11806            self.options.as_mut().map(|field| field as _)
11807        }
11808        ///Returns a mutable reference to `options`.
11809        ///If the field is unset, it is first initialized with the default value.
11810        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
11811            self.options.get_or_insert_default()
11812        }
11813        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
11814        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
11815            self.options.as_ref().map(|field| field as _)
11816        }
11817        ///Sets `options` with the provided value.
11818        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
11819            self.options = Some(field.into().into());
11820        }
11821        ///Sets `options` with the provided value.
11822        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
11823            self.set_options(field.into());
11824            self
11825        }
11826        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11827        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
11828            self.start_version.as_mut().map(|field| field as _)
11829        }
11830        ///Returns a mutable reference to `start_version`.
11831        ///If the field is unset, it is first initialized with the default value.
11832        pub fn start_version_mut(&mut self) -> &mut u64 {
11833            self.start_version.get_or_insert_default()
11834        }
11835        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11836        pub fn start_version_opt(&self) -> Option<u64> {
11837            self.start_version.as_ref().map(|field| *field)
11838        }
11839        ///Sets `start_version` with the provided value.
11840        pub fn set_start_version(&mut self, field: u64) {
11841            self.start_version = Some(field);
11842        }
11843        ///Sets `start_version` with the provided value.
11844        pub fn with_start_version(mut self, field: u64) -> Self {
11845            self.set_start_version(field);
11846            self
11847        }
11848        ///If `end_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11849        pub fn end_version_opt_mut(&mut self) -> Option<&mut u64> {
11850            self.end_version.as_mut().map(|field| field as _)
11851        }
11852        ///Returns a mutable reference to `end_version`.
11853        ///If the field is unset, it is first initialized with the default value.
11854        pub fn end_version_mut(&mut self) -> &mut u64 {
11855            self.end_version.get_or_insert_default()
11856        }
11857        ///If `end_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11858        pub fn end_version_opt(&self) -> Option<u64> {
11859            self.end_version.as_ref().map(|field| *field)
11860        }
11861        ///Sets `end_version` with the provided value.
11862        pub fn set_end_version(&mut self, field: u64) {
11863            self.end_version = Some(field);
11864        }
11865        ///Sets `end_version` with the provided value.
11866        pub fn with_end_version(mut self, field: u64) -> Self {
11867            self.set_end_version(field);
11868            self
11869        }
11870        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11871        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11872            self.start_checkpoint.as_mut().map(|field| field as _)
11873        }
11874        ///Returns a mutable reference to `start_checkpoint`.
11875        ///If the field is unset, it is first initialized with the default value.
11876        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
11877            self.start_checkpoint.get_or_insert_default()
11878        }
11879        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
11880        pub fn start_checkpoint_opt(&self) -> Option<u64> {
11881            self.start_checkpoint.as_ref().map(|field| *field)
11882        }
11883        ///Sets `start_checkpoint` with the provided value.
11884        pub fn set_start_checkpoint(&mut self, field: u64) {
11885            self.start_checkpoint = Some(field);
11886        }
11887        ///Sets `start_checkpoint` with the provided value.
11888        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
11889            self.set_start_checkpoint(field);
11890            self
11891        }
11892        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11893        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11894            self.end_checkpoint.as_mut().map(|field| field as _)
11895        }
11896        ///Returns a mutable reference to `end_checkpoint`.
11897        ///If the field is unset, it is first initialized with the default value.
11898        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
11899            self.end_checkpoint.get_or_insert_default()
11900        }
11901        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
11902        pub fn end_checkpoint_opt(&self) -> Option<u64> {
11903            self.end_checkpoint.as_ref().map(|field| *field)
11904        }
11905        ///Sets `end_checkpoint` with the provided value.
11906        pub fn set_end_checkpoint(&mut self, field: u64) {
11907            self.end_checkpoint = Some(field);
11908        }
11909        ///Sets `end_checkpoint` with the provided value.
11910        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
11911            self.set_end_checkpoint(field);
11912            self
11913        }
11914    }
11915    impl super::ListPackageVersionsResponse {
11916        pub const fn const_default() -> Self {
11917            Self {
11918                versions: Vec::new(),
11919                next_page_token: None,
11920                end: None,
11921            }
11922        }
11923        #[doc(hidden)]
11924        pub fn default_instance() -> &'static Self {
11925            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
11926            &DEFAULT
11927        }
11928        ///Returns the value of `versions`, or the default value if `versions` is unset.
11929        pub fn versions(&self) -> &[super::PackageVersion] {
11930            &self.versions
11931        }
11932        ///Returns a mutable reference to `versions`.
11933        ///If the field is unset, it is first initialized with the default value.
11934        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
11935            &mut self.versions
11936        }
11937        ///Sets `versions` with the provided value.
11938        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
11939            self.versions = field;
11940        }
11941        ///Sets `versions` with the provided value.
11942        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
11943            self.set_versions(field);
11944            self
11945        }
11946        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
11947        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
11948            self.next_page_token.as_ref().map(|field| field as _)
11949        }
11950        ///Sets `next_page_token` with the provided value.
11951        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11952            self.next_page_token = Some(field.into().into());
11953        }
11954        ///Sets `next_page_token` with the provided value.
11955        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
11956            mut self,
11957            field: T,
11958        ) -> Self {
11959            self.set_next_page_token(field.into());
11960            self
11961        }
11962        ///Returns the value of `end`, or the default value if `end` is unset.
11963        pub fn end(&self) -> &super::QueryEnd {
11964            self.end
11965                .as_ref()
11966                .map(|field| field as _)
11967                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11968        }
11969        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11970        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11971            self.end.as_mut().map(|field| field as _)
11972        }
11973        ///Returns a mutable reference to `end`.
11974        ///If the field is unset, it is first initialized with the default value.
11975        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11976            self.end.get_or_insert_default()
11977        }
11978        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
11979        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11980            self.end.as_ref().map(|field| field as _)
11981        }
11982        ///Sets `end` with the provided value.
11983        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11984            self.end = Some(field.into().into());
11985        }
11986        ///Sets `end` with the provided value.
11987        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11988            self.set_end(field.into());
11989            self
11990        }
11991    }
11992    impl super::ListSystemPackagesRequest {
11993        pub const fn const_default() -> Self {
11994            Self { at_checkpoint: None }
11995        }
11996        #[doc(hidden)]
11997        pub fn default_instance() -> &'static Self {
11998            static DEFAULT: super::ListSystemPackagesRequest = super::ListSystemPackagesRequest::const_default();
11999            &DEFAULT
12000        }
12001        ///If `at_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12002        pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
12003            self.at_checkpoint.as_mut().map(|field| field as _)
12004        }
12005        ///Returns a mutable reference to `at_checkpoint`.
12006        ///If the field is unset, it is first initialized with the default value.
12007        pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
12008            self.at_checkpoint.get_or_insert_default()
12009        }
12010        ///If `at_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
12011        pub fn at_checkpoint_opt(&self) -> Option<u64> {
12012            self.at_checkpoint.as_ref().map(|field| *field)
12013        }
12014        ///Sets `at_checkpoint` with the provided value.
12015        pub fn set_at_checkpoint(&mut self, field: u64) {
12016            self.at_checkpoint = Some(field);
12017        }
12018        ///Sets `at_checkpoint` with the provided value.
12019        pub fn with_at_checkpoint(mut self, field: u64) -> Self {
12020            self.set_at_checkpoint(field);
12021            self
12022        }
12023    }
12024    impl super::ListSystemPackagesResponse {
12025        pub const fn const_default() -> Self {
12026            Self {
12027                system_packages: Vec::new(),
12028            }
12029        }
12030        #[doc(hidden)]
12031        pub fn default_instance() -> &'static Self {
12032            static DEFAULT: super::ListSystemPackagesResponse = super::ListSystemPackagesResponse::const_default();
12033            &DEFAULT
12034        }
12035        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
12036        pub fn system_packages(&self) -> &[super::PackageVersion] {
12037            &self.system_packages
12038        }
12039        ///Returns a mutable reference to `system_packages`.
12040        ///If the field is unset, it is first initialized with the default value.
12041        pub fn system_packages_mut(&mut self) -> &mut Vec<super::PackageVersion> {
12042            &mut self.system_packages
12043        }
12044        ///Sets `system_packages` with the provided value.
12045        pub fn set_system_packages(&mut self, field: Vec<super::PackageVersion>) {
12046            self.system_packages = field;
12047        }
12048        ///Sets `system_packages` with the provided value.
12049        pub fn with_system_packages(
12050            mut self,
12051            field: Vec<super::PackageVersion>,
12052        ) -> Self {
12053            self.set_system_packages(field);
12054            self
12055        }
12056    }
12057    impl super::ListTransactionsRequest {
12058        pub const fn const_default() -> Self {
12059            Self {
12060                read_mask: None,
12061                start_checkpoint: None,
12062                end_checkpoint: None,
12063                filter: None,
12064                options: None,
12065                start_transaction_index: None,
12066                end_transaction_index: None,
12067            }
12068        }
12069        #[doc(hidden)]
12070        pub fn default_instance() -> &'static Self {
12071            static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
12072            &DEFAULT
12073        }
12074        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12075        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12076            self.read_mask.as_mut().map(|field| field as _)
12077        }
12078        ///Returns a mutable reference to `read_mask`.
12079        ///If the field is unset, it is first initialized with the default value.
12080        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12081            self.read_mask.get_or_insert_default()
12082        }
12083        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12084        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12085            self.read_mask.as_ref().map(|field| field as _)
12086        }
12087        ///Sets `read_mask` with the provided value.
12088        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12089            self.read_mask = Some(field.into().into());
12090        }
12091        ///Sets `read_mask` with the provided value.
12092        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12093            mut self,
12094            field: T,
12095        ) -> Self {
12096            self.set_read_mask(field.into());
12097            self
12098        }
12099        ///If `start_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12100        pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
12101            self.start_checkpoint.as_mut().map(|field| field as _)
12102        }
12103        ///Returns a mutable reference to `start_checkpoint`.
12104        ///If the field is unset, it is first initialized with the default value.
12105        pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
12106            self.start_checkpoint.get_or_insert_default()
12107        }
12108        ///If `start_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
12109        pub fn start_checkpoint_opt(&self) -> Option<u64> {
12110            self.start_checkpoint.as_ref().map(|field| *field)
12111        }
12112        ///Sets `start_checkpoint` with the provided value.
12113        pub fn set_start_checkpoint(&mut self, field: u64) {
12114            self.start_checkpoint = Some(field);
12115        }
12116        ///Sets `start_checkpoint` with the provided value.
12117        pub fn with_start_checkpoint(mut self, field: u64) -> Self {
12118            self.set_start_checkpoint(field);
12119            self
12120        }
12121        ///If `end_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12122        pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
12123            self.end_checkpoint.as_mut().map(|field| field as _)
12124        }
12125        ///Returns a mutable reference to `end_checkpoint`.
12126        ///If the field is unset, it is first initialized with the default value.
12127        pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
12128            self.end_checkpoint.get_or_insert_default()
12129        }
12130        ///If `end_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
12131        pub fn end_checkpoint_opt(&self) -> Option<u64> {
12132            self.end_checkpoint.as_ref().map(|field| *field)
12133        }
12134        ///Sets `end_checkpoint` with the provided value.
12135        pub fn set_end_checkpoint(&mut self, field: u64) {
12136            self.end_checkpoint = Some(field);
12137        }
12138        ///Sets `end_checkpoint` with the provided value.
12139        pub fn with_end_checkpoint(mut self, field: u64) -> Self {
12140            self.set_end_checkpoint(field);
12141            self
12142        }
12143        ///Returns the value of `filter`, or the default value if `filter` is unset.
12144        pub fn filter(&self) -> &super::TransactionFilter {
12145            self.filter
12146                .as_ref()
12147                .map(|field| field as _)
12148                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
12149        }
12150        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12151        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
12152            self.filter.as_mut().map(|field| field as _)
12153        }
12154        ///Returns a mutable reference to `filter`.
12155        ///If the field is unset, it is first initialized with the default value.
12156        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
12157            self.filter.get_or_insert_default()
12158        }
12159        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12160        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
12161            self.filter.as_ref().map(|field| field as _)
12162        }
12163        ///Sets `filter` with the provided value.
12164        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
12165            self.filter = Some(field.into().into());
12166        }
12167        ///Sets `filter` with the provided value.
12168        pub fn with_filter<T: Into<super::TransactionFilter>>(
12169            mut self,
12170            field: T,
12171        ) -> Self {
12172            self.set_filter(field.into());
12173            self
12174        }
12175        ///Returns the value of `options`, or the default value if `options` is unset.
12176        pub fn options(&self) -> &super::QueryOptions {
12177            self.options
12178                .as_ref()
12179                .map(|field| field as _)
12180                .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
12181        }
12182        ///If `options` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12183        pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
12184            self.options.as_mut().map(|field| field as _)
12185        }
12186        ///Returns a mutable reference to `options`.
12187        ///If the field is unset, it is first initialized with the default value.
12188        pub fn options_mut(&mut self) -> &mut super::QueryOptions {
12189            self.options.get_or_insert_default()
12190        }
12191        ///If `options` is set, returns [`Some`] with the value; otherwise returns [`None`].
12192        pub fn options_opt(&self) -> Option<&super::QueryOptions> {
12193            self.options.as_ref().map(|field| field as _)
12194        }
12195        ///Sets `options` with the provided value.
12196        pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
12197            self.options = Some(field.into().into());
12198        }
12199        ///Sets `options` with the provided value.
12200        pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
12201            self.set_options(field.into());
12202            self
12203        }
12204        ///If `start_transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12205        pub fn start_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
12206            self.start_transaction_index.as_mut().map(|field| field as _)
12207        }
12208        ///Returns a mutable reference to `start_transaction_index`.
12209        ///If the field is unset, it is first initialized with the default value.
12210        pub fn start_transaction_index_mut(&mut self) -> &mut u64 {
12211            self.start_transaction_index.get_or_insert_default()
12212        }
12213        ///If `start_transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
12214        pub fn start_transaction_index_opt(&self) -> Option<u64> {
12215            self.start_transaction_index.as_ref().map(|field| *field)
12216        }
12217        ///Sets `start_transaction_index` with the provided value.
12218        pub fn set_start_transaction_index(&mut self, field: u64) {
12219            self.start_transaction_index = Some(field);
12220        }
12221        ///Sets `start_transaction_index` with the provided value.
12222        pub fn with_start_transaction_index(mut self, field: u64) -> Self {
12223            self.set_start_transaction_index(field);
12224            self
12225        }
12226        ///If `end_transaction_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12227        pub fn end_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
12228            self.end_transaction_index.as_mut().map(|field| field as _)
12229        }
12230        ///Returns a mutable reference to `end_transaction_index`.
12231        ///If the field is unset, it is first initialized with the default value.
12232        pub fn end_transaction_index_mut(&mut self) -> &mut u64 {
12233            self.end_transaction_index.get_or_insert_default()
12234        }
12235        ///If `end_transaction_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
12236        pub fn end_transaction_index_opt(&self) -> Option<u64> {
12237            self.end_transaction_index.as_ref().map(|field| *field)
12238        }
12239        ///Sets `end_transaction_index` with the provided value.
12240        pub fn set_end_transaction_index(&mut self, field: u64) {
12241            self.end_transaction_index = Some(field);
12242        }
12243        ///Sets `end_transaction_index` with the provided value.
12244        pub fn with_end_transaction_index(mut self, field: u64) -> Self {
12245            self.set_end_transaction_index(field);
12246            self
12247        }
12248    }
12249    impl super::ListTransactionsResponse {
12250        pub const fn const_default() -> Self {
12251            Self {
12252                transaction: None,
12253                watermark: None,
12254                end: None,
12255            }
12256        }
12257        #[doc(hidden)]
12258        pub fn default_instance() -> &'static Self {
12259            static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
12260            &DEFAULT
12261        }
12262        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12263        pub fn transaction(&self) -> &super::ExecutedTransaction {
12264            self.transaction
12265                .as_ref()
12266                .map(|field| field as _)
12267                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12268        }
12269        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12270        pub fn transaction_opt_mut(
12271            &mut self,
12272        ) -> Option<&mut super::ExecutedTransaction> {
12273            self.transaction.as_mut().map(|field| field as _)
12274        }
12275        ///Returns a mutable reference to `transaction`.
12276        ///If the field is unset, it is first initialized with the default value.
12277        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12278            self.transaction.get_or_insert_default()
12279        }
12280        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12281        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12282            self.transaction.as_ref().map(|field| field as _)
12283        }
12284        ///Sets `transaction` with the provided value.
12285        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12286            &mut self,
12287            field: T,
12288        ) {
12289            self.transaction = Some(field.into().into());
12290        }
12291        ///Sets `transaction` with the provided value.
12292        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12293            mut self,
12294            field: T,
12295        ) -> Self {
12296            self.set_transaction(field.into());
12297            self
12298        }
12299        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
12300        pub fn watermark(&self) -> &super::Watermark {
12301            self.watermark
12302                .as_ref()
12303                .map(|field| field as _)
12304                .unwrap_or_else(|| super::Watermark::default_instance() as _)
12305        }
12306        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12307        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
12308            self.watermark.as_mut().map(|field| field as _)
12309        }
12310        ///Returns a mutable reference to `watermark`.
12311        ///If the field is unset, it is first initialized with the default value.
12312        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
12313            self.watermark.get_or_insert_default()
12314        }
12315        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
12316        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
12317            self.watermark.as_ref().map(|field| field as _)
12318        }
12319        ///Sets `watermark` with the provided value.
12320        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
12321            self.watermark = Some(field.into().into());
12322        }
12323        ///Sets `watermark` with the provided value.
12324        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
12325            self.set_watermark(field.into());
12326            self
12327        }
12328        ///Returns the value of `end`, or the default value if `end` is unset.
12329        pub fn end(&self) -> &super::QueryEnd {
12330            self.end
12331                .as_ref()
12332                .map(|field| field as _)
12333                .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
12334        }
12335        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12336        pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
12337            self.end.as_mut().map(|field| field as _)
12338        }
12339        ///Returns a mutable reference to `end`.
12340        ///If the field is unset, it is first initialized with the default value.
12341        pub fn end_mut(&mut self) -> &mut super::QueryEnd {
12342            self.end.get_or_insert_default()
12343        }
12344        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
12345        pub fn end_opt(&self) -> Option<&super::QueryEnd> {
12346            self.end.as_ref().map(|field| field as _)
12347        }
12348        ///Sets `end` with the provided value.
12349        pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
12350            self.end = Some(field.into().into());
12351        }
12352        ///Sets `end` with the provided value.
12353        pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
12354            self.set_end(field.into());
12355            self
12356        }
12357    }
12358    impl super::LookupNameRequest {
12359        pub const fn const_default() -> Self {
12360            Self { name: None }
12361        }
12362        #[doc(hidden)]
12363        pub fn default_instance() -> &'static Self {
12364            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
12365            &DEFAULT
12366        }
12367        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12368        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12369            self.name.as_mut().map(|field| field as _)
12370        }
12371        ///Returns a mutable reference to `name`.
12372        ///If the field is unset, it is first initialized with the default value.
12373        pub fn name_mut(&mut self) -> &mut String {
12374            self.name.get_or_insert_default()
12375        }
12376        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12377        pub fn name_opt(&self) -> Option<&str> {
12378            self.name.as_ref().map(|field| field as _)
12379        }
12380        ///Sets `name` with the provided value.
12381        pub fn set_name<T: Into<String>>(&mut self, field: T) {
12382            self.name = Some(field.into().into());
12383        }
12384        ///Sets `name` with the provided value.
12385        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12386            self.set_name(field.into());
12387            self
12388        }
12389    }
12390    impl super::LookupNameResponse {
12391        pub const fn const_default() -> Self {
12392            Self { record: None }
12393        }
12394        #[doc(hidden)]
12395        pub fn default_instance() -> &'static Self {
12396            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
12397            &DEFAULT
12398        }
12399        ///Returns the value of `record`, or the default value if `record` is unset.
12400        pub fn record(&self) -> &super::NameRecord {
12401            self.record
12402                .as_ref()
12403                .map(|field| field as _)
12404                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12405        }
12406        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12407        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12408            self.record.as_mut().map(|field| field as _)
12409        }
12410        ///Returns a mutable reference to `record`.
12411        ///If the field is unset, it is first initialized with the default value.
12412        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12413            self.record.get_or_insert_default()
12414        }
12415        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12416        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12417            self.record.as_ref().map(|field| field as _)
12418        }
12419        ///Sets `record` with the provided value.
12420        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12421            self.record = Some(field.into().into());
12422        }
12423        ///Sets `record` with the provided value.
12424        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12425            self.set_record(field.into());
12426            self
12427        }
12428    }
12429    impl super::MakeMoveVector {
12430        pub const fn const_default() -> Self {
12431            Self {
12432                element_type: None,
12433                elements: Vec::new(),
12434            }
12435        }
12436        #[doc(hidden)]
12437        pub fn default_instance() -> &'static Self {
12438            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
12439            &DEFAULT
12440        }
12441        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12442        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
12443            self.element_type.as_mut().map(|field| field as _)
12444        }
12445        ///Returns a mutable reference to `element_type`.
12446        ///If the field is unset, it is first initialized with the default value.
12447        pub fn element_type_mut(&mut self) -> &mut String {
12448            self.element_type.get_or_insert_default()
12449        }
12450        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
12451        pub fn element_type_opt(&self) -> Option<&str> {
12452            self.element_type.as_ref().map(|field| field as _)
12453        }
12454        ///Sets `element_type` with the provided value.
12455        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
12456            self.element_type = Some(field.into().into());
12457        }
12458        ///Sets `element_type` with the provided value.
12459        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
12460            self.set_element_type(field.into());
12461            self
12462        }
12463        ///Returns the value of `elements`, or the default value if `elements` is unset.
12464        pub fn elements(&self) -> &[super::Argument] {
12465            &self.elements
12466        }
12467        ///Returns a mutable reference to `elements`.
12468        ///If the field is unset, it is first initialized with the default value.
12469        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
12470            &mut self.elements
12471        }
12472        ///Sets `elements` with the provided value.
12473        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
12474            self.elements = field;
12475        }
12476        ///Sets `elements` with the provided value.
12477        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
12478            self.set_elements(field);
12479            self
12480        }
12481    }
12482    impl super::MergeCoins {
12483        pub const fn const_default() -> Self {
12484            Self {
12485                coin: None,
12486                coins_to_merge: Vec::new(),
12487            }
12488        }
12489        #[doc(hidden)]
12490        pub fn default_instance() -> &'static Self {
12491            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
12492            &DEFAULT
12493        }
12494        ///Returns the value of `coin`, or the default value if `coin` is unset.
12495        pub fn coin(&self) -> &super::Argument {
12496            self.coin
12497                .as_ref()
12498                .map(|field| field as _)
12499                .unwrap_or_else(|| super::Argument::default_instance() as _)
12500        }
12501        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12502        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12503            self.coin.as_mut().map(|field| field as _)
12504        }
12505        ///Returns a mutable reference to `coin`.
12506        ///If the field is unset, it is first initialized with the default value.
12507        pub fn coin_mut(&mut self) -> &mut super::Argument {
12508            self.coin.get_or_insert_default()
12509        }
12510        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12511        pub fn coin_opt(&self) -> Option<&super::Argument> {
12512            self.coin.as_ref().map(|field| field as _)
12513        }
12514        ///Sets `coin` with the provided value.
12515        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12516            self.coin = Some(field.into().into());
12517        }
12518        ///Sets `coin` with the provided value.
12519        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12520            self.set_coin(field.into());
12521            self
12522        }
12523        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
12524        pub fn coins_to_merge(&self) -> &[super::Argument] {
12525            &self.coins_to_merge
12526        }
12527        ///Returns a mutable reference to `coins_to_merge`.
12528        ///If the field is unset, it is first initialized with the default value.
12529        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
12530            &mut self.coins_to_merge
12531        }
12532        ///Sets `coins_to_merge` with the provided value.
12533        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
12534            self.coins_to_merge = field;
12535        }
12536        ///Sets `coins_to_merge` with the provided value.
12537        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
12538            self.set_coins_to_merge(field);
12539            self
12540        }
12541    }
12542    impl super::Module {
12543        pub const fn const_default() -> Self {
12544            Self {
12545                name: None,
12546                contents: None,
12547                datatypes: Vec::new(),
12548                functions: Vec::new(),
12549            }
12550        }
12551        #[doc(hidden)]
12552        pub fn default_instance() -> &'static Self {
12553            static DEFAULT: super::Module = super::Module::const_default();
12554            &DEFAULT
12555        }
12556        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12557        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12558            self.name.as_mut().map(|field| field as _)
12559        }
12560        ///Returns a mutable reference to `name`.
12561        ///If the field is unset, it is first initialized with the default value.
12562        pub fn name_mut(&mut self) -> &mut String {
12563            self.name.get_or_insert_default()
12564        }
12565        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12566        pub fn name_opt(&self) -> Option<&str> {
12567            self.name.as_ref().map(|field| field as _)
12568        }
12569        ///Sets `name` with the provided value.
12570        pub fn set_name<T: Into<String>>(&mut self, field: T) {
12571            self.name = Some(field.into().into());
12572        }
12573        ///Sets `name` with the provided value.
12574        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12575            self.set_name(field.into());
12576            self
12577        }
12578        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
12579        pub fn contents_opt(&self) -> Option<&[u8]> {
12580            self.contents.as_ref().map(|field| field as _)
12581        }
12582        ///Sets `contents` with the provided value.
12583        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12584            self.contents = Some(field.into().into());
12585        }
12586        ///Sets `contents` with the provided value.
12587        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
12588            mut self,
12589            field: T,
12590        ) -> Self {
12591            self.set_contents(field.into());
12592            self
12593        }
12594        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
12595        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
12596            &self.datatypes
12597        }
12598        ///Returns a mutable reference to `datatypes`.
12599        ///If the field is unset, it is first initialized with the default value.
12600        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
12601            &mut self.datatypes
12602        }
12603        ///Sets `datatypes` with the provided value.
12604        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
12605            self.datatypes = field;
12606        }
12607        ///Sets `datatypes` with the provided value.
12608        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
12609            self.set_datatypes(field);
12610            self
12611        }
12612        ///Returns the value of `functions`, or the default value if `functions` is unset.
12613        pub fn functions(&self) -> &[super::FunctionDescriptor] {
12614            &self.functions
12615        }
12616        ///Returns a mutable reference to `functions`.
12617        ///If the field is unset, it is first initialized with the default value.
12618        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
12619            &mut self.functions
12620        }
12621        ///Sets `functions` with the provided value.
12622        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
12623            self.functions = field;
12624        }
12625        ///Sets `functions` with the provided value.
12626        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
12627            self.set_functions(field);
12628            self
12629        }
12630    }
12631    impl super::MoveAbort {
12632        pub const fn const_default() -> Self {
12633            Self {
12634                abort_code: None,
12635                location: None,
12636                clever_error: None,
12637            }
12638        }
12639        #[doc(hidden)]
12640        pub fn default_instance() -> &'static Self {
12641            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
12642            &DEFAULT
12643        }
12644        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12645        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
12646            self.abort_code.as_mut().map(|field| field as _)
12647        }
12648        ///Returns a mutable reference to `abort_code`.
12649        ///If the field is unset, it is first initialized with the default value.
12650        pub fn abort_code_mut(&mut self) -> &mut u64 {
12651            self.abort_code.get_or_insert_default()
12652        }
12653        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
12654        pub fn abort_code_opt(&self) -> Option<u64> {
12655            self.abort_code.as_ref().map(|field| *field)
12656        }
12657        ///Sets `abort_code` with the provided value.
12658        pub fn set_abort_code(&mut self, field: u64) {
12659            self.abort_code = Some(field);
12660        }
12661        ///Sets `abort_code` with the provided value.
12662        pub fn with_abort_code(mut self, field: u64) -> Self {
12663            self.set_abort_code(field);
12664            self
12665        }
12666        ///Returns the value of `location`, or the default value if `location` is unset.
12667        pub fn location(&self) -> &super::MoveLocation {
12668            self.location
12669                .as_ref()
12670                .map(|field| field as _)
12671                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
12672        }
12673        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12674        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
12675            self.location.as_mut().map(|field| field as _)
12676        }
12677        ///Returns a mutable reference to `location`.
12678        ///If the field is unset, it is first initialized with the default value.
12679        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
12680            self.location.get_or_insert_default()
12681        }
12682        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
12683        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
12684            self.location.as_ref().map(|field| field as _)
12685        }
12686        ///Sets `location` with the provided value.
12687        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
12688            self.location = Some(field.into().into());
12689        }
12690        ///Sets `location` with the provided value.
12691        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
12692            self.set_location(field.into());
12693            self
12694        }
12695        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
12696        pub fn clever_error(&self) -> &super::CleverError {
12697            self.clever_error
12698                .as_ref()
12699                .map(|field| field as _)
12700                .unwrap_or_else(|| super::CleverError::default_instance() as _)
12701        }
12702        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12703        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
12704            self.clever_error.as_mut().map(|field| field as _)
12705        }
12706        ///Returns a mutable reference to `clever_error`.
12707        ///If the field is unset, it is first initialized with the default value.
12708        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
12709            self.clever_error.get_or_insert_default()
12710        }
12711        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
12712        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
12713            self.clever_error.as_ref().map(|field| field as _)
12714        }
12715        ///Sets `clever_error` with the provided value.
12716        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
12717            self.clever_error = Some(field.into().into());
12718        }
12719        ///Sets `clever_error` with the provided value.
12720        pub fn with_clever_error<T: Into<super::CleverError>>(
12721            mut self,
12722            field: T,
12723        ) -> Self {
12724            self.set_clever_error(field.into());
12725            self
12726        }
12727    }
12728    impl super::MoveCall {
12729        pub const fn const_default() -> Self {
12730            Self {
12731                package: None,
12732                module: None,
12733                function: None,
12734                type_arguments: Vec::new(),
12735                arguments: Vec::new(),
12736            }
12737        }
12738        #[doc(hidden)]
12739        pub fn default_instance() -> &'static Self {
12740            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
12741            &DEFAULT
12742        }
12743        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12744        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
12745            self.package.as_mut().map(|field| field as _)
12746        }
12747        ///Returns a mutable reference to `package`.
12748        ///If the field is unset, it is first initialized with the default value.
12749        pub fn package_mut(&mut self) -> &mut String {
12750            self.package.get_or_insert_default()
12751        }
12752        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
12753        pub fn package_opt(&self) -> Option<&str> {
12754            self.package.as_ref().map(|field| field as _)
12755        }
12756        ///Sets `package` with the provided value.
12757        pub fn set_package<T: Into<String>>(&mut self, field: T) {
12758            self.package = Some(field.into().into());
12759        }
12760        ///Sets `package` with the provided value.
12761        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
12762            self.set_package(field.into());
12763            self
12764        }
12765        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12766        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
12767            self.module.as_mut().map(|field| field as _)
12768        }
12769        ///Returns a mutable reference to `module`.
12770        ///If the field is unset, it is first initialized with the default value.
12771        pub fn module_mut(&mut self) -> &mut String {
12772            self.module.get_or_insert_default()
12773        }
12774        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
12775        pub fn module_opt(&self) -> Option<&str> {
12776            self.module.as_ref().map(|field| field as _)
12777        }
12778        ///Sets `module` with the provided value.
12779        pub fn set_module<T: Into<String>>(&mut self, field: T) {
12780            self.module = Some(field.into().into());
12781        }
12782        ///Sets `module` with the provided value.
12783        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
12784            self.set_module(field.into());
12785            self
12786        }
12787        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12788        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
12789            self.function.as_mut().map(|field| field as _)
12790        }
12791        ///Returns a mutable reference to `function`.
12792        ///If the field is unset, it is first initialized with the default value.
12793        pub fn function_mut(&mut self) -> &mut String {
12794            self.function.get_or_insert_default()
12795        }
12796        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
12797        pub fn function_opt(&self) -> Option<&str> {
12798            self.function.as_ref().map(|field| field as _)
12799        }
12800        ///Sets `function` with the provided value.
12801        pub fn set_function<T: Into<String>>(&mut self, field: T) {
12802            self.function = Some(field.into().into());
12803        }
12804        ///Sets `function` with the provided value.
12805        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
12806            self.set_function(field.into());
12807            self
12808        }
12809        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
12810        pub fn type_arguments(&self) -> &[String] {
12811            &self.type_arguments
12812        }
12813        ///Returns a mutable reference to `type_arguments`.
12814        ///If the field is unset, it is first initialized with the default value.
12815        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
12816            &mut self.type_arguments
12817        }
12818        ///Sets `type_arguments` with the provided value.
12819        pub fn set_type_arguments(&mut self, field: Vec<String>) {
12820            self.type_arguments = field;
12821        }
12822        ///Sets `type_arguments` with the provided value.
12823        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
12824            self.set_type_arguments(field);
12825            self
12826        }
12827        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
12828        pub fn arguments(&self) -> &[super::Argument] {
12829            &self.arguments
12830        }
12831        ///Returns a mutable reference to `arguments`.
12832        ///If the field is unset, it is first initialized with the default value.
12833        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
12834            &mut self.arguments
12835        }
12836        ///Sets `arguments` with the provided value.
12837        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
12838            self.arguments = field;
12839        }
12840        ///Sets `arguments` with the provided value.
12841        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
12842            self.set_arguments(field);
12843            self
12844        }
12845    }
12846    impl super::MoveCallFilter {
12847        pub const fn const_default() -> Self {
12848            Self { function: None }
12849        }
12850        #[doc(hidden)]
12851        pub fn default_instance() -> &'static Self {
12852            static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
12853            &DEFAULT
12854        }
12855        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12856        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
12857            self.function.as_mut().map(|field| field as _)
12858        }
12859        ///Returns a mutable reference to `function`.
12860        ///If the field is unset, it is first initialized with the default value.
12861        pub fn function_mut(&mut self) -> &mut String {
12862            self.function.get_or_insert_default()
12863        }
12864        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
12865        pub fn function_opt(&self) -> Option<&str> {
12866            self.function.as_ref().map(|field| field as _)
12867        }
12868        ///Sets `function` with the provided value.
12869        pub fn set_function<T: Into<String>>(&mut self, field: T) {
12870            self.function = Some(field.into().into());
12871        }
12872        ///Sets `function` with the provided value.
12873        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
12874            self.set_function(field.into());
12875            self
12876        }
12877    }
12878    impl super::MoveLocation {
12879        pub const fn const_default() -> Self {
12880            Self {
12881                package: None,
12882                module: None,
12883                function: None,
12884                instruction: None,
12885                function_name: None,
12886            }
12887        }
12888        #[doc(hidden)]
12889        pub fn default_instance() -> &'static Self {
12890            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
12891            &DEFAULT
12892        }
12893        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12894        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
12895            self.package.as_mut().map(|field| field as _)
12896        }
12897        ///Returns a mutable reference to `package`.
12898        ///If the field is unset, it is first initialized with the default value.
12899        pub fn package_mut(&mut self) -> &mut String {
12900            self.package.get_or_insert_default()
12901        }
12902        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
12903        pub fn package_opt(&self) -> Option<&str> {
12904            self.package.as_ref().map(|field| field as _)
12905        }
12906        ///Sets `package` with the provided value.
12907        pub fn set_package<T: Into<String>>(&mut self, field: T) {
12908            self.package = Some(field.into().into());
12909        }
12910        ///Sets `package` with the provided value.
12911        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
12912            self.set_package(field.into());
12913            self
12914        }
12915        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12916        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
12917            self.module.as_mut().map(|field| field as _)
12918        }
12919        ///Returns a mutable reference to `module`.
12920        ///If the field is unset, it is first initialized with the default value.
12921        pub fn module_mut(&mut self) -> &mut String {
12922            self.module.get_or_insert_default()
12923        }
12924        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
12925        pub fn module_opt(&self) -> Option<&str> {
12926            self.module.as_ref().map(|field| field as _)
12927        }
12928        ///Sets `module` with the provided value.
12929        pub fn set_module<T: Into<String>>(&mut self, field: T) {
12930            self.module = Some(field.into().into());
12931        }
12932        ///Sets `module` with the provided value.
12933        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
12934            self.set_module(field.into());
12935            self
12936        }
12937        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12938        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
12939            self.function.as_mut().map(|field| field as _)
12940        }
12941        ///Returns a mutable reference to `function`.
12942        ///If the field is unset, it is first initialized with the default value.
12943        pub fn function_mut(&mut self) -> &mut u32 {
12944            self.function.get_or_insert_default()
12945        }
12946        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
12947        pub fn function_opt(&self) -> Option<u32> {
12948            self.function.as_ref().map(|field| *field)
12949        }
12950        ///Sets `function` with the provided value.
12951        pub fn set_function(&mut self, field: u32) {
12952            self.function = Some(field);
12953        }
12954        ///Sets `function` with the provided value.
12955        pub fn with_function(mut self, field: u32) -> Self {
12956            self.set_function(field);
12957            self
12958        }
12959        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12960        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
12961            self.instruction.as_mut().map(|field| field as _)
12962        }
12963        ///Returns a mutable reference to `instruction`.
12964        ///If the field is unset, it is first initialized with the default value.
12965        pub fn instruction_mut(&mut self) -> &mut u32 {
12966            self.instruction.get_or_insert_default()
12967        }
12968        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12969        pub fn instruction_opt(&self) -> Option<u32> {
12970            self.instruction.as_ref().map(|field| *field)
12971        }
12972        ///Sets `instruction` with the provided value.
12973        pub fn set_instruction(&mut self, field: u32) {
12974            self.instruction = Some(field);
12975        }
12976        ///Sets `instruction` with the provided value.
12977        pub fn with_instruction(mut self, field: u32) -> Self {
12978            self.set_instruction(field);
12979            self
12980        }
12981        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12982        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
12983            self.function_name.as_mut().map(|field| field as _)
12984        }
12985        ///Returns a mutable reference to `function_name`.
12986        ///If the field is unset, it is first initialized with the default value.
12987        pub fn function_name_mut(&mut self) -> &mut String {
12988            self.function_name.get_or_insert_default()
12989        }
12990        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
12991        pub fn function_name_opt(&self) -> Option<&str> {
12992            self.function_name.as_ref().map(|field| field as _)
12993        }
12994        ///Sets `function_name` with the provided value.
12995        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
12996            self.function_name = Some(field.into().into());
12997        }
12998        ///Sets `function_name` with the provided value.
12999        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
13000            self.set_function_name(field.into());
13001            self
13002        }
13003    }
13004    impl super::MoveTable {
13005        pub const fn const_default() -> Self {
13006            Self { id: None, size: None }
13007        }
13008        #[doc(hidden)]
13009        pub fn default_instance() -> &'static Self {
13010            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
13011            &DEFAULT
13012        }
13013        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13014        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13015            self.id.as_mut().map(|field| field as _)
13016        }
13017        ///Returns a mutable reference to `id`.
13018        ///If the field is unset, it is first initialized with the default value.
13019        pub fn id_mut(&mut self) -> &mut String {
13020            self.id.get_or_insert_default()
13021        }
13022        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13023        pub fn id_opt(&self) -> Option<&str> {
13024            self.id.as_ref().map(|field| field as _)
13025        }
13026        ///Sets `id` with the provided value.
13027        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13028            self.id = Some(field.into().into());
13029        }
13030        ///Sets `id` with the provided value.
13031        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13032            self.set_id(field.into());
13033            self
13034        }
13035        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13036        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
13037            self.size.as_mut().map(|field| field as _)
13038        }
13039        ///Returns a mutable reference to `size`.
13040        ///If the field is unset, it is first initialized with the default value.
13041        pub fn size_mut(&mut self) -> &mut u64 {
13042            self.size.get_or_insert_default()
13043        }
13044        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
13045        pub fn size_opt(&self) -> Option<u64> {
13046            self.size.as_ref().map(|field| *field)
13047        }
13048        ///Sets `size` with the provided value.
13049        pub fn set_size(&mut self, field: u64) {
13050            self.size = Some(field);
13051        }
13052        ///Sets `size` with the provided value.
13053        pub fn with_size(mut self, field: u64) -> Self {
13054            self.set_size(field);
13055            self
13056        }
13057    }
13058    impl super::MultisigAggregatedSignature {
13059        pub const fn const_default() -> Self {
13060            Self {
13061                signatures: Vec::new(),
13062                bitmap: None,
13063                legacy_bitmap: None,
13064                committee: None,
13065            }
13066        }
13067        #[doc(hidden)]
13068        pub fn default_instance() -> &'static Self {
13069            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
13070            &DEFAULT
13071        }
13072        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
13073        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
13074            &self.signatures
13075        }
13076        ///Returns a mutable reference to `signatures`.
13077        ///If the field is unset, it is first initialized with the default value.
13078        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
13079            &mut self.signatures
13080        }
13081        ///Sets `signatures` with the provided value.
13082        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
13083            self.signatures = field;
13084        }
13085        ///Sets `signatures` with the provided value.
13086        pub fn with_signatures(
13087            mut self,
13088            field: Vec<super::MultisigMemberSignature>,
13089        ) -> Self {
13090            self.set_signatures(field);
13091            self
13092        }
13093        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13094        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
13095            self.bitmap.as_mut().map(|field| field as _)
13096        }
13097        ///Returns a mutable reference to `bitmap`.
13098        ///If the field is unset, it is first initialized with the default value.
13099        pub fn bitmap_mut(&mut self) -> &mut u32 {
13100            self.bitmap.get_or_insert_default()
13101        }
13102        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
13103        pub fn bitmap_opt(&self) -> Option<u32> {
13104            self.bitmap.as_ref().map(|field| *field)
13105        }
13106        ///Sets `bitmap` with the provided value.
13107        pub fn set_bitmap(&mut self, field: u32) {
13108            self.bitmap = Some(field);
13109        }
13110        ///Sets `bitmap` with the provided value.
13111        pub fn with_bitmap(mut self, field: u32) -> Self {
13112            self.set_bitmap(field);
13113            self
13114        }
13115        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
13116        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
13117            self.legacy_bitmap.as_ref().map(|field| field as _)
13118        }
13119        ///Sets `legacy_bitmap` with the provided value.
13120        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13121            self.legacy_bitmap = Some(field.into().into());
13122        }
13123        ///Sets `legacy_bitmap` with the provided value.
13124        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
13125            mut self,
13126            field: T,
13127        ) -> Self {
13128            self.set_legacy_bitmap(field.into());
13129            self
13130        }
13131        ///Returns the value of `committee`, or the default value if `committee` is unset.
13132        pub fn committee(&self) -> &super::MultisigCommittee {
13133            self.committee
13134                .as_ref()
13135                .map(|field| field as _)
13136                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
13137        }
13138        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13139        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
13140            self.committee.as_mut().map(|field| field as _)
13141        }
13142        ///Returns a mutable reference to `committee`.
13143        ///If the field is unset, it is first initialized with the default value.
13144        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
13145            self.committee.get_or_insert_default()
13146        }
13147        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13148        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
13149            self.committee.as_ref().map(|field| field as _)
13150        }
13151        ///Sets `committee` with the provided value.
13152        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
13153            self.committee = Some(field.into().into());
13154        }
13155        ///Sets `committee` with the provided value.
13156        pub fn with_committee<T: Into<super::MultisigCommittee>>(
13157            mut self,
13158            field: T,
13159        ) -> Self {
13160            self.set_committee(field.into());
13161            self
13162        }
13163    }
13164    impl super::MultisigCommittee {
13165        pub const fn const_default() -> Self {
13166            Self {
13167                members: Vec::new(),
13168                threshold: None,
13169            }
13170        }
13171        #[doc(hidden)]
13172        pub fn default_instance() -> &'static Self {
13173            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
13174            &DEFAULT
13175        }
13176        ///Returns the value of `members`, or the default value if `members` is unset.
13177        pub fn members(&self) -> &[super::MultisigMember] {
13178            &self.members
13179        }
13180        ///Returns a mutable reference to `members`.
13181        ///If the field is unset, it is first initialized with the default value.
13182        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
13183            &mut self.members
13184        }
13185        ///Sets `members` with the provided value.
13186        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
13187            self.members = field;
13188        }
13189        ///Sets `members` with the provided value.
13190        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
13191            self.set_members(field);
13192            self
13193        }
13194        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13195        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
13196            self.threshold.as_mut().map(|field| field as _)
13197        }
13198        ///Returns a mutable reference to `threshold`.
13199        ///If the field is unset, it is first initialized with the default value.
13200        pub fn threshold_mut(&mut self) -> &mut u32 {
13201            self.threshold.get_or_insert_default()
13202        }
13203        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13204        pub fn threshold_opt(&self) -> Option<u32> {
13205            self.threshold.as_ref().map(|field| *field)
13206        }
13207        ///Sets `threshold` with the provided value.
13208        pub fn set_threshold(&mut self, field: u32) {
13209            self.threshold = Some(field);
13210        }
13211        ///Sets `threshold` with the provided value.
13212        pub fn with_threshold(mut self, field: u32) -> Self {
13213            self.set_threshold(field);
13214            self
13215        }
13216    }
13217    impl super::MultisigMember {
13218        pub const fn const_default() -> Self {
13219            Self {
13220                public_key: None,
13221                weight: None,
13222            }
13223        }
13224        #[doc(hidden)]
13225        pub fn default_instance() -> &'static Self {
13226            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
13227            &DEFAULT
13228        }
13229        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
13230        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
13231            self.public_key
13232                .as_ref()
13233                .map(|field| field as _)
13234                .unwrap_or_else(|| {
13235                    super::MultisigMemberPublicKey::default_instance() as _
13236                })
13237        }
13238        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13239        pub fn public_key_opt_mut(
13240            &mut self,
13241        ) -> Option<&mut super::MultisigMemberPublicKey> {
13242            self.public_key.as_mut().map(|field| field as _)
13243        }
13244        ///Returns a mutable reference to `public_key`.
13245        ///If the field is unset, it is first initialized with the default value.
13246        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
13247            self.public_key.get_or_insert_default()
13248        }
13249        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
13250        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
13251            self.public_key.as_ref().map(|field| field as _)
13252        }
13253        ///Sets `public_key` with the provided value.
13254        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
13255            &mut self,
13256            field: T,
13257        ) {
13258            self.public_key = Some(field.into().into());
13259        }
13260        ///Sets `public_key` with the provided value.
13261        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
13262            mut self,
13263            field: T,
13264        ) -> Self {
13265            self.set_public_key(field.into());
13266            self
13267        }
13268        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13269        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
13270            self.weight.as_mut().map(|field| field as _)
13271        }
13272        ///Returns a mutable reference to `weight`.
13273        ///If the field is unset, it is first initialized with the default value.
13274        pub fn weight_mut(&mut self) -> &mut u32 {
13275            self.weight.get_or_insert_default()
13276        }
13277        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
13278        pub fn weight_opt(&self) -> Option<u32> {
13279            self.weight.as_ref().map(|field| *field)
13280        }
13281        ///Sets `weight` with the provided value.
13282        pub fn set_weight(&mut self, field: u32) {
13283            self.weight = Some(field);
13284        }
13285        ///Sets `weight` with the provided value.
13286        pub fn with_weight(mut self, field: u32) -> Self {
13287            self.set_weight(field);
13288            self
13289        }
13290    }
13291    impl super::MultisigMemberPublicKey {
13292        pub const fn const_default() -> Self {
13293            Self {
13294                scheme: None,
13295                public_key: None,
13296                zklogin: None,
13297            }
13298        }
13299        #[doc(hidden)]
13300        pub fn default_instance() -> &'static Self {
13301            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
13302            &DEFAULT
13303        }
13304        ///Sets `scheme` with the provided value.
13305        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
13306            self.set_scheme(field.into());
13307            self
13308        }
13309        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
13310        pub fn public_key_opt(&self) -> Option<&[u8]> {
13311            self.public_key.as_ref().map(|field| field as _)
13312        }
13313        ///Sets `public_key` with the provided value.
13314        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13315            self.public_key = Some(field.into().into());
13316        }
13317        ///Sets `public_key` with the provided value.
13318        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
13319            mut self,
13320            field: T,
13321        ) -> Self {
13322            self.set_public_key(field.into());
13323            self
13324        }
13325        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
13326        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
13327            self.zklogin
13328                .as_ref()
13329                .map(|field| field as _)
13330                .unwrap_or_else(|| {
13331                    super::ZkLoginPublicIdentifier::default_instance() as _
13332                })
13333        }
13334        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13335        pub fn zklogin_opt_mut(
13336            &mut self,
13337        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
13338            self.zklogin.as_mut().map(|field| field as _)
13339        }
13340        ///Returns a mutable reference to `zklogin`.
13341        ///If the field is unset, it is first initialized with the default value.
13342        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
13343            self.zklogin.get_or_insert_default()
13344        }
13345        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
13346        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
13347            self.zklogin.as_ref().map(|field| field as _)
13348        }
13349        ///Sets `zklogin` with the provided value.
13350        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
13351            &mut self,
13352            field: T,
13353        ) {
13354            self.zklogin = Some(field.into().into());
13355        }
13356        ///Sets `zklogin` with the provided value.
13357        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
13358            mut self,
13359            field: T,
13360        ) -> Self {
13361            self.set_zklogin(field.into());
13362            self
13363        }
13364    }
13365    impl super::MultisigMemberSignature {
13366        pub const fn const_default() -> Self {
13367            Self {
13368                scheme: None,
13369                signature: None,
13370                zklogin: None,
13371                passkey: None,
13372            }
13373        }
13374        #[doc(hidden)]
13375        pub fn default_instance() -> &'static Self {
13376            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
13377            &DEFAULT
13378        }
13379        ///Sets `scheme` with the provided value.
13380        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
13381            self.set_scheme(field.into());
13382            self
13383        }
13384        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
13385        pub fn signature_opt(&self) -> Option<&[u8]> {
13386            self.signature.as_ref().map(|field| field as _)
13387        }
13388        ///Sets `signature` with the provided value.
13389        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13390            self.signature = Some(field.into().into());
13391        }
13392        ///Sets `signature` with the provided value.
13393        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
13394            mut self,
13395            field: T,
13396        ) -> Self {
13397            self.set_signature(field.into());
13398            self
13399        }
13400        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
13401        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
13402            self.zklogin
13403                .as_ref()
13404                .map(|field| field as _)
13405                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
13406        }
13407        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13408        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
13409            self.zklogin.as_mut().map(|field| field as _)
13410        }
13411        ///Returns a mutable reference to `zklogin`.
13412        ///If the field is unset, it is first initialized with the default value.
13413        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
13414            self.zklogin.get_or_insert_default()
13415        }
13416        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
13417        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
13418            self.zklogin.as_ref().map(|field| field as _)
13419        }
13420        ///Sets `zklogin` with the provided value.
13421        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
13422            self.zklogin = Some(field.into().into());
13423        }
13424        ///Sets `zklogin` with the provided value.
13425        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
13426            mut self,
13427            field: T,
13428        ) -> Self {
13429            self.set_zklogin(field.into());
13430            self
13431        }
13432        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
13433        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
13434            self.passkey
13435                .as_ref()
13436                .map(|field| field as _)
13437                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
13438        }
13439        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13440        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
13441            self.passkey.as_mut().map(|field| field as _)
13442        }
13443        ///Returns a mutable reference to `passkey`.
13444        ///If the field is unset, it is first initialized with the default value.
13445        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
13446            self.passkey.get_or_insert_default()
13447        }
13448        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
13449        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
13450            self.passkey.as_ref().map(|field| field as _)
13451        }
13452        ///Sets `passkey` with the provided value.
13453        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
13454            self.passkey = Some(field.into().into());
13455        }
13456        ///Sets `passkey` with the provided value.
13457        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
13458            mut self,
13459            field: T,
13460        ) -> Self {
13461            self.set_passkey(field.into());
13462            self
13463        }
13464    }
13465    impl super::NameRecord {
13466        pub const fn const_default() -> Self {
13467            Self {
13468                id: None,
13469                name: None,
13470                registration_nft_id: None,
13471                expiration_timestamp: None,
13472                target_address: None,
13473                data: std::collections::BTreeMap::new(),
13474            }
13475        }
13476        #[doc(hidden)]
13477        pub fn default_instance() -> &'static Self {
13478            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
13479            &DEFAULT
13480        }
13481        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13482        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13483            self.id.as_mut().map(|field| field as _)
13484        }
13485        ///Returns a mutable reference to `id`.
13486        ///If the field is unset, it is first initialized with the default value.
13487        pub fn id_mut(&mut self) -> &mut String {
13488            self.id.get_or_insert_default()
13489        }
13490        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13491        pub fn id_opt(&self) -> Option<&str> {
13492            self.id.as_ref().map(|field| field as _)
13493        }
13494        ///Sets `id` with the provided value.
13495        pub fn set_id<T: Into<String>>(&mut self, field: T) {
13496            self.id = Some(field.into().into());
13497        }
13498        ///Sets `id` with the provided value.
13499        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13500            self.set_id(field.into());
13501            self
13502        }
13503        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13504        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
13505            self.name.as_mut().map(|field| field as _)
13506        }
13507        ///Returns a mutable reference to `name`.
13508        ///If the field is unset, it is first initialized with the default value.
13509        pub fn name_mut(&mut self) -> &mut String {
13510            self.name.get_or_insert_default()
13511        }
13512        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
13513        pub fn name_opt(&self) -> Option<&str> {
13514            self.name.as_ref().map(|field| field as _)
13515        }
13516        ///Sets `name` with the provided value.
13517        pub fn set_name<T: Into<String>>(&mut self, field: T) {
13518            self.name = Some(field.into().into());
13519        }
13520        ///Sets `name` with the provided value.
13521        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
13522            self.set_name(field.into());
13523            self
13524        }
13525        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13526        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
13527            self.registration_nft_id.as_mut().map(|field| field as _)
13528        }
13529        ///Returns a mutable reference to `registration_nft_id`.
13530        ///If the field is unset, it is first initialized with the default value.
13531        pub fn registration_nft_id_mut(&mut self) -> &mut String {
13532            self.registration_nft_id.get_or_insert_default()
13533        }
13534        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13535        pub fn registration_nft_id_opt(&self) -> Option<&str> {
13536            self.registration_nft_id.as_ref().map(|field| field as _)
13537        }
13538        ///Sets `registration_nft_id` with the provided value.
13539        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
13540            self.registration_nft_id = Some(field.into().into());
13541        }
13542        ///Sets `registration_nft_id` with the provided value.
13543        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
13544            self.set_registration_nft_id(field.into());
13545            self
13546        }
13547        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13548        pub fn expiration_timestamp_opt_mut(
13549            &mut self,
13550        ) -> Option<&mut ::prost_types::Timestamp> {
13551            self.expiration_timestamp.as_mut().map(|field| field as _)
13552        }
13553        ///Returns a mutable reference to `expiration_timestamp`.
13554        ///If the field is unset, it is first initialized with the default value.
13555        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
13556            self.expiration_timestamp.get_or_insert_default()
13557        }
13558        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
13559        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
13560            self.expiration_timestamp.as_ref().map(|field| field as _)
13561        }
13562        ///Sets `expiration_timestamp` with the provided value.
13563        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
13564            &mut self,
13565            field: T,
13566        ) {
13567            self.expiration_timestamp = Some(field.into().into());
13568        }
13569        ///Sets `expiration_timestamp` with the provided value.
13570        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
13571            mut self,
13572            field: T,
13573        ) -> Self {
13574            self.set_expiration_timestamp(field.into());
13575            self
13576        }
13577        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13578        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
13579            self.target_address.as_mut().map(|field| field as _)
13580        }
13581        ///Returns a mutable reference to `target_address`.
13582        ///If the field is unset, it is first initialized with the default value.
13583        pub fn target_address_mut(&mut self) -> &mut String {
13584            self.target_address.get_or_insert_default()
13585        }
13586        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
13587        pub fn target_address_opt(&self) -> Option<&str> {
13588            self.target_address.as_ref().map(|field| field as _)
13589        }
13590        ///Sets `target_address` with the provided value.
13591        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
13592            self.target_address = Some(field.into().into());
13593        }
13594        ///Sets `target_address` with the provided value.
13595        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
13596            self.set_target_address(field.into());
13597            self
13598        }
13599        ///Returns the value of `data`, or the default value if `data` is unset.
13600        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
13601            &self.data
13602        }
13603        ///Returns a mutable reference to `data`.
13604        ///If the field is unset, it is first initialized with the default value.
13605        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
13606            &mut self.data
13607        }
13608        ///Sets `data` with the provided value.
13609        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
13610            self.data = field;
13611        }
13612        ///Sets `data` with the provided value.
13613        pub fn with_data(
13614            mut self,
13615            field: ::std::collections::BTreeMap<String, String>,
13616        ) -> Self {
13617            self.set_data(field);
13618            self
13619        }
13620    }
13621    impl super::Object {
13622        pub const fn const_default() -> Self {
13623            Self {
13624                bcs: None,
13625                object_id: None,
13626                version: None,
13627                digest: None,
13628                owner: None,
13629                object_type: None,
13630                has_public_transfer: None,
13631                contents: None,
13632                package: None,
13633                previous_transaction: None,
13634                storage_rebate: None,
13635                json: None,
13636                balance: None,
13637                display: None,
13638            }
13639        }
13640        #[doc(hidden)]
13641        pub fn default_instance() -> &'static Self {
13642            static DEFAULT: super::Object = super::Object::const_default();
13643            &DEFAULT
13644        }
13645        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13646        pub fn bcs(&self) -> &super::Bcs {
13647            self.bcs
13648                .as_ref()
13649                .map(|field| field as _)
13650                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13651        }
13652        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13653        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13654            self.bcs.as_mut().map(|field| field as _)
13655        }
13656        ///Returns a mutable reference to `bcs`.
13657        ///If the field is unset, it is first initialized with the default value.
13658        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13659            self.bcs.get_or_insert_default()
13660        }
13661        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13662        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13663            self.bcs.as_ref().map(|field| field as _)
13664        }
13665        ///Sets `bcs` with the provided value.
13666        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13667            self.bcs = Some(field.into().into());
13668        }
13669        ///Sets `bcs` with the provided value.
13670        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13671            self.set_bcs(field.into());
13672            self
13673        }
13674        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13675        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
13676            self.object_id.as_mut().map(|field| field as _)
13677        }
13678        ///Returns a mutable reference to `object_id`.
13679        ///If the field is unset, it is first initialized with the default value.
13680        pub fn object_id_mut(&mut self) -> &mut String {
13681            self.object_id.get_or_insert_default()
13682        }
13683        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
13684        pub fn object_id_opt(&self) -> Option<&str> {
13685            self.object_id.as_ref().map(|field| field as _)
13686        }
13687        ///Sets `object_id` with the provided value.
13688        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
13689            self.object_id = Some(field.into().into());
13690        }
13691        ///Sets `object_id` with the provided value.
13692        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
13693            self.set_object_id(field.into());
13694            self
13695        }
13696        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13697        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13698            self.version.as_mut().map(|field| field as _)
13699        }
13700        ///Returns a mutable reference to `version`.
13701        ///If the field is unset, it is first initialized with the default value.
13702        pub fn version_mut(&mut self) -> &mut u64 {
13703            self.version.get_or_insert_default()
13704        }
13705        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13706        pub fn version_opt(&self) -> Option<u64> {
13707            self.version.as_ref().map(|field| *field)
13708        }
13709        ///Sets `version` with the provided value.
13710        pub fn set_version(&mut self, field: u64) {
13711            self.version = Some(field);
13712        }
13713        ///Sets `version` with the provided value.
13714        pub fn with_version(mut self, field: u64) -> Self {
13715            self.set_version(field);
13716            self
13717        }
13718        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13719        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13720            self.digest.as_mut().map(|field| field as _)
13721        }
13722        ///Returns a mutable reference to `digest`.
13723        ///If the field is unset, it is first initialized with the default value.
13724        pub fn digest_mut(&mut self) -> &mut String {
13725            self.digest.get_or_insert_default()
13726        }
13727        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13728        pub fn digest_opt(&self) -> Option<&str> {
13729            self.digest.as_ref().map(|field| field as _)
13730        }
13731        ///Sets `digest` with the provided value.
13732        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13733            self.digest = Some(field.into().into());
13734        }
13735        ///Sets `digest` with the provided value.
13736        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13737            self.set_digest(field.into());
13738            self
13739        }
13740        ///Returns the value of `owner`, or the default value if `owner` is unset.
13741        pub fn owner(&self) -> &super::Owner {
13742            self.owner
13743                .as_ref()
13744                .map(|field| field as _)
13745                .unwrap_or_else(|| super::Owner::default_instance() as _)
13746        }
13747        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13748        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
13749            self.owner.as_mut().map(|field| field as _)
13750        }
13751        ///Returns a mutable reference to `owner`.
13752        ///If the field is unset, it is first initialized with the default value.
13753        pub fn owner_mut(&mut self) -> &mut super::Owner {
13754            self.owner.get_or_insert_default()
13755        }
13756        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
13757        pub fn owner_opt(&self) -> Option<&super::Owner> {
13758            self.owner.as_ref().map(|field| field as _)
13759        }
13760        ///Sets `owner` with the provided value.
13761        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
13762            self.owner = Some(field.into().into());
13763        }
13764        ///Sets `owner` with the provided value.
13765        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
13766            self.set_owner(field.into());
13767            self
13768        }
13769        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13770        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
13771            self.object_type.as_mut().map(|field| field as _)
13772        }
13773        ///Returns a mutable reference to `object_type`.
13774        ///If the field is unset, it is first initialized with the default value.
13775        pub fn object_type_mut(&mut self) -> &mut String {
13776            self.object_type.get_or_insert_default()
13777        }
13778        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
13779        pub fn object_type_opt(&self) -> Option<&str> {
13780            self.object_type.as_ref().map(|field| field as _)
13781        }
13782        ///Sets `object_type` with the provided value.
13783        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
13784            self.object_type = Some(field.into().into());
13785        }
13786        ///Sets `object_type` with the provided value.
13787        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
13788            self.set_object_type(field.into());
13789            self
13790        }
13791        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13792        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
13793            self.has_public_transfer.as_mut().map(|field| field as _)
13794        }
13795        ///Returns a mutable reference to `has_public_transfer`.
13796        ///If the field is unset, it is first initialized with the default value.
13797        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
13798            self.has_public_transfer.get_or_insert_default()
13799        }
13800        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
13801        pub fn has_public_transfer_opt(&self) -> Option<bool> {
13802            self.has_public_transfer.as_ref().map(|field| *field)
13803        }
13804        ///Sets `has_public_transfer` with the provided value.
13805        pub fn set_has_public_transfer(&mut self, field: bool) {
13806            self.has_public_transfer = Some(field);
13807        }
13808        ///Sets `has_public_transfer` with the provided value.
13809        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
13810            self.set_has_public_transfer(field);
13811            self
13812        }
13813        ///Returns the value of `contents`, or the default value if `contents` is unset.
13814        pub fn contents(&self) -> &super::Bcs {
13815            self.contents
13816                .as_ref()
13817                .map(|field| field as _)
13818                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13819        }
13820        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13821        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13822            self.contents.as_mut().map(|field| field as _)
13823        }
13824        ///Returns a mutable reference to `contents`.
13825        ///If the field is unset, it is first initialized with the default value.
13826        pub fn contents_mut(&mut self) -> &mut super::Bcs {
13827            self.contents.get_or_insert_default()
13828        }
13829        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
13830        pub fn contents_opt(&self) -> Option<&super::Bcs> {
13831            self.contents.as_ref().map(|field| field as _)
13832        }
13833        ///Sets `contents` with the provided value.
13834        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
13835            self.contents = Some(field.into().into());
13836        }
13837        ///Sets `contents` with the provided value.
13838        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13839            self.set_contents(field.into());
13840            self
13841        }
13842        ///Returns the value of `package`, or the default value if `package` is unset.
13843        pub fn package(&self) -> &super::Package {
13844            self.package
13845                .as_ref()
13846                .map(|field| field as _)
13847                .unwrap_or_else(|| super::Package::default_instance() as _)
13848        }
13849        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13850        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
13851            self.package.as_mut().map(|field| field as _)
13852        }
13853        ///Returns a mutable reference to `package`.
13854        ///If the field is unset, it is first initialized with the default value.
13855        pub fn package_mut(&mut self) -> &mut super::Package {
13856            self.package.get_or_insert_default()
13857        }
13858        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
13859        pub fn package_opt(&self) -> Option<&super::Package> {
13860            self.package.as_ref().map(|field| field as _)
13861        }
13862        ///Sets `package` with the provided value.
13863        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
13864            self.package = Some(field.into().into());
13865        }
13866        ///Sets `package` with the provided value.
13867        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
13868            self.set_package(field.into());
13869            self
13870        }
13871        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13872        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
13873            self.previous_transaction.as_mut().map(|field| field as _)
13874        }
13875        ///Returns a mutable reference to `previous_transaction`.
13876        ///If the field is unset, it is first initialized with the default value.
13877        pub fn previous_transaction_mut(&mut self) -> &mut String {
13878            self.previous_transaction.get_or_insert_default()
13879        }
13880        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
13881        pub fn previous_transaction_opt(&self) -> Option<&str> {
13882            self.previous_transaction.as_ref().map(|field| field as _)
13883        }
13884        ///Sets `previous_transaction` with the provided value.
13885        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
13886            self.previous_transaction = Some(field.into().into());
13887        }
13888        ///Sets `previous_transaction` with the provided value.
13889        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
13890            self.set_previous_transaction(field.into());
13891            self
13892        }
13893        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13894        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
13895            self.storage_rebate.as_mut().map(|field| field as _)
13896        }
13897        ///Returns a mutable reference to `storage_rebate`.
13898        ///If the field is unset, it is first initialized with the default value.
13899        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
13900            self.storage_rebate.get_or_insert_default()
13901        }
13902        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
13903        pub fn storage_rebate_opt(&self) -> Option<u64> {
13904            self.storage_rebate.as_ref().map(|field| *field)
13905        }
13906        ///Sets `storage_rebate` with the provided value.
13907        pub fn set_storage_rebate(&mut self, field: u64) {
13908            self.storage_rebate = Some(field);
13909        }
13910        ///Sets `storage_rebate` with the provided value.
13911        pub fn with_storage_rebate(mut self, field: u64) -> Self {
13912            self.set_storage_rebate(field);
13913            self
13914        }
13915        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13916        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
13917            self.json.as_mut().map(|field| field as _)
13918        }
13919        ///Returns a mutable reference to `json`.
13920        ///If the field is unset, it is first initialized with the default value.
13921        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
13922            self.json.get_or_insert_default()
13923        }
13924        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
13925        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
13926            self.json.as_ref().map(|field| field as _)
13927        }
13928        ///Sets `json` with the provided value.
13929        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
13930            self.json = Some(field.into().into());
13931        }
13932        ///Sets `json` with the provided value.
13933        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
13934            self.set_json(field.into());
13935            self
13936        }
13937        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13938        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
13939            self.balance.as_mut().map(|field| field as _)
13940        }
13941        ///Returns a mutable reference to `balance`.
13942        ///If the field is unset, it is first initialized with the default value.
13943        pub fn balance_mut(&mut self) -> &mut u64 {
13944            self.balance.get_or_insert_default()
13945        }
13946        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
13947        pub fn balance_opt(&self) -> Option<u64> {
13948            self.balance.as_ref().map(|field| *field)
13949        }
13950        ///Sets `balance` with the provided value.
13951        pub fn set_balance(&mut self, field: u64) {
13952            self.balance = Some(field);
13953        }
13954        ///Sets `balance` with the provided value.
13955        pub fn with_balance(mut self, field: u64) -> Self {
13956            self.set_balance(field);
13957            self
13958        }
13959        ///Returns the value of `display`, or the default value if `display` is unset.
13960        pub fn display(&self) -> &super::Display {
13961            self.display
13962                .as_ref()
13963                .map(|field| field as _)
13964                .unwrap_or_else(|| super::Display::default_instance() as _)
13965        }
13966        ///If `display` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13967        pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
13968            self.display.as_mut().map(|field| field as _)
13969        }
13970        ///Returns a mutable reference to `display`.
13971        ///If the field is unset, it is first initialized with the default value.
13972        pub fn display_mut(&mut self) -> &mut super::Display {
13973            self.display.get_or_insert_default()
13974        }
13975        ///If `display` is set, returns [`Some`] with the value; otherwise returns [`None`].
13976        pub fn display_opt(&self) -> Option<&super::Display> {
13977            self.display.as_ref().map(|field| field as _)
13978        }
13979        ///Sets `display` with the provided value.
13980        pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
13981            self.display = Some(field.into().into());
13982        }
13983        ///Sets `display` with the provided value.
13984        pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
13985            self.set_display(field.into());
13986            self
13987        }
13988    }
13989    impl super::ObjectReference {
13990        pub const fn const_default() -> Self {
13991            Self {
13992                object_id: None,
13993                version: None,
13994                digest: None,
13995            }
13996        }
13997        #[doc(hidden)]
13998        pub fn default_instance() -> &'static Self {
13999            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
14000            &DEFAULT
14001        }
14002        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14003        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
14004            self.object_id.as_mut().map(|field| field as _)
14005        }
14006        ///Returns a mutable reference to `object_id`.
14007        ///If the field is unset, it is first initialized with the default value.
14008        pub fn object_id_mut(&mut self) -> &mut String {
14009            self.object_id.get_or_insert_default()
14010        }
14011        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14012        pub fn object_id_opt(&self) -> Option<&str> {
14013            self.object_id.as_ref().map(|field| field as _)
14014        }
14015        ///Sets `object_id` with the provided value.
14016        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
14017            self.object_id = Some(field.into().into());
14018        }
14019        ///Sets `object_id` with the provided value.
14020        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
14021            self.set_object_id(field.into());
14022            self
14023        }
14024        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14025        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14026            self.version.as_mut().map(|field| field as _)
14027        }
14028        ///Returns a mutable reference to `version`.
14029        ///If the field is unset, it is first initialized with the default value.
14030        pub fn version_mut(&mut self) -> &mut u64 {
14031            self.version.get_or_insert_default()
14032        }
14033        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14034        pub fn version_opt(&self) -> Option<u64> {
14035            self.version.as_ref().map(|field| *field)
14036        }
14037        ///Sets `version` with the provided value.
14038        pub fn set_version(&mut self, field: u64) {
14039            self.version = Some(field);
14040        }
14041        ///Sets `version` with the provided value.
14042        pub fn with_version(mut self, field: u64) -> Self {
14043            self.set_version(field);
14044            self
14045        }
14046        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14047        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14048            self.digest.as_mut().map(|field| field as _)
14049        }
14050        ///Returns a mutable reference to `digest`.
14051        ///If the field is unset, it is first initialized with the default value.
14052        pub fn digest_mut(&mut self) -> &mut String {
14053            self.digest.get_or_insert_default()
14054        }
14055        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14056        pub fn digest_opt(&self) -> Option<&str> {
14057            self.digest.as_ref().map(|field| field as _)
14058        }
14059        ///Sets `digest` with the provided value.
14060        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14061            self.digest = Some(field.into().into());
14062        }
14063        ///Sets `digest` with the provided value.
14064        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14065            self.set_digest(field.into());
14066            self
14067        }
14068    }
14069    impl super::ObjectRemoval {
14070        pub const fn const_default() -> Self {
14071            Self {
14072                version: None,
14073                kind: None,
14074                transaction: None,
14075            }
14076        }
14077        #[doc(hidden)]
14078        pub fn default_instance() -> &'static Self {
14079            static DEFAULT: super::ObjectRemoval = super::ObjectRemoval::const_default();
14080            &DEFAULT
14081        }
14082        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14083        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14084            self.version.as_mut().map(|field| field as _)
14085        }
14086        ///Returns a mutable reference to `version`.
14087        ///If the field is unset, it is first initialized with the default value.
14088        pub fn version_mut(&mut self) -> &mut u64 {
14089            self.version.get_or_insert_default()
14090        }
14091        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14092        pub fn version_opt(&self) -> Option<u64> {
14093            self.version.as_ref().map(|field| *field)
14094        }
14095        ///Sets `version` with the provided value.
14096        pub fn set_version(&mut self, field: u64) {
14097            self.version = Some(field);
14098        }
14099        ///Sets `version` with the provided value.
14100        pub fn with_version(mut self, field: u64) -> Self {
14101            self.set_version(field);
14102            self
14103        }
14104        ///Sets `kind` with the provided value.
14105        pub fn with_kind<T: Into<super::object_removal::Kind>>(
14106            mut self,
14107            field: T,
14108        ) -> Self {
14109            self.set_kind(field.into());
14110            self
14111        }
14112        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14113        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
14114            self.transaction.as_mut().map(|field| field as _)
14115        }
14116        ///Returns a mutable reference to `transaction`.
14117        ///If the field is unset, it is first initialized with the default value.
14118        pub fn transaction_mut(&mut self) -> &mut String {
14119            self.transaction.get_or_insert_default()
14120        }
14121        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14122        pub fn transaction_opt(&self) -> Option<&str> {
14123            self.transaction.as_ref().map(|field| field as _)
14124        }
14125        ///Sets `transaction` with the provided value.
14126        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
14127            self.transaction = Some(field.into().into());
14128        }
14129        ///Sets `transaction` with the provided value.
14130        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
14131            self.set_transaction(field.into());
14132            self
14133        }
14134    }
14135    impl super::ObjectSet {
14136        pub const fn const_default() -> Self {
14137            Self { objects: Vec::new() }
14138        }
14139        #[doc(hidden)]
14140        pub fn default_instance() -> &'static Self {
14141            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
14142            &DEFAULT
14143        }
14144        ///Returns the value of `objects`, or the default value if `objects` is unset.
14145        pub fn objects(&self) -> &[super::Object] {
14146            &self.objects
14147        }
14148        ///Returns a mutable reference to `objects`.
14149        ///If the field is unset, it is first initialized with the default value.
14150        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
14151            &mut self.objects
14152        }
14153        ///Sets `objects` with the provided value.
14154        pub fn set_objects(&mut self, field: Vec<super::Object>) {
14155            self.objects = field;
14156        }
14157        ///Sets `objects` with the provided value.
14158        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
14159            self.set_objects(field);
14160            self
14161        }
14162    }
14163    impl super::OpenSignature {
14164        pub const fn const_default() -> Self {
14165            Self {
14166                reference: None,
14167                body: None,
14168            }
14169        }
14170        #[doc(hidden)]
14171        pub fn default_instance() -> &'static Self {
14172            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
14173            &DEFAULT
14174        }
14175        ///Sets `reference` with the provided value.
14176        pub fn with_reference<T: Into<super::open_signature::Reference>>(
14177            mut self,
14178            field: T,
14179        ) -> Self {
14180            self.set_reference(field.into());
14181            self
14182        }
14183        ///Returns the value of `body`, or the default value if `body` is unset.
14184        pub fn body(&self) -> &super::OpenSignatureBody {
14185            self.body
14186                .as_ref()
14187                .map(|field| field as _)
14188                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
14189        }
14190        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14191        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
14192            self.body.as_mut().map(|field| field as _)
14193        }
14194        ///Returns a mutable reference to `body`.
14195        ///If the field is unset, it is first initialized with the default value.
14196        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
14197            self.body.get_or_insert_default()
14198        }
14199        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
14200        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
14201            self.body.as_ref().map(|field| field as _)
14202        }
14203        ///Sets `body` with the provided value.
14204        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
14205            self.body = Some(field.into().into());
14206        }
14207        ///Sets `body` with the provided value.
14208        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
14209            self.set_body(field.into());
14210            self
14211        }
14212    }
14213    impl super::OpenSignatureBody {
14214        pub const fn const_default() -> Self {
14215            Self {
14216                r#type: None,
14217                type_name: None,
14218                type_parameter_instantiation: Vec::new(),
14219                type_parameter: None,
14220            }
14221        }
14222        #[doc(hidden)]
14223        pub fn default_instance() -> &'static Self {
14224            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
14225            &DEFAULT
14226        }
14227        ///Sets `r#type` with the provided value.
14228        pub fn with_type<T: Into<super::open_signature_body::Type>>(
14229            mut self,
14230            field: T,
14231        ) -> Self {
14232            self.set_type(field.into());
14233            self
14234        }
14235        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14236        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
14237            self.type_name.as_mut().map(|field| field as _)
14238        }
14239        ///Returns a mutable reference to `type_name`.
14240        ///If the field is unset, it is first initialized with the default value.
14241        pub fn type_name_mut(&mut self) -> &mut String {
14242            self.type_name.get_or_insert_default()
14243        }
14244        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
14245        pub fn type_name_opt(&self) -> Option<&str> {
14246            self.type_name.as_ref().map(|field| field as _)
14247        }
14248        ///Sets `type_name` with the provided value.
14249        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
14250            self.type_name = Some(field.into().into());
14251        }
14252        ///Sets `type_name` with the provided value.
14253        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
14254            self.set_type_name(field.into());
14255            self
14256        }
14257        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
14258        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
14259            &self.type_parameter_instantiation
14260        }
14261        ///Returns a mutable reference to `type_parameter_instantiation`.
14262        ///If the field is unset, it is first initialized with the default value.
14263        pub fn type_parameter_instantiation_mut(
14264            &mut self,
14265        ) -> &mut Vec<super::OpenSignatureBody> {
14266            &mut self.type_parameter_instantiation
14267        }
14268        ///Sets `type_parameter_instantiation` with the provided value.
14269        pub fn set_type_parameter_instantiation(
14270            &mut self,
14271            field: Vec<super::OpenSignatureBody>,
14272        ) {
14273            self.type_parameter_instantiation = field;
14274        }
14275        ///Sets `type_parameter_instantiation` with the provided value.
14276        pub fn with_type_parameter_instantiation(
14277            mut self,
14278            field: Vec<super::OpenSignatureBody>,
14279        ) -> Self {
14280            self.set_type_parameter_instantiation(field);
14281            self
14282        }
14283        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14284        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
14285            self.type_parameter.as_mut().map(|field| field as _)
14286        }
14287        ///Returns a mutable reference to `type_parameter`.
14288        ///If the field is unset, it is first initialized with the default value.
14289        pub fn type_parameter_mut(&mut self) -> &mut u32 {
14290            self.type_parameter.get_or_insert_default()
14291        }
14292        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
14293        pub fn type_parameter_opt(&self) -> Option<u32> {
14294            self.type_parameter.as_ref().map(|field| *field)
14295        }
14296        ///Sets `type_parameter` with the provided value.
14297        pub fn set_type_parameter(&mut self, field: u32) {
14298            self.type_parameter = Some(field);
14299        }
14300        ///Sets `type_parameter` with the provided value.
14301        pub fn with_type_parameter(mut self, field: u32) -> Self {
14302            self.set_type_parameter(field);
14303            self
14304        }
14305    }
14306    impl super::Owner {
14307        pub const fn const_default() -> Self {
14308            Self {
14309                kind: None,
14310                address: None,
14311                version: None,
14312            }
14313        }
14314        #[doc(hidden)]
14315        pub fn default_instance() -> &'static Self {
14316            static DEFAULT: super::Owner = super::Owner::const_default();
14317            &DEFAULT
14318        }
14319        ///Sets `kind` with the provided value.
14320        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
14321            self.set_kind(field.into());
14322            self
14323        }
14324        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14325        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14326            self.address.as_mut().map(|field| field as _)
14327        }
14328        ///Returns a mutable reference to `address`.
14329        ///If the field is unset, it is first initialized with the default value.
14330        pub fn address_mut(&mut self) -> &mut String {
14331            self.address.get_or_insert_default()
14332        }
14333        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14334        pub fn address_opt(&self) -> Option<&str> {
14335            self.address.as_ref().map(|field| field as _)
14336        }
14337        ///Sets `address` with the provided value.
14338        pub fn set_address<T: Into<String>>(&mut self, field: T) {
14339            self.address = Some(field.into().into());
14340        }
14341        ///Sets `address` with the provided value.
14342        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14343            self.set_address(field.into());
14344            self
14345        }
14346        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14347        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14348            self.version.as_mut().map(|field| field as _)
14349        }
14350        ///Returns a mutable reference to `version`.
14351        ///If the field is unset, it is first initialized with the default value.
14352        pub fn version_mut(&mut self) -> &mut u64 {
14353            self.version.get_or_insert_default()
14354        }
14355        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14356        pub fn version_opt(&self) -> Option<u64> {
14357            self.version.as_ref().map(|field| *field)
14358        }
14359        ///Sets `version` with the provided value.
14360        pub fn set_version(&mut self, field: u64) {
14361            self.version = Some(field);
14362        }
14363        ///Sets `version` with the provided value.
14364        pub fn with_version(mut self, field: u64) -> Self {
14365            self.set_version(field);
14366            self
14367        }
14368    }
14369    impl super::Package {
14370        pub const fn const_default() -> Self {
14371            Self {
14372                storage_id: None,
14373                original_id: None,
14374                version: None,
14375                modules: Vec::new(),
14376                type_origins: Vec::new(),
14377                linkage: Vec::new(),
14378            }
14379        }
14380        #[doc(hidden)]
14381        pub fn default_instance() -> &'static Self {
14382            static DEFAULT: super::Package = super::Package::const_default();
14383            &DEFAULT
14384        }
14385        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14386        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
14387            self.storage_id.as_mut().map(|field| field as _)
14388        }
14389        ///Returns a mutable reference to `storage_id`.
14390        ///If the field is unset, it is first initialized with the default value.
14391        pub fn storage_id_mut(&mut self) -> &mut String {
14392            self.storage_id.get_or_insert_default()
14393        }
14394        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14395        pub fn storage_id_opt(&self) -> Option<&str> {
14396            self.storage_id.as_ref().map(|field| field as _)
14397        }
14398        ///Sets `storage_id` with the provided value.
14399        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
14400            self.storage_id = Some(field.into().into());
14401        }
14402        ///Sets `storage_id` with the provided value.
14403        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
14404            self.set_storage_id(field.into());
14405            self
14406        }
14407        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14408        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
14409            self.original_id.as_mut().map(|field| field as _)
14410        }
14411        ///Returns a mutable reference to `original_id`.
14412        ///If the field is unset, it is first initialized with the default value.
14413        pub fn original_id_mut(&mut self) -> &mut String {
14414            self.original_id.get_or_insert_default()
14415        }
14416        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14417        pub fn original_id_opt(&self) -> Option<&str> {
14418            self.original_id.as_ref().map(|field| field as _)
14419        }
14420        ///Sets `original_id` with the provided value.
14421        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
14422            self.original_id = Some(field.into().into());
14423        }
14424        ///Sets `original_id` with the provided value.
14425        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
14426            self.set_original_id(field.into());
14427            self
14428        }
14429        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14430        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14431            self.version.as_mut().map(|field| field as _)
14432        }
14433        ///Returns a mutable reference to `version`.
14434        ///If the field is unset, it is first initialized with the default value.
14435        pub fn version_mut(&mut self) -> &mut u64 {
14436            self.version.get_or_insert_default()
14437        }
14438        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14439        pub fn version_opt(&self) -> Option<u64> {
14440            self.version.as_ref().map(|field| *field)
14441        }
14442        ///Sets `version` with the provided value.
14443        pub fn set_version(&mut self, field: u64) {
14444            self.version = Some(field);
14445        }
14446        ///Sets `version` with the provided value.
14447        pub fn with_version(mut self, field: u64) -> Self {
14448            self.set_version(field);
14449            self
14450        }
14451        ///Returns the value of `modules`, or the default value if `modules` is unset.
14452        pub fn modules(&self) -> &[super::Module] {
14453            &self.modules
14454        }
14455        ///Returns a mutable reference to `modules`.
14456        ///If the field is unset, it is first initialized with the default value.
14457        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
14458            &mut self.modules
14459        }
14460        ///Sets `modules` with the provided value.
14461        pub fn set_modules(&mut self, field: Vec<super::Module>) {
14462            self.modules = field;
14463        }
14464        ///Sets `modules` with the provided value.
14465        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
14466            self.set_modules(field);
14467            self
14468        }
14469        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
14470        pub fn type_origins(&self) -> &[super::TypeOrigin] {
14471            &self.type_origins
14472        }
14473        ///Returns a mutable reference to `type_origins`.
14474        ///If the field is unset, it is first initialized with the default value.
14475        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
14476            &mut self.type_origins
14477        }
14478        ///Sets `type_origins` with the provided value.
14479        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
14480            self.type_origins = field;
14481        }
14482        ///Sets `type_origins` with the provided value.
14483        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
14484            self.set_type_origins(field);
14485            self
14486        }
14487        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
14488        pub fn linkage(&self) -> &[super::Linkage] {
14489            &self.linkage
14490        }
14491        ///Returns a mutable reference to `linkage`.
14492        ///If the field is unset, it is first initialized with the default value.
14493        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
14494            &mut self.linkage
14495        }
14496        ///Sets `linkage` with the provided value.
14497        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
14498            self.linkage = field;
14499        }
14500        ///Sets `linkage` with the provided value.
14501        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
14502            self.set_linkage(field);
14503            self
14504        }
14505    }
14506    impl super::PackageUpgradeError {
14507        pub const fn const_default() -> Self {
14508            Self {
14509                kind: None,
14510                package_id: None,
14511                digest: None,
14512                policy: None,
14513                ticket_id: None,
14514            }
14515        }
14516        #[doc(hidden)]
14517        pub fn default_instance() -> &'static Self {
14518            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
14519            &DEFAULT
14520        }
14521        ///Sets `kind` with the provided value.
14522        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
14523            mut self,
14524            field: T,
14525        ) -> Self {
14526            self.set_kind(field.into());
14527            self
14528        }
14529        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14530        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14531            self.package_id.as_mut().map(|field| field as _)
14532        }
14533        ///Returns a mutable reference to `package_id`.
14534        ///If the field is unset, it is first initialized with the default value.
14535        pub fn package_id_mut(&mut self) -> &mut String {
14536            self.package_id.get_or_insert_default()
14537        }
14538        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14539        pub fn package_id_opt(&self) -> Option<&str> {
14540            self.package_id.as_ref().map(|field| field as _)
14541        }
14542        ///Sets `package_id` with the provided value.
14543        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14544            self.package_id = Some(field.into().into());
14545        }
14546        ///Sets `package_id` with the provided value.
14547        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14548            self.set_package_id(field.into());
14549            self
14550        }
14551        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14552        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14553            self.digest.as_mut().map(|field| field as _)
14554        }
14555        ///Returns a mutable reference to `digest`.
14556        ///If the field is unset, it is first initialized with the default value.
14557        pub fn digest_mut(&mut self) -> &mut String {
14558            self.digest.get_or_insert_default()
14559        }
14560        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14561        pub fn digest_opt(&self) -> Option<&str> {
14562            self.digest.as_ref().map(|field| field as _)
14563        }
14564        ///Sets `digest` with the provided value.
14565        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14566            self.digest = Some(field.into().into());
14567        }
14568        ///Sets `digest` with the provided value.
14569        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14570            self.set_digest(field.into());
14571            self
14572        }
14573        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14574        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
14575            self.policy.as_mut().map(|field| field as _)
14576        }
14577        ///Returns a mutable reference to `policy`.
14578        ///If the field is unset, it is first initialized with the default value.
14579        pub fn policy_mut(&mut self) -> &mut u32 {
14580            self.policy.get_or_insert_default()
14581        }
14582        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
14583        pub fn policy_opt(&self) -> Option<u32> {
14584            self.policy.as_ref().map(|field| *field)
14585        }
14586        ///Sets `policy` with the provided value.
14587        pub fn set_policy(&mut self, field: u32) {
14588            self.policy = Some(field);
14589        }
14590        ///Sets `policy` with the provided value.
14591        pub fn with_policy(mut self, field: u32) -> Self {
14592            self.set_policy(field);
14593            self
14594        }
14595        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14596        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
14597            self.ticket_id.as_mut().map(|field| field as _)
14598        }
14599        ///Returns a mutable reference to `ticket_id`.
14600        ///If the field is unset, it is first initialized with the default value.
14601        pub fn ticket_id_mut(&mut self) -> &mut String {
14602            self.ticket_id.get_or_insert_default()
14603        }
14604        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14605        pub fn ticket_id_opt(&self) -> Option<&str> {
14606            self.ticket_id.as_ref().map(|field| field as _)
14607        }
14608        ///Sets `ticket_id` with the provided value.
14609        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
14610            self.ticket_id = Some(field.into().into());
14611        }
14612        ///Sets `ticket_id` with the provided value.
14613        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
14614            self.set_ticket_id(field.into());
14615            self
14616        }
14617    }
14618    impl super::PackageVersion {
14619        pub const fn const_default() -> Self {
14620            Self {
14621                package_id: None,
14622                version: None,
14623                checkpoint: None,
14624                cursor: None,
14625                original_id: None,
14626            }
14627        }
14628        #[doc(hidden)]
14629        pub fn default_instance() -> &'static Self {
14630            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
14631            &DEFAULT
14632        }
14633        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14634        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14635            self.package_id.as_mut().map(|field| field as _)
14636        }
14637        ///Returns a mutable reference to `package_id`.
14638        ///If the field is unset, it is first initialized with the default value.
14639        pub fn package_id_mut(&mut self) -> &mut String {
14640            self.package_id.get_or_insert_default()
14641        }
14642        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14643        pub fn package_id_opt(&self) -> Option<&str> {
14644            self.package_id.as_ref().map(|field| field as _)
14645        }
14646        ///Sets `package_id` with the provided value.
14647        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14648            self.package_id = Some(field.into().into());
14649        }
14650        ///Sets `package_id` with the provided value.
14651        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14652            self.set_package_id(field.into());
14653            self
14654        }
14655        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14656        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14657            self.version.as_mut().map(|field| field as _)
14658        }
14659        ///Returns a mutable reference to `version`.
14660        ///If the field is unset, it is first initialized with the default value.
14661        pub fn version_mut(&mut self) -> &mut u64 {
14662            self.version.get_or_insert_default()
14663        }
14664        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14665        pub fn version_opt(&self) -> Option<u64> {
14666            self.version.as_ref().map(|field| *field)
14667        }
14668        ///Sets `version` with the provided value.
14669        pub fn set_version(&mut self, field: u64) {
14670            self.version = Some(field);
14671        }
14672        ///Sets `version` with the provided value.
14673        pub fn with_version(mut self, field: u64) -> Self {
14674            self.set_version(field);
14675            self
14676        }
14677        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14678        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
14679            self.checkpoint.as_mut().map(|field| field as _)
14680        }
14681        ///Returns a mutable reference to `checkpoint`.
14682        ///If the field is unset, it is first initialized with the default value.
14683        pub fn checkpoint_mut(&mut self) -> &mut u64 {
14684            self.checkpoint.get_or_insert_default()
14685        }
14686        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
14687        pub fn checkpoint_opt(&self) -> Option<u64> {
14688            self.checkpoint.as_ref().map(|field| *field)
14689        }
14690        ///Sets `checkpoint` with the provided value.
14691        pub fn set_checkpoint(&mut self, field: u64) {
14692            self.checkpoint = Some(field);
14693        }
14694        ///Sets `checkpoint` with the provided value.
14695        pub fn with_checkpoint(mut self, field: u64) -> Self {
14696            self.set_checkpoint(field);
14697            self
14698        }
14699        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
14700        pub fn cursor_opt(&self) -> Option<&[u8]> {
14701            self.cursor.as_ref().map(|field| field as _)
14702        }
14703        ///Sets `cursor` with the provided value.
14704        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14705            self.cursor = Some(field.into().into());
14706        }
14707        ///Sets `cursor` with the provided value.
14708        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
14709            self.set_cursor(field.into());
14710            self
14711        }
14712        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14713        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
14714            self.original_id.as_mut().map(|field| field as _)
14715        }
14716        ///Returns a mutable reference to `original_id`.
14717        ///If the field is unset, it is first initialized with the default value.
14718        pub fn original_id_mut(&mut self) -> &mut String {
14719            self.original_id.get_or_insert_default()
14720        }
14721        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14722        pub fn original_id_opt(&self) -> Option<&str> {
14723            self.original_id.as_ref().map(|field| field as _)
14724        }
14725        ///Sets `original_id` with the provided value.
14726        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
14727            self.original_id = Some(field.into().into());
14728        }
14729        ///Sets `original_id` with the provided value.
14730        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
14731            self.set_original_id(field.into());
14732            self
14733        }
14734    }
14735    impl super::PackageWriteFilter {
14736        pub const fn const_default() -> Self {
14737            Self {}
14738        }
14739        #[doc(hidden)]
14740        pub fn default_instance() -> &'static Self {
14741            static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
14742            &DEFAULT
14743        }
14744    }
14745    impl super::PasskeyAuthenticator {
14746        pub const fn const_default() -> Self {
14747            Self {
14748                authenticator_data: None,
14749                client_data_json: None,
14750                signature: None,
14751            }
14752        }
14753        #[doc(hidden)]
14754        pub fn default_instance() -> &'static Self {
14755            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
14756            &DEFAULT
14757        }
14758        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
14759        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
14760            self.authenticator_data.as_ref().map(|field| field as _)
14761        }
14762        ///Sets `authenticator_data` with the provided value.
14763        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
14764            &mut self,
14765            field: T,
14766        ) {
14767            self.authenticator_data = Some(field.into().into());
14768        }
14769        ///Sets `authenticator_data` with the provided value.
14770        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
14771            mut self,
14772            field: T,
14773        ) -> Self {
14774            self.set_authenticator_data(field.into());
14775            self
14776        }
14777        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14778        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
14779            self.client_data_json.as_mut().map(|field| field as _)
14780        }
14781        ///Returns a mutable reference to `client_data_json`.
14782        ///If the field is unset, it is first initialized with the default value.
14783        pub fn client_data_json_mut(&mut self) -> &mut String {
14784            self.client_data_json.get_or_insert_default()
14785        }
14786        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
14787        pub fn client_data_json_opt(&self) -> Option<&str> {
14788            self.client_data_json.as_ref().map(|field| field as _)
14789        }
14790        ///Sets `client_data_json` with the provided value.
14791        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
14792            self.client_data_json = Some(field.into().into());
14793        }
14794        ///Sets `client_data_json` with the provided value.
14795        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
14796            self.set_client_data_json(field.into());
14797            self
14798        }
14799        ///Returns the value of `signature`, or the default value if `signature` is unset.
14800        pub fn signature(&self) -> &super::SimpleSignature {
14801            self.signature
14802                .as_ref()
14803                .map(|field| field as _)
14804                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
14805        }
14806        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14807        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
14808            self.signature.as_mut().map(|field| field as _)
14809        }
14810        ///Returns a mutable reference to `signature`.
14811        ///If the field is unset, it is first initialized with the default value.
14812        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
14813            self.signature.get_or_insert_default()
14814        }
14815        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
14816        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
14817            self.signature.as_ref().map(|field| field as _)
14818        }
14819        ///Sets `signature` with the provided value.
14820        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
14821            self.signature = Some(field.into().into());
14822        }
14823        ///Sets `signature` with the provided value.
14824        pub fn with_signature<T: Into<super::SimpleSignature>>(
14825            mut self,
14826            field: T,
14827        ) -> Self {
14828            self.set_signature(field.into());
14829            self
14830        }
14831    }
14832    impl super::ProgrammableTransaction {
14833        pub const fn const_default() -> Self {
14834            Self {
14835                inputs: Vec::new(),
14836                commands: Vec::new(),
14837            }
14838        }
14839        #[doc(hidden)]
14840        pub fn default_instance() -> &'static Self {
14841            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
14842            &DEFAULT
14843        }
14844        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
14845        pub fn inputs(&self) -> &[super::Input] {
14846            &self.inputs
14847        }
14848        ///Returns a mutable reference to `inputs`.
14849        ///If the field is unset, it is first initialized with the default value.
14850        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
14851            &mut self.inputs
14852        }
14853        ///Sets `inputs` with the provided value.
14854        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
14855            self.inputs = field;
14856        }
14857        ///Sets `inputs` with the provided value.
14858        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
14859            self.set_inputs(field);
14860            self
14861        }
14862        ///Returns the value of `commands`, or the default value if `commands` is unset.
14863        pub fn commands(&self) -> &[super::Command] {
14864            &self.commands
14865        }
14866        ///Returns a mutable reference to `commands`.
14867        ///If the field is unset, it is first initialized with the default value.
14868        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
14869            &mut self.commands
14870        }
14871        ///Sets `commands` with the provided value.
14872        pub fn set_commands(&mut self, field: Vec<super::Command>) {
14873            self.commands = field;
14874        }
14875        ///Sets `commands` with the provided value.
14876        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
14877            self.set_commands(field);
14878            self
14879        }
14880    }
14881    impl super::ProtocolConfig {
14882        pub const fn const_default() -> Self {
14883            Self {
14884                protocol_version: None,
14885                feature_flags: std::collections::BTreeMap::new(),
14886                attributes: std::collections::BTreeMap::new(),
14887                configs: std::collections::BTreeMap::new(),
14888            }
14889        }
14890        #[doc(hidden)]
14891        pub fn default_instance() -> &'static Self {
14892            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
14893            &DEFAULT
14894        }
14895        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14896        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
14897            self.protocol_version.as_mut().map(|field| field as _)
14898        }
14899        ///Returns a mutable reference to `protocol_version`.
14900        ///If the field is unset, it is first initialized with the default value.
14901        pub fn protocol_version_mut(&mut self) -> &mut u64 {
14902            self.protocol_version.get_or_insert_default()
14903        }
14904        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14905        pub fn protocol_version_opt(&self) -> Option<u64> {
14906            self.protocol_version.as_ref().map(|field| *field)
14907        }
14908        ///Sets `protocol_version` with the provided value.
14909        pub fn set_protocol_version(&mut self, field: u64) {
14910            self.protocol_version = Some(field);
14911        }
14912        ///Sets `protocol_version` with the provided value.
14913        pub fn with_protocol_version(mut self, field: u64) -> Self {
14914            self.set_protocol_version(field);
14915            self
14916        }
14917        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
14918        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
14919            &self.feature_flags
14920        }
14921        ///Returns a mutable reference to `feature_flags`.
14922        ///If the field is unset, it is first initialized with the default value.
14923        pub fn feature_flags_mut(
14924            &mut self,
14925        ) -> &mut ::std::collections::BTreeMap<String, bool> {
14926            &mut self.feature_flags
14927        }
14928        ///Sets `feature_flags` with the provided value.
14929        pub fn set_feature_flags(
14930            &mut self,
14931            field: ::std::collections::BTreeMap<String, bool>,
14932        ) {
14933            self.feature_flags = field;
14934        }
14935        ///Sets `feature_flags` with the provided value.
14936        pub fn with_feature_flags(
14937            mut self,
14938            field: ::std::collections::BTreeMap<String, bool>,
14939        ) -> Self {
14940            self.set_feature_flags(field);
14941            self
14942        }
14943        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
14944        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
14945            &self.attributes
14946        }
14947        ///Returns a mutable reference to `attributes`.
14948        ///If the field is unset, it is first initialized with the default value.
14949        pub fn attributes_mut(
14950            &mut self,
14951        ) -> &mut ::std::collections::BTreeMap<String, String> {
14952            &mut self.attributes
14953        }
14954        ///Sets `attributes` with the provided value.
14955        pub fn set_attributes(
14956            &mut self,
14957            field: ::std::collections::BTreeMap<String, String>,
14958        ) {
14959            self.attributes = field;
14960        }
14961        ///Sets `attributes` with the provided value.
14962        pub fn with_attributes(
14963            mut self,
14964            field: ::std::collections::BTreeMap<String, String>,
14965        ) -> Self {
14966            self.set_attributes(field);
14967            self
14968        }
14969        ///Returns the value of `configs`, or the default value if `configs` is unset.
14970        pub fn configs(
14971            &self,
14972        ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
14973            &self.configs
14974        }
14975        ///Returns a mutable reference to `configs`.
14976        ///If the field is unset, it is first initialized with the default value.
14977        pub fn configs_mut(
14978            &mut self,
14979        ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
14980            &mut self.configs
14981        }
14982        ///Sets `configs` with the provided value.
14983        pub fn set_configs(
14984            &mut self,
14985            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
14986        ) {
14987            self.configs = field;
14988        }
14989        ///Sets `configs` with the provided value.
14990        pub fn with_configs(
14991            mut self,
14992            field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
14993        ) -> Self {
14994            self.set_configs(field);
14995            self
14996        }
14997    }
14998    impl super::Publish {
14999        pub const fn const_default() -> Self {
15000            Self {
15001                modules: Vec::new(),
15002                dependencies: Vec::new(),
15003            }
15004        }
15005        #[doc(hidden)]
15006        pub fn default_instance() -> &'static Self {
15007            static DEFAULT: super::Publish = super::Publish::const_default();
15008            &DEFAULT
15009        }
15010        ///Returns the value of `modules`, or the default value if `modules` is unset.
15011        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15012            &self.modules
15013        }
15014        ///Returns a mutable reference to `modules`.
15015        ///If the field is unset, it is first initialized with the default value.
15016        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15017            &mut self.modules
15018        }
15019        ///Sets `modules` with the provided value.
15020        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15021            self.modules = field;
15022        }
15023        ///Sets `modules` with the provided value.
15024        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15025            self.set_modules(field);
15026            self
15027        }
15028        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15029        pub fn dependencies(&self) -> &[String] {
15030            &self.dependencies
15031        }
15032        ///Returns a mutable reference to `dependencies`.
15033        ///If the field is unset, it is first initialized with the default value.
15034        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15035            &mut self.dependencies
15036        }
15037        ///Sets `dependencies` with the provided value.
15038        pub fn set_dependencies(&mut self, field: Vec<String>) {
15039            self.dependencies = field;
15040        }
15041        ///Sets `dependencies` with the provided value.
15042        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15043            self.set_dependencies(field);
15044            self
15045        }
15046    }
15047    impl super::QueryEnd {
15048        pub const fn const_default() -> Self {
15049            Self { reason: None }
15050        }
15051        #[doc(hidden)]
15052        pub fn default_instance() -> &'static Self {
15053            static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
15054            &DEFAULT
15055        }
15056        ///Sets `reason` with the provided value.
15057        pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
15058            self.set_reason(field.into());
15059            self
15060        }
15061    }
15062    impl super::QueryOptions {
15063        pub const fn const_default() -> Self {
15064            Self {
15065                limit: None,
15066                after: None,
15067                before: None,
15068                ordering: None,
15069            }
15070        }
15071        #[doc(hidden)]
15072        pub fn default_instance() -> &'static Self {
15073            static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
15074            &DEFAULT
15075        }
15076        ///If `limit` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15077        pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
15078            self.limit.as_mut().map(|field| field as _)
15079        }
15080        ///Returns a mutable reference to `limit`.
15081        ///If the field is unset, it is first initialized with the default value.
15082        pub fn limit_mut(&mut self) -> &mut u32 {
15083            self.limit.get_or_insert_default()
15084        }
15085        ///If `limit` is set, returns [`Some`] with the value; otherwise returns [`None`].
15086        pub fn limit_opt(&self) -> Option<u32> {
15087            self.limit.as_ref().map(|field| *field)
15088        }
15089        ///Sets `limit` with the provided value.
15090        pub fn set_limit(&mut self, field: u32) {
15091            self.limit = Some(field);
15092        }
15093        ///Sets `limit` with the provided value.
15094        pub fn with_limit(mut self, field: u32) -> Self {
15095            self.set_limit(field);
15096            self
15097        }
15098        ///If `after` is set, returns [`Some`] with the value; otherwise returns [`None`].
15099        pub fn after_opt(&self) -> Option<&[u8]> {
15100            self.after.as_ref().map(|field| field as _)
15101        }
15102        ///Sets `after` with the provided value.
15103        pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15104            self.after = Some(field.into().into());
15105        }
15106        ///Sets `after` with the provided value.
15107        pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
15108            self.set_after(field.into());
15109            self
15110        }
15111        ///If `before` is set, returns [`Some`] with the value; otherwise returns [`None`].
15112        pub fn before_opt(&self) -> Option<&[u8]> {
15113            self.before.as_ref().map(|field| field as _)
15114        }
15115        ///Sets `before` with the provided value.
15116        pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15117            self.before = Some(field.into().into());
15118        }
15119        ///Sets `before` with the provided value.
15120        pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
15121            self.set_before(field.into());
15122            self
15123        }
15124        ///Sets `ordering` with the provided value.
15125        pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
15126            self.set_ordering(field.into());
15127            self
15128        }
15129    }
15130    impl super::RandomnessStateUpdate {
15131        pub const fn const_default() -> Self {
15132            Self {
15133                epoch: None,
15134                randomness_round: None,
15135                random_bytes: None,
15136                randomness_object_initial_shared_version: None,
15137            }
15138        }
15139        #[doc(hidden)]
15140        pub fn default_instance() -> &'static Self {
15141            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
15142            &DEFAULT
15143        }
15144        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15145        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15146            self.epoch.as_mut().map(|field| field as _)
15147        }
15148        ///Returns a mutable reference to `epoch`.
15149        ///If the field is unset, it is first initialized with the default value.
15150        pub fn epoch_mut(&mut self) -> &mut u64 {
15151            self.epoch.get_or_insert_default()
15152        }
15153        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15154        pub fn epoch_opt(&self) -> Option<u64> {
15155            self.epoch.as_ref().map(|field| *field)
15156        }
15157        ///Sets `epoch` with the provided value.
15158        pub fn set_epoch(&mut self, field: u64) {
15159            self.epoch = Some(field);
15160        }
15161        ///Sets `epoch` with the provided value.
15162        pub fn with_epoch(mut self, field: u64) -> Self {
15163            self.set_epoch(field);
15164            self
15165        }
15166        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15167        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
15168            self.randomness_round.as_mut().map(|field| field as _)
15169        }
15170        ///Returns a mutable reference to `randomness_round`.
15171        ///If the field is unset, it is first initialized with the default value.
15172        pub fn randomness_round_mut(&mut self) -> &mut u64 {
15173            self.randomness_round.get_or_insert_default()
15174        }
15175        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
15176        pub fn randomness_round_opt(&self) -> Option<u64> {
15177            self.randomness_round.as_ref().map(|field| *field)
15178        }
15179        ///Sets `randomness_round` with the provided value.
15180        pub fn set_randomness_round(&mut self, field: u64) {
15181            self.randomness_round = Some(field);
15182        }
15183        ///Sets `randomness_round` with the provided value.
15184        pub fn with_randomness_round(mut self, field: u64) -> Self {
15185            self.set_randomness_round(field);
15186            self
15187        }
15188        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
15189        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
15190            self.random_bytes.as_ref().map(|field| field as _)
15191        }
15192        ///Sets `random_bytes` with the provided value.
15193        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15194            self.random_bytes = Some(field.into().into());
15195        }
15196        ///Sets `random_bytes` with the provided value.
15197        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
15198            mut self,
15199            field: T,
15200        ) -> Self {
15201            self.set_random_bytes(field.into());
15202            self
15203        }
15204        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15205        pub fn randomness_object_initial_shared_version_opt_mut(
15206            &mut self,
15207        ) -> Option<&mut u64> {
15208            self.randomness_object_initial_shared_version
15209                .as_mut()
15210                .map(|field| field as _)
15211        }
15212        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
15213        ///If the field is unset, it is first initialized with the default value.
15214        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
15215            self.randomness_object_initial_shared_version.get_or_insert_default()
15216        }
15217        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15218        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
15219            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
15220        }
15221        ///Sets `randomness_object_initial_shared_version` with the provided value.
15222        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
15223            self.randomness_object_initial_shared_version = Some(field);
15224        }
15225        ///Sets `randomness_object_initial_shared_version` with the provided value.
15226        pub fn with_randomness_object_initial_shared_version(
15227            mut self,
15228            field: u64,
15229        ) -> Self {
15230            self.set_randomness_object_initial_shared_version(field);
15231            self
15232        }
15233    }
15234    impl super::RegulatedCoinMetadata {
15235        pub const fn const_default() -> Self {
15236            Self {
15237                id: None,
15238                coin_metadata_object: None,
15239                deny_cap_object: None,
15240                allow_global_pause: None,
15241                variant: None,
15242                coin_regulated_state: None,
15243            }
15244        }
15245        #[doc(hidden)]
15246        pub fn default_instance() -> &'static Self {
15247            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
15248            &DEFAULT
15249        }
15250        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15251        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
15252            self.id.as_mut().map(|field| field as _)
15253        }
15254        ///Returns a mutable reference to `id`.
15255        ///If the field is unset, it is first initialized with the default value.
15256        pub fn id_mut(&mut self) -> &mut String {
15257            self.id.get_or_insert_default()
15258        }
15259        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15260        pub fn id_opt(&self) -> Option<&str> {
15261            self.id.as_ref().map(|field| field as _)
15262        }
15263        ///Sets `id` with the provided value.
15264        pub fn set_id<T: Into<String>>(&mut self, field: T) {
15265            self.id = Some(field.into().into());
15266        }
15267        ///Sets `id` with the provided value.
15268        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
15269            self.set_id(field.into());
15270            self
15271        }
15272        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15273        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
15274            self.coin_metadata_object.as_mut().map(|field| field as _)
15275        }
15276        ///Returns a mutable reference to `coin_metadata_object`.
15277        ///If the field is unset, it is first initialized with the default value.
15278        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
15279            self.coin_metadata_object.get_or_insert_default()
15280        }
15281        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
15282        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
15283            self.coin_metadata_object.as_ref().map(|field| field as _)
15284        }
15285        ///Sets `coin_metadata_object` with the provided value.
15286        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
15287            self.coin_metadata_object = Some(field.into().into());
15288        }
15289        ///Sets `coin_metadata_object` with the provided value.
15290        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
15291            self.set_coin_metadata_object(field.into());
15292            self
15293        }
15294        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15295        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
15296            self.deny_cap_object.as_mut().map(|field| field as _)
15297        }
15298        ///Returns a mutable reference to `deny_cap_object`.
15299        ///If the field is unset, it is first initialized with the default value.
15300        pub fn deny_cap_object_mut(&mut self) -> &mut String {
15301            self.deny_cap_object.get_or_insert_default()
15302        }
15303        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
15304        pub fn deny_cap_object_opt(&self) -> Option<&str> {
15305            self.deny_cap_object.as_ref().map(|field| field as _)
15306        }
15307        ///Sets `deny_cap_object` with the provided value.
15308        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
15309            self.deny_cap_object = Some(field.into().into());
15310        }
15311        ///Sets `deny_cap_object` with the provided value.
15312        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
15313            self.set_deny_cap_object(field.into());
15314            self
15315        }
15316        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15317        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
15318            self.allow_global_pause.as_mut().map(|field| field as _)
15319        }
15320        ///Returns a mutable reference to `allow_global_pause`.
15321        ///If the field is unset, it is first initialized with the default value.
15322        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
15323            self.allow_global_pause.get_or_insert_default()
15324        }
15325        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
15326        pub fn allow_global_pause_opt(&self) -> Option<bool> {
15327            self.allow_global_pause.as_ref().map(|field| *field)
15328        }
15329        ///Sets `allow_global_pause` with the provided value.
15330        pub fn set_allow_global_pause(&mut self, field: bool) {
15331            self.allow_global_pause = Some(field);
15332        }
15333        ///Sets `allow_global_pause` with the provided value.
15334        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
15335            self.set_allow_global_pause(field);
15336            self
15337        }
15338        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15339        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
15340            self.variant.as_mut().map(|field| field as _)
15341        }
15342        ///Returns a mutable reference to `variant`.
15343        ///If the field is unset, it is first initialized with the default value.
15344        pub fn variant_mut(&mut self) -> &mut u32 {
15345            self.variant.get_or_insert_default()
15346        }
15347        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
15348        pub fn variant_opt(&self) -> Option<u32> {
15349            self.variant.as_ref().map(|field| *field)
15350        }
15351        ///Sets `variant` with the provided value.
15352        pub fn set_variant(&mut self, field: u32) {
15353            self.variant = Some(field);
15354        }
15355        ///Sets `variant` with the provided value.
15356        pub fn with_variant(mut self, field: u32) -> Self {
15357            self.set_variant(field);
15358            self
15359        }
15360        ///Sets `coin_regulated_state` with the provided value.
15361        pub fn with_coin_regulated_state<
15362            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
15363        >(mut self, field: T) -> Self {
15364            self.set_coin_regulated_state(field.into());
15365            self
15366        }
15367    }
15368    impl super::ReverseLookupNameRequest {
15369        pub const fn const_default() -> Self {
15370            Self { address: None }
15371        }
15372        #[doc(hidden)]
15373        pub fn default_instance() -> &'static Self {
15374            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
15375            &DEFAULT
15376        }
15377        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15378        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15379            self.address.as_mut().map(|field| field as _)
15380        }
15381        ///Returns a mutable reference to `address`.
15382        ///If the field is unset, it is first initialized with the default value.
15383        pub fn address_mut(&mut self) -> &mut String {
15384            self.address.get_or_insert_default()
15385        }
15386        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15387        pub fn address_opt(&self) -> Option<&str> {
15388            self.address.as_ref().map(|field| field as _)
15389        }
15390        ///Sets `address` with the provided value.
15391        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15392            self.address = Some(field.into().into());
15393        }
15394        ///Sets `address` with the provided value.
15395        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15396            self.set_address(field.into());
15397            self
15398        }
15399    }
15400    impl super::ReverseLookupNameResponse {
15401        pub const fn const_default() -> Self {
15402            Self { record: None }
15403        }
15404        #[doc(hidden)]
15405        pub fn default_instance() -> &'static Self {
15406            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
15407            &DEFAULT
15408        }
15409        ///Returns the value of `record`, or the default value if `record` is unset.
15410        pub fn record(&self) -> &super::NameRecord {
15411            self.record
15412                .as_ref()
15413                .map(|field| field as _)
15414                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
15415        }
15416        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15417        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
15418            self.record.as_mut().map(|field| field as _)
15419        }
15420        ///Returns a mutable reference to `record`.
15421        ///If the field is unset, it is first initialized with the default value.
15422        pub fn record_mut(&mut self) -> &mut super::NameRecord {
15423            self.record.get_or_insert_default()
15424        }
15425        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
15426        pub fn record_opt(&self) -> Option<&super::NameRecord> {
15427            self.record.as_ref().map(|field| field as _)
15428        }
15429        ///Sets `record` with the provided value.
15430        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
15431            self.record = Some(field.into().into());
15432        }
15433        ///Sets `record` with the provided value.
15434        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
15435            self.set_record(field.into());
15436            self
15437        }
15438    }
15439    impl super::SenderFilter {
15440        pub const fn const_default() -> Self {
15441            Self { address: None }
15442        }
15443        #[doc(hidden)]
15444        pub fn default_instance() -> &'static Self {
15445            static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
15446            &DEFAULT
15447        }
15448        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15449        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15450            self.address.as_mut().map(|field| field as _)
15451        }
15452        ///Returns a mutable reference to `address`.
15453        ///If the field is unset, it is first initialized with the default value.
15454        pub fn address_mut(&mut self) -> &mut String {
15455            self.address.get_or_insert_default()
15456        }
15457        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15458        pub fn address_opt(&self) -> Option<&str> {
15459            self.address.as_ref().map(|field| field as _)
15460        }
15461        ///Sets `address` with the provided value.
15462        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15463            self.address = Some(field.into().into());
15464        }
15465        ///Sets `address` with the provided value.
15466        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15467            self.set_address(field.into());
15468            self
15469        }
15470    }
15471    impl super::SimpleSignature {
15472        pub const fn const_default() -> Self {
15473            Self {
15474                scheme: None,
15475                signature: None,
15476                public_key: None,
15477            }
15478        }
15479        #[doc(hidden)]
15480        pub fn default_instance() -> &'static Self {
15481            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
15482            &DEFAULT
15483        }
15484        ///Sets `scheme` with the provided value.
15485        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15486            self.set_scheme(field.into());
15487            self
15488        }
15489        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
15490        pub fn signature_opt(&self) -> Option<&[u8]> {
15491            self.signature.as_ref().map(|field| field as _)
15492        }
15493        ///Sets `signature` with the provided value.
15494        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15495            self.signature = Some(field.into().into());
15496        }
15497        ///Sets `signature` with the provided value.
15498        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
15499            mut self,
15500            field: T,
15501        ) -> Self {
15502            self.set_signature(field.into());
15503            self
15504        }
15505        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15506        pub fn public_key_opt(&self) -> Option<&[u8]> {
15507            self.public_key.as_ref().map(|field| field as _)
15508        }
15509        ///Sets `public_key` with the provided value.
15510        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15511            self.public_key = Some(field.into().into());
15512        }
15513        ///Sets `public_key` with the provided value.
15514        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
15515            mut self,
15516            field: T,
15517        ) -> Self {
15518            self.set_public_key(field.into());
15519            self
15520        }
15521    }
15522    impl super::SimulateTransactionRequest {
15523        pub const fn const_default() -> Self {
15524            Self {
15525                transaction: None,
15526                read_mask: None,
15527                checks: None,
15528                do_gas_selection: None,
15529            }
15530        }
15531        #[doc(hidden)]
15532        pub fn default_instance() -> &'static Self {
15533            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
15534            &DEFAULT
15535        }
15536        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
15537        pub fn transaction(&self) -> &super::Transaction {
15538            self.transaction
15539                .as_ref()
15540                .map(|field| field as _)
15541                .unwrap_or_else(|| super::Transaction::default_instance() as _)
15542        }
15543        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15544        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
15545            self.transaction.as_mut().map(|field| field as _)
15546        }
15547        ///Returns a mutable reference to `transaction`.
15548        ///If the field is unset, it is first initialized with the default value.
15549        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
15550            self.transaction.get_or_insert_default()
15551        }
15552        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15553        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
15554            self.transaction.as_ref().map(|field| field as _)
15555        }
15556        ///Sets `transaction` with the provided value.
15557        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
15558            self.transaction = Some(field.into().into());
15559        }
15560        ///Sets `transaction` with the provided value.
15561        pub fn with_transaction<T: Into<super::Transaction>>(
15562            mut self,
15563            field: T,
15564        ) -> Self {
15565            self.set_transaction(field.into());
15566            self
15567        }
15568        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15569        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15570            self.read_mask.as_mut().map(|field| field as _)
15571        }
15572        ///Returns a mutable reference to `read_mask`.
15573        ///If the field is unset, it is first initialized with the default value.
15574        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15575            self.read_mask.get_or_insert_default()
15576        }
15577        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
15578        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15579            self.read_mask.as_ref().map(|field| field as _)
15580        }
15581        ///Sets `read_mask` with the provided value.
15582        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15583            self.read_mask = Some(field.into().into());
15584        }
15585        ///Sets `read_mask` with the provided value.
15586        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15587            mut self,
15588            field: T,
15589        ) -> Self {
15590            self.set_read_mask(field.into());
15591            self
15592        }
15593        ///Sets `checks` with the provided value.
15594        pub fn with_checks<
15595            T: Into<super::simulate_transaction_request::TransactionChecks>,
15596        >(mut self, field: T) -> Self {
15597            self.set_checks(field.into());
15598            self
15599        }
15600        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15601        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
15602            self.do_gas_selection.as_mut().map(|field| field as _)
15603        }
15604        ///Returns a mutable reference to `do_gas_selection`.
15605        ///If the field is unset, it is first initialized with the default value.
15606        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
15607            self.do_gas_selection.get_or_insert_default()
15608        }
15609        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
15610        pub fn do_gas_selection_opt(&self) -> Option<bool> {
15611            self.do_gas_selection.as_ref().map(|field| *field)
15612        }
15613        ///Sets `do_gas_selection` with the provided value.
15614        pub fn set_do_gas_selection(&mut self, field: bool) {
15615            self.do_gas_selection = Some(field);
15616        }
15617        ///Sets `do_gas_selection` with the provided value.
15618        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
15619            self.set_do_gas_selection(field);
15620            self
15621        }
15622    }
15623    impl super::SimulateTransactionResponse {
15624        pub const fn const_default() -> Self {
15625            Self {
15626                transaction: None,
15627                command_outputs: Vec::new(),
15628                suggested_gas_price: None,
15629            }
15630        }
15631        #[doc(hidden)]
15632        pub fn default_instance() -> &'static Self {
15633            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
15634            &DEFAULT
15635        }
15636        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
15637        pub fn transaction(&self) -> &super::ExecutedTransaction {
15638            self.transaction
15639                .as_ref()
15640                .map(|field| field as _)
15641                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15642        }
15643        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15644        pub fn transaction_opt_mut(
15645            &mut self,
15646        ) -> Option<&mut super::ExecutedTransaction> {
15647            self.transaction.as_mut().map(|field| field as _)
15648        }
15649        ///Returns a mutable reference to `transaction`.
15650        ///If the field is unset, it is first initialized with the default value.
15651        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15652            self.transaction.get_or_insert_default()
15653        }
15654        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
15655        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15656            self.transaction.as_ref().map(|field| field as _)
15657        }
15658        ///Sets `transaction` with the provided value.
15659        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15660            &mut self,
15661            field: T,
15662        ) {
15663            self.transaction = Some(field.into().into());
15664        }
15665        ///Sets `transaction` with the provided value.
15666        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15667            mut self,
15668            field: T,
15669        ) -> Self {
15670            self.set_transaction(field.into());
15671            self
15672        }
15673        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
15674        pub fn command_outputs(&self) -> &[super::CommandResult] {
15675            &self.command_outputs
15676        }
15677        ///Returns a mutable reference to `command_outputs`.
15678        ///If the field is unset, it is first initialized with the default value.
15679        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
15680            &mut self.command_outputs
15681        }
15682        ///Sets `command_outputs` with the provided value.
15683        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
15684            self.command_outputs = field;
15685        }
15686        ///Sets `command_outputs` with the provided value.
15687        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
15688            self.set_command_outputs(field);
15689            self
15690        }
15691        ///If `suggested_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15692        pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15693            self.suggested_gas_price.as_mut().map(|field| field as _)
15694        }
15695        ///Returns a mutable reference to `suggested_gas_price`.
15696        ///If the field is unset, it is first initialized with the default value.
15697        pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
15698            self.suggested_gas_price.get_or_insert_default()
15699        }
15700        ///If `suggested_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
15701        pub fn suggested_gas_price_opt(&self) -> Option<u64> {
15702            self.suggested_gas_price.as_ref().map(|field| *field)
15703        }
15704        ///Sets `suggested_gas_price` with the provided value.
15705        pub fn set_suggested_gas_price(&mut self, field: u64) {
15706            self.suggested_gas_price = Some(field);
15707        }
15708        ///Sets `suggested_gas_price` with the provided value.
15709        pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
15710            self.set_suggested_gas_price(field);
15711            self
15712        }
15713    }
15714    impl super::SizeError {
15715        pub const fn const_default() -> Self {
15716            Self { size: None, max_size: None }
15717        }
15718        #[doc(hidden)]
15719        pub fn default_instance() -> &'static Self {
15720            static DEFAULT: super::SizeError = super::SizeError::const_default();
15721            &DEFAULT
15722        }
15723        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15724        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
15725            self.size.as_mut().map(|field| field as _)
15726        }
15727        ///Returns a mutable reference to `size`.
15728        ///If the field is unset, it is first initialized with the default value.
15729        pub fn size_mut(&mut self) -> &mut u64 {
15730            self.size.get_or_insert_default()
15731        }
15732        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
15733        pub fn size_opt(&self) -> Option<u64> {
15734            self.size.as_ref().map(|field| *field)
15735        }
15736        ///Sets `size` with the provided value.
15737        pub fn set_size(&mut self, field: u64) {
15738            self.size = Some(field);
15739        }
15740        ///Sets `size` with the provided value.
15741        pub fn with_size(mut self, field: u64) -> Self {
15742            self.set_size(field);
15743            self
15744        }
15745        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15746        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
15747            self.max_size.as_mut().map(|field| field as _)
15748        }
15749        ///Returns a mutable reference to `max_size`.
15750        ///If the field is unset, it is first initialized with the default value.
15751        pub fn max_size_mut(&mut self) -> &mut u64 {
15752            self.max_size.get_or_insert_default()
15753        }
15754        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
15755        pub fn max_size_opt(&self) -> Option<u64> {
15756            self.max_size.as_ref().map(|field| *field)
15757        }
15758        ///Sets `max_size` with the provided value.
15759        pub fn set_max_size(&mut self, field: u64) {
15760            self.max_size = Some(field);
15761        }
15762        ///Sets `max_size` with the provided value.
15763        pub fn with_max_size(mut self, field: u64) -> Self {
15764            self.set_max_size(field);
15765            self
15766        }
15767    }
15768    impl super::SplitCoins {
15769        pub const fn const_default() -> Self {
15770            Self {
15771                coin: None,
15772                amounts: Vec::new(),
15773            }
15774        }
15775        #[doc(hidden)]
15776        pub fn default_instance() -> &'static Self {
15777            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
15778            &DEFAULT
15779        }
15780        ///Returns the value of `coin`, or the default value if `coin` is unset.
15781        pub fn coin(&self) -> &super::Argument {
15782            self.coin
15783                .as_ref()
15784                .map(|field| field as _)
15785                .unwrap_or_else(|| super::Argument::default_instance() as _)
15786        }
15787        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15788        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
15789            self.coin.as_mut().map(|field| field as _)
15790        }
15791        ///Returns a mutable reference to `coin`.
15792        ///If the field is unset, it is first initialized with the default value.
15793        pub fn coin_mut(&mut self) -> &mut super::Argument {
15794            self.coin.get_or_insert_default()
15795        }
15796        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15797        pub fn coin_opt(&self) -> Option<&super::Argument> {
15798            self.coin.as_ref().map(|field| field as _)
15799        }
15800        ///Sets `coin` with the provided value.
15801        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
15802            self.coin = Some(field.into().into());
15803        }
15804        ///Sets `coin` with the provided value.
15805        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
15806            self.set_coin(field.into());
15807            self
15808        }
15809        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
15810        pub fn amounts(&self) -> &[super::Argument] {
15811            &self.amounts
15812        }
15813        ///Returns a mutable reference to `amounts`.
15814        ///If the field is unset, it is first initialized with the default value.
15815        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
15816            &mut self.amounts
15817        }
15818        ///Sets `amounts` with the provided value.
15819        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
15820            self.amounts = field;
15821        }
15822        ///Sets `amounts` with the provided value.
15823        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
15824            self.set_amounts(field);
15825            self
15826        }
15827    }
15828    impl super::StakeSubsidy {
15829        pub const fn const_default() -> Self {
15830            Self {
15831                balance: None,
15832                distribution_counter: None,
15833                current_distribution_amount: None,
15834                stake_subsidy_period_length: None,
15835                stake_subsidy_decrease_rate: None,
15836                extra_fields: None,
15837            }
15838        }
15839        #[doc(hidden)]
15840        pub fn default_instance() -> &'static Self {
15841            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
15842            &DEFAULT
15843        }
15844        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15845        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
15846            self.balance.as_mut().map(|field| field as _)
15847        }
15848        ///Returns a mutable reference to `balance`.
15849        ///If the field is unset, it is first initialized with the default value.
15850        pub fn balance_mut(&mut self) -> &mut u64 {
15851            self.balance.get_or_insert_default()
15852        }
15853        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
15854        pub fn balance_opt(&self) -> Option<u64> {
15855            self.balance.as_ref().map(|field| *field)
15856        }
15857        ///Sets `balance` with the provided value.
15858        pub fn set_balance(&mut self, field: u64) {
15859            self.balance = Some(field);
15860        }
15861        ///Sets `balance` with the provided value.
15862        pub fn with_balance(mut self, field: u64) -> Self {
15863            self.set_balance(field);
15864            self
15865        }
15866        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15867        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
15868            self.distribution_counter.as_mut().map(|field| field as _)
15869        }
15870        ///Returns a mutable reference to `distribution_counter`.
15871        ///If the field is unset, it is first initialized with the default value.
15872        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
15873            self.distribution_counter.get_or_insert_default()
15874        }
15875        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
15876        pub fn distribution_counter_opt(&self) -> Option<u64> {
15877            self.distribution_counter.as_ref().map(|field| *field)
15878        }
15879        ///Sets `distribution_counter` with the provided value.
15880        pub fn set_distribution_counter(&mut self, field: u64) {
15881            self.distribution_counter = Some(field);
15882        }
15883        ///Sets `distribution_counter` with the provided value.
15884        pub fn with_distribution_counter(mut self, field: u64) -> Self {
15885            self.set_distribution_counter(field);
15886            self
15887        }
15888        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15889        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
15890            self.current_distribution_amount.as_mut().map(|field| field as _)
15891        }
15892        ///Returns a mutable reference to `current_distribution_amount`.
15893        ///If the field is unset, it is first initialized with the default value.
15894        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
15895            self.current_distribution_amount.get_or_insert_default()
15896        }
15897        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
15898        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
15899            self.current_distribution_amount.as_ref().map(|field| *field)
15900        }
15901        ///Sets `current_distribution_amount` with the provided value.
15902        pub fn set_current_distribution_amount(&mut self, field: u64) {
15903            self.current_distribution_amount = Some(field);
15904        }
15905        ///Sets `current_distribution_amount` with the provided value.
15906        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
15907            self.set_current_distribution_amount(field);
15908            self
15909        }
15910        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15911        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
15912            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
15913        }
15914        ///Returns a mutable reference to `stake_subsidy_period_length`.
15915        ///If the field is unset, it is first initialized with the default value.
15916        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
15917            self.stake_subsidy_period_length.get_or_insert_default()
15918        }
15919        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
15920        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
15921            self.stake_subsidy_period_length.as_ref().map(|field| *field)
15922        }
15923        ///Sets `stake_subsidy_period_length` with the provided value.
15924        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
15925            self.stake_subsidy_period_length = Some(field);
15926        }
15927        ///Sets `stake_subsidy_period_length` with the provided value.
15928        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
15929            self.set_stake_subsidy_period_length(field);
15930            self
15931        }
15932        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15933        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
15934            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
15935        }
15936        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
15937        ///If the field is unset, it is first initialized with the default value.
15938        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
15939            self.stake_subsidy_decrease_rate.get_or_insert_default()
15940        }
15941        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
15942        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
15943            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
15944        }
15945        ///Sets `stake_subsidy_decrease_rate` with the provided value.
15946        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
15947            self.stake_subsidy_decrease_rate = Some(field);
15948        }
15949        ///Sets `stake_subsidy_decrease_rate` with the provided value.
15950        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
15951            self.set_stake_subsidy_decrease_rate(field);
15952            self
15953        }
15954        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
15955        pub fn extra_fields(&self) -> &super::MoveTable {
15956            self.extra_fields
15957                .as_ref()
15958                .map(|field| field as _)
15959                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15960        }
15961        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15962        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15963            self.extra_fields.as_mut().map(|field| field as _)
15964        }
15965        ///Returns a mutable reference to `extra_fields`.
15966        ///If the field is unset, it is first initialized with the default value.
15967        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15968            self.extra_fields.get_or_insert_default()
15969        }
15970        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
15971        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15972            self.extra_fields.as_ref().map(|field| field as _)
15973        }
15974        ///Sets `extra_fields` with the provided value.
15975        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15976            self.extra_fields = Some(field.into().into());
15977        }
15978        ///Sets `extra_fields` with the provided value.
15979        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15980            self.set_extra_fields(field.into());
15981            self
15982        }
15983    }
15984    impl super::StakingPool {
15985        pub const fn const_default() -> Self {
15986            Self {
15987                id: None,
15988                activation_epoch: None,
15989                deactivation_epoch: None,
15990                sui_balance: None,
15991                rewards_pool: None,
15992                pool_token_balance: None,
15993                exchange_rates: None,
15994                pending_stake: None,
15995                pending_total_sui_withdraw: None,
15996                pending_pool_token_withdraw: None,
15997                extra_fields: None,
15998            }
15999        }
16000        #[doc(hidden)]
16001        pub fn default_instance() -> &'static Self {
16002            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
16003            &DEFAULT
16004        }
16005        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16006        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
16007            self.id.as_mut().map(|field| field as _)
16008        }
16009        ///Returns a mutable reference to `id`.
16010        ///If the field is unset, it is first initialized with the default value.
16011        pub fn id_mut(&mut self) -> &mut String {
16012            self.id.get_or_insert_default()
16013        }
16014        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16015        pub fn id_opt(&self) -> Option<&str> {
16016            self.id.as_ref().map(|field| field as _)
16017        }
16018        ///Sets `id` with the provided value.
16019        pub fn set_id<T: Into<String>>(&mut self, field: T) {
16020            self.id = Some(field.into().into());
16021        }
16022        ///Sets `id` with the provided value.
16023        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
16024            self.set_id(field.into());
16025            self
16026        }
16027        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16028        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16029            self.activation_epoch.as_mut().map(|field| field as _)
16030        }
16031        ///Returns a mutable reference to `activation_epoch`.
16032        ///If the field is unset, it is first initialized with the default value.
16033        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
16034            self.activation_epoch.get_or_insert_default()
16035        }
16036        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16037        pub fn activation_epoch_opt(&self) -> Option<u64> {
16038            self.activation_epoch.as_ref().map(|field| *field)
16039        }
16040        ///Sets `activation_epoch` with the provided value.
16041        pub fn set_activation_epoch(&mut self, field: u64) {
16042            self.activation_epoch = Some(field);
16043        }
16044        ///Sets `activation_epoch` with the provided value.
16045        pub fn with_activation_epoch(mut self, field: u64) -> Self {
16046            self.set_activation_epoch(field);
16047            self
16048        }
16049        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16050        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16051            self.deactivation_epoch.as_mut().map(|field| field as _)
16052        }
16053        ///Returns a mutable reference to `deactivation_epoch`.
16054        ///If the field is unset, it is first initialized with the default value.
16055        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
16056            self.deactivation_epoch.get_or_insert_default()
16057        }
16058        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16059        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
16060            self.deactivation_epoch.as_ref().map(|field| *field)
16061        }
16062        ///Sets `deactivation_epoch` with the provided value.
16063        pub fn set_deactivation_epoch(&mut self, field: u64) {
16064            self.deactivation_epoch = Some(field);
16065        }
16066        ///Sets `deactivation_epoch` with the provided value.
16067        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
16068            self.set_deactivation_epoch(field);
16069            self
16070        }
16071        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16072        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
16073            self.sui_balance.as_mut().map(|field| field as _)
16074        }
16075        ///Returns a mutable reference to `sui_balance`.
16076        ///If the field is unset, it is first initialized with the default value.
16077        pub fn sui_balance_mut(&mut self) -> &mut u64 {
16078            self.sui_balance.get_or_insert_default()
16079        }
16080        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
16081        pub fn sui_balance_opt(&self) -> Option<u64> {
16082            self.sui_balance.as_ref().map(|field| *field)
16083        }
16084        ///Sets `sui_balance` with the provided value.
16085        pub fn set_sui_balance(&mut self, field: u64) {
16086            self.sui_balance = Some(field);
16087        }
16088        ///Sets `sui_balance` with the provided value.
16089        pub fn with_sui_balance(mut self, field: u64) -> Self {
16090            self.set_sui_balance(field);
16091            self
16092        }
16093        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16094        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
16095            self.rewards_pool.as_mut().map(|field| field as _)
16096        }
16097        ///Returns a mutable reference to `rewards_pool`.
16098        ///If the field is unset, it is first initialized with the default value.
16099        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
16100            self.rewards_pool.get_or_insert_default()
16101        }
16102        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16103        pub fn rewards_pool_opt(&self) -> Option<u64> {
16104            self.rewards_pool.as_ref().map(|field| *field)
16105        }
16106        ///Sets `rewards_pool` with the provided value.
16107        pub fn set_rewards_pool(&mut self, field: u64) {
16108            self.rewards_pool = Some(field);
16109        }
16110        ///Sets `rewards_pool` with the provided value.
16111        pub fn with_rewards_pool(mut self, field: u64) -> Self {
16112            self.set_rewards_pool(field);
16113            self
16114        }
16115        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16116        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
16117            self.pool_token_balance.as_mut().map(|field| field as _)
16118        }
16119        ///Returns a mutable reference to `pool_token_balance`.
16120        ///If the field is unset, it is first initialized with the default value.
16121        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
16122            self.pool_token_balance.get_or_insert_default()
16123        }
16124        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
16125        pub fn pool_token_balance_opt(&self) -> Option<u64> {
16126            self.pool_token_balance.as_ref().map(|field| *field)
16127        }
16128        ///Sets `pool_token_balance` with the provided value.
16129        pub fn set_pool_token_balance(&mut self, field: u64) {
16130            self.pool_token_balance = Some(field);
16131        }
16132        ///Sets `pool_token_balance` with the provided value.
16133        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
16134            self.set_pool_token_balance(field);
16135            self
16136        }
16137        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
16138        pub fn exchange_rates(&self) -> &super::MoveTable {
16139            self.exchange_rates
16140                .as_ref()
16141                .map(|field| field as _)
16142                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16143        }
16144        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16145        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16146            self.exchange_rates.as_mut().map(|field| field as _)
16147        }
16148        ///Returns a mutable reference to `exchange_rates`.
16149        ///If the field is unset, it is first initialized with the default value.
16150        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
16151            self.exchange_rates.get_or_insert_default()
16152        }
16153        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
16154        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
16155            self.exchange_rates.as_ref().map(|field| field as _)
16156        }
16157        ///Sets `exchange_rates` with the provided value.
16158        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
16159            self.exchange_rates = Some(field.into().into());
16160        }
16161        ///Sets `exchange_rates` with the provided value.
16162        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
16163            mut self,
16164            field: T,
16165        ) -> Self {
16166            self.set_exchange_rates(field.into());
16167            self
16168        }
16169        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16170        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
16171            self.pending_stake.as_mut().map(|field| field as _)
16172        }
16173        ///Returns a mutable reference to `pending_stake`.
16174        ///If the field is unset, it is first initialized with the default value.
16175        pub fn pending_stake_mut(&mut self) -> &mut u64 {
16176            self.pending_stake.get_or_insert_default()
16177        }
16178        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16179        pub fn pending_stake_opt(&self) -> Option<u64> {
16180            self.pending_stake.as_ref().map(|field| *field)
16181        }
16182        ///Sets `pending_stake` with the provided value.
16183        pub fn set_pending_stake(&mut self, field: u64) {
16184            self.pending_stake = Some(field);
16185        }
16186        ///Sets `pending_stake` with the provided value.
16187        pub fn with_pending_stake(mut self, field: u64) -> Self {
16188            self.set_pending_stake(field);
16189            self
16190        }
16191        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16192        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
16193            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
16194        }
16195        ///Returns a mutable reference to `pending_total_sui_withdraw`.
16196        ///If the field is unset, it is first initialized with the default value.
16197        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
16198            self.pending_total_sui_withdraw.get_or_insert_default()
16199        }
16200        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
16201        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
16202            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
16203        }
16204        ///Sets `pending_total_sui_withdraw` with the provided value.
16205        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
16206            self.pending_total_sui_withdraw = Some(field);
16207        }
16208        ///Sets `pending_total_sui_withdraw` with the provided value.
16209        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
16210            self.set_pending_total_sui_withdraw(field);
16211            self
16212        }
16213        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16214        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
16215            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
16216        }
16217        ///Returns a mutable reference to `pending_pool_token_withdraw`.
16218        ///If the field is unset, it is first initialized with the default value.
16219        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
16220            self.pending_pool_token_withdraw.get_or_insert_default()
16221        }
16222        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
16223        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
16224            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
16225        }
16226        ///Sets `pending_pool_token_withdraw` with the provided value.
16227        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
16228            self.pending_pool_token_withdraw = Some(field);
16229        }
16230        ///Sets `pending_pool_token_withdraw` with the provided value.
16231        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
16232            self.set_pending_pool_token_withdraw(field);
16233            self
16234        }
16235        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16236        pub fn extra_fields(&self) -> &super::MoveTable {
16237            self.extra_fields
16238                .as_ref()
16239                .map(|field| field as _)
16240                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16241        }
16242        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16243        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16244            self.extra_fields.as_mut().map(|field| field as _)
16245        }
16246        ///Returns a mutable reference to `extra_fields`.
16247        ///If the field is unset, it is first initialized with the default value.
16248        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16249            self.extra_fields.get_or_insert_default()
16250        }
16251        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16252        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16253            self.extra_fields.as_ref().map(|field| field as _)
16254        }
16255        ///Sets `extra_fields` with the provided value.
16256        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16257            self.extra_fields = Some(field.into().into());
16258        }
16259        ///Sets `extra_fields` with the provided value.
16260        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16261            self.set_extra_fields(field.into());
16262            self
16263        }
16264    }
16265    impl super::StorageFund {
16266        pub const fn const_default() -> Self {
16267            Self {
16268                total_object_storage_rebates: None,
16269                non_refundable_balance: None,
16270            }
16271        }
16272        #[doc(hidden)]
16273        pub fn default_instance() -> &'static Self {
16274            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
16275            &DEFAULT
16276        }
16277        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16278        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
16279            self.total_object_storage_rebates.as_mut().map(|field| field as _)
16280        }
16281        ///Returns a mutable reference to `total_object_storage_rebates`.
16282        ///If the field is unset, it is first initialized with the default value.
16283        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
16284            self.total_object_storage_rebates.get_or_insert_default()
16285        }
16286        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
16287        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
16288            self.total_object_storage_rebates.as_ref().map(|field| *field)
16289        }
16290        ///Sets `total_object_storage_rebates` with the provided value.
16291        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
16292            self.total_object_storage_rebates = Some(field);
16293        }
16294        ///Sets `total_object_storage_rebates` with the provided value.
16295        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
16296            self.set_total_object_storage_rebates(field);
16297            self
16298        }
16299        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16300        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
16301            self.non_refundable_balance.as_mut().map(|field| field as _)
16302        }
16303        ///Returns a mutable reference to `non_refundable_balance`.
16304        ///If the field is unset, it is first initialized with the default value.
16305        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
16306            self.non_refundable_balance.get_or_insert_default()
16307        }
16308        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
16309        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
16310            self.non_refundable_balance.as_ref().map(|field| *field)
16311        }
16312        ///Sets `non_refundable_balance` with the provided value.
16313        pub fn set_non_refundable_balance(&mut self, field: u64) {
16314            self.non_refundable_balance = Some(field);
16315        }
16316        ///Sets `non_refundable_balance` with the provided value.
16317        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
16318            self.set_non_refundable_balance(field);
16319            self
16320        }
16321    }
16322    impl super::SubscribeCheckpointsRequest {
16323        pub const fn const_default() -> Self {
16324            Self {
16325                read_mask: None,
16326                filter: None,
16327            }
16328        }
16329        #[doc(hidden)]
16330        pub fn default_instance() -> &'static Self {
16331            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
16332            &DEFAULT
16333        }
16334        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16335        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
16336            self.read_mask.as_mut().map(|field| field as _)
16337        }
16338        ///Returns a mutable reference to `read_mask`.
16339        ///If the field is unset, it is first initialized with the default value.
16340        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
16341            self.read_mask.get_or_insert_default()
16342        }
16343        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
16344        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
16345            self.read_mask.as_ref().map(|field| field as _)
16346        }
16347        ///Sets `read_mask` with the provided value.
16348        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
16349            self.read_mask = Some(field.into().into());
16350        }
16351        ///Sets `read_mask` with the provided value.
16352        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
16353            mut self,
16354            field: T,
16355        ) -> Self {
16356            self.set_read_mask(field.into());
16357            self
16358        }
16359        ///Returns the value of `filter`, or the default value if `filter` is unset.
16360        pub fn filter(&self) -> &super::TransactionFilter {
16361            self.filter
16362                .as_ref()
16363                .map(|field| field as _)
16364                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
16365        }
16366        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16367        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
16368            self.filter.as_mut().map(|field| field as _)
16369        }
16370        ///Returns a mutable reference to `filter`.
16371        ///If the field is unset, it is first initialized with the default value.
16372        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
16373            self.filter.get_or_insert_default()
16374        }
16375        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
16376        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
16377            self.filter.as_ref().map(|field| field as _)
16378        }
16379        ///Sets `filter` with the provided value.
16380        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
16381            self.filter = Some(field.into().into());
16382        }
16383        ///Sets `filter` with the provided value.
16384        pub fn with_filter<T: Into<super::TransactionFilter>>(
16385            mut self,
16386            field: T,
16387        ) -> Self {
16388            self.set_filter(field.into());
16389            self
16390        }
16391    }
16392    impl super::SubscribeCheckpointsResponse {
16393        pub const fn const_default() -> Self {
16394            Self {
16395                cursor: None,
16396                checkpoint: None,
16397            }
16398        }
16399        #[doc(hidden)]
16400        pub fn default_instance() -> &'static Self {
16401            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
16402            &DEFAULT
16403        }
16404        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16405        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
16406            self.cursor.as_mut().map(|field| field as _)
16407        }
16408        ///Returns a mutable reference to `cursor`.
16409        ///If the field is unset, it is first initialized with the default value.
16410        pub fn cursor_mut(&mut self) -> &mut u64 {
16411            self.cursor.get_or_insert_default()
16412        }
16413        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
16414        pub fn cursor_opt(&self) -> Option<u64> {
16415            self.cursor.as_ref().map(|field| *field)
16416        }
16417        ///Sets `cursor` with the provided value.
16418        pub fn set_cursor(&mut self, field: u64) {
16419            self.cursor = Some(field);
16420        }
16421        ///Sets `cursor` with the provided value.
16422        pub fn with_cursor(mut self, field: u64) -> Self {
16423            self.set_cursor(field);
16424            self
16425        }
16426        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
16427        pub fn checkpoint(&self) -> &super::Checkpoint {
16428            self.checkpoint
16429                .as_ref()
16430                .map(|field| field as _)
16431                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
16432        }
16433        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16434        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
16435            self.checkpoint.as_mut().map(|field| field as _)
16436        }
16437        ///Returns a mutable reference to `checkpoint`.
16438        ///If the field is unset, it is first initialized with the default value.
16439        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
16440            self.checkpoint.get_or_insert_default()
16441        }
16442        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
16443        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
16444            self.checkpoint.as_ref().map(|field| field as _)
16445        }
16446        ///Sets `checkpoint` with the provided value.
16447        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
16448            self.checkpoint = Some(field.into().into());
16449        }
16450        ///Sets `checkpoint` with the provided value.
16451        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
16452            self.set_checkpoint(field.into());
16453            self
16454        }
16455    }
16456    impl super::SubscribeEventsRequest {
16457        pub const fn const_default() -> Self {
16458            Self {
16459                read_mask: None,
16460                filter: None,
16461            }
16462        }
16463        #[doc(hidden)]
16464        pub fn default_instance() -> &'static Self {
16465            static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
16466            &DEFAULT
16467        }
16468        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16469        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
16470            self.read_mask.as_mut().map(|field| field as _)
16471        }
16472        ///Returns a mutable reference to `read_mask`.
16473        ///If the field is unset, it is first initialized with the default value.
16474        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
16475            self.read_mask.get_or_insert_default()
16476        }
16477        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
16478        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
16479            self.read_mask.as_ref().map(|field| field as _)
16480        }
16481        ///Sets `read_mask` with the provided value.
16482        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
16483            self.read_mask = Some(field.into().into());
16484        }
16485        ///Sets `read_mask` with the provided value.
16486        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
16487            mut self,
16488            field: T,
16489        ) -> Self {
16490            self.set_read_mask(field.into());
16491            self
16492        }
16493        ///Returns the value of `filter`, or the default value if `filter` is unset.
16494        pub fn filter(&self) -> &super::EventFilter {
16495            self.filter
16496                .as_ref()
16497                .map(|field| field as _)
16498                .unwrap_or_else(|| super::EventFilter::default_instance() as _)
16499        }
16500        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16501        pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
16502            self.filter.as_mut().map(|field| field as _)
16503        }
16504        ///Returns a mutable reference to `filter`.
16505        ///If the field is unset, it is first initialized with the default value.
16506        pub fn filter_mut(&mut self) -> &mut super::EventFilter {
16507            self.filter.get_or_insert_default()
16508        }
16509        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
16510        pub fn filter_opt(&self) -> Option<&super::EventFilter> {
16511            self.filter.as_ref().map(|field| field as _)
16512        }
16513        ///Sets `filter` with the provided value.
16514        pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
16515            self.filter = Some(field.into().into());
16516        }
16517        ///Sets `filter` with the provided value.
16518        pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
16519            self.set_filter(field.into());
16520            self
16521        }
16522    }
16523    impl super::SubscribeEventsResponse {
16524        pub const fn const_default() -> Self {
16525            Self {
16526                event: None,
16527                watermark: None,
16528            }
16529        }
16530        #[doc(hidden)]
16531        pub fn default_instance() -> &'static Self {
16532            static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
16533            &DEFAULT
16534        }
16535        ///Returns the value of `event`, or the default value if `event` is unset.
16536        pub fn event(&self) -> &super::Event {
16537            self.event
16538                .as_ref()
16539                .map(|field| field as _)
16540                .unwrap_or_else(|| super::Event::default_instance() as _)
16541        }
16542        ///If `event` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16543        pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
16544            self.event.as_mut().map(|field| field as _)
16545        }
16546        ///Returns a mutable reference to `event`.
16547        ///If the field is unset, it is first initialized with the default value.
16548        pub fn event_mut(&mut self) -> &mut super::Event {
16549            self.event.get_or_insert_default()
16550        }
16551        ///If `event` is set, returns [`Some`] with the value; otherwise returns [`None`].
16552        pub fn event_opt(&self) -> Option<&super::Event> {
16553            self.event.as_ref().map(|field| field as _)
16554        }
16555        ///Sets `event` with the provided value.
16556        pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
16557            self.event = Some(field.into().into());
16558        }
16559        ///Sets `event` with the provided value.
16560        pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
16561            self.set_event(field.into());
16562            self
16563        }
16564        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
16565        pub fn watermark(&self) -> &super::Watermark {
16566            self.watermark
16567                .as_ref()
16568                .map(|field| field as _)
16569                .unwrap_or_else(|| super::Watermark::default_instance() as _)
16570        }
16571        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16572        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
16573            self.watermark.as_mut().map(|field| field as _)
16574        }
16575        ///Returns a mutable reference to `watermark`.
16576        ///If the field is unset, it is first initialized with the default value.
16577        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
16578            self.watermark.get_or_insert_default()
16579        }
16580        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
16581        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
16582            self.watermark.as_ref().map(|field| field as _)
16583        }
16584        ///Sets `watermark` with the provided value.
16585        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
16586            self.watermark = Some(field.into().into());
16587        }
16588        ///Sets `watermark` with the provided value.
16589        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
16590            self.set_watermark(field.into());
16591            self
16592        }
16593    }
16594    impl super::SubscribeTransactionsRequest {
16595        pub const fn const_default() -> Self {
16596            Self {
16597                read_mask: None,
16598                filter: None,
16599            }
16600        }
16601        #[doc(hidden)]
16602        pub fn default_instance() -> &'static Self {
16603            static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
16604            &DEFAULT
16605        }
16606        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16607        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
16608            self.read_mask.as_mut().map(|field| field as _)
16609        }
16610        ///Returns a mutable reference to `read_mask`.
16611        ///If the field is unset, it is first initialized with the default value.
16612        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
16613            self.read_mask.get_or_insert_default()
16614        }
16615        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
16616        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
16617            self.read_mask.as_ref().map(|field| field as _)
16618        }
16619        ///Sets `read_mask` with the provided value.
16620        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
16621            self.read_mask = Some(field.into().into());
16622        }
16623        ///Sets `read_mask` with the provided value.
16624        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
16625            mut self,
16626            field: T,
16627        ) -> Self {
16628            self.set_read_mask(field.into());
16629            self
16630        }
16631        ///Returns the value of `filter`, or the default value if `filter` is unset.
16632        pub fn filter(&self) -> &super::TransactionFilter {
16633            self.filter
16634                .as_ref()
16635                .map(|field| field as _)
16636                .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
16637        }
16638        ///If `filter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16639        pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
16640            self.filter.as_mut().map(|field| field as _)
16641        }
16642        ///Returns a mutable reference to `filter`.
16643        ///If the field is unset, it is first initialized with the default value.
16644        pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
16645            self.filter.get_or_insert_default()
16646        }
16647        ///If `filter` is set, returns [`Some`] with the value; otherwise returns [`None`].
16648        pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
16649            self.filter.as_ref().map(|field| field as _)
16650        }
16651        ///Sets `filter` with the provided value.
16652        pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
16653            self.filter = Some(field.into().into());
16654        }
16655        ///Sets `filter` with the provided value.
16656        pub fn with_filter<T: Into<super::TransactionFilter>>(
16657            mut self,
16658            field: T,
16659        ) -> Self {
16660            self.set_filter(field.into());
16661            self
16662        }
16663    }
16664    impl super::SubscribeTransactionsResponse {
16665        pub const fn const_default() -> Self {
16666            Self {
16667                transaction: None,
16668                watermark: None,
16669            }
16670        }
16671        #[doc(hidden)]
16672        pub fn default_instance() -> &'static Self {
16673            static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
16674            &DEFAULT
16675        }
16676        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
16677        pub fn transaction(&self) -> &super::ExecutedTransaction {
16678            self.transaction
16679                .as_ref()
16680                .map(|field| field as _)
16681                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
16682        }
16683        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16684        pub fn transaction_opt_mut(
16685            &mut self,
16686        ) -> Option<&mut super::ExecutedTransaction> {
16687            self.transaction.as_mut().map(|field| field as _)
16688        }
16689        ///Returns a mutable reference to `transaction`.
16690        ///If the field is unset, it is first initialized with the default value.
16691        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
16692            self.transaction.get_or_insert_default()
16693        }
16694        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
16695        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
16696            self.transaction.as_ref().map(|field| field as _)
16697        }
16698        ///Sets `transaction` with the provided value.
16699        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
16700            &mut self,
16701            field: T,
16702        ) {
16703            self.transaction = Some(field.into().into());
16704        }
16705        ///Sets `transaction` with the provided value.
16706        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
16707            mut self,
16708            field: T,
16709        ) -> Self {
16710            self.set_transaction(field.into());
16711            self
16712        }
16713        ///Returns the value of `watermark`, or the default value if `watermark` is unset.
16714        pub fn watermark(&self) -> &super::Watermark {
16715            self.watermark
16716                .as_ref()
16717                .map(|field| field as _)
16718                .unwrap_or_else(|| super::Watermark::default_instance() as _)
16719        }
16720        ///If `watermark` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16721        pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
16722            self.watermark.as_mut().map(|field| field as _)
16723        }
16724        ///Returns a mutable reference to `watermark`.
16725        ///If the field is unset, it is first initialized with the default value.
16726        pub fn watermark_mut(&mut self) -> &mut super::Watermark {
16727            self.watermark.get_or_insert_default()
16728        }
16729        ///If `watermark` is set, returns [`Some`] with the value; otherwise returns [`None`].
16730        pub fn watermark_opt(&self) -> Option<&super::Watermark> {
16731            self.watermark.as_ref().map(|field| field as _)
16732        }
16733        ///Sets `watermark` with the provided value.
16734        pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
16735            self.watermark = Some(field.into().into());
16736        }
16737        ///Sets `watermark` with the provided value.
16738        pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
16739            self.set_watermark(field.into());
16740            self
16741        }
16742    }
16743    impl super::SystemEpochInfo {
16744        pub const fn const_default() -> Self {
16745            Self {
16746                total_stake: None,
16747                storage_fund_reinvestment: None,
16748                storage_charge: None,
16749                storage_rebate: None,
16750                storage_fund_balance: None,
16751                stake_subsidy_amount: None,
16752                total_gas_fees: None,
16753                total_stake_rewards_distributed: None,
16754                leftover_storage_fund_inflow: None,
16755            }
16756        }
16757        #[doc(hidden)]
16758        pub fn default_instance() -> &'static Self {
16759            static DEFAULT: super::SystemEpochInfo = super::SystemEpochInfo::const_default();
16760            &DEFAULT
16761        }
16762        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16763        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16764            self.total_stake.as_mut().map(|field| field as _)
16765        }
16766        ///Returns a mutable reference to `total_stake`.
16767        ///If the field is unset, it is first initialized with the default value.
16768        pub fn total_stake_mut(&mut self) -> &mut u64 {
16769            self.total_stake.get_or_insert_default()
16770        }
16771        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16772        pub fn total_stake_opt(&self) -> Option<u64> {
16773            self.total_stake.as_ref().map(|field| *field)
16774        }
16775        ///Sets `total_stake` with the provided value.
16776        pub fn set_total_stake(&mut self, field: u64) {
16777            self.total_stake = Some(field);
16778        }
16779        ///Sets `total_stake` with the provided value.
16780        pub fn with_total_stake(mut self, field: u64) -> Self {
16781            self.set_total_stake(field);
16782            self
16783        }
16784        ///If `storage_fund_reinvestment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16785        pub fn storage_fund_reinvestment_opt_mut(&mut self) -> Option<&mut u64> {
16786            self.storage_fund_reinvestment.as_mut().map(|field| field as _)
16787        }
16788        ///Returns a mutable reference to `storage_fund_reinvestment`.
16789        ///If the field is unset, it is first initialized with the default value.
16790        pub fn storage_fund_reinvestment_mut(&mut self) -> &mut u64 {
16791            self.storage_fund_reinvestment.get_or_insert_default()
16792        }
16793        ///If `storage_fund_reinvestment` is set, returns [`Some`] with the value; otherwise returns [`None`].
16794        pub fn storage_fund_reinvestment_opt(&self) -> Option<u64> {
16795            self.storage_fund_reinvestment.as_ref().map(|field| *field)
16796        }
16797        ///Sets `storage_fund_reinvestment` with the provided value.
16798        pub fn set_storage_fund_reinvestment(&mut self, field: u64) {
16799            self.storage_fund_reinvestment = Some(field);
16800        }
16801        ///Sets `storage_fund_reinvestment` with the provided value.
16802        pub fn with_storage_fund_reinvestment(mut self, field: u64) -> Self {
16803            self.set_storage_fund_reinvestment(field);
16804            self
16805        }
16806        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16807        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
16808            self.storage_charge.as_mut().map(|field| field as _)
16809        }
16810        ///Returns a mutable reference to `storage_charge`.
16811        ///If the field is unset, it is first initialized with the default value.
16812        pub fn storage_charge_mut(&mut self) -> &mut u64 {
16813            self.storage_charge.get_or_insert_default()
16814        }
16815        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
16816        pub fn storage_charge_opt(&self) -> Option<u64> {
16817            self.storage_charge.as_ref().map(|field| *field)
16818        }
16819        ///Sets `storage_charge` with the provided value.
16820        pub fn set_storage_charge(&mut self, field: u64) {
16821            self.storage_charge = Some(field);
16822        }
16823        ///Sets `storage_charge` with the provided value.
16824        pub fn with_storage_charge(mut self, field: u64) -> Self {
16825            self.set_storage_charge(field);
16826            self
16827        }
16828        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16829        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
16830            self.storage_rebate.as_mut().map(|field| field as _)
16831        }
16832        ///Returns a mutable reference to `storage_rebate`.
16833        ///If the field is unset, it is first initialized with the default value.
16834        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
16835            self.storage_rebate.get_or_insert_default()
16836        }
16837        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16838        pub fn storage_rebate_opt(&self) -> Option<u64> {
16839            self.storage_rebate.as_ref().map(|field| *field)
16840        }
16841        ///Sets `storage_rebate` with the provided value.
16842        pub fn set_storage_rebate(&mut self, field: u64) {
16843            self.storage_rebate = Some(field);
16844        }
16845        ///Sets `storage_rebate` with the provided value.
16846        pub fn with_storage_rebate(mut self, field: u64) -> Self {
16847            self.set_storage_rebate(field);
16848            self
16849        }
16850        ///If `storage_fund_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16851        pub fn storage_fund_balance_opt_mut(&mut self) -> Option<&mut u64> {
16852            self.storage_fund_balance.as_mut().map(|field| field as _)
16853        }
16854        ///Returns a mutable reference to `storage_fund_balance`.
16855        ///If the field is unset, it is first initialized with the default value.
16856        pub fn storage_fund_balance_mut(&mut self) -> &mut u64 {
16857            self.storage_fund_balance.get_or_insert_default()
16858        }
16859        ///If `storage_fund_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
16860        pub fn storage_fund_balance_opt(&self) -> Option<u64> {
16861            self.storage_fund_balance.as_ref().map(|field| *field)
16862        }
16863        ///Sets `storage_fund_balance` with the provided value.
16864        pub fn set_storage_fund_balance(&mut self, field: u64) {
16865            self.storage_fund_balance = Some(field);
16866        }
16867        ///Sets `storage_fund_balance` with the provided value.
16868        pub fn with_storage_fund_balance(mut self, field: u64) -> Self {
16869            self.set_storage_fund_balance(field);
16870            self
16871        }
16872        ///If `stake_subsidy_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16873        pub fn stake_subsidy_amount_opt_mut(&mut self) -> Option<&mut u64> {
16874            self.stake_subsidy_amount.as_mut().map(|field| field as _)
16875        }
16876        ///Returns a mutable reference to `stake_subsidy_amount`.
16877        ///If the field is unset, it is first initialized with the default value.
16878        pub fn stake_subsidy_amount_mut(&mut self) -> &mut u64 {
16879            self.stake_subsidy_amount.get_or_insert_default()
16880        }
16881        ///If `stake_subsidy_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
16882        pub fn stake_subsidy_amount_opt(&self) -> Option<u64> {
16883            self.stake_subsidy_amount.as_ref().map(|field| *field)
16884        }
16885        ///Sets `stake_subsidy_amount` with the provided value.
16886        pub fn set_stake_subsidy_amount(&mut self, field: u64) {
16887            self.stake_subsidy_amount = Some(field);
16888        }
16889        ///Sets `stake_subsidy_amount` with the provided value.
16890        pub fn with_stake_subsidy_amount(mut self, field: u64) -> Self {
16891            self.set_stake_subsidy_amount(field);
16892            self
16893        }
16894        ///If `total_gas_fees` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16895        pub fn total_gas_fees_opt_mut(&mut self) -> Option<&mut u64> {
16896            self.total_gas_fees.as_mut().map(|field| field as _)
16897        }
16898        ///Returns a mutable reference to `total_gas_fees`.
16899        ///If the field is unset, it is first initialized with the default value.
16900        pub fn total_gas_fees_mut(&mut self) -> &mut u64 {
16901            self.total_gas_fees.get_or_insert_default()
16902        }
16903        ///If `total_gas_fees` is set, returns [`Some`] with the value; otherwise returns [`None`].
16904        pub fn total_gas_fees_opt(&self) -> Option<u64> {
16905            self.total_gas_fees.as_ref().map(|field| *field)
16906        }
16907        ///Sets `total_gas_fees` with the provided value.
16908        pub fn set_total_gas_fees(&mut self, field: u64) {
16909            self.total_gas_fees = Some(field);
16910        }
16911        ///Sets `total_gas_fees` with the provided value.
16912        pub fn with_total_gas_fees(mut self, field: u64) -> Self {
16913            self.set_total_gas_fees(field);
16914            self
16915        }
16916        ///If `total_stake_rewards_distributed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16917        pub fn total_stake_rewards_distributed_opt_mut(&mut self) -> Option<&mut u64> {
16918            self.total_stake_rewards_distributed.as_mut().map(|field| field as _)
16919        }
16920        ///Returns a mutable reference to `total_stake_rewards_distributed`.
16921        ///If the field is unset, it is first initialized with the default value.
16922        pub fn total_stake_rewards_distributed_mut(&mut self) -> &mut u64 {
16923            self.total_stake_rewards_distributed.get_or_insert_default()
16924        }
16925        ///If `total_stake_rewards_distributed` is set, returns [`Some`] with the value; otherwise returns [`None`].
16926        pub fn total_stake_rewards_distributed_opt(&self) -> Option<u64> {
16927            self.total_stake_rewards_distributed.as_ref().map(|field| *field)
16928        }
16929        ///Sets `total_stake_rewards_distributed` with the provided value.
16930        pub fn set_total_stake_rewards_distributed(&mut self, field: u64) {
16931            self.total_stake_rewards_distributed = Some(field);
16932        }
16933        ///Sets `total_stake_rewards_distributed` with the provided value.
16934        pub fn with_total_stake_rewards_distributed(mut self, field: u64) -> Self {
16935            self.set_total_stake_rewards_distributed(field);
16936            self
16937        }
16938        ///If `leftover_storage_fund_inflow` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16939        pub fn leftover_storage_fund_inflow_opt_mut(&mut self) -> Option<&mut u64> {
16940            self.leftover_storage_fund_inflow.as_mut().map(|field| field as _)
16941        }
16942        ///Returns a mutable reference to `leftover_storage_fund_inflow`.
16943        ///If the field is unset, it is first initialized with the default value.
16944        pub fn leftover_storage_fund_inflow_mut(&mut self) -> &mut u64 {
16945            self.leftover_storage_fund_inflow.get_or_insert_default()
16946        }
16947        ///If `leftover_storage_fund_inflow` is set, returns [`Some`] with the value; otherwise returns [`None`].
16948        pub fn leftover_storage_fund_inflow_opt(&self) -> Option<u64> {
16949            self.leftover_storage_fund_inflow.as_ref().map(|field| *field)
16950        }
16951        ///Sets `leftover_storage_fund_inflow` with the provided value.
16952        pub fn set_leftover_storage_fund_inflow(&mut self, field: u64) {
16953            self.leftover_storage_fund_inflow = Some(field);
16954        }
16955        ///Sets `leftover_storage_fund_inflow` with the provided value.
16956        pub fn with_leftover_storage_fund_inflow(mut self, field: u64) -> Self {
16957            self.set_leftover_storage_fund_inflow(field);
16958            self
16959        }
16960    }
16961    impl super::SystemPackage {
16962        pub const fn const_default() -> Self {
16963            Self {
16964                version: None,
16965                modules: Vec::new(),
16966                dependencies: Vec::new(),
16967            }
16968        }
16969        #[doc(hidden)]
16970        pub fn default_instance() -> &'static Self {
16971            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
16972            &DEFAULT
16973        }
16974        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16975        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
16976            self.version.as_mut().map(|field| field as _)
16977        }
16978        ///Returns a mutable reference to `version`.
16979        ///If the field is unset, it is first initialized with the default value.
16980        pub fn version_mut(&mut self) -> &mut u64 {
16981            self.version.get_or_insert_default()
16982        }
16983        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
16984        pub fn version_opt(&self) -> Option<u64> {
16985            self.version.as_ref().map(|field| *field)
16986        }
16987        ///Sets `version` with the provided value.
16988        pub fn set_version(&mut self, field: u64) {
16989            self.version = Some(field);
16990        }
16991        ///Sets `version` with the provided value.
16992        pub fn with_version(mut self, field: u64) -> Self {
16993            self.set_version(field);
16994            self
16995        }
16996        ///Returns the value of `modules`, or the default value if `modules` is unset.
16997        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
16998            &self.modules
16999        }
17000        ///Returns a mutable reference to `modules`.
17001        ///If the field is unset, it is first initialized with the default value.
17002        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
17003            &mut self.modules
17004        }
17005        ///Sets `modules` with the provided value.
17006        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
17007            self.modules = field;
17008        }
17009        ///Sets `modules` with the provided value.
17010        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
17011            self.set_modules(field);
17012            self
17013        }
17014        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
17015        pub fn dependencies(&self) -> &[String] {
17016            &self.dependencies
17017        }
17018        ///Returns a mutable reference to `dependencies`.
17019        ///If the field is unset, it is first initialized with the default value.
17020        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
17021            &mut self.dependencies
17022        }
17023        ///Sets `dependencies` with the provided value.
17024        pub fn set_dependencies(&mut self, field: Vec<String>) {
17025            self.dependencies = field;
17026        }
17027        ///Sets `dependencies` with the provided value.
17028        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
17029            self.set_dependencies(field);
17030            self
17031        }
17032    }
17033    impl super::SystemParameters {
17034        pub const fn const_default() -> Self {
17035            Self {
17036                epoch_duration_ms: None,
17037                stake_subsidy_start_epoch: None,
17038                min_validator_count: None,
17039                max_validator_count: None,
17040                min_validator_joining_stake: None,
17041                validator_low_stake_threshold: None,
17042                validator_very_low_stake_threshold: None,
17043                validator_low_stake_grace_period: None,
17044                extra_fields: None,
17045            }
17046        }
17047        #[doc(hidden)]
17048        pub fn default_instance() -> &'static Self {
17049            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
17050            &DEFAULT
17051        }
17052        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17053        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
17054            self.epoch_duration_ms.as_mut().map(|field| field as _)
17055        }
17056        ///Returns a mutable reference to `epoch_duration_ms`.
17057        ///If the field is unset, it is first initialized with the default value.
17058        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
17059            self.epoch_duration_ms.get_or_insert_default()
17060        }
17061        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
17062        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
17063            self.epoch_duration_ms.as_ref().map(|field| *field)
17064        }
17065        ///Sets `epoch_duration_ms` with the provided value.
17066        pub fn set_epoch_duration_ms(&mut self, field: u64) {
17067            self.epoch_duration_ms = Some(field);
17068        }
17069        ///Sets `epoch_duration_ms` with the provided value.
17070        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
17071            self.set_epoch_duration_ms(field);
17072            self
17073        }
17074        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17075        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17076            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
17077        }
17078        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
17079        ///If the field is unset, it is first initialized with the default value.
17080        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
17081            self.stake_subsidy_start_epoch.get_or_insert_default()
17082        }
17083        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17084        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
17085            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
17086        }
17087        ///Sets `stake_subsidy_start_epoch` with the provided value.
17088        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
17089            self.stake_subsidy_start_epoch = Some(field);
17090        }
17091        ///Sets `stake_subsidy_start_epoch` with the provided value.
17092        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
17093            self.set_stake_subsidy_start_epoch(field);
17094            self
17095        }
17096        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17097        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
17098            self.min_validator_count.as_mut().map(|field| field as _)
17099        }
17100        ///Returns a mutable reference to `min_validator_count`.
17101        ///If the field is unset, it is first initialized with the default value.
17102        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
17103            self.min_validator_count.get_or_insert_default()
17104        }
17105        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
17106        pub fn min_validator_count_opt(&self) -> Option<u64> {
17107            self.min_validator_count.as_ref().map(|field| *field)
17108        }
17109        ///Sets `min_validator_count` with the provided value.
17110        pub fn set_min_validator_count(&mut self, field: u64) {
17111            self.min_validator_count = Some(field);
17112        }
17113        ///Sets `min_validator_count` with the provided value.
17114        pub fn with_min_validator_count(mut self, field: u64) -> Self {
17115            self.set_min_validator_count(field);
17116            self
17117        }
17118        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17119        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
17120            self.max_validator_count.as_mut().map(|field| field as _)
17121        }
17122        ///Returns a mutable reference to `max_validator_count`.
17123        ///If the field is unset, it is first initialized with the default value.
17124        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
17125            self.max_validator_count.get_or_insert_default()
17126        }
17127        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
17128        pub fn max_validator_count_opt(&self) -> Option<u64> {
17129            self.max_validator_count.as_ref().map(|field| *field)
17130        }
17131        ///Sets `max_validator_count` with the provided value.
17132        pub fn set_max_validator_count(&mut self, field: u64) {
17133            self.max_validator_count = Some(field);
17134        }
17135        ///Sets `max_validator_count` with the provided value.
17136        pub fn with_max_validator_count(mut self, field: u64) -> Self {
17137            self.set_max_validator_count(field);
17138            self
17139        }
17140        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17141        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
17142            self.min_validator_joining_stake.as_mut().map(|field| field as _)
17143        }
17144        ///Returns a mutable reference to `min_validator_joining_stake`.
17145        ///If the field is unset, it is first initialized with the default value.
17146        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
17147            self.min_validator_joining_stake.get_or_insert_default()
17148        }
17149        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
17150        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
17151            self.min_validator_joining_stake.as_ref().map(|field| *field)
17152        }
17153        ///Sets `min_validator_joining_stake` with the provided value.
17154        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
17155            self.min_validator_joining_stake = Some(field);
17156        }
17157        ///Sets `min_validator_joining_stake` with the provided value.
17158        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
17159            self.set_min_validator_joining_stake(field);
17160            self
17161        }
17162        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17163        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
17164            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
17165        }
17166        ///Returns a mutable reference to `validator_low_stake_threshold`.
17167        ///If the field is unset, it is first initialized with the default value.
17168        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
17169            self.validator_low_stake_threshold.get_or_insert_default()
17170        }
17171        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
17172        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
17173            self.validator_low_stake_threshold.as_ref().map(|field| *field)
17174        }
17175        ///Sets `validator_low_stake_threshold` with the provided value.
17176        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
17177            self.validator_low_stake_threshold = Some(field);
17178        }
17179        ///Sets `validator_low_stake_threshold` with the provided value.
17180        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
17181            self.set_validator_low_stake_threshold(field);
17182            self
17183        }
17184        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17185        pub fn validator_very_low_stake_threshold_opt_mut(
17186            &mut self,
17187        ) -> Option<&mut u64> {
17188            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
17189        }
17190        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
17191        ///If the field is unset, it is first initialized with the default value.
17192        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
17193            self.validator_very_low_stake_threshold.get_or_insert_default()
17194        }
17195        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
17196        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
17197            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
17198        }
17199        ///Sets `validator_very_low_stake_threshold` with the provided value.
17200        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
17201            self.validator_very_low_stake_threshold = Some(field);
17202        }
17203        ///Sets `validator_very_low_stake_threshold` with the provided value.
17204        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
17205            self.set_validator_very_low_stake_threshold(field);
17206            self
17207        }
17208        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17209        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
17210            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
17211        }
17212        ///Returns a mutable reference to `validator_low_stake_grace_period`.
17213        ///If the field is unset, it is first initialized with the default value.
17214        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
17215            self.validator_low_stake_grace_period.get_or_insert_default()
17216        }
17217        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
17218        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
17219            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
17220        }
17221        ///Sets `validator_low_stake_grace_period` with the provided value.
17222        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
17223            self.validator_low_stake_grace_period = Some(field);
17224        }
17225        ///Sets `validator_low_stake_grace_period` with the provided value.
17226        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
17227            self.set_validator_low_stake_grace_period(field);
17228            self
17229        }
17230        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17231        pub fn extra_fields(&self) -> &super::MoveTable {
17232            self.extra_fields
17233                .as_ref()
17234                .map(|field| field as _)
17235                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17236        }
17237        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17238        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17239            self.extra_fields.as_mut().map(|field| field as _)
17240        }
17241        ///Returns a mutable reference to `extra_fields`.
17242        ///If the field is unset, it is first initialized with the default value.
17243        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17244            self.extra_fields.get_or_insert_default()
17245        }
17246        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17247        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17248            self.extra_fields.as_ref().map(|field| field as _)
17249        }
17250        ///Sets `extra_fields` with the provided value.
17251        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17252            self.extra_fields = Some(field.into().into());
17253        }
17254        ///Sets `extra_fields` with the provided value.
17255        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17256            self.set_extra_fields(field.into());
17257            self
17258        }
17259    }
17260    impl super::SystemState {
17261        pub const fn const_default() -> Self {
17262            Self {
17263                version: None,
17264                epoch: None,
17265                protocol_version: None,
17266                validators: None,
17267                storage_fund: None,
17268                parameters: None,
17269                reference_gas_price: None,
17270                validator_report_records: Vec::new(),
17271                stake_subsidy: None,
17272                safe_mode: None,
17273                safe_mode_storage_rewards: None,
17274                safe_mode_computation_rewards: None,
17275                safe_mode_storage_rebates: None,
17276                safe_mode_non_refundable_storage_fee: None,
17277                epoch_start_timestamp_ms: None,
17278                extra_fields: None,
17279            }
17280        }
17281        #[doc(hidden)]
17282        pub fn default_instance() -> &'static Self {
17283            static DEFAULT: super::SystemState = super::SystemState::const_default();
17284            &DEFAULT
17285        }
17286        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17287        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17288            self.version.as_mut().map(|field| field as _)
17289        }
17290        ///Returns a mutable reference to `version`.
17291        ///If the field is unset, it is first initialized with the default value.
17292        pub fn version_mut(&mut self) -> &mut u64 {
17293            self.version.get_or_insert_default()
17294        }
17295        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17296        pub fn version_opt(&self) -> Option<u64> {
17297            self.version.as_ref().map(|field| *field)
17298        }
17299        ///Sets `version` with the provided value.
17300        pub fn set_version(&mut self, field: u64) {
17301            self.version = Some(field);
17302        }
17303        ///Sets `version` with the provided value.
17304        pub fn with_version(mut self, field: u64) -> Self {
17305            self.set_version(field);
17306            self
17307        }
17308        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17309        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
17310            self.epoch.as_mut().map(|field| field as _)
17311        }
17312        ///Returns a mutable reference to `epoch`.
17313        ///If the field is unset, it is first initialized with the default value.
17314        pub fn epoch_mut(&mut self) -> &mut u64 {
17315            self.epoch.get_or_insert_default()
17316        }
17317        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17318        pub fn epoch_opt(&self) -> Option<u64> {
17319            self.epoch.as_ref().map(|field| *field)
17320        }
17321        ///Sets `epoch` with the provided value.
17322        pub fn set_epoch(&mut self, field: u64) {
17323            self.epoch = Some(field);
17324        }
17325        ///Sets `epoch` with the provided value.
17326        pub fn with_epoch(mut self, field: u64) -> Self {
17327            self.set_epoch(field);
17328            self
17329        }
17330        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17331        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
17332            self.protocol_version.as_mut().map(|field| field as _)
17333        }
17334        ///Returns a mutable reference to `protocol_version`.
17335        ///If the field is unset, it is first initialized with the default value.
17336        pub fn protocol_version_mut(&mut self) -> &mut u64 {
17337            self.protocol_version.get_or_insert_default()
17338        }
17339        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17340        pub fn protocol_version_opt(&self) -> Option<u64> {
17341            self.protocol_version.as_ref().map(|field| *field)
17342        }
17343        ///Sets `protocol_version` with the provided value.
17344        pub fn set_protocol_version(&mut self, field: u64) {
17345            self.protocol_version = Some(field);
17346        }
17347        ///Sets `protocol_version` with the provided value.
17348        pub fn with_protocol_version(mut self, field: u64) -> Self {
17349            self.set_protocol_version(field);
17350            self
17351        }
17352        ///Returns the value of `validators`, or the default value if `validators` is unset.
17353        pub fn validators(&self) -> &super::ValidatorSet {
17354            self.validators
17355                .as_ref()
17356                .map(|field| field as _)
17357                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
17358        }
17359        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17360        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
17361            self.validators.as_mut().map(|field| field as _)
17362        }
17363        ///Returns a mutable reference to `validators`.
17364        ///If the field is unset, it is first initialized with the default value.
17365        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
17366            self.validators.get_or_insert_default()
17367        }
17368        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17369        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
17370            self.validators.as_ref().map(|field| field as _)
17371        }
17372        ///Sets `validators` with the provided value.
17373        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
17374            self.validators = Some(field.into().into());
17375        }
17376        ///Sets `validators` with the provided value.
17377        pub fn with_validators<T: Into<super::ValidatorSet>>(
17378            mut self,
17379            field: T,
17380        ) -> Self {
17381            self.set_validators(field.into());
17382            self
17383        }
17384        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
17385        pub fn storage_fund(&self) -> &super::StorageFund {
17386            self.storage_fund
17387                .as_ref()
17388                .map(|field| field as _)
17389                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
17390        }
17391        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17392        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
17393            self.storage_fund.as_mut().map(|field| field as _)
17394        }
17395        ///Returns a mutable reference to `storage_fund`.
17396        ///If the field is unset, it is first initialized with the default value.
17397        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
17398            self.storage_fund.get_or_insert_default()
17399        }
17400        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
17401        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
17402            self.storage_fund.as_ref().map(|field| field as _)
17403        }
17404        ///Sets `storage_fund` with the provided value.
17405        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
17406            self.storage_fund = Some(field.into().into());
17407        }
17408        ///Sets `storage_fund` with the provided value.
17409        pub fn with_storage_fund<T: Into<super::StorageFund>>(
17410            mut self,
17411            field: T,
17412        ) -> Self {
17413            self.set_storage_fund(field.into());
17414            self
17415        }
17416        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
17417        pub fn parameters(&self) -> &super::SystemParameters {
17418            self.parameters
17419                .as_ref()
17420                .map(|field| field as _)
17421                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
17422        }
17423        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17424        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
17425            self.parameters.as_mut().map(|field| field as _)
17426        }
17427        ///Returns a mutable reference to `parameters`.
17428        ///If the field is unset, it is first initialized with the default value.
17429        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
17430            self.parameters.get_or_insert_default()
17431        }
17432        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
17433        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
17434            self.parameters.as_ref().map(|field| field as _)
17435        }
17436        ///Sets `parameters` with the provided value.
17437        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
17438            self.parameters = Some(field.into().into());
17439        }
17440        ///Sets `parameters` with the provided value.
17441        pub fn with_parameters<T: Into<super::SystemParameters>>(
17442            mut self,
17443            field: T,
17444        ) -> Self {
17445            self.set_parameters(field.into());
17446            self
17447        }
17448        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17449        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
17450            self.reference_gas_price.as_mut().map(|field| field as _)
17451        }
17452        ///Returns a mutable reference to `reference_gas_price`.
17453        ///If the field is unset, it is first initialized with the default value.
17454        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
17455            self.reference_gas_price.get_or_insert_default()
17456        }
17457        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
17458        pub fn reference_gas_price_opt(&self) -> Option<u64> {
17459            self.reference_gas_price.as_ref().map(|field| *field)
17460        }
17461        ///Sets `reference_gas_price` with the provided value.
17462        pub fn set_reference_gas_price(&mut self, field: u64) {
17463            self.reference_gas_price = Some(field);
17464        }
17465        ///Sets `reference_gas_price` with the provided value.
17466        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
17467            self.set_reference_gas_price(field);
17468            self
17469        }
17470        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
17471        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
17472            &self.validator_report_records
17473        }
17474        ///Returns a mutable reference to `validator_report_records`.
17475        ///If the field is unset, it is first initialized with the default value.
17476        pub fn validator_report_records_mut(
17477            &mut self,
17478        ) -> &mut Vec<super::ValidatorReportRecord> {
17479            &mut self.validator_report_records
17480        }
17481        ///Sets `validator_report_records` with the provided value.
17482        pub fn set_validator_report_records(
17483            &mut self,
17484            field: Vec<super::ValidatorReportRecord>,
17485        ) {
17486            self.validator_report_records = field;
17487        }
17488        ///Sets `validator_report_records` with the provided value.
17489        pub fn with_validator_report_records(
17490            mut self,
17491            field: Vec<super::ValidatorReportRecord>,
17492        ) -> Self {
17493            self.set_validator_report_records(field);
17494            self
17495        }
17496        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
17497        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
17498            self.stake_subsidy
17499                .as_ref()
17500                .map(|field| field as _)
17501                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
17502        }
17503        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17504        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
17505            self.stake_subsidy.as_mut().map(|field| field as _)
17506        }
17507        ///Returns a mutable reference to `stake_subsidy`.
17508        ///If the field is unset, it is first initialized with the default value.
17509        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
17510            self.stake_subsidy.get_or_insert_default()
17511        }
17512        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
17513        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
17514            self.stake_subsidy.as_ref().map(|field| field as _)
17515        }
17516        ///Sets `stake_subsidy` with the provided value.
17517        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
17518            self.stake_subsidy = Some(field.into().into());
17519        }
17520        ///Sets `stake_subsidy` with the provided value.
17521        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
17522            mut self,
17523            field: T,
17524        ) -> Self {
17525            self.set_stake_subsidy(field.into());
17526            self
17527        }
17528        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17529        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
17530            self.safe_mode.as_mut().map(|field| field as _)
17531        }
17532        ///Returns a mutable reference to `safe_mode`.
17533        ///If the field is unset, it is first initialized with the default value.
17534        pub fn safe_mode_mut(&mut self) -> &mut bool {
17535            self.safe_mode.get_or_insert_default()
17536        }
17537        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
17538        pub fn safe_mode_opt(&self) -> Option<bool> {
17539            self.safe_mode.as_ref().map(|field| *field)
17540        }
17541        ///Sets `safe_mode` with the provided value.
17542        pub fn set_safe_mode(&mut self, field: bool) {
17543            self.safe_mode = Some(field);
17544        }
17545        ///Sets `safe_mode` with the provided value.
17546        pub fn with_safe_mode(mut self, field: bool) -> Self {
17547            self.set_safe_mode(field);
17548            self
17549        }
17550        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17551        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
17552            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
17553        }
17554        ///Returns a mutable reference to `safe_mode_storage_rewards`.
17555        ///If the field is unset, it is first initialized with the default value.
17556        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
17557            self.safe_mode_storage_rewards.get_or_insert_default()
17558        }
17559        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
17560        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
17561            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
17562        }
17563        ///Sets `safe_mode_storage_rewards` with the provided value.
17564        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
17565            self.safe_mode_storage_rewards = Some(field);
17566        }
17567        ///Sets `safe_mode_storage_rewards` with the provided value.
17568        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
17569            self.set_safe_mode_storage_rewards(field);
17570            self
17571        }
17572        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17573        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
17574            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
17575        }
17576        ///Returns a mutable reference to `safe_mode_computation_rewards`.
17577        ///If the field is unset, it is first initialized with the default value.
17578        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
17579            self.safe_mode_computation_rewards.get_or_insert_default()
17580        }
17581        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
17582        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
17583            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
17584        }
17585        ///Sets `safe_mode_computation_rewards` with the provided value.
17586        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
17587            self.safe_mode_computation_rewards = Some(field);
17588        }
17589        ///Sets `safe_mode_computation_rewards` with the provided value.
17590        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
17591            self.set_safe_mode_computation_rewards(field);
17592            self
17593        }
17594        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17595        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
17596            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
17597        }
17598        ///Returns a mutable reference to `safe_mode_storage_rebates`.
17599        ///If the field is unset, it is first initialized with the default value.
17600        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
17601            self.safe_mode_storage_rebates.get_or_insert_default()
17602        }
17603        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17604        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
17605            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
17606        }
17607        ///Sets `safe_mode_storage_rebates` with the provided value.
17608        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
17609            self.safe_mode_storage_rebates = Some(field);
17610        }
17611        ///Sets `safe_mode_storage_rebates` with the provided value.
17612        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
17613            self.set_safe_mode_storage_rebates(field);
17614            self
17615        }
17616        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17617        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
17618            &mut self,
17619        ) -> Option<&mut u64> {
17620            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
17621        }
17622        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
17623        ///If the field is unset, it is first initialized with the default value.
17624        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
17625            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
17626        }
17627        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
17628        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
17629            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
17630        }
17631        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
17632        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
17633            self.safe_mode_non_refundable_storage_fee = Some(field);
17634        }
17635        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
17636        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
17637            self.set_safe_mode_non_refundable_storage_fee(field);
17638            self
17639        }
17640        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17641        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
17642            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
17643        }
17644        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
17645        ///If the field is unset, it is first initialized with the default value.
17646        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
17647            self.epoch_start_timestamp_ms.get_or_insert_default()
17648        }
17649        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
17650        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
17651            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
17652        }
17653        ///Sets `epoch_start_timestamp_ms` with the provided value.
17654        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
17655            self.epoch_start_timestamp_ms = Some(field);
17656        }
17657        ///Sets `epoch_start_timestamp_ms` with the provided value.
17658        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
17659            self.set_epoch_start_timestamp_ms(field);
17660            self
17661        }
17662        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17663        pub fn extra_fields(&self) -> &super::MoveTable {
17664            self.extra_fields
17665                .as_ref()
17666                .map(|field| field as _)
17667                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17668        }
17669        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17670        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17671            self.extra_fields.as_mut().map(|field| field as _)
17672        }
17673        ///Returns a mutable reference to `extra_fields`.
17674        ///If the field is unset, it is first initialized with the default value.
17675        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17676            self.extra_fields.get_or_insert_default()
17677        }
17678        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17679        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17680            self.extra_fields.as_ref().map(|field| field as _)
17681        }
17682        ///Sets `extra_fields` with the provided value.
17683        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17684            self.extra_fields = Some(field.into().into());
17685        }
17686        ///Sets `extra_fields` with the provided value.
17687        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17688            self.set_extra_fields(field.into());
17689            self
17690        }
17691    }
17692    impl super::Transaction {
17693        pub const fn const_default() -> Self {
17694            Self {
17695                bcs: None,
17696                digest: None,
17697                version: None,
17698                kind: None,
17699                sender: None,
17700                gas_payment: None,
17701                expiration: None,
17702            }
17703        }
17704        #[doc(hidden)]
17705        pub fn default_instance() -> &'static Self {
17706            static DEFAULT: super::Transaction = super::Transaction::const_default();
17707            &DEFAULT
17708        }
17709        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
17710        pub fn bcs(&self) -> &super::Bcs {
17711            self.bcs
17712                .as_ref()
17713                .map(|field| field as _)
17714                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17715        }
17716        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17717        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17718            self.bcs.as_mut().map(|field| field as _)
17719        }
17720        ///Returns a mutable reference to `bcs`.
17721        ///If the field is unset, it is first initialized with the default value.
17722        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
17723            self.bcs.get_or_insert_default()
17724        }
17725        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17726        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
17727            self.bcs.as_ref().map(|field| field as _)
17728        }
17729        ///Sets `bcs` with the provided value.
17730        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
17731            self.bcs = Some(field.into().into());
17732        }
17733        ///Sets `bcs` with the provided value.
17734        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17735            self.set_bcs(field.into());
17736            self
17737        }
17738        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17739        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
17740            self.digest.as_mut().map(|field| field as _)
17741        }
17742        ///Returns a mutable reference to `digest`.
17743        ///If the field is unset, it is first initialized with the default value.
17744        pub fn digest_mut(&mut self) -> &mut String {
17745            self.digest.get_or_insert_default()
17746        }
17747        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
17748        pub fn digest_opt(&self) -> Option<&str> {
17749            self.digest.as_ref().map(|field| field as _)
17750        }
17751        ///Sets `digest` with the provided value.
17752        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
17753            self.digest = Some(field.into().into());
17754        }
17755        ///Sets `digest` with the provided value.
17756        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
17757            self.set_digest(field.into());
17758            self
17759        }
17760        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17761        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
17762            self.version.as_mut().map(|field| field as _)
17763        }
17764        ///Returns a mutable reference to `version`.
17765        ///If the field is unset, it is first initialized with the default value.
17766        pub fn version_mut(&mut self) -> &mut i32 {
17767            self.version.get_or_insert_default()
17768        }
17769        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17770        pub fn version_opt(&self) -> Option<i32> {
17771            self.version.as_ref().map(|field| *field)
17772        }
17773        ///Sets `version` with the provided value.
17774        pub fn set_version(&mut self, field: i32) {
17775            self.version = Some(field);
17776        }
17777        ///Sets `version` with the provided value.
17778        pub fn with_version(mut self, field: i32) -> Self {
17779            self.set_version(field);
17780            self
17781        }
17782        ///Returns the value of `kind`, or the default value if `kind` is unset.
17783        pub fn kind(&self) -> &super::TransactionKind {
17784            self.kind
17785                .as_ref()
17786                .map(|field| field as _)
17787                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
17788        }
17789        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17790        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
17791            self.kind.as_mut().map(|field| field as _)
17792        }
17793        ///Returns a mutable reference to `kind`.
17794        ///If the field is unset, it is first initialized with the default value.
17795        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
17796            self.kind.get_or_insert_default()
17797        }
17798        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
17799        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
17800            self.kind.as_ref().map(|field| field as _)
17801        }
17802        ///Sets `kind` with the provided value.
17803        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
17804            self.kind = Some(field.into().into());
17805        }
17806        ///Sets `kind` with the provided value.
17807        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
17808            self.set_kind(field.into());
17809            self
17810        }
17811        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17812        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
17813            self.sender.as_mut().map(|field| field as _)
17814        }
17815        ///Returns a mutable reference to `sender`.
17816        ///If the field is unset, it is first initialized with the default value.
17817        pub fn sender_mut(&mut self) -> &mut String {
17818            self.sender.get_or_insert_default()
17819        }
17820        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
17821        pub fn sender_opt(&self) -> Option<&str> {
17822            self.sender.as_ref().map(|field| field as _)
17823        }
17824        ///Sets `sender` with the provided value.
17825        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
17826            self.sender = Some(field.into().into());
17827        }
17828        ///Sets `sender` with the provided value.
17829        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
17830            self.set_sender(field.into());
17831            self
17832        }
17833        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
17834        pub fn gas_payment(&self) -> &super::GasPayment {
17835            self.gas_payment
17836                .as_ref()
17837                .map(|field| field as _)
17838                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
17839        }
17840        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17841        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
17842            self.gas_payment.as_mut().map(|field| field as _)
17843        }
17844        ///Returns a mutable reference to `gas_payment`.
17845        ///If the field is unset, it is first initialized with the default value.
17846        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
17847            self.gas_payment.get_or_insert_default()
17848        }
17849        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
17850        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
17851            self.gas_payment.as_ref().map(|field| field as _)
17852        }
17853        ///Sets `gas_payment` with the provided value.
17854        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
17855            self.gas_payment = Some(field.into().into());
17856        }
17857        ///Sets `gas_payment` with the provided value.
17858        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
17859            self.set_gas_payment(field.into());
17860            self
17861        }
17862        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
17863        pub fn expiration(&self) -> &super::TransactionExpiration {
17864            self.expiration
17865                .as_ref()
17866                .map(|field| field as _)
17867                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
17868        }
17869        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17870        pub fn expiration_opt_mut(
17871            &mut self,
17872        ) -> Option<&mut super::TransactionExpiration> {
17873            self.expiration.as_mut().map(|field| field as _)
17874        }
17875        ///Returns a mutable reference to `expiration`.
17876        ///If the field is unset, it is first initialized with the default value.
17877        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
17878            self.expiration.get_or_insert_default()
17879        }
17880        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
17881        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
17882            self.expiration.as_ref().map(|field| field as _)
17883        }
17884        ///Sets `expiration` with the provided value.
17885        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
17886            &mut self,
17887            field: T,
17888        ) {
17889            self.expiration = Some(field.into().into());
17890        }
17891        ///Sets `expiration` with the provided value.
17892        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
17893            mut self,
17894            field: T,
17895        ) -> Self {
17896            self.set_expiration(field.into());
17897            self
17898        }
17899    }
17900    impl super::TransactionEffects {
17901        pub const fn const_default() -> Self {
17902            Self {
17903                bcs: None,
17904                digest: None,
17905                version: None,
17906                status: None,
17907                epoch: None,
17908                gas_used: None,
17909                transaction_digest: None,
17910                gas_object: None,
17911                events_digest: None,
17912                dependencies: Vec::new(),
17913                lamport_version: None,
17914                changed_objects: Vec::new(),
17915                unchanged_consensus_objects: Vec::new(),
17916                auxiliary_data_digest: None,
17917                unchanged_loaded_runtime_objects: Vec::new(),
17918            }
17919        }
17920        #[doc(hidden)]
17921        pub fn default_instance() -> &'static Self {
17922            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
17923            &DEFAULT
17924        }
17925        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
17926        pub fn bcs(&self) -> &super::Bcs {
17927            self.bcs
17928                .as_ref()
17929                .map(|field| field as _)
17930                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17931        }
17932        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17933        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17934            self.bcs.as_mut().map(|field| field as _)
17935        }
17936        ///Returns a mutable reference to `bcs`.
17937        ///If the field is unset, it is first initialized with the default value.
17938        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
17939            self.bcs.get_or_insert_default()
17940        }
17941        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17942        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
17943            self.bcs.as_ref().map(|field| field as _)
17944        }
17945        ///Sets `bcs` with the provided value.
17946        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
17947            self.bcs = Some(field.into().into());
17948        }
17949        ///Sets `bcs` with the provided value.
17950        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17951            self.set_bcs(field.into());
17952            self
17953        }
17954        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17955        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
17956            self.digest.as_mut().map(|field| field as _)
17957        }
17958        ///Returns a mutable reference to `digest`.
17959        ///If the field is unset, it is first initialized with the default value.
17960        pub fn digest_mut(&mut self) -> &mut String {
17961            self.digest.get_or_insert_default()
17962        }
17963        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
17964        pub fn digest_opt(&self) -> Option<&str> {
17965            self.digest.as_ref().map(|field| field as _)
17966        }
17967        ///Sets `digest` with the provided value.
17968        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
17969            self.digest = Some(field.into().into());
17970        }
17971        ///Sets `digest` with the provided value.
17972        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
17973            self.set_digest(field.into());
17974            self
17975        }
17976        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17977        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
17978            self.version.as_mut().map(|field| field as _)
17979        }
17980        ///Returns a mutable reference to `version`.
17981        ///If the field is unset, it is first initialized with the default value.
17982        pub fn version_mut(&mut self) -> &mut i32 {
17983            self.version.get_or_insert_default()
17984        }
17985        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17986        pub fn version_opt(&self) -> Option<i32> {
17987            self.version.as_ref().map(|field| *field)
17988        }
17989        ///Sets `version` with the provided value.
17990        pub fn set_version(&mut self, field: i32) {
17991            self.version = Some(field);
17992        }
17993        ///Sets `version` with the provided value.
17994        pub fn with_version(mut self, field: i32) -> Self {
17995            self.set_version(field);
17996            self
17997        }
17998        ///Returns the value of `status`, or the default value if `status` is unset.
17999        pub fn status(&self) -> &super::ExecutionStatus {
18000            self.status
18001                .as_ref()
18002                .map(|field| field as _)
18003                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
18004        }
18005        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18006        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
18007            self.status.as_mut().map(|field| field as _)
18008        }
18009        ///Returns a mutable reference to `status`.
18010        ///If the field is unset, it is first initialized with the default value.
18011        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
18012            self.status.get_or_insert_default()
18013        }
18014        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
18015        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
18016            self.status.as_ref().map(|field| field as _)
18017        }
18018        ///Sets `status` with the provided value.
18019        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
18020            self.status = Some(field.into().into());
18021        }
18022        ///Sets `status` with the provided value.
18023        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
18024            self.set_status(field.into());
18025            self
18026        }
18027        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18028        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
18029            self.epoch.as_mut().map(|field| field as _)
18030        }
18031        ///Returns a mutable reference to `epoch`.
18032        ///If the field is unset, it is first initialized with the default value.
18033        pub fn epoch_mut(&mut self) -> &mut u64 {
18034            self.epoch.get_or_insert_default()
18035        }
18036        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
18037        pub fn epoch_opt(&self) -> Option<u64> {
18038            self.epoch.as_ref().map(|field| *field)
18039        }
18040        ///Sets `epoch` with the provided value.
18041        pub fn set_epoch(&mut self, field: u64) {
18042            self.epoch = Some(field);
18043        }
18044        ///Sets `epoch` with the provided value.
18045        pub fn with_epoch(mut self, field: u64) -> Self {
18046            self.set_epoch(field);
18047            self
18048        }
18049        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
18050        pub fn gas_used(&self) -> &super::GasCostSummary {
18051            self.gas_used
18052                .as_ref()
18053                .map(|field| field as _)
18054                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
18055        }
18056        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18057        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
18058            self.gas_used.as_mut().map(|field| field as _)
18059        }
18060        ///Returns a mutable reference to `gas_used`.
18061        ///If the field is unset, it is first initialized with the default value.
18062        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
18063            self.gas_used.get_or_insert_default()
18064        }
18065        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
18066        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
18067            self.gas_used.as_ref().map(|field| field as _)
18068        }
18069        ///Sets `gas_used` with the provided value.
18070        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
18071            self.gas_used = Some(field.into().into());
18072        }
18073        ///Sets `gas_used` with the provided value.
18074        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
18075            mut self,
18076            field: T,
18077        ) -> Self {
18078            self.set_gas_used(field.into());
18079            self
18080        }
18081        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18082        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
18083            self.transaction_digest.as_mut().map(|field| field as _)
18084        }
18085        ///Returns a mutable reference to `transaction_digest`.
18086        ///If the field is unset, it is first initialized with the default value.
18087        pub fn transaction_digest_mut(&mut self) -> &mut String {
18088            self.transaction_digest.get_or_insert_default()
18089        }
18090        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18091        pub fn transaction_digest_opt(&self) -> Option<&str> {
18092            self.transaction_digest.as_ref().map(|field| field as _)
18093        }
18094        ///Sets `transaction_digest` with the provided value.
18095        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
18096            self.transaction_digest = Some(field.into().into());
18097        }
18098        ///Sets `transaction_digest` with the provided value.
18099        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
18100            self.set_transaction_digest(field.into());
18101            self
18102        }
18103        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
18104        pub fn gas_object(&self) -> &super::ChangedObject {
18105            self.gas_object
18106                .as_ref()
18107                .map(|field| field as _)
18108                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
18109        }
18110        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18111        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
18112            self.gas_object.as_mut().map(|field| field as _)
18113        }
18114        ///Returns a mutable reference to `gas_object`.
18115        ///If the field is unset, it is first initialized with the default value.
18116        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
18117            self.gas_object.get_or_insert_default()
18118        }
18119        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
18120        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
18121            self.gas_object.as_ref().map(|field| field as _)
18122        }
18123        ///Sets `gas_object` with the provided value.
18124        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
18125            self.gas_object = Some(field.into().into());
18126        }
18127        ///Sets `gas_object` with the provided value.
18128        pub fn with_gas_object<T: Into<super::ChangedObject>>(
18129            mut self,
18130            field: T,
18131        ) -> Self {
18132            self.set_gas_object(field.into());
18133            self
18134        }
18135        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18136        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
18137            self.events_digest.as_mut().map(|field| field as _)
18138        }
18139        ///Returns a mutable reference to `events_digest`.
18140        ///If the field is unset, it is first initialized with the default value.
18141        pub fn events_digest_mut(&mut self) -> &mut String {
18142            self.events_digest.get_or_insert_default()
18143        }
18144        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18145        pub fn events_digest_opt(&self) -> Option<&str> {
18146            self.events_digest.as_ref().map(|field| field as _)
18147        }
18148        ///Sets `events_digest` with the provided value.
18149        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
18150            self.events_digest = Some(field.into().into());
18151        }
18152        ///Sets `events_digest` with the provided value.
18153        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
18154            self.set_events_digest(field.into());
18155            self
18156        }
18157        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
18158        pub fn dependencies(&self) -> &[String] {
18159            &self.dependencies
18160        }
18161        ///Returns a mutable reference to `dependencies`.
18162        ///If the field is unset, it is first initialized with the default value.
18163        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18164            &mut self.dependencies
18165        }
18166        ///Sets `dependencies` with the provided value.
18167        pub fn set_dependencies(&mut self, field: Vec<String>) {
18168            self.dependencies = field;
18169        }
18170        ///Sets `dependencies` with the provided value.
18171        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18172            self.set_dependencies(field);
18173            self
18174        }
18175        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18176        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
18177            self.lamport_version.as_mut().map(|field| field as _)
18178        }
18179        ///Returns a mutable reference to `lamport_version`.
18180        ///If the field is unset, it is first initialized with the default value.
18181        pub fn lamport_version_mut(&mut self) -> &mut u64 {
18182            self.lamport_version.get_or_insert_default()
18183        }
18184        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
18185        pub fn lamport_version_opt(&self) -> Option<u64> {
18186            self.lamport_version.as_ref().map(|field| *field)
18187        }
18188        ///Sets `lamport_version` with the provided value.
18189        pub fn set_lamport_version(&mut self, field: u64) {
18190            self.lamport_version = Some(field);
18191        }
18192        ///Sets `lamport_version` with the provided value.
18193        pub fn with_lamport_version(mut self, field: u64) -> Self {
18194            self.set_lamport_version(field);
18195            self
18196        }
18197        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
18198        pub fn changed_objects(&self) -> &[super::ChangedObject] {
18199            &self.changed_objects
18200        }
18201        ///Returns a mutable reference to `changed_objects`.
18202        ///If the field is unset, it is first initialized with the default value.
18203        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
18204            &mut self.changed_objects
18205        }
18206        ///Sets `changed_objects` with the provided value.
18207        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
18208            self.changed_objects = field;
18209        }
18210        ///Sets `changed_objects` with the provided value.
18211        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
18212            self.set_changed_objects(field);
18213            self
18214        }
18215        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
18216        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
18217            &self.unchanged_consensus_objects
18218        }
18219        ///Returns a mutable reference to `unchanged_consensus_objects`.
18220        ///If the field is unset, it is first initialized with the default value.
18221        pub fn unchanged_consensus_objects_mut(
18222            &mut self,
18223        ) -> &mut Vec<super::UnchangedConsensusObject> {
18224            &mut self.unchanged_consensus_objects
18225        }
18226        ///Sets `unchanged_consensus_objects` with the provided value.
18227        pub fn set_unchanged_consensus_objects(
18228            &mut self,
18229            field: Vec<super::UnchangedConsensusObject>,
18230        ) {
18231            self.unchanged_consensus_objects = field;
18232        }
18233        ///Sets `unchanged_consensus_objects` with the provided value.
18234        pub fn with_unchanged_consensus_objects(
18235            mut self,
18236            field: Vec<super::UnchangedConsensusObject>,
18237        ) -> Self {
18238            self.set_unchanged_consensus_objects(field);
18239            self
18240        }
18241        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18242        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
18243            self.auxiliary_data_digest.as_mut().map(|field| field as _)
18244        }
18245        ///Returns a mutable reference to `auxiliary_data_digest`.
18246        ///If the field is unset, it is first initialized with the default value.
18247        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
18248            self.auxiliary_data_digest.get_or_insert_default()
18249        }
18250        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18251        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
18252            self.auxiliary_data_digest.as_ref().map(|field| field as _)
18253        }
18254        ///Sets `auxiliary_data_digest` with the provided value.
18255        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
18256            self.auxiliary_data_digest = Some(field.into().into());
18257        }
18258        ///Sets `auxiliary_data_digest` with the provided value.
18259        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
18260            self.set_auxiliary_data_digest(field.into());
18261            self
18262        }
18263        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
18264        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
18265            &self.unchanged_loaded_runtime_objects
18266        }
18267        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
18268        ///If the field is unset, it is first initialized with the default value.
18269        pub fn unchanged_loaded_runtime_objects_mut(
18270            &mut self,
18271        ) -> &mut Vec<super::ObjectReference> {
18272            &mut self.unchanged_loaded_runtime_objects
18273        }
18274        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
18275        pub fn set_unchanged_loaded_runtime_objects(
18276            &mut self,
18277            field: Vec<super::ObjectReference>,
18278        ) {
18279            self.unchanged_loaded_runtime_objects = field;
18280        }
18281        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
18282        pub fn with_unchanged_loaded_runtime_objects(
18283            mut self,
18284            field: Vec<super::ObjectReference>,
18285        ) -> Self {
18286            self.set_unchanged_loaded_runtime_objects(field);
18287            self
18288        }
18289    }
18290    impl super::TransactionEvents {
18291        pub const fn const_default() -> Self {
18292            Self {
18293                bcs: None,
18294                digest: None,
18295                events: Vec::new(),
18296            }
18297        }
18298        #[doc(hidden)]
18299        pub fn default_instance() -> &'static Self {
18300            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
18301            &DEFAULT
18302        }
18303        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
18304        pub fn bcs(&self) -> &super::Bcs {
18305            self.bcs
18306                .as_ref()
18307                .map(|field| field as _)
18308                .unwrap_or_else(|| super::Bcs::default_instance() as _)
18309        }
18310        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18311        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18312            self.bcs.as_mut().map(|field| field as _)
18313        }
18314        ///Returns a mutable reference to `bcs`.
18315        ///If the field is unset, it is first initialized with the default value.
18316        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18317            self.bcs.get_or_insert_default()
18318        }
18319        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
18320        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18321            self.bcs.as_ref().map(|field| field as _)
18322        }
18323        ///Sets `bcs` with the provided value.
18324        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18325            self.bcs = Some(field.into().into());
18326        }
18327        ///Sets `bcs` with the provided value.
18328        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18329            self.set_bcs(field.into());
18330            self
18331        }
18332        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18333        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18334            self.digest.as_mut().map(|field| field as _)
18335        }
18336        ///Returns a mutable reference to `digest`.
18337        ///If the field is unset, it is first initialized with the default value.
18338        pub fn digest_mut(&mut self) -> &mut String {
18339            self.digest.get_or_insert_default()
18340        }
18341        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
18342        pub fn digest_opt(&self) -> Option<&str> {
18343            self.digest.as_ref().map(|field| field as _)
18344        }
18345        ///Sets `digest` with the provided value.
18346        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18347            self.digest = Some(field.into().into());
18348        }
18349        ///Sets `digest` with the provided value.
18350        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18351            self.set_digest(field.into());
18352            self
18353        }
18354        ///Returns the value of `events`, or the default value if `events` is unset.
18355        pub fn events(&self) -> &[super::Event] {
18356            &self.events
18357        }
18358        ///Returns a mutable reference to `events`.
18359        ///If the field is unset, it is first initialized with the default value.
18360        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
18361            &mut self.events
18362        }
18363        ///Sets `events` with the provided value.
18364        pub fn set_events(&mut self, field: Vec<super::Event>) {
18365            self.events = field;
18366        }
18367        ///Sets `events` with the provided value.
18368        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
18369            self.set_events(field);
18370            self
18371        }
18372    }
18373    impl super::TransactionExpiration {
18374        pub const fn const_default() -> Self {
18375            Self {
18376                kind: None,
18377                epoch: None,
18378                min_epoch: None,
18379                min_timestamp: None,
18380                max_timestamp: None,
18381                chain: None,
18382                nonce: None,
18383                allowed_proposers: None,
18384            }
18385        }
18386        #[doc(hidden)]
18387        pub fn default_instance() -> &'static Self {
18388            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
18389            &DEFAULT
18390        }
18391        ///Sets `kind` with the provided value.
18392        pub fn with_kind<
18393            T: Into<super::transaction_expiration::TransactionExpirationKind>,
18394        >(mut self, field: T) -> Self {
18395            self.set_kind(field.into());
18396            self
18397        }
18398        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18399        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
18400            self.epoch.as_mut().map(|field| field as _)
18401        }
18402        ///Returns a mutable reference to `epoch`.
18403        ///If the field is unset, it is first initialized with the default value.
18404        pub fn epoch_mut(&mut self) -> &mut u64 {
18405            self.epoch.get_or_insert_default()
18406        }
18407        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
18408        pub fn epoch_opt(&self) -> Option<u64> {
18409            self.epoch.as_ref().map(|field| *field)
18410        }
18411        ///Sets `epoch` with the provided value.
18412        pub fn set_epoch(&mut self, field: u64) {
18413            self.epoch = Some(field);
18414        }
18415        ///Sets `epoch` with the provided value.
18416        pub fn with_epoch(mut self, field: u64) -> Self {
18417            self.set_epoch(field);
18418            self
18419        }
18420        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18421        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
18422            self.min_epoch.as_mut().map(|field| field as _)
18423        }
18424        ///Returns a mutable reference to `min_epoch`.
18425        ///If the field is unset, it is first initialized with the default value.
18426        pub fn min_epoch_mut(&mut self) -> &mut u64 {
18427            self.min_epoch.get_or_insert_default()
18428        }
18429        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
18430        pub fn min_epoch_opt(&self) -> Option<u64> {
18431            self.min_epoch.as_ref().map(|field| *field)
18432        }
18433        ///Sets `min_epoch` with the provided value.
18434        pub fn set_min_epoch(&mut self, field: u64) {
18435            self.min_epoch = Some(field);
18436        }
18437        ///Sets `min_epoch` with the provided value.
18438        pub fn with_min_epoch(mut self, field: u64) -> Self {
18439            self.set_min_epoch(field);
18440            self
18441        }
18442        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18443        pub fn min_timestamp_opt_mut(
18444            &mut self,
18445        ) -> Option<&mut ::prost_types::Timestamp> {
18446            self.min_timestamp.as_mut().map(|field| field as _)
18447        }
18448        ///Returns a mutable reference to `min_timestamp`.
18449        ///If the field is unset, it is first initialized with the default value.
18450        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
18451            self.min_timestamp.get_or_insert_default()
18452        }
18453        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
18454        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
18455            self.min_timestamp.as_ref().map(|field| field as _)
18456        }
18457        ///Sets `min_timestamp` with the provided value.
18458        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
18459            &mut self,
18460            field: T,
18461        ) {
18462            self.min_timestamp = Some(field.into().into());
18463        }
18464        ///Sets `min_timestamp` with the provided value.
18465        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
18466            mut self,
18467            field: T,
18468        ) -> Self {
18469            self.set_min_timestamp(field.into());
18470            self
18471        }
18472        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18473        pub fn max_timestamp_opt_mut(
18474            &mut self,
18475        ) -> Option<&mut ::prost_types::Timestamp> {
18476            self.max_timestamp.as_mut().map(|field| field as _)
18477        }
18478        ///Returns a mutable reference to `max_timestamp`.
18479        ///If the field is unset, it is first initialized with the default value.
18480        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
18481            self.max_timestamp.get_or_insert_default()
18482        }
18483        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
18484        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
18485            self.max_timestamp.as_ref().map(|field| field as _)
18486        }
18487        ///Sets `max_timestamp` with the provided value.
18488        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
18489            &mut self,
18490            field: T,
18491        ) {
18492            self.max_timestamp = Some(field.into().into());
18493        }
18494        ///Sets `max_timestamp` with the provided value.
18495        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
18496            mut self,
18497            field: T,
18498        ) -> Self {
18499            self.set_max_timestamp(field.into());
18500            self
18501        }
18502        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18503        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
18504            self.chain.as_mut().map(|field| field as _)
18505        }
18506        ///Returns a mutable reference to `chain`.
18507        ///If the field is unset, it is first initialized with the default value.
18508        pub fn chain_mut(&mut self) -> &mut String {
18509            self.chain.get_or_insert_default()
18510        }
18511        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
18512        pub fn chain_opt(&self) -> Option<&str> {
18513            self.chain.as_ref().map(|field| field as _)
18514        }
18515        ///Sets `chain` with the provided value.
18516        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
18517            self.chain = Some(field.into().into());
18518        }
18519        ///Sets `chain` with the provided value.
18520        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
18521            self.set_chain(field.into());
18522            self
18523        }
18524        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18525        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
18526            self.nonce.as_mut().map(|field| field as _)
18527        }
18528        ///Returns a mutable reference to `nonce`.
18529        ///If the field is unset, it is first initialized with the default value.
18530        pub fn nonce_mut(&mut self) -> &mut u32 {
18531            self.nonce.get_or_insert_default()
18532        }
18533        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
18534        pub fn nonce_opt(&self) -> Option<u32> {
18535            self.nonce.as_ref().map(|field| *field)
18536        }
18537        ///Sets `nonce` with the provided value.
18538        pub fn set_nonce(&mut self, field: u32) {
18539            self.nonce = Some(field);
18540        }
18541        ///Sets `nonce` with the provided value.
18542        pub fn with_nonce(mut self, field: u32) -> Self {
18543            self.set_nonce(field);
18544            self
18545        }
18546        ///Returns the value of `allowed_proposers`, or the default value if `allowed_proposers` is unset.
18547        pub fn allowed_proposers(&self) -> &super::AllowedProposers {
18548            self.allowed_proposers
18549                .as_ref()
18550                .map(|field| field as _)
18551                .unwrap_or_else(|| super::AllowedProposers::default_instance() as _)
18552        }
18553        ///If `allowed_proposers` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18554        pub fn allowed_proposers_opt_mut(
18555            &mut self,
18556        ) -> Option<&mut super::AllowedProposers> {
18557            self.allowed_proposers.as_mut().map(|field| field as _)
18558        }
18559        ///Returns a mutable reference to `allowed_proposers`.
18560        ///If the field is unset, it is first initialized with the default value.
18561        pub fn allowed_proposers_mut(&mut self) -> &mut super::AllowedProposers {
18562            self.allowed_proposers.get_or_insert_default()
18563        }
18564        ///If `allowed_proposers` is set, returns [`Some`] with the value; otherwise returns [`None`].
18565        pub fn allowed_proposers_opt(&self) -> Option<&super::AllowedProposers> {
18566            self.allowed_proposers.as_ref().map(|field| field as _)
18567        }
18568        ///Sets `allowed_proposers` with the provided value.
18569        pub fn set_allowed_proposers<T: Into<super::AllowedProposers>>(
18570            &mut self,
18571            field: T,
18572        ) {
18573            self.allowed_proposers = Some(field.into().into());
18574        }
18575        ///Sets `allowed_proposers` with the provided value.
18576        pub fn with_allowed_proposers<T: Into<super::AllowedProposers>>(
18577            mut self,
18578            field: T,
18579        ) -> Self {
18580            self.set_allowed_proposers(field.into());
18581            self
18582        }
18583    }
18584    impl super::TransactionFilter {
18585        pub const fn const_default() -> Self {
18586            Self { terms: Vec::new() }
18587        }
18588        #[doc(hidden)]
18589        pub fn default_instance() -> &'static Self {
18590            static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
18591            &DEFAULT
18592        }
18593        ///Returns the value of `terms`, or the default value if `terms` is unset.
18594        pub fn terms(&self) -> &[super::TransactionTerm] {
18595            &self.terms
18596        }
18597        ///Returns a mutable reference to `terms`.
18598        ///If the field is unset, it is first initialized with the default value.
18599        pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
18600            &mut self.terms
18601        }
18602        ///Sets `terms` with the provided value.
18603        pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
18604            self.terms = field;
18605        }
18606        ///Sets `terms` with the provided value.
18607        pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
18608            self.set_terms(field);
18609            self
18610        }
18611    }
18612    impl super::TransactionKind {
18613        pub const fn const_default() -> Self {
18614            Self { kind: None, data: None }
18615        }
18616        #[doc(hidden)]
18617        pub fn default_instance() -> &'static Self {
18618            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
18619            &DEFAULT
18620        }
18621        ///Sets `kind` with the provided value.
18622        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
18623            mut self,
18624            field: T,
18625        ) -> Self {
18626            self.set_kind(field.into());
18627            self
18628        }
18629        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
18630        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
18631            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
18632                .data
18633            {
18634                field as _
18635            } else {
18636                super::ProgrammableTransaction::default_instance() as _
18637            }
18638        }
18639        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
18640        pub fn programmable_transaction_opt(
18641            &self,
18642        ) -> Option<&super::ProgrammableTransaction> {
18643            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
18644                .data
18645            {
18646                Some(field as _)
18647            } else {
18648                None
18649            }
18650        }
18651        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18652        pub fn programmable_transaction_opt_mut(
18653            &mut self,
18654        ) -> Option<&mut super::ProgrammableTransaction> {
18655            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
18656                .data
18657            {
18658                Some(field as _)
18659            } else {
18660                None
18661            }
18662        }
18663        ///Returns a mutable reference to `programmable_transaction`.
18664        ///If the field is unset, it is first initialized with the default value.
18665        ///If any other oneof field in the same oneof is set, it will be cleared.
18666        pub fn programmable_transaction_mut(
18667            &mut self,
18668        ) -> &mut super::ProgrammableTransaction {
18669            if self.programmable_transaction_opt_mut().is_none() {
18670                self.data = Some(
18671                    super::transaction_kind::Data::ProgrammableTransaction(
18672                        super::ProgrammableTransaction::default(),
18673                    ),
18674                );
18675            }
18676            self.programmable_transaction_opt_mut().unwrap()
18677        }
18678        ///Sets `programmable_transaction` with the provided value.
18679        ///If any other oneof field in the same oneof is set, it will be cleared.
18680        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
18681            &mut self,
18682            field: T,
18683        ) {
18684            self.data = Some(
18685                super::transaction_kind::Data::ProgrammableTransaction(
18686                    field.into().into(),
18687                ),
18688            );
18689        }
18690        ///Sets `programmable_transaction` with the provided value.
18691        ///If any other oneof field in the same oneof is set, it will be cleared.
18692        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
18693            mut self,
18694            field: T,
18695        ) -> Self {
18696            self.set_programmable_transaction(field.into());
18697            self
18698        }
18699        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
18700        pub fn change_epoch(&self) -> &super::ChangeEpoch {
18701            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
18702                field as _
18703            } else {
18704                super::ChangeEpoch::default_instance() as _
18705            }
18706        }
18707        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
18708        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
18709            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
18710                Some(field as _)
18711            } else {
18712                None
18713            }
18714        }
18715        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18716        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
18717            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
18718                .data
18719            {
18720                Some(field as _)
18721            } else {
18722                None
18723            }
18724        }
18725        ///Returns a mutable reference to `change_epoch`.
18726        ///If the field is unset, it is first initialized with the default value.
18727        ///If any other oneof field in the same oneof is set, it will be cleared.
18728        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
18729            if self.change_epoch_opt_mut().is_none() {
18730                self.data = Some(
18731                    super::transaction_kind::Data::ChangeEpoch(
18732                        super::ChangeEpoch::default(),
18733                    ),
18734                );
18735            }
18736            self.change_epoch_opt_mut().unwrap()
18737        }
18738        ///Sets `change_epoch` with the provided value.
18739        ///If any other oneof field in the same oneof is set, it will be cleared.
18740        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
18741            self.data = Some(
18742                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
18743            );
18744        }
18745        ///Sets `change_epoch` with the provided value.
18746        ///If any other oneof field in the same oneof is set, it will be cleared.
18747        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
18748            mut self,
18749            field: T,
18750        ) -> Self {
18751            self.set_change_epoch(field.into());
18752            self
18753        }
18754        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
18755        pub fn genesis(&self) -> &super::GenesisTransaction {
18756            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
18757                field as _
18758            } else {
18759                super::GenesisTransaction::default_instance() as _
18760            }
18761        }
18762        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
18763        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
18764            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
18765                Some(field as _)
18766            } else {
18767                None
18768            }
18769        }
18770        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18771        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
18772            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
18773                Some(field as _)
18774            } else {
18775                None
18776            }
18777        }
18778        ///Returns a mutable reference to `genesis`.
18779        ///If the field is unset, it is first initialized with the default value.
18780        ///If any other oneof field in the same oneof is set, it will be cleared.
18781        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
18782            if self.genesis_opt_mut().is_none() {
18783                self.data = Some(
18784                    super::transaction_kind::Data::Genesis(
18785                        super::GenesisTransaction::default(),
18786                    ),
18787                );
18788            }
18789            self.genesis_opt_mut().unwrap()
18790        }
18791        ///Sets `genesis` with the provided value.
18792        ///If any other oneof field in the same oneof is set, it will be cleared.
18793        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
18794            self.data = Some(
18795                super::transaction_kind::Data::Genesis(field.into().into()),
18796            );
18797        }
18798        ///Sets `genesis` with the provided value.
18799        ///If any other oneof field in the same oneof is set, it will be cleared.
18800        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
18801            mut self,
18802            field: T,
18803        ) -> Self {
18804            self.set_genesis(field.into());
18805            self
18806        }
18807        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
18808        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
18809            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
18810                .data
18811            {
18812                field as _
18813            } else {
18814                super::ConsensusCommitPrologue::default_instance() as _
18815            }
18816        }
18817        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
18818        pub fn consensus_commit_prologue_opt(
18819            &self,
18820        ) -> Option<&super::ConsensusCommitPrologue> {
18821            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
18822                .data
18823            {
18824                Some(field as _)
18825            } else {
18826                None
18827            }
18828        }
18829        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18830        pub fn consensus_commit_prologue_opt_mut(
18831            &mut self,
18832        ) -> Option<&mut super::ConsensusCommitPrologue> {
18833            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
18834                .data
18835            {
18836                Some(field as _)
18837            } else {
18838                None
18839            }
18840        }
18841        ///Returns a mutable reference to `consensus_commit_prologue`.
18842        ///If the field is unset, it is first initialized with the default value.
18843        ///If any other oneof field in the same oneof is set, it will be cleared.
18844        pub fn consensus_commit_prologue_mut(
18845            &mut self,
18846        ) -> &mut super::ConsensusCommitPrologue {
18847            if self.consensus_commit_prologue_opt_mut().is_none() {
18848                self.data = Some(
18849                    super::transaction_kind::Data::ConsensusCommitPrologue(
18850                        super::ConsensusCommitPrologue::default(),
18851                    ),
18852                );
18853            }
18854            self.consensus_commit_prologue_opt_mut().unwrap()
18855        }
18856        ///Sets `consensus_commit_prologue` with the provided value.
18857        ///If any other oneof field in the same oneof is set, it will be cleared.
18858        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
18859            &mut self,
18860            field: T,
18861        ) {
18862            self.data = Some(
18863                super::transaction_kind::Data::ConsensusCommitPrologue(
18864                    field.into().into(),
18865                ),
18866            );
18867        }
18868        ///Sets `consensus_commit_prologue` with the provided value.
18869        ///If any other oneof field in the same oneof is set, it will be cleared.
18870        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
18871            mut self,
18872            field: T,
18873        ) -> Self {
18874            self.set_consensus_commit_prologue(field.into());
18875            self
18876        }
18877        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
18878        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
18879            if let Some(
18880                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
18881            ) = &self.data
18882            {
18883                field as _
18884            } else {
18885                super::AuthenticatorStateUpdate::default_instance() as _
18886            }
18887        }
18888        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
18889        pub fn authenticator_state_update_opt(
18890            &self,
18891        ) -> Option<&super::AuthenticatorStateUpdate> {
18892            if let Some(
18893                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
18894            ) = &self.data
18895            {
18896                Some(field as _)
18897            } else {
18898                None
18899            }
18900        }
18901        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18902        pub fn authenticator_state_update_opt_mut(
18903            &mut self,
18904        ) -> Option<&mut super::AuthenticatorStateUpdate> {
18905            if let Some(
18906                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
18907            ) = &mut self.data
18908            {
18909                Some(field as _)
18910            } else {
18911                None
18912            }
18913        }
18914        ///Returns a mutable reference to `authenticator_state_update`.
18915        ///If the field is unset, it is first initialized with the default value.
18916        ///If any other oneof field in the same oneof is set, it will be cleared.
18917        pub fn authenticator_state_update_mut(
18918            &mut self,
18919        ) -> &mut super::AuthenticatorStateUpdate {
18920            if self.authenticator_state_update_opt_mut().is_none() {
18921                self.data = Some(
18922                    super::transaction_kind::Data::AuthenticatorStateUpdate(
18923                        super::AuthenticatorStateUpdate::default(),
18924                    ),
18925                );
18926            }
18927            self.authenticator_state_update_opt_mut().unwrap()
18928        }
18929        ///Sets `authenticator_state_update` with the provided value.
18930        ///If any other oneof field in the same oneof is set, it will be cleared.
18931        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
18932            &mut self,
18933            field: T,
18934        ) {
18935            self.data = Some(
18936                super::transaction_kind::Data::AuthenticatorStateUpdate(
18937                    field.into().into(),
18938                ),
18939            );
18940        }
18941        ///Sets `authenticator_state_update` with the provided value.
18942        ///If any other oneof field in the same oneof is set, it will be cleared.
18943        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
18944            mut self,
18945            field: T,
18946        ) -> Self {
18947            self.set_authenticator_state_update(field.into());
18948            self
18949        }
18950        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
18951        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
18952            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
18953                field as _
18954            } else {
18955                super::EndOfEpochTransaction::default_instance() as _
18956            }
18957        }
18958        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
18959        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
18960            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
18961                Some(field as _)
18962            } else {
18963                None
18964            }
18965        }
18966        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18967        pub fn end_of_epoch_opt_mut(
18968            &mut self,
18969        ) -> Option<&mut super::EndOfEpochTransaction> {
18970            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
18971                .data
18972            {
18973                Some(field as _)
18974            } else {
18975                None
18976            }
18977        }
18978        ///Returns a mutable reference to `end_of_epoch`.
18979        ///If the field is unset, it is first initialized with the default value.
18980        ///If any other oneof field in the same oneof is set, it will be cleared.
18981        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
18982            if self.end_of_epoch_opt_mut().is_none() {
18983                self.data = Some(
18984                    super::transaction_kind::Data::EndOfEpoch(
18985                        super::EndOfEpochTransaction::default(),
18986                    ),
18987                );
18988            }
18989            self.end_of_epoch_opt_mut().unwrap()
18990        }
18991        ///Sets `end_of_epoch` with the provided value.
18992        ///If any other oneof field in the same oneof is set, it will be cleared.
18993        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
18994            &mut self,
18995            field: T,
18996        ) {
18997            self.data = Some(
18998                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
18999            );
19000        }
19001        ///Sets `end_of_epoch` with the provided value.
19002        ///If any other oneof field in the same oneof is set, it will be cleared.
19003        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
19004            mut self,
19005            field: T,
19006        ) -> Self {
19007            self.set_end_of_epoch(field.into());
19008            self
19009        }
19010        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
19011        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
19012            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
19013                .data
19014            {
19015                field as _
19016            } else {
19017                super::RandomnessStateUpdate::default_instance() as _
19018            }
19019        }
19020        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
19021        pub fn randomness_state_update_opt(
19022            &self,
19023        ) -> Option<&super::RandomnessStateUpdate> {
19024            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
19025                .data
19026            {
19027                Some(field as _)
19028            } else {
19029                None
19030            }
19031        }
19032        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19033        pub fn randomness_state_update_opt_mut(
19034            &mut self,
19035        ) -> Option<&mut super::RandomnessStateUpdate> {
19036            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
19037                .data
19038            {
19039                Some(field as _)
19040            } else {
19041                None
19042            }
19043        }
19044        ///Returns a mutable reference to `randomness_state_update`.
19045        ///If the field is unset, it is first initialized with the default value.
19046        ///If any other oneof field in the same oneof is set, it will be cleared.
19047        pub fn randomness_state_update_mut(
19048            &mut self,
19049        ) -> &mut super::RandomnessStateUpdate {
19050            if self.randomness_state_update_opt_mut().is_none() {
19051                self.data = Some(
19052                    super::transaction_kind::Data::RandomnessStateUpdate(
19053                        super::RandomnessStateUpdate::default(),
19054                    ),
19055                );
19056            }
19057            self.randomness_state_update_opt_mut().unwrap()
19058        }
19059        ///Sets `randomness_state_update` with the provided value.
19060        ///If any other oneof field in the same oneof is set, it will be cleared.
19061        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
19062            &mut self,
19063            field: T,
19064        ) {
19065            self.data = Some(
19066                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
19067            );
19068        }
19069        ///Sets `randomness_state_update` with the provided value.
19070        ///If any other oneof field in the same oneof is set, it will be cleared.
19071        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
19072            mut self,
19073            field: T,
19074        ) -> Self {
19075            self.set_randomness_state_update(field.into());
19076            self
19077        }
19078    }
19079    impl super::TransactionLiteral {
19080        pub const fn const_default() -> Self {
19081            Self {
19082                negated: false,
19083                predicate: None,
19084            }
19085        }
19086        #[doc(hidden)]
19087        pub fn default_instance() -> &'static Self {
19088            static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
19089            &DEFAULT
19090        }
19091        ///Returns a mutable reference to `negated`.
19092        ///If the field is unset, it is first initialized with the default value.
19093        pub fn negated_mut(&mut self) -> &mut bool {
19094            &mut self.negated
19095        }
19096        ///Sets `negated` with the provided value.
19097        pub fn set_negated(&mut self, field: bool) {
19098            self.negated = field;
19099        }
19100        ///Sets `negated` with the provided value.
19101        pub fn with_negated(mut self, field: bool) -> Self {
19102            self.set_negated(field);
19103            self
19104        }
19105        ///Returns the value of `sender`, or the default value if `sender` is unset.
19106        pub fn sender(&self) -> &super::SenderFilter {
19107            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
19108                .predicate
19109            {
19110                field as _
19111            } else {
19112                super::SenderFilter::default_instance() as _
19113            }
19114        }
19115        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
19116        pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
19117            if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
19118                .predicate
19119            {
19120                Some(field as _)
19121            } else {
19122                None
19123            }
19124        }
19125        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19126        pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
19127            if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
19128                .predicate
19129            {
19130                Some(field as _)
19131            } else {
19132                None
19133            }
19134        }
19135        ///Returns a mutable reference to `sender`.
19136        ///If the field is unset, it is first initialized with the default value.
19137        ///If any other oneof field in the same oneof is set, it will be cleared.
19138        pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
19139            if self.sender_opt_mut().is_none() {
19140                self.predicate = Some(
19141                    super::transaction_literal::Predicate::Sender(
19142                        super::SenderFilter::default(),
19143                    ),
19144                );
19145            }
19146            self.sender_opt_mut().unwrap()
19147        }
19148        ///Sets `sender` with the provided value.
19149        ///If any other oneof field in the same oneof is set, it will be cleared.
19150        pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
19151            self.predicate = Some(
19152                super::transaction_literal::Predicate::Sender(field.into().into()),
19153            );
19154        }
19155        ///Sets `sender` with the provided value.
19156        ///If any other oneof field in the same oneof is set, it will be cleared.
19157        pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
19158            self.set_sender(field.into());
19159            self
19160        }
19161        ///Returns the value of `affected_address`, or the default value if `affected_address` is unset.
19162        pub fn affected_address(&self) -> &super::AffectedAddressFilter {
19163            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
19164                .predicate
19165            {
19166                field as _
19167            } else {
19168                super::AffectedAddressFilter::default_instance() as _
19169            }
19170        }
19171        ///If `affected_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19172        pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
19173            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
19174                .predicate
19175            {
19176                Some(field as _)
19177            } else {
19178                None
19179            }
19180        }
19181        ///If `affected_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19182        pub fn affected_address_opt_mut(
19183            &mut self,
19184        ) -> Option<&mut super::AffectedAddressFilter> {
19185            if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
19186                .predicate
19187            {
19188                Some(field as _)
19189            } else {
19190                None
19191            }
19192        }
19193        ///Returns a mutable reference to `affected_address`.
19194        ///If the field is unset, it is first initialized with the default value.
19195        ///If any other oneof field in the same oneof is set, it will be cleared.
19196        pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
19197            if self.affected_address_opt_mut().is_none() {
19198                self.predicate = Some(
19199                    super::transaction_literal::Predicate::AffectedAddress(
19200                        super::AffectedAddressFilter::default(),
19201                    ),
19202                );
19203            }
19204            self.affected_address_opt_mut().unwrap()
19205        }
19206        ///Sets `affected_address` with the provided value.
19207        ///If any other oneof field in the same oneof is set, it will be cleared.
19208        pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
19209            &mut self,
19210            field: T,
19211        ) {
19212            self.predicate = Some(
19213                super::transaction_literal::Predicate::AffectedAddress(
19214                    field.into().into(),
19215                ),
19216            );
19217        }
19218        ///Sets `affected_address` with the provided value.
19219        ///If any other oneof field in the same oneof is set, it will be cleared.
19220        pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
19221            mut self,
19222            field: T,
19223        ) -> Self {
19224            self.set_affected_address(field.into());
19225            self
19226        }
19227        ///Returns the value of `affected_object`, or the default value if `affected_object` is unset.
19228        pub fn affected_object(&self) -> &super::AffectedObjectFilter {
19229            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
19230                .predicate
19231            {
19232                field as _
19233            } else {
19234                super::AffectedObjectFilter::default_instance() as _
19235            }
19236        }
19237        ///If `affected_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
19238        pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
19239            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
19240                .predicate
19241            {
19242                Some(field as _)
19243            } else {
19244                None
19245            }
19246        }
19247        ///If `affected_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19248        pub fn affected_object_opt_mut(
19249            &mut self,
19250        ) -> Option<&mut super::AffectedObjectFilter> {
19251            if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
19252                .predicate
19253            {
19254                Some(field as _)
19255            } else {
19256                None
19257            }
19258        }
19259        ///Returns a mutable reference to `affected_object`.
19260        ///If the field is unset, it is first initialized with the default value.
19261        ///If any other oneof field in the same oneof is set, it will be cleared.
19262        pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
19263            if self.affected_object_opt_mut().is_none() {
19264                self.predicate = Some(
19265                    super::transaction_literal::Predicate::AffectedObject(
19266                        super::AffectedObjectFilter::default(),
19267                    ),
19268                );
19269            }
19270            self.affected_object_opt_mut().unwrap()
19271        }
19272        ///Sets `affected_object` with the provided value.
19273        ///If any other oneof field in the same oneof is set, it will be cleared.
19274        pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
19275            &mut self,
19276            field: T,
19277        ) {
19278            self.predicate = Some(
19279                super::transaction_literal::Predicate::AffectedObject(
19280                    field.into().into(),
19281                ),
19282            );
19283        }
19284        ///Sets `affected_object` with the provided value.
19285        ///If any other oneof field in the same oneof is set, it will be cleared.
19286        pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
19287            mut self,
19288            field: T,
19289        ) -> Self {
19290            self.set_affected_object(field.into());
19291            self
19292        }
19293        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
19294        pub fn move_call(&self) -> &super::MoveCallFilter {
19295            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
19296                .predicate
19297            {
19298                field as _
19299            } else {
19300                super::MoveCallFilter::default_instance() as _
19301            }
19302        }
19303        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
19304        pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
19305            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
19306                .predicate
19307            {
19308                Some(field as _)
19309            } else {
19310                None
19311            }
19312        }
19313        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19314        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
19315            if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
19316                .predicate
19317            {
19318                Some(field as _)
19319            } else {
19320                None
19321            }
19322        }
19323        ///Returns a mutable reference to `move_call`.
19324        ///If the field is unset, it is first initialized with the default value.
19325        ///If any other oneof field in the same oneof is set, it will be cleared.
19326        pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
19327            if self.move_call_opt_mut().is_none() {
19328                self.predicate = Some(
19329                    super::transaction_literal::Predicate::MoveCall(
19330                        super::MoveCallFilter::default(),
19331                    ),
19332                );
19333            }
19334            self.move_call_opt_mut().unwrap()
19335        }
19336        ///Sets `move_call` with the provided value.
19337        ///If any other oneof field in the same oneof is set, it will be cleared.
19338        pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
19339            self.predicate = Some(
19340                super::transaction_literal::Predicate::MoveCall(field.into().into()),
19341            );
19342        }
19343        ///Sets `move_call` with the provided value.
19344        ///If any other oneof field in the same oneof is set, it will be cleared.
19345        pub fn with_move_call<T: Into<super::MoveCallFilter>>(
19346            mut self,
19347            field: T,
19348        ) -> Self {
19349            self.set_move_call(field.into());
19350            self
19351        }
19352        ///Returns the value of `emit_module`, or the default value if `emit_module` is unset.
19353        pub fn emit_module(&self) -> &super::EmitModuleFilter {
19354            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
19355                .predicate
19356            {
19357                field as _
19358            } else {
19359                super::EmitModuleFilter::default_instance() as _
19360            }
19361        }
19362        ///If `emit_module` is set, returns [`Some`] with the value; otherwise returns [`None`].
19363        pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
19364            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
19365                .predicate
19366            {
19367                Some(field as _)
19368            } else {
19369                None
19370            }
19371        }
19372        ///If `emit_module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19373        pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
19374            if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
19375                .predicate
19376            {
19377                Some(field as _)
19378            } else {
19379                None
19380            }
19381        }
19382        ///Returns a mutable reference to `emit_module`.
19383        ///If the field is unset, it is first initialized with the default value.
19384        ///If any other oneof field in the same oneof is set, it will be cleared.
19385        pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
19386            if self.emit_module_opt_mut().is_none() {
19387                self.predicate = Some(
19388                    super::transaction_literal::Predicate::EmitModule(
19389                        super::EmitModuleFilter::default(),
19390                    ),
19391                );
19392            }
19393            self.emit_module_opt_mut().unwrap()
19394        }
19395        ///Sets `emit_module` with the provided value.
19396        ///If any other oneof field in the same oneof is set, it will be cleared.
19397        pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
19398            self.predicate = Some(
19399                super::transaction_literal::Predicate::EmitModule(field.into().into()),
19400            );
19401        }
19402        ///Sets `emit_module` with the provided value.
19403        ///If any other oneof field in the same oneof is set, it will be cleared.
19404        pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
19405            mut self,
19406            field: T,
19407        ) -> Self {
19408            self.set_emit_module(field.into());
19409            self
19410        }
19411        ///Returns the value of `event_type`, or the default value if `event_type` is unset.
19412        pub fn event_type(&self) -> &super::EventTypeFilter {
19413            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
19414                .predicate
19415            {
19416                field as _
19417            } else {
19418                super::EventTypeFilter::default_instance() as _
19419            }
19420        }
19421        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
19422        pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
19423            if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
19424                .predicate
19425            {
19426                Some(field as _)
19427            } else {
19428                None
19429            }
19430        }
19431        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19432        pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
19433            if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
19434                .predicate
19435            {
19436                Some(field as _)
19437            } else {
19438                None
19439            }
19440        }
19441        ///Returns a mutable reference to `event_type`.
19442        ///If the field is unset, it is first initialized with the default value.
19443        ///If any other oneof field in the same oneof is set, it will be cleared.
19444        pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
19445            if self.event_type_opt_mut().is_none() {
19446                self.predicate = Some(
19447                    super::transaction_literal::Predicate::EventType(
19448                        super::EventTypeFilter::default(),
19449                    ),
19450                );
19451            }
19452            self.event_type_opt_mut().unwrap()
19453        }
19454        ///Sets `event_type` with the provided value.
19455        ///If any other oneof field in the same oneof is set, it will be cleared.
19456        pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
19457            self.predicate = Some(
19458                super::transaction_literal::Predicate::EventType(field.into().into()),
19459            );
19460        }
19461        ///Sets `event_type` with the provided value.
19462        ///If any other oneof field in the same oneof is set, it will be cleared.
19463        pub fn with_event_type<T: Into<super::EventTypeFilter>>(
19464            mut self,
19465            field: T,
19466        ) -> Self {
19467            self.set_event_type(field.into());
19468            self
19469        }
19470        ///Returns the value of `event_stream_head`, or the default value if `event_stream_head` is unset.
19471        pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
19472            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
19473                .predicate
19474            {
19475                field as _
19476            } else {
19477                super::EventStreamHeadFilter::default_instance() as _
19478            }
19479        }
19480        ///If `event_stream_head` is set, returns [`Some`] with the value; otherwise returns [`None`].
19481        pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
19482            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
19483                .predicate
19484            {
19485                Some(field as _)
19486            } else {
19487                None
19488            }
19489        }
19490        ///If `event_stream_head` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19491        pub fn event_stream_head_opt_mut(
19492            &mut self,
19493        ) -> Option<&mut super::EventStreamHeadFilter> {
19494            if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
19495                .predicate
19496            {
19497                Some(field as _)
19498            } else {
19499                None
19500            }
19501        }
19502        ///Returns a mutable reference to `event_stream_head`.
19503        ///If the field is unset, it is first initialized with the default value.
19504        ///If any other oneof field in the same oneof is set, it will be cleared.
19505        pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
19506            if self.event_stream_head_opt_mut().is_none() {
19507                self.predicate = Some(
19508                    super::transaction_literal::Predicate::EventStreamHead(
19509                        super::EventStreamHeadFilter::default(),
19510                    ),
19511                );
19512            }
19513            self.event_stream_head_opt_mut().unwrap()
19514        }
19515        ///Sets `event_stream_head` with the provided value.
19516        ///If any other oneof field in the same oneof is set, it will be cleared.
19517        pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
19518            &mut self,
19519            field: T,
19520        ) {
19521            self.predicate = Some(
19522                super::transaction_literal::Predicate::EventStreamHead(
19523                    field.into().into(),
19524                ),
19525            );
19526        }
19527        ///Sets `event_stream_head` with the provided value.
19528        ///If any other oneof field in the same oneof is set, it will be cleared.
19529        pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
19530            mut self,
19531            field: T,
19532        ) -> Self {
19533            self.set_event_stream_head(field.into());
19534            self
19535        }
19536        ///Returns the value of `package_write`, or the default value if `package_write` is unset.
19537        pub fn package_write(&self) -> &super::PackageWriteFilter {
19538            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
19539                .predicate
19540            {
19541                field as _
19542            } else {
19543                super::PackageWriteFilter::default_instance() as _
19544            }
19545        }
19546        ///If `package_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
19547        pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
19548            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
19549                .predicate
19550            {
19551                Some(field as _)
19552            } else {
19553                None
19554            }
19555        }
19556        ///If `package_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19557        pub fn package_write_opt_mut(
19558            &mut self,
19559        ) -> Option<&mut super::PackageWriteFilter> {
19560            if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
19561                .predicate
19562            {
19563                Some(field as _)
19564            } else {
19565                None
19566            }
19567        }
19568        ///Returns a mutable reference to `package_write`.
19569        ///If the field is unset, it is first initialized with the default value.
19570        ///If any other oneof field in the same oneof is set, it will be cleared.
19571        pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
19572            if self.package_write_opt_mut().is_none() {
19573                self.predicate = Some(
19574                    super::transaction_literal::Predicate::PackageWrite(
19575                        super::PackageWriteFilter::default(),
19576                    ),
19577                );
19578            }
19579            self.package_write_opt_mut().unwrap()
19580        }
19581        ///Sets `package_write` with the provided value.
19582        ///If any other oneof field in the same oneof is set, it will be cleared.
19583        pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
19584            &mut self,
19585            field: T,
19586        ) {
19587            self.predicate = Some(
19588                super::transaction_literal::Predicate::PackageWrite(field.into().into()),
19589            );
19590        }
19591        ///Sets `package_write` with the provided value.
19592        ///If any other oneof field in the same oneof is set, it will be cleared.
19593        pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
19594            mut self,
19595            field: T,
19596        ) -> Self {
19597            self.set_package_write(field.into());
19598            self
19599        }
19600    }
19601    impl super::TransactionTerm {
19602        pub const fn const_default() -> Self {
19603            Self { literals: Vec::new() }
19604        }
19605        #[doc(hidden)]
19606        pub fn default_instance() -> &'static Self {
19607            static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
19608            &DEFAULT
19609        }
19610        ///Returns the value of `literals`, or the default value if `literals` is unset.
19611        pub fn literals(&self) -> &[super::TransactionLiteral] {
19612            &self.literals
19613        }
19614        ///Returns a mutable reference to `literals`.
19615        ///If the field is unset, it is first initialized with the default value.
19616        pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
19617            &mut self.literals
19618        }
19619        ///Sets `literals` with the provided value.
19620        pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
19621            self.literals = field;
19622        }
19623        ///Sets `literals` with the provided value.
19624        pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
19625            self.set_literals(field);
19626            self
19627        }
19628    }
19629    impl super::TransferObjects {
19630        pub const fn const_default() -> Self {
19631            Self {
19632                objects: Vec::new(),
19633                address: None,
19634            }
19635        }
19636        #[doc(hidden)]
19637        pub fn default_instance() -> &'static Self {
19638            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
19639            &DEFAULT
19640        }
19641        ///Returns the value of `objects`, or the default value if `objects` is unset.
19642        pub fn objects(&self) -> &[super::Argument] {
19643            &self.objects
19644        }
19645        ///Returns a mutable reference to `objects`.
19646        ///If the field is unset, it is first initialized with the default value.
19647        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
19648            &mut self.objects
19649        }
19650        ///Sets `objects` with the provided value.
19651        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
19652            self.objects = field;
19653        }
19654        ///Sets `objects` with the provided value.
19655        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
19656            self.set_objects(field);
19657            self
19658        }
19659        ///Returns the value of `address`, or the default value if `address` is unset.
19660        pub fn address(&self) -> &super::Argument {
19661            self.address
19662                .as_ref()
19663                .map(|field| field as _)
19664                .unwrap_or_else(|| super::Argument::default_instance() as _)
19665        }
19666        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19667        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
19668            self.address.as_mut().map(|field| field as _)
19669        }
19670        ///Returns a mutable reference to `address`.
19671        ///If the field is unset, it is first initialized with the default value.
19672        pub fn address_mut(&mut self) -> &mut super::Argument {
19673            self.address.get_or_insert_default()
19674        }
19675        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
19676        pub fn address_opt(&self) -> Option<&super::Argument> {
19677            self.address.as_ref().map(|field| field as _)
19678        }
19679        ///Sets `address` with the provided value.
19680        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
19681            self.address = Some(field.into().into());
19682        }
19683        ///Sets `address` with the provided value.
19684        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
19685            self.set_address(field.into());
19686            self
19687        }
19688    }
19689    impl super::TypeArgumentError {
19690        pub const fn const_default() -> Self {
19691            Self {
19692                type_argument: None,
19693                kind: None,
19694            }
19695        }
19696        #[doc(hidden)]
19697        pub fn default_instance() -> &'static Self {
19698            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
19699            &DEFAULT
19700        }
19701        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19702        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
19703            self.type_argument.as_mut().map(|field| field as _)
19704        }
19705        ///Returns a mutable reference to `type_argument`.
19706        ///If the field is unset, it is first initialized with the default value.
19707        pub fn type_argument_mut(&mut self) -> &mut u32 {
19708            self.type_argument.get_or_insert_default()
19709        }
19710        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
19711        pub fn type_argument_opt(&self) -> Option<u32> {
19712            self.type_argument.as_ref().map(|field| *field)
19713        }
19714        ///Sets `type_argument` with the provided value.
19715        pub fn set_type_argument(&mut self, field: u32) {
19716            self.type_argument = Some(field);
19717        }
19718        ///Sets `type_argument` with the provided value.
19719        pub fn with_type_argument(mut self, field: u32) -> Self {
19720            self.set_type_argument(field);
19721            self
19722        }
19723        ///Sets `kind` with the provided value.
19724        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
19725            mut self,
19726            field: T,
19727        ) -> Self {
19728            self.set_kind(field.into());
19729            self
19730        }
19731    }
19732    impl super::TypeOrigin {
19733        pub const fn const_default() -> Self {
19734            Self {
19735                module_name: None,
19736                datatype_name: None,
19737                package_id: None,
19738            }
19739        }
19740        #[doc(hidden)]
19741        pub fn default_instance() -> &'static Self {
19742            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
19743            &DEFAULT
19744        }
19745        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19746        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
19747            self.module_name.as_mut().map(|field| field as _)
19748        }
19749        ///Returns a mutable reference to `module_name`.
19750        ///If the field is unset, it is first initialized with the default value.
19751        pub fn module_name_mut(&mut self) -> &mut String {
19752            self.module_name.get_or_insert_default()
19753        }
19754        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
19755        pub fn module_name_opt(&self) -> Option<&str> {
19756            self.module_name.as_ref().map(|field| field as _)
19757        }
19758        ///Sets `module_name` with the provided value.
19759        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
19760            self.module_name = Some(field.into().into());
19761        }
19762        ///Sets `module_name` with the provided value.
19763        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
19764            self.set_module_name(field.into());
19765            self
19766        }
19767        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19768        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
19769            self.datatype_name.as_mut().map(|field| field as _)
19770        }
19771        ///Returns a mutable reference to `datatype_name`.
19772        ///If the field is unset, it is first initialized with the default value.
19773        pub fn datatype_name_mut(&mut self) -> &mut String {
19774            self.datatype_name.get_or_insert_default()
19775        }
19776        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
19777        pub fn datatype_name_opt(&self) -> Option<&str> {
19778            self.datatype_name.as_ref().map(|field| field as _)
19779        }
19780        ///Sets `datatype_name` with the provided value.
19781        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
19782            self.datatype_name = Some(field.into().into());
19783        }
19784        ///Sets `datatype_name` with the provided value.
19785        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
19786            self.set_datatype_name(field.into());
19787            self
19788        }
19789        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19790        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
19791            self.package_id.as_mut().map(|field| field as _)
19792        }
19793        ///Returns a mutable reference to `package_id`.
19794        ///If the field is unset, it is first initialized with the default value.
19795        pub fn package_id_mut(&mut self) -> &mut String {
19796            self.package_id.get_or_insert_default()
19797        }
19798        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
19799        pub fn package_id_opt(&self) -> Option<&str> {
19800            self.package_id.as_ref().map(|field| field as _)
19801        }
19802        ///Sets `package_id` with the provided value.
19803        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
19804            self.package_id = Some(field.into().into());
19805        }
19806        ///Sets `package_id` with the provided value.
19807        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
19808            self.set_package_id(field.into());
19809            self
19810        }
19811    }
19812    impl super::TypeParameter {
19813        pub const fn const_default() -> Self {
19814            Self {
19815                constraints: Vec::new(),
19816                is_phantom: None,
19817            }
19818        }
19819        #[doc(hidden)]
19820        pub fn default_instance() -> &'static Self {
19821            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
19822            &DEFAULT
19823        }
19824        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19825        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
19826            self.is_phantom.as_mut().map(|field| field as _)
19827        }
19828        ///Returns a mutable reference to `is_phantom`.
19829        ///If the field is unset, it is first initialized with the default value.
19830        pub fn is_phantom_mut(&mut self) -> &mut bool {
19831            self.is_phantom.get_or_insert_default()
19832        }
19833        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
19834        pub fn is_phantom_opt(&self) -> Option<bool> {
19835            self.is_phantom.as_ref().map(|field| *field)
19836        }
19837        ///Sets `is_phantom` with the provided value.
19838        pub fn set_is_phantom(&mut self, field: bool) {
19839            self.is_phantom = Some(field);
19840        }
19841        ///Sets `is_phantom` with the provided value.
19842        pub fn with_is_phantom(mut self, field: bool) -> Self {
19843            self.set_is_phantom(field);
19844            self
19845        }
19846    }
19847    impl super::UnchangedConsensusObject {
19848        pub const fn const_default() -> Self {
19849            Self {
19850                kind: None,
19851                object_id: None,
19852                version: None,
19853                digest: None,
19854                object_type: None,
19855            }
19856        }
19857        #[doc(hidden)]
19858        pub fn default_instance() -> &'static Self {
19859            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
19860            &DEFAULT
19861        }
19862        ///Sets `kind` with the provided value.
19863        pub fn with_kind<
19864            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
19865        >(mut self, field: T) -> Self {
19866            self.set_kind(field.into());
19867            self
19868        }
19869        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19870        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
19871            self.object_id.as_mut().map(|field| field as _)
19872        }
19873        ///Returns a mutable reference to `object_id`.
19874        ///If the field is unset, it is first initialized with the default value.
19875        pub fn object_id_mut(&mut self) -> &mut String {
19876            self.object_id.get_or_insert_default()
19877        }
19878        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
19879        pub fn object_id_opt(&self) -> Option<&str> {
19880            self.object_id.as_ref().map(|field| field as _)
19881        }
19882        ///Sets `object_id` with the provided value.
19883        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
19884            self.object_id = Some(field.into().into());
19885        }
19886        ///Sets `object_id` with the provided value.
19887        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
19888            self.set_object_id(field.into());
19889            self
19890        }
19891        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19892        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
19893            self.version.as_mut().map(|field| field as _)
19894        }
19895        ///Returns a mutable reference to `version`.
19896        ///If the field is unset, it is first initialized with the default value.
19897        pub fn version_mut(&mut self) -> &mut u64 {
19898            self.version.get_or_insert_default()
19899        }
19900        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
19901        pub fn version_opt(&self) -> Option<u64> {
19902            self.version.as_ref().map(|field| *field)
19903        }
19904        ///Sets `version` with the provided value.
19905        pub fn set_version(&mut self, field: u64) {
19906            self.version = Some(field);
19907        }
19908        ///Sets `version` with the provided value.
19909        pub fn with_version(mut self, field: u64) -> Self {
19910            self.set_version(field);
19911            self
19912        }
19913        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19914        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
19915            self.digest.as_mut().map(|field| field as _)
19916        }
19917        ///Returns a mutable reference to `digest`.
19918        ///If the field is unset, it is first initialized with the default value.
19919        pub fn digest_mut(&mut self) -> &mut String {
19920            self.digest.get_or_insert_default()
19921        }
19922        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
19923        pub fn digest_opt(&self) -> Option<&str> {
19924            self.digest.as_ref().map(|field| field as _)
19925        }
19926        ///Sets `digest` with the provided value.
19927        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
19928            self.digest = Some(field.into().into());
19929        }
19930        ///Sets `digest` with the provided value.
19931        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
19932            self.set_digest(field.into());
19933            self
19934        }
19935        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
19936        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
19937            self.object_type.as_mut().map(|field| field as _)
19938        }
19939        ///Returns a mutable reference to `object_type`.
19940        ///If the field is unset, it is first initialized with the default value.
19941        pub fn object_type_mut(&mut self) -> &mut String {
19942            self.object_type.get_or_insert_default()
19943        }
19944        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
19945        pub fn object_type_opt(&self) -> Option<&str> {
19946            self.object_type.as_ref().map(|field| field as _)
19947        }
19948        ///Sets `object_type` with the provided value.
19949        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
19950            self.object_type = Some(field.into().into());
19951        }
19952        ///Sets `object_type` with the provided value.
19953        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
19954            self.set_object_type(field.into());
19955            self
19956        }
19957    }
19958    impl super::Upgrade {
19959        pub const fn const_default() -> Self {
19960            Self {
19961                modules: Vec::new(),
19962                dependencies: Vec::new(),
19963                package: None,
19964                ticket: None,
19965            }
19966        }
19967        #[doc(hidden)]
19968        pub fn default_instance() -> &'static Self {
19969            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
19970            &DEFAULT
19971        }
19972        ///Returns the value of `modules`, or the default value if `modules` is unset.
19973        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
19974            &self.modules
19975        }
19976        ///Returns a mutable reference to `modules`.
19977        ///If the field is unset, it is first initialized with the default value.
19978        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
19979            &mut self.modules
19980        }
19981        ///Sets `modules` with the provided value.
19982        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
19983            self.modules = field;
19984        }
19985        ///Sets `modules` with the provided value.
19986        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
19987            self.set_modules(field);
19988            self
19989        }
19990        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
19991        pub fn dependencies(&self) -> &[String] {
19992            &self.dependencies
19993        }
19994        ///Returns a mutable reference to `dependencies`.
19995        ///If the field is unset, it is first initialized with the default value.
19996        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
19997            &mut self.dependencies
19998        }
19999        ///Sets `dependencies` with the provided value.
20000        pub fn set_dependencies(&mut self, field: Vec<String>) {
20001            self.dependencies = field;
20002        }
20003        ///Sets `dependencies` with the provided value.
20004        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
20005            self.set_dependencies(field);
20006            self
20007        }
20008        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20009        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
20010            self.package.as_mut().map(|field| field as _)
20011        }
20012        ///Returns a mutable reference to `package`.
20013        ///If the field is unset, it is first initialized with the default value.
20014        pub fn package_mut(&mut self) -> &mut String {
20015            self.package.get_or_insert_default()
20016        }
20017        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
20018        pub fn package_opt(&self) -> Option<&str> {
20019            self.package.as_ref().map(|field| field as _)
20020        }
20021        ///Sets `package` with the provided value.
20022        pub fn set_package<T: Into<String>>(&mut self, field: T) {
20023            self.package = Some(field.into().into());
20024        }
20025        ///Sets `package` with the provided value.
20026        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
20027            self.set_package(field.into());
20028            self
20029        }
20030        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
20031        pub fn ticket(&self) -> &super::Argument {
20032            self.ticket
20033                .as_ref()
20034                .map(|field| field as _)
20035                .unwrap_or_else(|| super::Argument::default_instance() as _)
20036        }
20037        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20038        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
20039            self.ticket.as_mut().map(|field| field as _)
20040        }
20041        ///Returns a mutable reference to `ticket`.
20042        ///If the field is unset, it is first initialized with the default value.
20043        pub fn ticket_mut(&mut self) -> &mut super::Argument {
20044            self.ticket.get_or_insert_default()
20045        }
20046        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
20047        pub fn ticket_opt(&self) -> Option<&super::Argument> {
20048            self.ticket.as_ref().map(|field| field as _)
20049        }
20050        ///Sets `ticket` with the provided value.
20051        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
20052            self.ticket = Some(field.into().into());
20053        }
20054        ///Sets `ticket` with the provided value.
20055        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
20056            self.set_ticket(field.into());
20057            self
20058        }
20059    }
20060    impl super::UserSignature {
20061        pub const fn const_default() -> Self {
20062            Self {
20063                bcs: None,
20064                scheme: None,
20065                signature: None,
20066            }
20067        }
20068        #[doc(hidden)]
20069        pub fn default_instance() -> &'static Self {
20070            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
20071            &DEFAULT
20072        }
20073        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
20074        pub fn bcs(&self) -> &super::Bcs {
20075            self.bcs
20076                .as_ref()
20077                .map(|field| field as _)
20078                .unwrap_or_else(|| super::Bcs::default_instance() as _)
20079        }
20080        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20081        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20082            self.bcs.as_mut().map(|field| field as _)
20083        }
20084        ///Returns a mutable reference to `bcs`.
20085        ///If the field is unset, it is first initialized with the default value.
20086        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
20087            self.bcs.get_or_insert_default()
20088        }
20089        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
20090        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
20091            self.bcs.as_ref().map(|field| field as _)
20092        }
20093        ///Sets `bcs` with the provided value.
20094        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
20095            self.bcs = Some(field.into().into());
20096        }
20097        ///Sets `bcs` with the provided value.
20098        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20099            self.set_bcs(field.into());
20100            self
20101        }
20102        ///Sets `scheme` with the provided value.
20103        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
20104            self.set_scheme(field.into());
20105            self
20106        }
20107        ///Returns the value of `simple`, or the default value if `simple` is unset.
20108        pub fn simple(&self) -> &super::SimpleSignature {
20109            if let Some(super::user_signature::Signature::Simple(field)) = &self
20110                .signature
20111            {
20112                field as _
20113            } else {
20114                super::SimpleSignature::default_instance() as _
20115            }
20116        }
20117        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
20118        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
20119            if let Some(super::user_signature::Signature::Simple(field)) = &self
20120                .signature
20121            {
20122                Some(field as _)
20123            } else {
20124                None
20125            }
20126        }
20127        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20128        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20129            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
20130                .signature
20131            {
20132                Some(field as _)
20133            } else {
20134                None
20135            }
20136        }
20137        ///Returns a mutable reference to `simple`.
20138        ///If the field is unset, it is first initialized with the default value.
20139        ///If any other oneof field in the same oneof is set, it will be cleared.
20140        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
20141            if self.simple_opt_mut().is_none() {
20142                self.signature = Some(
20143                    super::user_signature::Signature::Simple(
20144                        super::SimpleSignature::default(),
20145                    ),
20146                );
20147            }
20148            self.simple_opt_mut().unwrap()
20149        }
20150        ///Sets `simple` with the provided value.
20151        ///If any other oneof field in the same oneof is set, it will be cleared.
20152        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20153            self.signature = Some(
20154                super::user_signature::Signature::Simple(field.into().into()),
20155            );
20156        }
20157        ///Sets `simple` with the provided value.
20158        ///If any other oneof field in the same oneof is set, it will be cleared.
20159        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
20160            self.set_simple(field.into());
20161            self
20162        }
20163        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
20164        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
20165            if let Some(super::user_signature::Signature::Multisig(field)) = &self
20166                .signature
20167            {
20168                field as _
20169            } else {
20170                super::MultisigAggregatedSignature::default_instance() as _
20171            }
20172        }
20173        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
20174        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
20175            if let Some(super::user_signature::Signature::Multisig(field)) = &self
20176                .signature
20177            {
20178                Some(field as _)
20179            } else {
20180                None
20181            }
20182        }
20183        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20184        pub fn multisig_opt_mut(
20185            &mut self,
20186        ) -> Option<&mut super::MultisigAggregatedSignature> {
20187            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
20188                .signature
20189            {
20190                Some(field as _)
20191            } else {
20192                None
20193            }
20194        }
20195        ///Returns a mutable reference to `multisig`.
20196        ///If the field is unset, it is first initialized with the default value.
20197        ///If any other oneof field in the same oneof is set, it will be cleared.
20198        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
20199            if self.multisig_opt_mut().is_none() {
20200                self.signature = Some(
20201                    super::user_signature::Signature::Multisig(
20202                        super::MultisigAggregatedSignature::default(),
20203                    ),
20204                );
20205            }
20206            self.multisig_opt_mut().unwrap()
20207        }
20208        ///Sets `multisig` with the provided value.
20209        ///If any other oneof field in the same oneof is set, it will be cleared.
20210        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
20211            &mut self,
20212            field: T,
20213        ) {
20214            self.signature = Some(
20215                super::user_signature::Signature::Multisig(field.into().into()),
20216            );
20217        }
20218        ///Sets `multisig` with the provided value.
20219        ///If any other oneof field in the same oneof is set, it will be cleared.
20220        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
20221            mut self,
20222            field: T,
20223        ) -> Self {
20224            self.set_multisig(field.into());
20225            self
20226        }
20227        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
20228        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
20229            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
20230                .signature
20231            {
20232                field as _
20233            } else {
20234                super::ZkLoginAuthenticator::default_instance() as _
20235            }
20236        }
20237        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
20238        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
20239            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
20240                .signature
20241            {
20242                Some(field as _)
20243            } else {
20244                None
20245            }
20246        }
20247        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20248        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
20249            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
20250                .signature
20251            {
20252                Some(field as _)
20253            } else {
20254                None
20255            }
20256        }
20257        ///Returns a mutable reference to `zklogin`.
20258        ///If the field is unset, it is first initialized with the default value.
20259        ///If any other oneof field in the same oneof is set, it will be cleared.
20260        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
20261            if self.zklogin_opt_mut().is_none() {
20262                self.signature = Some(
20263                    super::user_signature::Signature::Zklogin(
20264                        super::ZkLoginAuthenticator::default(),
20265                    ),
20266                );
20267            }
20268            self.zklogin_opt_mut().unwrap()
20269        }
20270        ///Sets `zklogin` with the provided value.
20271        ///If any other oneof field in the same oneof is set, it will be cleared.
20272        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
20273            self.signature = Some(
20274                super::user_signature::Signature::Zklogin(field.into().into()),
20275            );
20276        }
20277        ///Sets `zklogin` with the provided value.
20278        ///If any other oneof field in the same oneof is set, it will be cleared.
20279        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
20280            mut self,
20281            field: T,
20282        ) -> Self {
20283            self.set_zklogin(field.into());
20284            self
20285        }
20286        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
20287        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
20288            if let Some(super::user_signature::Signature::Passkey(field)) = &self
20289                .signature
20290            {
20291                field as _
20292            } else {
20293                super::PasskeyAuthenticator::default_instance() as _
20294            }
20295        }
20296        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
20297        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
20298            if let Some(super::user_signature::Signature::Passkey(field)) = &self
20299                .signature
20300            {
20301                Some(field as _)
20302            } else {
20303                None
20304            }
20305        }
20306        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20307        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
20308            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
20309                .signature
20310            {
20311                Some(field as _)
20312            } else {
20313                None
20314            }
20315        }
20316        ///Returns a mutable reference to `passkey`.
20317        ///If the field is unset, it is first initialized with the default value.
20318        ///If any other oneof field in the same oneof is set, it will be cleared.
20319        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
20320            if self.passkey_opt_mut().is_none() {
20321                self.signature = Some(
20322                    super::user_signature::Signature::Passkey(
20323                        super::PasskeyAuthenticator::default(),
20324                    ),
20325                );
20326            }
20327            self.passkey_opt_mut().unwrap()
20328        }
20329        ///Sets `passkey` with the provided value.
20330        ///If any other oneof field in the same oneof is set, it will be cleared.
20331        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
20332            self.signature = Some(
20333                super::user_signature::Signature::Passkey(field.into().into()),
20334            );
20335        }
20336        ///Sets `passkey` with the provided value.
20337        ///If any other oneof field in the same oneof is set, it will be cleared.
20338        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
20339            mut self,
20340            field: T,
20341        ) -> Self {
20342            self.set_passkey(field.into());
20343            self
20344        }
20345    }
20346    impl super::Validator {
20347        pub const fn const_default() -> Self {
20348            Self {
20349                name: None,
20350                address: None,
20351                description: None,
20352                image_url: None,
20353                project_url: None,
20354                protocol_public_key: None,
20355                proof_of_possession: None,
20356                network_public_key: None,
20357                worker_public_key: None,
20358                network_address: None,
20359                p2p_address: None,
20360                primary_address: None,
20361                worker_address: None,
20362                next_epoch_protocol_public_key: None,
20363                next_epoch_proof_of_possession: None,
20364                next_epoch_network_public_key: None,
20365                next_epoch_worker_public_key: None,
20366                next_epoch_network_address: None,
20367                next_epoch_p2p_address: None,
20368                next_epoch_primary_address: None,
20369                next_epoch_worker_address: None,
20370                metadata_extra_fields: None,
20371                voting_power: None,
20372                operation_cap_id: None,
20373                gas_price: None,
20374                staking_pool: None,
20375                commission_rate: None,
20376                next_epoch_stake: None,
20377                next_epoch_gas_price: None,
20378                next_epoch_commission_rate: None,
20379                extra_fields: None,
20380            }
20381        }
20382        #[doc(hidden)]
20383        pub fn default_instance() -> &'static Self {
20384            static DEFAULT: super::Validator = super::Validator::const_default();
20385            &DEFAULT
20386        }
20387        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20388        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
20389            self.name.as_mut().map(|field| field as _)
20390        }
20391        ///Returns a mutable reference to `name`.
20392        ///If the field is unset, it is first initialized with the default value.
20393        pub fn name_mut(&mut self) -> &mut String {
20394            self.name.get_or_insert_default()
20395        }
20396        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
20397        pub fn name_opt(&self) -> Option<&str> {
20398            self.name.as_ref().map(|field| field as _)
20399        }
20400        ///Sets `name` with the provided value.
20401        pub fn set_name<T: Into<String>>(&mut self, field: T) {
20402            self.name = Some(field.into().into());
20403        }
20404        ///Sets `name` with the provided value.
20405        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
20406            self.set_name(field.into());
20407            self
20408        }
20409        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20410        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20411            self.address.as_mut().map(|field| field as _)
20412        }
20413        ///Returns a mutable reference to `address`.
20414        ///If the field is unset, it is first initialized with the default value.
20415        pub fn address_mut(&mut self) -> &mut String {
20416            self.address.get_or_insert_default()
20417        }
20418        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20419        pub fn address_opt(&self) -> Option<&str> {
20420            self.address.as_ref().map(|field| field as _)
20421        }
20422        ///Sets `address` with the provided value.
20423        pub fn set_address<T: Into<String>>(&mut self, field: T) {
20424            self.address = Some(field.into().into());
20425        }
20426        ///Sets `address` with the provided value.
20427        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20428            self.set_address(field.into());
20429            self
20430        }
20431        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20432        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
20433            self.description.as_mut().map(|field| field as _)
20434        }
20435        ///Returns a mutable reference to `description`.
20436        ///If the field is unset, it is first initialized with the default value.
20437        pub fn description_mut(&mut self) -> &mut String {
20438            self.description.get_or_insert_default()
20439        }
20440        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
20441        pub fn description_opt(&self) -> Option<&str> {
20442            self.description.as_ref().map(|field| field as _)
20443        }
20444        ///Sets `description` with the provided value.
20445        pub fn set_description<T: Into<String>>(&mut self, field: T) {
20446            self.description = Some(field.into().into());
20447        }
20448        ///Sets `description` with the provided value.
20449        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
20450            self.set_description(field.into());
20451            self
20452        }
20453        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20454        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
20455            self.image_url.as_mut().map(|field| field as _)
20456        }
20457        ///Returns a mutable reference to `image_url`.
20458        ///If the field is unset, it is first initialized with the default value.
20459        pub fn image_url_mut(&mut self) -> &mut String {
20460            self.image_url.get_or_insert_default()
20461        }
20462        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
20463        pub fn image_url_opt(&self) -> Option<&str> {
20464            self.image_url.as_ref().map(|field| field as _)
20465        }
20466        ///Sets `image_url` with the provided value.
20467        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
20468            self.image_url = Some(field.into().into());
20469        }
20470        ///Sets `image_url` with the provided value.
20471        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
20472            self.set_image_url(field.into());
20473            self
20474        }
20475        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20476        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
20477            self.project_url.as_mut().map(|field| field as _)
20478        }
20479        ///Returns a mutable reference to `project_url`.
20480        ///If the field is unset, it is first initialized with the default value.
20481        pub fn project_url_mut(&mut self) -> &mut String {
20482            self.project_url.get_or_insert_default()
20483        }
20484        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
20485        pub fn project_url_opt(&self) -> Option<&str> {
20486            self.project_url.as_ref().map(|field| field as _)
20487        }
20488        ///Sets `project_url` with the provided value.
20489        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
20490            self.project_url = Some(field.into().into());
20491        }
20492        ///Sets `project_url` with the provided value.
20493        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
20494            self.set_project_url(field.into());
20495            self
20496        }
20497        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
20498        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
20499            self.protocol_public_key.as_ref().map(|field| field as _)
20500        }
20501        ///Sets `protocol_public_key` with the provided value.
20502        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20503            &mut self,
20504            field: T,
20505        ) {
20506            self.protocol_public_key = Some(field.into().into());
20507        }
20508        ///Sets `protocol_public_key` with the provided value.
20509        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20510            mut self,
20511            field: T,
20512        ) -> Self {
20513            self.set_protocol_public_key(field.into());
20514            self
20515        }
20516        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
20517        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
20518            self.proof_of_possession.as_ref().map(|field| field as _)
20519        }
20520        ///Sets `proof_of_possession` with the provided value.
20521        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20522            &mut self,
20523            field: T,
20524        ) {
20525            self.proof_of_possession = Some(field.into().into());
20526        }
20527        ///Sets `proof_of_possession` with the provided value.
20528        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20529            mut self,
20530            field: T,
20531        ) -> Self {
20532            self.set_proof_of_possession(field.into());
20533            self
20534        }
20535        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
20536        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
20537            self.network_public_key.as_ref().map(|field| field as _)
20538        }
20539        ///Sets `network_public_key` with the provided value.
20540        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
20541            &mut self,
20542            field: T,
20543        ) {
20544            self.network_public_key = Some(field.into().into());
20545        }
20546        ///Sets `network_public_key` with the provided value.
20547        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
20548            mut self,
20549            field: T,
20550        ) -> Self {
20551            self.set_network_public_key(field.into());
20552            self
20553        }
20554        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
20555        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
20556            self.worker_public_key.as_ref().map(|field| field as _)
20557        }
20558        ///Sets `worker_public_key` with the provided value.
20559        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20560            &mut self,
20561            field: T,
20562        ) {
20563            self.worker_public_key = Some(field.into().into());
20564        }
20565        ///Sets `worker_public_key` with the provided value.
20566        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20567            mut self,
20568            field: T,
20569        ) -> Self {
20570            self.set_worker_public_key(field.into());
20571            self
20572        }
20573        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20574        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
20575            self.network_address.as_mut().map(|field| field as _)
20576        }
20577        ///Returns a mutable reference to `network_address`.
20578        ///If the field is unset, it is first initialized with the default value.
20579        pub fn network_address_mut(&mut self) -> &mut String {
20580            self.network_address.get_or_insert_default()
20581        }
20582        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20583        pub fn network_address_opt(&self) -> Option<&str> {
20584            self.network_address.as_ref().map(|field| field as _)
20585        }
20586        ///Sets `network_address` with the provided value.
20587        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
20588            self.network_address = Some(field.into().into());
20589        }
20590        ///Sets `network_address` with the provided value.
20591        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
20592            self.set_network_address(field.into());
20593            self
20594        }
20595        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20596        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
20597            self.p2p_address.as_mut().map(|field| field as _)
20598        }
20599        ///Returns a mutable reference to `p2p_address`.
20600        ///If the field is unset, it is first initialized with the default value.
20601        pub fn p2p_address_mut(&mut self) -> &mut String {
20602            self.p2p_address.get_or_insert_default()
20603        }
20604        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20605        pub fn p2p_address_opt(&self) -> Option<&str> {
20606            self.p2p_address.as_ref().map(|field| field as _)
20607        }
20608        ///Sets `p2p_address` with the provided value.
20609        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
20610            self.p2p_address = Some(field.into().into());
20611        }
20612        ///Sets `p2p_address` with the provided value.
20613        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
20614            self.set_p2p_address(field.into());
20615            self
20616        }
20617        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20618        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
20619            self.primary_address.as_mut().map(|field| field as _)
20620        }
20621        ///Returns a mutable reference to `primary_address`.
20622        ///If the field is unset, it is first initialized with the default value.
20623        pub fn primary_address_mut(&mut self) -> &mut String {
20624            self.primary_address.get_or_insert_default()
20625        }
20626        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20627        pub fn primary_address_opt(&self) -> Option<&str> {
20628            self.primary_address.as_ref().map(|field| field as _)
20629        }
20630        ///Sets `primary_address` with the provided value.
20631        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
20632            self.primary_address = Some(field.into().into());
20633        }
20634        ///Sets `primary_address` with the provided value.
20635        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
20636            self.set_primary_address(field.into());
20637            self
20638        }
20639        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20640        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
20641            self.worker_address.as_mut().map(|field| field as _)
20642        }
20643        ///Returns a mutable reference to `worker_address`.
20644        ///If the field is unset, it is first initialized with the default value.
20645        pub fn worker_address_mut(&mut self) -> &mut String {
20646            self.worker_address.get_or_insert_default()
20647        }
20648        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20649        pub fn worker_address_opt(&self) -> Option<&str> {
20650            self.worker_address.as_ref().map(|field| field as _)
20651        }
20652        ///Sets `worker_address` with the provided value.
20653        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
20654            self.worker_address = Some(field.into().into());
20655        }
20656        ///Sets `worker_address` with the provided value.
20657        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
20658            self.set_worker_address(field.into());
20659            self
20660        }
20661        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
20662        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
20663            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
20664        }
20665        ///Sets `next_epoch_protocol_public_key` with the provided value.
20666        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20667            &mut self,
20668            field: T,
20669        ) {
20670            self.next_epoch_protocol_public_key = Some(field.into().into());
20671        }
20672        ///Sets `next_epoch_protocol_public_key` with the provided value.
20673        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20674            mut self,
20675            field: T,
20676        ) -> Self {
20677            self.set_next_epoch_protocol_public_key(field.into());
20678            self
20679        }
20680        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
20681        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
20682            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
20683        }
20684        ///Sets `next_epoch_proof_of_possession` with the provided value.
20685        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20686            &mut self,
20687            field: T,
20688        ) {
20689            self.next_epoch_proof_of_possession = Some(field.into().into());
20690        }
20691        ///Sets `next_epoch_proof_of_possession` with the provided value.
20692        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20693            mut self,
20694            field: T,
20695        ) -> Self {
20696            self.set_next_epoch_proof_of_possession(field.into());
20697            self
20698        }
20699        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
20700        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
20701            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
20702        }
20703        ///Sets `next_epoch_network_public_key` with the provided value.
20704        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
20705            &mut self,
20706            field: T,
20707        ) {
20708            self.next_epoch_network_public_key = Some(field.into().into());
20709        }
20710        ///Sets `next_epoch_network_public_key` with the provided value.
20711        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
20712            mut self,
20713            field: T,
20714        ) -> Self {
20715            self.set_next_epoch_network_public_key(field.into());
20716            self
20717        }
20718        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
20719        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
20720            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
20721        }
20722        ///Sets `next_epoch_worker_public_key` with the provided value.
20723        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20724            &mut self,
20725            field: T,
20726        ) {
20727            self.next_epoch_worker_public_key = Some(field.into().into());
20728        }
20729        ///Sets `next_epoch_worker_public_key` with the provided value.
20730        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20731            mut self,
20732            field: T,
20733        ) -> Self {
20734            self.set_next_epoch_worker_public_key(field.into());
20735            self
20736        }
20737        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20738        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
20739            self.next_epoch_network_address.as_mut().map(|field| field as _)
20740        }
20741        ///Returns a mutable reference to `next_epoch_network_address`.
20742        ///If the field is unset, it is first initialized with the default value.
20743        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
20744            self.next_epoch_network_address.get_or_insert_default()
20745        }
20746        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20747        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
20748            self.next_epoch_network_address.as_ref().map(|field| field as _)
20749        }
20750        ///Sets `next_epoch_network_address` with the provided value.
20751        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
20752            self.next_epoch_network_address = Some(field.into().into());
20753        }
20754        ///Sets `next_epoch_network_address` with the provided value.
20755        pub fn with_next_epoch_network_address<T: Into<String>>(
20756            mut self,
20757            field: T,
20758        ) -> Self {
20759            self.set_next_epoch_network_address(field.into());
20760            self
20761        }
20762        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20763        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
20764            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
20765        }
20766        ///Returns a mutable reference to `next_epoch_p2p_address`.
20767        ///If the field is unset, it is first initialized with the default value.
20768        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
20769            self.next_epoch_p2p_address.get_or_insert_default()
20770        }
20771        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20772        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
20773            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
20774        }
20775        ///Sets `next_epoch_p2p_address` with the provided value.
20776        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
20777            self.next_epoch_p2p_address = Some(field.into().into());
20778        }
20779        ///Sets `next_epoch_p2p_address` with the provided value.
20780        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
20781            self.set_next_epoch_p2p_address(field.into());
20782            self
20783        }
20784        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20785        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
20786            self.next_epoch_primary_address.as_mut().map(|field| field as _)
20787        }
20788        ///Returns a mutable reference to `next_epoch_primary_address`.
20789        ///If the field is unset, it is first initialized with the default value.
20790        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
20791            self.next_epoch_primary_address.get_or_insert_default()
20792        }
20793        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20794        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
20795            self.next_epoch_primary_address.as_ref().map(|field| field as _)
20796        }
20797        ///Sets `next_epoch_primary_address` with the provided value.
20798        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
20799            self.next_epoch_primary_address = Some(field.into().into());
20800        }
20801        ///Sets `next_epoch_primary_address` with the provided value.
20802        pub fn with_next_epoch_primary_address<T: Into<String>>(
20803            mut self,
20804            field: T,
20805        ) -> Self {
20806            self.set_next_epoch_primary_address(field.into());
20807            self
20808        }
20809        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20810        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
20811            self.next_epoch_worker_address.as_mut().map(|field| field as _)
20812        }
20813        ///Returns a mutable reference to `next_epoch_worker_address`.
20814        ///If the field is unset, it is first initialized with the default value.
20815        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
20816            self.next_epoch_worker_address.get_or_insert_default()
20817        }
20818        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
20819        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
20820            self.next_epoch_worker_address.as_ref().map(|field| field as _)
20821        }
20822        ///Sets `next_epoch_worker_address` with the provided value.
20823        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
20824            self.next_epoch_worker_address = Some(field.into().into());
20825        }
20826        ///Sets `next_epoch_worker_address` with the provided value.
20827        pub fn with_next_epoch_worker_address<T: Into<String>>(
20828            mut self,
20829            field: T,
20830        ) -> Self {
20831            self.set_next_epoch_worker_address(field.into());
20832            self
20833        }
20834        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
20835        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
20836            self.metadata_extra_fields
20837                .as_ref()
20838                .map(|field| field as _)
20839                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20840        }
20841        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20842        pub fn metadata_extra_fields_opt_mut(
20843            &mut self,
20844        ) -> Option<&mut super::MoveTable> {
20845            self.metadata_extra_fields.as_mut().map(|field| field as _)
20846        }
20847        ///Returns a mutable reference to `metadata_extra_fields`.
20848        ///If the field is unset, it is first initialized with the default value.
20849        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
20850            self.metadata_extra_fields.get_or_insert_default()
20851        }
20852        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
20853        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
20854            self.metadata_extra_fields.as_ref().map(|field| field as _)
20855        }
20856        ///Sets `metadata_extra_fields` with the provided value.
20857        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
20858            &mut self,
20859            field: T,
20860        ) {
20861            self.metadata_extra_fields = Some(field.into().into());
20862        }
20863        ///Sets `metadata_extra_fields` with the provided value.
20864        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
20865            mut self,
20866            field: T,
20867        ) -> Self {
20868            self.set_metadata_extra_fields(field.into());
20869            self
20870        }
20871        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20872        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
20873            self.voting_power.as_mut().map(|field| field as _)
20874        }
20875        ///Returns a mutable reference to `voting_power`.
20876        ///If the field is unset, it is first initialized with the default value.
20877        pub fn voting_power_mut(&mut self) -> &mut u64 {
20878            self.voting_power.get_or_insert_default()
20879        }
20880        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
20881        pub fn voting_power_opt(&self) -> Option<u64> {
20882            self.voting_power.as_ref().map(|field| *field)
20883        }
20884        ///Sets `voting_power` with the provided value.
20885        pub fn set_voting_power(&mut self, field: u64) {
20886            self.voting_power = Some(field);
20887        }
20888        ///Sets `voting_power` with the provided value.
20889        pub fn with_voting_power(mut self, field: u64) -> Self {
20890            self.set_voting_power(field);
20891            self
20892        }
20893        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20894        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
20895            self.operation_cap_id.as_mut().map(|field| field as _)
20896        }
20897        ///Returns a mutable reference to `operation_cap_id`.
20898        ///If the field is unset, it is first initialized with the default value.
20899        pub fn operation_cap_id_mut(&mut self) -> &mut String {
20900            self.operation_cap_id.get_or_insert_default()
20901        }
20902        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
20903        pub fn operation_cap_id_opt(&self) -> Option<&str> {
20904            self.operation_cap_id.as_ref().map(|field| field as _)
20905        }
20906        ///Sets `operation_cap_id` with the provided value.
20907        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
20908            self.operation_cap_id = Some(field.into().into());
20909        }
20910        ///Sets `operation_cap_id` with the provided value.
20911        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
20912            self.set_operation_cap_id(field.into());
20913            self
20914        }
20915        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20916        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
20917            self.gas_price.as_mut().map(|field| field as _)
20918        }
20919        ///Returns a mutable reference to `gas_price`.
20920        ///If the field is unset, it is first initialized with the default value.
20921        pub fn gas_price_mut(&mut self) -> &mut u64 {
20922            self.gas_price.get_or_insert_default()
20923        }
20924        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
20925        pub fn gas_price_opt(&self) -> Option<u64> {
20926            self.gas_price.as_ref().map(|field| *field)
20927        }
20928        ///Sets `gas_price` with the provided value.
20929        pub fn set_gas_price(&mut self, field: u64) {
20930            self.gas_price = Some(field);
20931        }
20932        ///Sets `gas_price` with the provided value.
20933        pub fn with_gas_price(mut self, field: u64) -> Self {
20934            self.set_gas_price(field);
20935            self
20936        }
20937        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
20938        pub fn staking_pool(&self) -> &super::StakingPool {
20939            self.staking_pool
20940                .as_ref()
20941                .map(|field| field as _)
20942                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
20943        }
20944        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20945        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
20946            self.staking_pool.as_mut().map(|field| field as _)
20947        }
20948        ///Returns a mutable reference to `staking_pool`.
20949        ///If the field is unset, it is first initialized with the default value.
20950        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
20951            self.staking_pool.get_or_insert_default()
20952        }
20953        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
20954        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
20955            self.staking_pool.as_ref().map(|field| field as _)
20956        }
20957        ///Sets `staking_pool` with the provided value.
20958        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
20959            self.staking_pool = Some(field.into().into());
20960        }
20961        ///Sets `staking_pool` with the provided value.
20962        pub fn with_staking_pool<T: Into<super::StakingPool>>(
20963            mut self,
20964            field: T,
20965        ) -> Self {
20966            self.set_staking_pool(field.into());
20967            self
20968        }
20969        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20970        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
20971            self.commission_rate.as_mut().map(|field| field as _)
20972        }
20973        ///Returns a mutable reference to `commission_rate`.
20974        ///If the field is unset, it is first initialized with the default value.
20975        pub fn commission_rate_mut(&mut self) -> &mut u64 {
20976            self.commission_rate.get_or_insert_default()
20977        }
20978        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
20979        pub fn commission_rate_opt(&self) -> Option<u64> {
20980            self.commission_rate.as_ref().map(|field| *field)
20981        }
20982        ///Sets `commission_rate` with the provided value.
20983        pub fn set_commission_rate(&mut self, field: u64) {
20984            self.commission_rate = Some(field);
20985        }
20986        ///Sets `commission_rate` with the provided value.
20987        pub fn with_commission_rate(mut self, field: u64) -> Self {
20988            self.set_commission_rate(field);
20989            self
20990        }
20991        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
20992        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
20993            self.next_epoch_stake.as_mut().map(|field| field as _)
20994        }
20995        ///Returns a mutable reference to `next_epoch_stake`.
20996        ///If the field is unset, it is first initialized with the default value.
20997        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
20998            self.next_epoch_stake.get_or_insert_default()
20999        }
21000        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
21001        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
21002            self.next_epoch_stake.as_ref().map(|field| *field)
21003        }
21004        ///Sets `next_epoch_stake` with the provided value.
21005        pub fn set_next_epoch_stake(&mut self, field: u64) {
21006            self.next_epoch_stake = Some(field);
21007        }
21008        ///Sets `next_epoch_stake` with the provided value.
21009        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
21010            self.set_next_epoch_stake(field);
21011            self
21012        }
21013        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21014        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
21015            self.next_epoch_gas_price.as_mut().map(|field| field as _)
21016        }
21017        ///Returns a mutable reference to `next_epoch_gas_price`.
21018        ///If the field is unset, it is first initialized with the default value.
21019        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
21020            self.next_epoch_gas_price.get_or_insert_default()
21021        }
21022        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
21023        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
21024            self.next_epoch_gas_price.as_ref().map(|field| *field)
21025        }
21026        ///Sets `next_epoch_gas_price` with the provided value.
21027        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
21028            self.next_epoch_gas_price = Some(field);
21029        }
21030        ///Sets `next_epoch_gas_price` with the provided value.
21031        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
21032            self.set_next_epoch_gas_price(field);
21033            self
21034        }
21035        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21036        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
21037            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
21038        }
21039        ///Returns a mutable reference to `next_epoch_commission_rate`.
21040        ///If the field is unset, it is first initialized with the default value.
21041        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
21042            self.next_epoch_commission_rate.get_or_insert_default()
21043        }
21044        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
21045        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
21046            self.next_epoch_commission_rate.as_ref().map(|field| *field)
21047        }
21048        ///Sets `next_epoch_commission_rate` with the provided value.
21049        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
21050            self.next_epoch_commission_rate = Some(field);
21051        }
21052        ///Sets `next_epoch_commission_rate` with the provided value.
21053        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
21054            self.set_next_epoch_commission_rate(field);
21055            self
21056        }
21057        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
21058        pub fn extra_fields(&self) -> &super::MoveTable {
21059            self.extra_fields
21060                .as_ref()
21061                .map(|field| field as _)
21062                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21063        }
21064        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21065        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21066            self.extra_fields.as_mut().map(|field| field as _)
21067        }
21068        ///Returns a mutable reference to `extra_fields`.
21069        ///If the field is unset, it is first initialized with the default value.
21070        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
21071            self.extra_fields.get_or_insert_default()
21072        }
21073        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
21074        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
21075            self.extra_fields.as_ref().map(|field| field as _)
21076        }
21077        ///Sets `extra_fields` with the provided value.
21078        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
21079            self.extra_fields = Some(field.into().into());
21080        }
21081        ///Sets `extra_fields` with the provided value.
21082        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
21083            self.set_extra_fields(field.into());
21084            self
21085        }
21086    }
21087    impl super::ValidatorAggregatedSignature {
21088        pub const fn const_default() -> Self {
21089            Self {
21090                epoch: None,
21091                signature: None,
21092                bitmap: None,
21093            }
21094        }
21095        #[doc(hidden)]
21096        pub fn default_instance() -> &'static Self {
21097            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
21098            &DEFAULT
21099        }
21100        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21101        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
21102            self.epoch.as_mut().map(|field| field as _)
21103        }
21104        ///Returns a mutable reference to `epoch`.
21105        ///If the field is unset, it is first initialized with the default value.
21106        pub fn epoch_mut(&mut self) -> &mut u64 {
21107            self.epoch.get_or_insert_default()
21108        }
21109        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
21110        pub fn epoch_opt(&self) -> Option<u64> {
21111            self.epoch.as_ref().map(|field| *field)
21112        }
21113        ///Sets `epoch` with the provided value.
21114        pub fn set_epoch(&mut self, field: u64) {
21115            self.epoch = Some(field);
21116        }
21117        ///Sets `epoch` with the provided value.
21118        pub fn with_epoch(mut self, field: u64) -> Self {
21119            self.set_epoch(field);
21120            self
21121        }
21122        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
21123        pub fn signature_opt(&self) -> Option<&[u8]> {
21124            self.signature.as_ref().map(|field| field as _)
21125        }
21126        ///Sets `signature` with the provided value.
21127        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21128            self.signature = Some(field.into().into());
21129        }
21130        ///Sets `signature` with the provided value.
21131        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
21132            mut self,
21133            field: T,
21134        ) -> Self {
21135            self.set_signature(field.into());
21136            self
21137        }
21138        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
21139        pub fn bitmap_opt(&self) -> Option<&[u8]> {
21140            self.bitmap.as_ref().map(|field| field as _)
21141        }
21142        ///Sets `bitmap` with the provided value.
21143        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21144            self.bitmap = Some(field.into().into());
21145        }
21146        ///Sets `bitmap` with the provided value.
21147        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
21148            self.set_bitmap(field.into());
21149            self
21150        }
21151    }
21152    impl super::ValidatorCommittee {
21153        pub const fn const_default() -> Self {
21154            Self {
21155                epoch: None,
21156                members: Vec::new(),
21157            }
21158        }
21159        #[doc(hidden)]
21160        pub fn default_instance() -> &'static Self {
21161            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
21162            &DEFAULT
21163        }
21164        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21165        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
21166            self.epoch.as_mut().map(|field| field as _)
21167        }
21168        ///Returns a mutable reference to `epoch`.
21169        ///If the field is unset, it is first initialized with the default value.
21170        pub fn epoch_mut(&mut self) -> &mut u64 {
21171            self.epoch.get_or_insert_default()
21172        }
21173        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
21174        pub fn epoch_opt(&self) -> Option<u64> {
21175            self.epoch.as_ref().map(|field| *field)
21176        }
21177        ///Sets `epoch` with the provided value.
21178        pub fn set_epoch(&mut self, field: u64) {
21179            self.epoch = Some(field);
21180        }
21181        ///Sets `epoch` with the provided value.
21182        pub fn with_epoch(mut self, field: u64) -> Self {
21183            self.set_epoch(field);
21184            self
21185        }
21186        ///Returns the value of `members`, or the default value if `members` is unset.
21187        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
21188            &self.members
21189        }
21190        ///Returns a mutable reference to `members`.
21191        ///If the field is unset, it is first initialized with the default value.
21192        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
21193            &mut self.members
21194        }
21195        ///Sets `members` with the provided value.
21196        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
21197            self.members = field;
21198        }
21199        ///Sets `members` with the provided value.
21200        pub fn with_members(
21201            mut self,
21202            field: Vec<super::ValidatorCommitteeMember>,
21203        ) -> Self {
21204            self.set_members(field);
21205            self
21206        }
21207    }
21208    impl super::ValidatorCommitteeMember {
21209        pub const fn const_default() -> Self {
21210            Self {
21211                public_key: None,
21212                weight: None,
21213            }
21214        }
21215        #[doc(hidden)]
21216        pub fn default_instance() -> &'static Self {
21217            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
21218            &DEFAULT
21219        }
21220        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
21221        pub fn public_key_opt(&self) -> Option<&[u8]> {
21222            self.public_key.as_ref().map(|field| field as _)
21223        }
21224        ///Sets `public_key` with the provided value.
21225        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21226            self.public_key = Some(field.into().into());
21227        }
21228        ///Sets `public_key` with the provided value.
21229        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
21230            mut self,
21231            field: T,
21232        ) -> Self {
21233            self.set_public_key(field.into());
21234            self
21235        }
21236        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21237        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
21238            self.weight.as_mut().map(|field| field as _)
21239        }
21240        ///Returns a mutable reference to `weight`.
21241        ///If the field is unset, it is first initialized with the default value.
21242        pub fn weight_mut(&mut self) -> &mut u64 {
21243            self.weight.get_or_insert_default()
21244        }
21245        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
21246        pub fn weight_opt(&self) -> Option<u64> {
21247            self.weight.as_ref().map(|field| *field)
21248        }
21249        ///Sets `weight` with the provided value.
21250        pub fn set_weight(&mut self, field: u64) {
21251            self.weight = Some(field);
21252        }
21253        ///Sets `weight` with the provided value.
21254        pub fn with_weight(mut self, field: u64) -> Self {
21255            self.set_weight(field);
21256            self
21257        }
21258    }
21259    impl super::ValidatorExecutionTimeObservation {
21260        pub const fn const_default() -> Self {
21261            Self {
21262                validator: None,
21263                duration: None,
21264            }
21265        }
21266        #[doc(hidden)]
21267        pub fn default_instance() -> &'static Self {
21268            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
21269            &DEFAULT
21270        }
21271        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
21272        pub fn validator_opt(&self) -> Option<&[u8]> {
21273            self.validator.as_ref().map(|field| field as _)
21274        }
21275        ///Sets `validator` with the provided value.
21276        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21277            self.validator = Some(field.into().into());
21278        }
21279        ///Sets `validator` with the provided value.
21280        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
21281            mut self,
21282            field: T,
21283        ) -> Self {
21284            self.set_validator(field.into());
21285            self
21286        }
21287        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21288        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
21289            self.duration.as_mut().map(|field| field as _)
21290        }
21291        ///Returns a mutable reference to `duration`.
21292        ///If the field is unset, it is first initialized with the default value.
21293        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
21294            self.duration.get_or_insert_default()
21295        }
21296        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
21297        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
21298            self.duration.as_ref().map(|field| field as _)
21299        }
21300        ///Sets `duration` with the provided value.
21301        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
21302            self.duration = Some(field.into().into());
21303        }
21304        ///Sets `duration` with the provided value.
21305        pub fn with_duration<T: Into<::prost_types::Duration>>(
21306            mut self,
21307            field: T,
21308        ) -> Self {
21309            self.set_duration(field.into());
21310            self
21311        }
21312    }
21313    impl super::ValidatorReportRecord {
21314        pub const fn const_default() -> Self {
21315            Self {
21316                reported: None,
21317                reporters: Vec::new(),
21318            }
21319        }
21320        #[doc(hidden)]
21321        pub fn default_instance() -> &'static Self {
21322            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
21323            &DEFAULT
21324        }
21325        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21326        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
21327            self.reported.as_mut().map(|field| field as _)
21328        }
21329        ///Returns a mutable reference to `reported`.
21330        ///If the field is unset, it is first initialized with the default value.
21331        pub fn reported_mut(&mut self) -> &mut String {
21332            self.reported.get_or_insert_default()
21333        }
21334        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
21335        pub fn reported_opt(&self) -> Option<&str> {
21336            self.reported.as_ref().map(|field| field as _)
21337        }
21338        ///Sets `reported` with the provided value.
21339        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
21340            self.reported = Some(field.into().into());
21341        }
21342        ///Sets `reported` with the provided value.
21343        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
21344            self.set_reported(field.into());
21345            self
21346        }
21347        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
21348        pub fn reporters(&self) -> &[String] {
21349            &self.reporters
21350        }
21351        ///Returns a mutable reference to `reporters`.
21352        ///If the field is unset, it is first initialized with the default value.
21353        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
21354            &mut self.reporters
21355        }
21356        ///Sets `reporters` with the provided value.
21357        pub fn set_reporters(&mut self, field: Vec<String>) {
21358            self.reporters = field;
21359        }
21360        ///Sets `reporters` with the provided value.
21361        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
21362            self.set_reporters(field);
21363            self
21364        }
21365    }
21366    impl super::ValidatorSet {
21367        pub const fn const_default() -> Self {
21368            Self {
21369                total_stake: None,
21370                active_validators: Vec::new(),
21371                pending_active_validators: None,
21372                pending_removals: Vec::new(),
21373                staking_pool_mappings: None,
21374                inactive_validators: None,
21375                validator_candidates: None,
21376                at_risk_validators: std::collections::BTreeMap::new(),
21377                extra_fields: None,
21378            }
21379        }
21380        #[doc(hidden)]
21381        pub fn default_instance() -> &'static Self {
21382            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
21383            &DEFAULT
21384        }
21385        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21386        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
21387            self.total_stake.as_mut().map(|field| field as _)
21388        }
21389        ///Returns a mutable reference to `total_stake`.
21390        ///If the field is unset, it is first initialized with the default value.
21391        pub fn total_stake_mut(&mut self) -> &mut u64 {
21392            self.total_stake.get_or_insert_default()
21393        }
21394        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
21395        pub fn total_stake_opt(&self) -> Option<u64> {
21396            self.total_stake.as_ref().map(|field| *field)
21397        }
21398        ///Sets `total_stake` with the provided value.
21399        pub fn set_total_stake(&mut self, field: u64) {
21400            self.total_stake = Some(field);
21401        }
21402        ///Sets `total_stake` with the provided value.
21403        pub fn with_total_stake(mut self, field: u64) -> Self {
21404            self.set_total_stake(field);
21405            self
21406        }
21407        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
21408        pub fn active_validators(&self) -> &[super::Validator] {
21409            &self.active_validators
21410        }
21411        ///Returns a mutable reference to `active_validators`.
21412        ///If the field is unset, it is first initialized with the default value.
21413        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
21414            &mut self.active_validators
21415        }
21416        ///Sets `active_validators` with the provided value.
21417        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
21418            self.active_validators = field;
21419        }
21420        ///Sets `active_validators` with the provided value.
21421        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
21422            self.set_active_validators(field);
21423            self
21424        }
21425        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
21426        pub fn pending_active_validators(&self) -> &super::MoveTable {
21427            self.pending_active_validators
21428                .as_ref()
21429                .map(|field| field as _)
21430                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21431        }
21432        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21433        pub fn pending_active_validators_opt_mut(
21434            &mut self,
21435        ) -> Option<&mut super::MoveTable> {
21436            self.pending_active_validators.as_mut().map(|field| field as _)
21437        }
21438        ///Returns a mutable reference to `pending_active_validators`.
21439        ///If the field is unset, it is first initialized with the default value.
21440        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
21441            self.pending_active_validators.get_or_insert_default()
21442        }
21443        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
21444        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
21445            self.pending_active_validators.as_ref().map(|field| field as _)
21446        }
21447        ///Sets `pending_active_validators` with the provided value.
21448        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
21449            &mut self,
21450            field: T,
21451        ) {
21452            self.pending_active_validators = Some(field.into().into());
21453        }
21454        ///Sets `pending_active_validators` with the provided value.
21455        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
21456            mut self,
21457            field: T,
21458        ) -> Self {
21459            self.set_pending_active_validators(field.into());
21460            self
21461        }
21462        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
21463        pub fn pending_removals(&self) -> &[u64] {
21464            &self.pending_removals
21465        }
21466        ///Returns a mutable reference to `pending_removals`.
21467        ///If the field is unset, it is first initialized with the default value.
21468        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
21469            &mut self.pending_removals
21470        }
21471        ///Sets `pending_removals` with the provided value.
21472        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
21473            self.pending_removals = field;
21474        }
21475        ///Sets `pending_removals` with the provided value.
21476        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
21477            self.set_pending_removals(field);
21478            self
21479        }
21480        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
21481        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
21482            self.staking_pool_mappings
21483                .as_ref()
21484                .map(|field| field as _)
21485                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21486        }
21487        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21488        pub fn staking_pool_mappings_opt_mut(
21489            &mut self,
21490        ) -> Option<&mut super::MoveTable> {
21491            self.staking_pool_mappings.as_mut().map(|field| field as _)
21492        }
21493        ///Returns a mutable reference to `staking_pool_mappings`.
21494        ///If the field is unset, it is first initialized with the default value.
21495        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
21496            self.staking_pool_mappings.get_or_insert_default()
21497        }
21498        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
21499        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
21500            self.staking_pool_mappings.as_ref().map(|field| field as _)
21501        }
21502        ///Sets `staking_pool_mappings` with the provided value.
21503        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
21504            &mut self,
21505            field: T,
21506        ) {
21507            self.staking_pool_mappings = Some(field.into().into());
21508        }
21509        ///Sets `staking_pool_mappings` with the provided value.
21510        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
21511            mut self,
21512            field: T,
21513        ) -> Self {
21514            self.set_staking_pool_mappings(field.into());
21515            self
21516        }
21517        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
21518        pub fn inactive_validators(&self) -> &super::MoveTable {
21519            self.inactive_validators
21520                .as_ref()
21521                .map(|field| field as _)
21522                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21523        }
21524        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21525        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21526            self.inactive_validators.as_mut().map(|field| field as _)
21527        }
21528        ///Returns a mutable reference to `inactive_validators`.
21529        ///If the field is unset, it is first initialized with the default value.
21530        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
21531            self.inactive_validators.get_or_insert_default()
21532        }
21533        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
21534        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
21535            self.inactive_validators.as_ref().map(|field| field as _)
21536        }
21537        ///Sets `inactive_validators` with the provided value.
21538        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
21539            self.inactive_validators = Some(field.into().into());
21540        }
21541        ///Sets `inactive_validators` with the provided value.
21542        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
21543            mut self,
21544            field: T,
21545        ) -> Self {
21546            self.set_inactive_validators(field.into());
21547            self
21548        }
21549        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
21550        pub fn validator_candidates(&self) -> &super::MoveTable {
21551            self.validator_candidates
21552                .as_ref()
21553                .map(|field| field as _)
21554                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21555        }
21556        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21557        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21558            self.validator_candidates.as_mut().map(|field| field as _)
21559        }
21560        ///Returns a mutable reference to `validator_candidates`.
21561        ///If the field is unset, it is first initialized with the default value.
21562        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
21563            self.validator_candidates.get_or_insert_default()
21564        }
21565        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
21566        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
21567            self.validator_candidates.as_ref().map(|field| field as _)
21568        }
21569        ///Sets `validator_candidates` with the provided value.
21570        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
21571            self.validator_candidates = Some(field.into().into());
21572        }
21573        ///Sets `validator_candidates` with the provided value.
21574        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
21575            mut self,
21576            field: T,
21577        ) -> Self {
21578            self.set_validator_candidates(field.into());
21579            self
21580        }
21581        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
21582        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
21583            &self.at_risk_validators
21584        }
21585        ///Returns a mutable reference to `at_risk_validators`.
21586        ///If the field is unset, it is first initialized with the default value.
21587        pub fn at_risk_validators_mut(
21588            &mut self,
21589        ) -> &mut ::std::collections::BTreeMap<String, u64> {
21590            &mut self.at_risk_validators
21591        }
21592        ///Sets `at_risk_validators` with the provided value.
21593        pub fn set_at_risk_validators(
21594            &mut self,
21595            field: ::std::collections::BTreeMap<String, u64>,
21596        ) {
21597            self.at_risk_validators = field;
21598        }
21599        ///Sets `at_risk_validators` with the provided value.
21600        pub fn with_at_risk_validators(
21601            mut self,
21602            field: ::std::collections::BTreeMap<String, u64>,
21603        ) -> Self {
21604            self.set_at_risk_validators(field);
21605            self
21606        }
21607        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
21608        pub fn extra_fields(&self) -> &super::MoveTable {
21609            self.extra_fields
21610                .as_ref()
21611                .map(|field| field as _)
21612                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21613        }
21614        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21615        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21616            self.extra_fields.as_mut().map(|field| field as _)
21617        }
21618        ///Returns a mutable reference to `extra_fields`.
21619        ///If the field is unset, it is first initialized with the default value.
21620        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
21621            self.extra_fields.get_or_insert_default()
21622        }
21623        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
21624        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
21625            self.extra_fields.as_ref().map(|field| field as _)
21626        }
21627        ///Sets `extra_fields` with the provided value.
21628        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
21629            self.extra_fields = Some(field.into().into());
21630        }
21631        ///Sets `extra_fields` with the provided value.
21632        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
21633            self.set_extra_fields(field.into());
21634            self
21635        }
21636    }
21637    impl super::VariantDescriptor {
21638        pub const fn const_default() -> Self {
21639            Self {
21640                name: None,
21641                position: None,
21642                fields: Vec::new(),
21643            }
21644        }
21645        #[doc(hidden)]
21646        pub fn default_instance() -> &'static Self {
21647            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
21648            &DEFAULT
21649        }
21650        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21651        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
21652            self.name.as_mut().map(|field| field as _)
21653        }
21654        ///Returns a mutable reference to `name`.
21655        ///If the field is unset, it is first initialized with the default value.
21656        pub fn name_mut(&mut self) -> &mut String {
21657            self.name.get_or_insert_default()
21658        }
21659        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
21660        pub fn name_opt(&self) -> Option<&str> {
21661            self.name.as_ref().map(|field| field as _)
21662        }
21663        ///Sets `name` with the provided value.
21664        pub fn set_name<T: Into<String>>(&mut self, field: T) {
21665            self.name = Some(field.into().into());
21666        }
21667        ///Sets `name` with the provided value.
21668        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
21669            self.set_name(field.into());
21670            self
21671        }
21672        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21673        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
21674            self.position.as_mut().map(|field| field as _)
21675        }
21676        ///Returns a mutable reference to `position`.
21677        ///If the field is unset, it is first initialized with the default value.
21678        pub fn position_mut(&mut self) -> &mut u32 {
21679            self.position.get_or_insert_default()
21680        }
21681        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
21682        pub fn position_opt(&self) -> Option<u32> {
21683            self.position.as_ref().map(|field| *field)
21684        }
21685        ///Sets `position` with the provided value.
21686        pub fn set_position(&mut self, field: u32) {
21687            self.position = Some(field);
21688        }
21689        ///Sets `position` with the provided value.
21690        pub fn with_position(mut self, field: u32) -> Self {
21691            self.set_position(field);
21692            self
21693        }
21694        ///Returns the value of `fields`, or the default value if `fields` is unset.
21695        pub fn fields(&self) -> &[super::FieldDescriptor] {
21696            &self.fields
21697        }
21698        ///Returns a mutable reference to `fields`.
21699        ///If the field is unset, it is first initialized with the default value.
21700        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
21701            &mut self.fields
21702        }
21703        ///Sets `fields` with the provided value.
21704        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
21705            self.fields = field;
21706        }
21707        ///Sets `fields` with the provided value.
21708        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
21709            self.set_fields(field);
21710            self
21711        }
21712    }
21713    impl super::VerifySignatureRequest {
21714        pub const fn const_default() -> Self {
21715            Self {
21716                message: None,
21717                signature: None,
21718                address: None,
21719                jwks: Vec::new(),
21720                check_address_aliases: None,
21721            }
21722        }
21723        #[doc(hidden)]
21724        pub fn default_instance() -> &'static Self {
21725            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
21726            &DEFAULT
21727        }
21728        ///Returns the value of `message`, or the default value if `message` is unset.
21729        pub fn message(&self) -> &super::Bcs {
21730            self.message
21731                .as_ref()
21732                .map(|field| field as _)
21733                .unwrap_or_else(|| super::Bcs::default_instance() as _)
21734        }
21735        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21736        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
21737            self.message.as_mut().map(|field| field as _)
21738        }
21739        ///Returns a mutable reference to `message`.
21740        ///If the field is unset, it is first initialized with the default value.
21741        pub fn message_mut(&mut self) -> &mut super::Bcs {
21742            self.message.get_or_insert_default()
21743        }
21744        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
21745        pub fn message_opt(&self) -> Option<&super::Bcs> {
21746            self.message.as_ref().map(|field| field as _)
21747        }
21748        ///Sets `message` with the provided value.
21749        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
21750            self.message = Some(field.into().into());
21751        }
21752        ///Sets `message` with the provided value.
21753        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
21754            self.set_message(field.into());
21755            self
21756        }
21757        ///Returns the value of `signature`, or the default value if `signature` is unset.
21758        pub fn signature(&self) -> &super::UserSignature {
21759            self.signature
21760                .as_ref()
21761                .map(|field| field as _)
21762                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
21763        }
21764        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21765        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
21766            self.signature.as_mut().map(|field| field as _)
21767        }
21768        ///Returns a mutable reference to `signature`.
21769        ///If the field is unset, it is first initialized with the default value.
21770        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
21771            self.signature.get_or_insert_default()
21772        }
21773        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
21774        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
21775            self.signature.as_ref().map(|field| field as _)
21776        }
21777        ///Sets `signature` with the provided value.
21778        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
21779            self.signature = Some(field.into().into());
21780        }
21781        ///Sets `signature` with the provided value.
21782        pub fn with_signature<T: Into<super::UserSignature>>(
21783            mut self,
21784            field: T,
21785        ) -> Self {
21786            self.set_signature(field.into());
21787            self
21788        }
21789        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21790        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
21791            self.address.as_mut().map(|field| field as _)
21792        }
21793        ///Returns a mutable reference to `address`.
21794        ///If the field is unset, it is first initialized with the default value.
21795        pub fn address_mut(&mut self) -> &mut String {
21796            self.address.get_or_insert_default()
21797        }
21798        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
21799        pub fn address_opt(&self) -> Option<&str> {
21800            self.address.as_ref().map(|field| field as _)
21801        }
21802        ///Sets `address` with the provided value.
21803        pub fn set_address<T: Into<String>>(&mut self, field: T) {
21804            self.address = Some(field.into().into());
21805        }
21806        ///Sets `address` with the provided value.
21807        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
21808            self.set_address(field.into());
21809            self
21810        }
21811        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
21812        pub fn jwks(&self) -> &[super::ActiveJwk] {
21813            &self.jwks
21814        }
21815        ///Returns a mutable reference to `jwks`.
21816        ///If the field is unset, it is first initialized with the default value.
21817        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
21818            &mut self.jwks
21819        }
21820        ///Sets `jwks` with the provided value.
21821        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
21822            self.jwks = field;
21823        }
21824        ///Sets `jwks` with the provided value.
21825        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
21826            self.set_jwks(field);
21827            self
21828        }
21829        ///If `check_address_aliases` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21830        pub fn check_address_aliases_opt_mut(&mut self) -> Option<&mut bool> {
21831            self.check_address_aliases.as_mut().map(|field| field as _)
21832        }
21833        ///Returns a mutable reference to `check_address_aliases`.
21834        ///If the field is unset, it is first initialized with the default value.
21835        pub fn check_address_aliases_mut(&mut self) -> &mut bool {
21836            self.check_address_aliases.get_or_insert_default()
21837        }
21838        ///If `check_address_aliases` is set, returns [`Some`] with the value; otherwise returns [`None`].
21839        pub fn check_address_aliases_opt(&self) -> Option<bool> {
21840            self.check_address_aliases.as_ref().map(|field| *field)
21841        }
21842        ///Sets `check_address_aliases` with the provided value.
21843        pub fn set_check_address_aliases(&mut self, field: bool) {
21844            self.check_address_aliases = Some(field);
21845        }
21846        ///Sets `check_address_aliases` with the provided value.
21847        pub fn with_check_address_aliases(mut self, field: bool) -> Self {
21848            self.set_check_address_aliases(field);
21849            self
21850        }
21851    }
21852    impl super::VerifySignatureResponse {
21853        pub const fn const_default() -> Self {
21854            Self {
21855                is_valid: None,
21856                reason: None,
21857                address_aliases_checked: None,
21858            }
21859        }
21860        #[doc(hidden)]
21861        pub fn default_instance() -> &'static Self {
21862            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
21863            &DEFAULT
21864        }
21865        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21866        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
21867            self.is_valid.as_mut().map(|field| field as _)
21868        }
21869        ///Returns a mutable reference to `is_valid`.
21870        ///If the field is unset, it is first initialized with the default value.
21871        pub fn is_valid_mut(&mut self) -> &mut bool {
21872            self.is_valid.get_or_insert_default()
21873        }
21874        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
21875        pub fn is_valid_opt(&self) -> Option<bool> {
21876            self.is_valid.as_ref().map(|field| *field)
21877        }
21878        ///Sets `is_valid` with the provided value.
21879        pub fn set_is_valid(&mut self, field: bool) {
21880            self.is_valid = Some(field);
21881        }
21882        ///Sets `is_valid` with the provided value.
21883        pub fn with_is_valid(mut self, field: bool) -> Self {
21884            self.set_is_valid(field);
21885            self
21886        }
21887        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21888        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
21889            self.reason.as_mut().map(|field| field as _)
21890        }
21891        ///Returns a mutable reference to `reason`.
21892        ///If the field is unset, it is first initialized with the default value.
21893        pub fn reason_mut(&mut self) -> &mut String {
21894            self.reason.get_or_insert_default()
21895        }
21896        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
21897        pub fn reason_opt(&self) -> Option<&str> {
21898            self.reason.as_ref().map(|field| field as _)
21899        }
21900        ///Sets `reason` with the provided value.
21901        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
21902            self.reason = Some(field.into().into());
21903        }
21904        ///Sets `reason` with the provided value.
21905        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
21906            self.set_reason(field.into());
21907            self
21908        }
21909        ///If `address_aliases_checked` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21910        pub fn address_aliases_checked_opt_mut(&mut self) -> Option<&mut bool> {
21911            self.address_aliases_checked.as_mut().map(|field| field as _)
21912        }
21913        ///Returns a mutable reference to `address_aliases_checked`.
21914        ///If the field is unset, it is first initialized with the default value.
21915        pub fn address_aliases_checked_mut(&mut self) -> &mut bool {
21916            self.address_aliases_checked.get_or_insert_default()
21917        }
21918        ///If `address_aliases_checked` is set, returns [`Some`] with the value; otherwise returns [`None`].
21919        pub fn address_aliases_checked_opt(&self) -> Option<bool> {
21920            self.address_aliases_checked.as_ref().map(|field| *field)
21921        }
21922        ///Sets `address_aliases_checked` with the provided value.
21923        pub fn set_address_aliases_checked(&mut self, field: bool) {
21924            self.address_aliases_checked = Some(field);
21925        }
21926        ///Sets `address_aliases_checked` with the provided value.
21927        pub fn with_address_aliases_checked(mut self, field: bool) -> Self {
21928            self.set_address_aliases_checked(field);
21929            self
21930        }
21931    }
21932    impl super::VersionAssignment {
21933        pub const fn const_default() -> Self {
21934            Self {
21935                object_id: None,
21936                start_version: None,
21937                version: None,
21938            }
21939        }
21940        #[doc(hidden)]
21941        pub fn default_instance() -> &'static Self {
21942            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
21943            &DEFAULT
21944        }
21945        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21946        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
21947            self.object_id.as_mut().map(|field| field as _)
21948        }
21949        ///Returns a mutable reference to `object_id`.
21950        ///If the field is unset, it is first initialized with the default value.
21951        pub fn object_id_mut(&mut self) -> &mut String {
21952            self.object_id.get_or_insert_default()
21953        }
21954        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
21955        pub fn object_id_opt(&self) -> Option<&str> {
21956            self.object_id.as_ref().map(|field| field as _)
21957        }
21958        ///Sets `object_id` with the provided value.
21959        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
21960            self.object_id = Some(field.into().into());
21961        }
21962        ///Sets `object_id` with the provided value.
21963        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
21964            self.set_object_id(field.into());
21965            self
21966        }
21967        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21968        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
21969            self.start_version.as_mut().map(|field| field as _)
21970        }
21971        ///Returns a mutable reference to `start_version`.
21972        ///If the field is unset, it is first initialized with the default value.
21973        pub fn start_version_mut(&mut self) -> &mut u64 {
21974            self.start_version.get_or_insert_default()
21975        }
21976        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
21977        pub fn start_version_opt(&self) -> Option<u64> {
21978            self.start_version.as_ref().map(|field| *field)
21979        }
21980        ///Sets `start_version` with the provided value.
21981        pub fn set_start_version(&mut self, field: u64) {
21982            self.start_version = Some(field);
21983        }
21984        ///Sets `start_version` with the provided value.
21985        pub fn with_start_version(mut self, field: u64) -> Self {
21986            self.set_start_version(field);
21987            self
21988        }
21989        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
21990        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
21991            self.version.as_mut().map(|field| field as _)
21992        }
21993        ///Returns a mutable reference to `version`.
21994        ///If the field is unset, it is first initialized with the default value.
21995        pub fn version_mut(&mut self) -> &mut u64 {
21996            self.version.get_or_insert_default()
21997        }
21998        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
21999        pub fn version_opt(&self) -> Option<u64> {
22000            self.version.as_ref().map(|field| *field)
22001        }
22002        ///Sets `version` with the provided value.
22003        pub fn set_version(&mut self, field: u64) {
22004            self.version = Some(field);
22005        }
22006        ///Sets `version` with the provided value.
22007        pub fn with_version(mut self, field: u64) -> Self {
22008            self.set_version(field);
22009            self
22010        }
22011    }
22012    impl super::Watermark {
22013        pub const fn const_default() -> Self {
22014            Self {
22015                cursor: None,
22016                checkpoint: None,
22017                cursor_position: None,
22018            }
22019        }
22020        #[doc(hidden)]
22021        pub fn default_instance() -> &'static Self {
22022            static DEFAULT: super::Watermark = super::Watermark::const_default();
22023            &DEFAULT
22024        }
22025        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
22026        pub fn cursor_opt(&self) -> Option<&[u8]> {
22027            self.cursor.as_ref().map(|field| field as _)
22028        }
22029        ///Sets `cursor` with the provided value.
22030        pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
22031            self.cursor = Some(field.into().into());
22032        }
22033        ///Sets `cursor` with the provided value.
22034        pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
22035            self.set_cursor(field.into());
22036            self
22037        }
22038        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22039        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
22040            self.checkpoint.as_mut().map(|field| field as _)
22041        }
22042        ///Returns a mutable reference to `checkpoint`.
22043        ///If the field is unset, it is first initialized with the default value.
22044        pub fn checkpoint_mut(&mut self) -> &mut u64 {
22045            self.checkpoint.get_or_insert_default()
22046        }
22047        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
22048        pub fn checkpoint_opt(&self) -> Option<u64> {
22049            self.checkpoint.as_ref().map(|field| *field)
22050        }
22051        ///Sets `checkpoint` with the provided value.
22052        pub fn set_checkpoint(&mut self, field: u64) {
22053            self.checkpoint = Some(field);
22054        }
22055        ///Sets `checkpoint` with the provided value.
22056        pub fn with_checkpoint(mut self, field: u64) -> Self {
22057            self.set_checkpoint(field);
22058            self
22059        }
22060        ///Returns the value of `cursor_position`, or the default value if `cursor_position` is unset.
22061        pub fn cursor_position(&self) -> &super::LedgerPosition {
22062            self.cursor_position
22063                .as_ref()
22064                .map(|field| field as _)
22065                .unwrap_or_else(|| super::LedgerPosition::default_instance() as _)
22066        }
22067        ///If `cursor_position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22068        pub fn cursor_position_opt_mut(&mut self) -> Option<&mut super::LedgerPosition> {
22069            self.cursor_position.as_mut().map(|field| field as _)
22070        }
22071        ///Returns a mutable reference to `cursor_position`.
22072        ///If the field is unset, it is first initialized with the default value.
22073        pub fn cursor_position_mut(&mut self) -> &mut super::LedgerPosition {
22074            self.cursor_position.get_or_insert_default()
22075        }
22076        ///If `cursor_position` is set, returns [`Some`] with the value; otherwise returns [`None`].
22077        pub fn cursor_position_opt(&self) -> Option<&super::LedgerPosition> {
22078            self.cursor_position.as_ref().map(|field| field as _)
22079        }
22080        ///Sets `cursor_position` with the provided value.
22081        pub fn set_cursor_position<T: Into<super::LedgerPosition>>(&mut self, field: T) {
22082            self.cursor_position = Some(field.into().into());
22083        }
22084        ///Sets `cursor_position` with the provided value.
22085        pub fn with_cursor_position<T: Into<super::LedgerPosition>>(
22086            mut self,
22087            field: T,
22088        ) -> Self {
22089            self.set_cursor_position(field.into());
22090            self
22091        }
22092    }
22093    impl super::ZkLoginAuthenticator {
22094        pub const fn const_default() -> Self {
22095            Self {
22096                inputs: None,
22097                max_epoch: None,
22098                signature: None,
22099                public_identifier: None,
22100                jwk_id: None,
22101            }
22102        }
22103        #[doc(hidden)]
22104        pub fn default_instance() -> &'static Self {
22105            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
22106            &DEFAULT
22107        }
22108        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
22109        pub fn inputs(&self) -> &super::ZkLoginInputs {
22110            self.inputs
22111                .as_ref()
22112                .map(|field| field as _)
22113                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
22114        }
22115        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22116        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
22117            self.inputs.as_mut().map(|field| field as _)
22118        }
22119        ///Returns a mutable reference to `inputs`.
22120        ///If the field is unset, it is first initialized with the default value.
22121        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
22122            self.inputs.get_or_insert_default()
22123        }
22124        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
22125        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
22126            self.inputs.as_ref().map(|field| field as _)
22127        }
22128        ///Sets `inputs` with the provided value.
22129        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
22130            self.inputs = Some(field.into().into());
22131        }
22132        ///Sets `inputs` with the provided value.
22133        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
22134            self.set_inputs(field.into());
22135            self
22136        }
22137        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22138        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
22139            self.max_epoch.as_mut().map(|field| field as _)
22140        }
22141        ///Returns a mutable reference to `max_epoch`.
22142        ///If the field is unset, it is first initialized with the default value.
22143        pub fn max_epoch_mut(&mut self) -> &mut u64 {
22144            self.max_epoch.get_or_insert_default()
22145        }
22146        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
22147        pub fn max_epoch_opt(&self) -> Option<u64> {
22148            self.max_epoch.as_ref().map(|field| *field)
22149        }
22150        ///Sets `max_epoch` with the provided value.
22151        pub fn set_max_epoch(&mut self, field: u64) {
22152            self.max_epoch = Some(field);
22153        }
22154        ///Sets `max_epoch` with the provided value.
22155        pub fn with_max_epoch(mut self, field: u64) -> Self {
22156            self.set_max_epoch(field);
22157            self
22158        }
22159        ///Returns the value of `signature`, or the default value if `signature` is unset.
22160        pub fn signature(&self) -> &super::SimpleSignature {
22161            self.signature
22162                .as_ref()
22163                .map(|field| field as _)
22164                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
22165        }
22166        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22167        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
22168            self.signature.as_mut().map(|field| field as _)
22169        }
22170        ///Returns a mutable reference to `signature`.
22171        ///If the field is unset, it is first initialized with the default value.
22172        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
22173            self.signature.get_or_insert_default()
22174        }
22175        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
22176        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
22177            self.signature.as_ref().map(|field| field as _)
22178        }
22179        ///Sets `signature` with the provided value.
22180        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
22181            self.signature = Some(field.into().into());
22182        }
22183        ///Sets `signature` with the provided value.
22184        pub fn with_signature<T: Into<super::SimpleSignature>>(
22185            mut self,
22186            field: T,
22187        ) -> Self {
22188            self.set_signature(field.into());
22189            self
22190        }
22191        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
22192        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
22193            self.public_identifier
22194                .as_ref()
22195                .map(|field| field as _)
22196                .unwrap_or_else(|| {
22197                    super::ZkLoginPublicIdentifier::default_instance() as _
22198                })
22199        }
22200        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22201        pub fn public_identifier_opt_mut(
22202            &mut self,
22203        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
22204            self.public_identifier.as_mut().map(|field| field as _)
22205        }
22206        ///Returns a mutable reference to `public_identifier`.
22207        ///If the field is unset, it is first initialized with the default value.
22208        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
22209            self.public_identifier.get_or_insert_default()
22210        }
22211        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
22212        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
22213            self.public_identifier.as_ref().map(|field| field as _)
22214        }
22215        ///Sets `public_identifier` with the provided value.
22216        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
22217            &mut self,
22218            field: T,
22219        ) {
22220            self.public_identifier = Some(field.into().into());
22221        }
22222        ///Sets `public_identifier` with the provided value.
22223        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
22224            mut self,
22225            field: T,
22226        ) -> Self {
22227            self.set_public_identifier(field.into());
22228            self
22229        }
22230        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
22231        pub fn jwk_id(&self) -> &super::JwkId {
22232            self.jwk_id
22233                .as_ref()
22234                .map(|field| field as _)
22235                .unwrap_or_else(|| super::JwkId::default_instance() as _)
22236        }
22237        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22238        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
22239            self.jwk_id.as_mut().map(|field| field as _)
22240        }
22241        ///Returns a mutable reference to `jwk_id`.
22242        ///If the field is unset, it is first initialized with the default value.
22243        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
22244            self.jwk_id.get_or_insert_default()
22245        }
22246        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
22247        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
22248            self.jwk_id.as_ref().map(|field| field as _)
22249        }
22250        ///Sets `jwk_id` with the provided value.
22251        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
22252            self.jwk_id = Some(field.into().into());
22253        }
22254        ///Sets `jwk_id` with the provided value.
22255        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
22256            self.set_jwk_id(field.into());
22257            self
22258        }
22259    }
22260    impl super::ZkLoginClaim {
22261        pub const fn const_default() -> Self {
22262            Self {
22263                value: None,
22264                index_mod_4: None,
22265            }
22266        }
22267        #[doc(hidden)]
22268        pub fn default_instance() -> &'static Self {
22269            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
22270            &DEFAULT
22271        }
22272        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22273        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
22274            self.value.as_mut().map(|field| field as _)
22275        }
22276        ///Returns a mutable reference to `value`.
22277        ///If the field is unset, it is first initialized with the default value.
22278        pub fn value_mut(&mut self) -> &mut String {
22279            self.value.get_or_insert_default()
22280        }
22281        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
22282        pub fn value_opt(&self) -> Option<&str> {
22283            self.value.as_ref().map(|field| field as _)
22284        }
22285        ///Sets `value` with the provided value.
22286        pub fn set_value<T: Into<String>>(&mut self, field: T) {
22287            self.value = Some(field.into().into());
22288        }
22289        ///Sets `value` with the provided value.
22290        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
22291            self.set_value(field.into());
22292            self
22293        }
22294        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22295        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
22296            self.index_mod_4.as_mut().map(|field| field as _)
22297        }
22298        ///Returns a mutable reference to `index_mod_4`.
22299        ///If the field is unset, it is first initialized with the default value.
22300        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
22301            self.index_mod_4.get_or_insert_default()
22302        }
22303        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
22304        pub fn index_mod_4_opt(&self) -> Option<u32> {
22305            self.index_mod_4.as_ref().map(|field| *field)
22306        }
22307        ///Sets `index_mod_4` with the provided value.
22308        pub fn set_index_mod_4(&mut self, field: u32) {
22309            self.index_mod_4 = Some(field);
22310        }
22311        ///Sets `index_mod_4` with the provided value.
22312        pub fn with_index_mod_4(mut self, field: u32) -> Self {
22313            self.set_index_mod_4(field);
22314            self
22315        }
22316    }
22317    impl super::ZkLoginInputs {
22318        pub const fn const_default() -> Self {
22319            Self {
22320                proof_points: None,
22321                iss_base64_details: None,
22322                header_base64: None,
22323                address_seed: None,
22324            }
22325        }
22326        #[doc(hidden)]
22327        pub fn default_instance() -> &'static Self {
22328            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
22329            &DEFAULT
22330        }
22331        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
22332        pub fn proof_points(&self) -> &super::ZkLoginProof {
22333            self.proof_points
22334                .as_ref()
22335                .map(|field| field as _)
22336                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
22337        }
22338        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22339        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
22340            self.proof_points.as_mut().map(|field| field as _)
22341        }
22342        ///Returns a mutable reference to `proof_points`.
22343        ///If the field is unset, it is first initialized with the default value.
22344        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
22345            self.proof_points.get_or_insert_default()
22346        }
22347        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
22348        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
22349            self.proof_points.as_ref().map(|field| field as _)
22350        }
22351        ///Sets `proof_points` with the provided value.
22352        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
22353            self.proof_points = Some(field.into().into());
22354        }
22355        ///Sets `proof_points` with the provided value.
22356        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
22357            mut self,
22358            field: T,
22359        ) -> Self {
22360            self.set_proof_points(field.into());
22361            self
22362        }
22363        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
22364        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
22365            self.iss_base64_details
22366                .as_ref()
22367                .map(|field| field as _)
22368                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
22369        }
22370        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22371        pub fn iss_base64_details_opt_mut(
22372            &mut self,
22373        ) -> Option<&mut super::ZkLoginClaim> {
22374            self.iss_base64_details.as_mut().map(|field| field as _)
22375        }
22376        ///Returns a mutable reference to `iss_base64_details`.
22377        ///If the field is unset, it is first initialized with the default value.
22378        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
22379            self.iss_base64_details.get_or_insert_default()
22380        }
22381        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
22382        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
22383            self.iss_base64_details.as_ref().map(|field| field as _)
22384        }
22385        ///Sets `iss_base64_details` with the provided value.
22386        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
22387            &mut self,
22388            field: T,
22389        ) {
22390            self.iss_base64_details = Some(field.into().into());
22391        }
22392        ///Sets `iss_base64_details` with the provided value.
22393        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
22394            mut self,
22395            field: T,
22396        ) -> Self {
22397            self.set_iss_base64_details(field.into());
22398            self
22399        }
22400        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22401        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
22402            self.header_base64.as_mut().map(|field| field as _)
22403        }
22404        ///Returns a mutable reference to `header_base64`.
22405        ///If the field is unset, it is first initialized with the default value.
22406        pub fn header_base64_mut(&mut self) -> &mut String {
22407            self.header_base64.get_or_insert_default()
22408        }
22409        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
22410        pub fn header_base64_opt(&self) -> Option<&str> {
22411            self.header_base64.as_ref().map(|field| field as _)
22412        }
22413        ///Sets `header_base64` with the provided value.
22414        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
22415            self.header_base64 = Some(field.into().into());
22416        }
22417        ///Sets `header_base64` with the provided value.
22418        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
22419            self.set_header_base64(field.into());
22420            self
22421        }
22422        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22423        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
22424            self.address_seed.as_mut().map(|field| field as _)
22425        }
22426        ///Returns a mutable reference to `address_seed`.
22427        ///If the field is unset, it is first initialized with the default value.
22428        pub fn address_seed_mut(&mut self) -> &mut String {
22429            self.address_seed.get_or_insert_default()
22430        }
22431        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
22432        pub fn address_seed_opt(&self) -> Option<&str> {
22433            self.address_seed.as_ref().map(|field| field as _)
22434        }
22435        ///Sets `address_seed` with the provided value.
22436        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
22437            self.address_seed = Some(field.into().into());
22438        }
22439        ///Sets `address_seed` with the provided value.
22440        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
22441            self.set_address_seed(field.into());
22442            self
22443        }
22444    }
22445    impl super::ZkLoginProof {
22446        pub const fn const_default() -> Self {
22447            Self { a: None, b: None, c: None }
22448        }
22449        #[doc(hidden)]
22450        pub fn default_instance() -> &'static Self {
22451            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
22452            &DEFAULT
22453        }
22454        ///Returns the value of `a`, or the default value if `a` is unset.
22455        pub fn a(&self) -> &super::CircomG1 {
22456            self.a
22457                .as_ref()
22458                .map(|field| field as _)
22459                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
22460        }
22461        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22462        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
22463            self.a.as_mut().map(|field| field as _)
22464        }
22465        ///Returns a mutable reference to `a`.
22466        ///If the field is unset, it is first initialized with the default value.
22467        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
22468            self.a.get_or_insert_default()
22469        }
22470        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
22471        pub fn a_opt(&self) -> Option<&super::CircomG1> {
22472            self.a.as_ref().map(|field| field as _)
22473        }
22474        ///Sets `a` with the provided value.
22475        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
22476            self.a = Some(field.into().into());
22477        }
22478        ///Sets `a` with the provided value.
22479        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
22480            self.set_a(field.into());
22481            self
22482        }
22483        ///Returns the value of `b`, or the default value if `b` is unset.
22484        pub fn b(&self) -> &super::CircomG2 {
22485            self.b
22486                .as_ref()
22487                .map(|field| field as _)
22488                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
22489        }
22490        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22491        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
22492            self.b.as_mut().map(|field| field as _)
22493        }
22494        ///Returns a mutable reference to `b`.
22495        ///If the field is unset, it is first initialized with the default value.
22496        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
22497            self.b.get_or_insert_default()
22498        }
22499        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
22500        pub fn b_opt(&self) -> Option<&super::CircomG2> {
22501            self.b.as_ref().map(|field| field as _)
22502        }
22503        ///Sets `b` with the provided value.
22504        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
22505            self.b = Some(field.into().into());
22506        }
22507        ///Sets `b` with the provided value.
22508        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
22509            self.set_b(field.into());
22510            self
22511        }
22512        ///Returns the value of `c`, or the default value if `c` is unset.
22513        pub fn c(&self) -> &super::CircomG1 {
22514            self.c
22515                .as_ref()
22516                .map(|field| field as _)
22517                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
22518        }
22519        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22520        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
22521            self.c.as_mut().map(|field| field as _)
22522        }
22523        ///Returns a mutable reference to `c`.
22524        ///If the field is unset, it is first initialized with the default value.
22525        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
22526            self.c.get_or_insert_default()
22527        }
22528        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
22529        pub fn c_opt(&self) -> Option<&super::CircomG1> {
22530            self.c.as_ref().map(|field| field as _)
22531        }
22532        ///Sets `c` with the provided value.
22533        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
22534            self.c = Some(field.into().into());
22535        }
22536        ///Sets `c` with the provided value.
22537        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
22538            self.set_c(field.into());
22539            self
22540        }
22541    }
22542    impl super::ZkLoginPublicIdentifier {
22543        pub const fn const_default() -> Self {
22544            Self {
22545                iss: None,
22546                address_seed: None,
22547            }
22548        }
22549        #[doc(hidden)]
22550        pub fn default_instance() -> &'static Self {
22551            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
22552            &DEFAULT
22553        }
22554        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22555        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
22556            self.iss.as_mut().map(|field| field as _)
22557        }
22558        ///Returns a mutable reference to `iss`.
22559        ///If the field is unset, it is first initialized with the default value.
22560        pub fn iss_mut(&mut self) -> &mut String {
22561            self.iss.get_or_insert_default()
22562        }
22563        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
22564        pub fn iss_opt(&self) -> Option<&str> {
22565            self.iss.as_ref().map(|field| field as _)
22566        }
22567        ///Sets `iss` with the provided value.
22568        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
22569            self.iss = Some(field.into().into());
22570        }
22571        ///Sets `iss` with the provided value.
22572        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
22573            self.set_iss(field.into());
22574            self
22575        }
22576        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
22577        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
22578            self.address_seed.as_mut().map(|field| field as _)
22579        }
22580        ///Returns a mutable reference to `address_seed`.
22581        ///If the field is unset, it is first initialized with the default value.
22582        pub fn address_seed_mut(&mut self) -> &mut String {
22583            self.address_seed.get_or_insert_default()
22584        }
22585        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
22586        pub fn address_seed_opt(&self) -> Option<&str> {
22587            self.address_seed.as_ref().map(|field| field as _)
22588        }
22589        ///Sets `address_seed` with the provided value.
22590        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
22591            self.address_seed = Some(field.into().into());
22592        }
22593        ///Sets `address_seed` with the provided value.
22594        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
22595            self.set_address_seed(field.into());
22596            self
22597        }
22598    }
22599}